User guide
50
VTB USER GUIDE
ALLOC
Dynamic allocating of memory area.
Hardware NG35
Syntax
ALLOC (Long Mem) as long
Parameters
Mem Total amount of memory to be allacated
Return value:
<>0 Pointer to the allocated memory
0 Allocation error
Example
Pnt As *Char
N as Long
Pnt=Alloc(3000) ‘ Alloc 3000 byte of memory
FOR N=0 to N<3000
PUNT[N]=N
NEXT N
FREE
Frees the a memory area previously allocated with alloc.
Hardware NG35
Syntax
Free (Char *Pnt)
Parameters
Pnt Pointer to the memory to free
Example
Pnt As *Char
Pnt=Alloc(3000) ‘ Alloc 3000 bytes of memory
....
....
Free(pnt) ‘ Free the memory
SYSTEM_RESET
Executes a software RESET on the hardware.
Hardware All
Syntax
SYSTEM_RESET (Char mode)
Parameters
mode =0 Executes a normal RESET running the application
=1 Executes a RESET putting device in BOOT state