USBB17RX78K4-XXX NEC Electronics, USBB17RX78K4-XXX Datasheet - Page 37

no-image

USBB17RX78K4-XXX

Manufacturer Part Number
USBB17RX78K4-XXX
Description
78K/4 series realtime OS
Manufacturer
NEC Electronics
Datasheet
[C format]:
¡ ¡
¡
28
Description format used when the system call is issued in the C language and the data type of the parameter
Interface with C language
The high-level language supported in developing an application program is the C language. To issue a system
call in the C language, an assembler routine is necessary for interfacing with the OS. Therefore, the interface
routine corresponding to the system call used must be linked with each task. The format of the system call in the
C language is as follows:
The data type of each parameter and size are as follows.
Interface with assembler
To issue a system call in the assembler, set parameters to the relevant register of register bank 0 as follows.
Example of sta_tsk issuance (large model)
Example of sta_tsk issuance (small model)
The entry address of branch processing to branch to the system call is set to 40H. The branch processing module
takes out the entry address of each system call from a table created by the configurator and branches.
The configuration of the entry address storage table of system calls is as follows:
MOV
MOVW
MOV
CALLT
MOV
MOVW
CALLT
ret = <name>([<parameter>],...);
char
unsigned short
char*
ret
<name>
<parameter>
BNK0_REG1, #system call ID number
BNK0_REG2, #parameter 1 (lower 16 bits)
BNK0_REG3, #parameter 1 (higher 8 bits)
BNK0_REG1, #system call ID number
BNK0_REG2, #parameter 1
[40H]
[40H]
CHAPTER 4
: function return value (char type)
: system call name
: input parameter
: 8-bit integer
: 16-bit integer
: 24-bit pointer (large model)
16-bit pointer (small model)
RX78K/IV SYSTEM CALL LIST

Related parts for USBB17RX78K4-XXX