linked lists in assembly 
Author Message
 linked lists in assembly

How do I find the first space in memory of a particular size not already
allocated?  What's analogous to the C++ command new?

Thanking you in advance

Adam Bright



Tue, 02 Jul 2002 03:00:00 GMT  
 linked lists in assembly
If I understand your question: Why not simply use GETMAIN and let the system
find that
area for you? (And if this is not what you want then you should not need to
bother about
such areas at all).
regards Sven


Quote:
> How do I find the first space in memory of a particular size not already
> allocated?  What's analogous to the C++ command new?

> Thanking you in advance

> Adam Bright



Tue, 02 Jul 2002 03:00:00 GMT  
 linked lists in assembly

Quote:

> How do I find the first space in memory of a particular size not already
> allocated?  What's analogous to the C++ command new?

> Thanking you in advance

> Adam Bright

In OS/390 assembler, there is no direct analogue to new.

There is a close analogue to malloc(), the GETMAIN service,
which causes the operating system to allocate memory for
you.

A C++ `new' does more than just allocate memory....

    - Dave Rivers -

--

Get your mainframe (370) `C' compiler at http://www.dignus.com



Tue, 02 Jul 2002 03:00:00 GMT  
 linked lists in assembly


Quote:

>> How do I find the first space in memory of a particular size not already
>> allocated?  What's analogous to the C++ command new?

>> Thanking you in advance

>> Adam Bright

>In OS/390 assembler, there is no direct analogue to new.

>There is a close analogue to malloc(), the GETMAIN service,
>which causes the operating system to allocate memory for
>you.

>A C++ `new' does more than just allocate memory....

so you might also look at ATTACH, LOAD and LINK. Be aware that the
upper case stuff people have been recommending to you will be found
under assembler "macros" and not machine insructions. A macro, if
you are not yet familiar with it, is a small compile-time program
(okay, assemble-time :) that expands into a list of instructions
and data, depending on what parameters you supply in the operands
field.

--
Alex Vrenios
Ph.D. Student
Computer Science Dept.



Tue, 02 Jul 2002 03:00:00 GMT  
 linked lists in assembly

Quote:

> >> How do I find the first space in memory of a particular size not
already
> >> allocated?  What's analogous to the C++ command new?

If  MCB PSP/Owner ID field (offs-1h) word is 0, then this is free block.
Or to use OS services.
--
  Ivar,  (c)RMSoft.

  http://my.tele2.ee/rmsoft


Tue, 02 Jul 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. linked lists in assembly

2. linked list in assembly langauge

3. Deallocating linked lists of linked lists

4. cool assembly links

5. Linking external assembly language module to C (pointers?)

6. Assembly basis: linking and memory management

7. assembly linking problem

8. Linking assembly procedures to 32bit c

9. Good Assembly Link for Newbies

10. problem on linking turbo C and assembly, again

11. problem on linking turbo C and assembly

12. Linking plain assembly and the /i (initialize all segments) option

 

 
Powered by phpBB® Forum Software