Memory allocation: Difference between revisions

no edit summary
(Added BBC BASIC)
No edit summary
Line 1:
{{task|Basic language learning}}
Show how to explicitly allocate and deallocate blocks of memory in your language. Show access to different types of memory (i.e., [[heap]], [[system stack|stack]], shared, foreign) if applicable.
 
=={{header|360 Assembly}}==
Storage Requests Managed by "GETMAIN" Supervisor Call (SVC 4)
<lang 360 Assembly>
LA 1,PLIST Point Reg 1 to SVC4 Parameter List
SVC 4 Issue GETMAIN SVC
LTR 15,15 Register 15 = 0?
BZ GOTSTG Yes: Got Storage
[...] No: Handle GETMAIN Failure
GOTSTG L 2,STG@ Load Reg (any Reg) with Addr of Aquired Stg
[...] Continue
STG@ DS A Area to Receive Address of Acquired Storage
PLIST EQU *
DC A(256) Number of Bytes Requested
DC A(STG@) Addr of Area to Recv Addr of Acquired Stg
DC X'0000' (Unconditional Request; Subpool 0)
</lang>
 
=={{header|Ada}}==