22
CHAPTER 3 Overview of the Standard I/O Library
3.2
Incorporating the Standard I/O Driver
When using the standard I/O library, you must develop your own code (I/O driver) for
the target system. The driver inputs and outputs individual characters using the actual
hardware.
■
Incorporating the standard I/O driver
Follow the specifications listed below when creating an I/O driver.
❍
Input driver interface
❍
Output driver interface
Programs in the standard I/O library do not issue system calls for exclusive control or
waiting on events. If required, issue system calls from the program that calls the function
or from the I/O driver.
Item
Description
Input
None
Output
AL: Input character code
In case of an error, return EOF (-1).
Registration method
Store the entry address of the input driver (24-bit
address) in the four bytes commencing from
label “_stdin”.
Register saving
Save all except the AL and AH registers and T,
N, Z, V, and C.
Item
Description
Input
@sp+4 (2 bytes) Output character code
Output
AL: Output character code
In case of an error, return EOF (-1).
Registration method
Store the entry address of the output driver (24-
bit address) in the four bytes commencing from
label "_stdout".
Register saving
Save all except the AL and AH registers and T,
N, Z, V, and C.
*
Содержание F2MC-16L Series
Страница 2: ... ...
Страница 4: ... ...
Страница 10: ...vi ...
Страница 12: ...viii ...
Страница 44: ...32 CHAPTER 4 Program Reference for the Standard I O Library ...
Страница 53: ...41 APPENDIX B Running the Sample System Figure Be Project Member List ...
Страница 54: ...42 APPENDIX Figure Bf Set Configuration File Dialog Box ...
Страница 64: ...52 APPENDIX Figure Cb Sample System Memory Map Continued ...
Страница 65: ...53 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Страница 68: ... ...