Input Serial Port Status (.Instat) - Motorola M68CPU32BUG User Manual

Debug monitor
Table of Contents

Advertisement

.INSTAT
5.2.9
Input Serial Port Status
SYSCALL
TRAP CODE: $0001
Checks the default input port buffer for characters. The condition codes are set to indicate the
result of the operation.
Entry Conditions:
No arguments or stack allocation required
Exit Conditions:
Z (zero) = 1 if the receiver buffer is empty
EXAMPLE
LOOP
SYSCALL
BEQ.S
SUBQ.L
SYSCALL
MOVE.B
BRA.S
EMPTY
M68CPU32BUG/D REV 1
Input Serial Port Status
.INSTAT
.INSTAT
EMPTY
#2,A7
.INCHR
(A7)+,(A0)+
LOOP
Any characters?
If no, branch
If yes, then read them in buffer
Check for more
5-13
SYSTEM CALLS
.INSTAT

Advertisement

Table of Contents
loading

Table of Contents