Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
14
Task/Memory-allocation/Action-/memory-allocation.action
Normal file
14
Task/Memory-allocation/Action-/memory-allocation.action
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
CARD EndProg ;required for ALLOCATE.ACT
|
||||
|
||||
INCLUDE "D2:ALLOCATE.ACT" ;from the Action! Tool Kit. You must type 'SET EndProg=*' from the monitor after compiling, but before running this program!
|
||||
|
||||
PROC Main()
|
||||
DEFINE SIZE="1000"
|
||||
BYTE POINTER ptr
|
||||
|
||||
AllocInit(EndProg) ;required before any memory allocation
|
||||
|
||||
ptr=Alloc(SIZE) ;allocate memory of 1000 bytes
|
||||
SetBlock(ptr,SIZE,$FF) ;fill the memory block with $FF
|
||||
Free(ptr,SIZE) ;free allocated memory
|
||||
RETURN
|
||||
Loading…
Add table
Add a link
Reference in a new issue