Download BIOS REFERENCE MANUAL - K-Team
Transcript
K-system
All information in this document
is preliminary and subject to change
tim_define_association(reference, general)
Define an association between a string and a general pointer.
This system call makes it possible to define an association between a 16 character string and a general
32-bit pointer. This allows a task to export high level references. For example, task 1 manages everything about the sensors; it can publish a pointer on a sensor table with a high level reference. All the
other tasks that need to work with sensors can obtain the sensor pointer via the global high level reference. The general table can contain 32 associations. An error is returned if the association table is full
before the system call.
Input (stacking order):
general
General pointer.
reference
Pointer on a 16 char (max.) string
terminated with null Ô\0Õ.
Output:
D0
0
Association created.
D0
-1
Association table full.
Call examples in assembler and C:
...
push.32
#{A6}+general
; general pointer
push.32
#R16^reference
; pointer on the reference
CALL_BIOS
tim_define_association,2
; execute the function
test.32
D0
;
jump,mi
R8^Error
; too many associations
int32
status;
static
char reference[] = ÒSensorsÓ;
uint32
*general;
...
status = tim_define_association(reference, general);
if (status < 0) return -1;
K-Team
http://www.k-team.com
[email protected]
May 25, 1999
39