Download BIOS REFERENCE MANUAL - K-Team
Transcript
K-system
All information in this document
is preliminary and subject to change
com_receive_byte()
Receive one byte via the active channel.
This system call looks for the reception buffer of the active channel if one byte is available.
Input (stacking order):
Output:
D0
+16'000000nn
nn = byte.
D0
-1
Buffer empty.
D0
-4
Hardware error.
Call examples in assembler and C:
...
CALL_COM
com_receive_byte,0
; execute the function
test.32
D0
;
jump,mi
R8^Error
; channel error
move.8
D0,{A6}+aByte
; a character
int32
status;
uint8
aByte;
...
status = com_receive_byte();
if (status < 0) return status;
aByte = (uint8)status;
K-Team
http://www.k-team.com
info@k-team.com
May 25, 1999
22