
24
in the menu.
Menu_AddSubItem_H
Use
Menu_AddSubItem_H
to increase the items and
functions in the menu and hiding setup.
Menu_Create
Use
Menu_Create
to provide the function of initialization
for a cycling menu.
Menu_Destory
Use
Menu_Destory
to remove the function of cycling
menu.
Menu_Run
Use
Menu_Run
to enable the cycling menu function
initialized by
Menu_Create
.
Menu_SetRent
Use
Menu_Setrent
to set the cycling menu function’s scroll
range.
◆
Memory Allocation and Management
Tfree
Purpose
:
Use the
Tfree
to release an allocated storage block to the pool of free
memory.
Syntax
:
void Tfree(void *mem_address);
Example call
:
Tfree(buffer);
Includes
:
#include
“
UserLib.h
"
Description
:
The
Tfree
function returns to the pool of free memory a blockof
memory that was allocated earlier by
Tmalloc
. The address of the
block is specified by the argument
mem_address
, which is a
pointer to the starting byte of the block. A NULL pointer argument
is ignored by
Tfree
.
Tmalloc
Purpose
:
Use
Tmalloc
to allocate memory for an array of a given number of
bytes, not exceeding 200KB.
Syntax
:
void *Tmalloc(size_t num_bytes);
Example call
:
buffer = (char *)Tmalloc(100*sizeof(char));
Includes
:
#include
“
UserLib.h
"
Description
:
The
Tmalloc
function allocates the number of bytes requested in the
argument
num_bytes
by calling internal Turbo C heap management
routines. The
Tmalloc
function will work properly for all memory
models.
Returns
:
The
Tmalloc
function returns a pointer that is the starting address of
the memory allocated. The allocated memory is properly aligned (the
Содержание PT-10
Страница 4: ...3 Keyboard Wedge 99 System 101 Power 102 Other 102 ...
Страница 13: ...12 6 Development Flow Chart ...
Страница 53: ...52 Returns No returns Notes ...