Motorola M68CPU32BUG Instrukcja Użytkownika Strona 127

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 196
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 126
SYSTEM CALLS
M68CPU32BUG/D REV 1 5-13
.INSTAT Input Serial Port Status .INSTAT
5.2.9 Input Serial Port Status
SYSCALL .INSTAT
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 .INSTAT
Any characters?
BEQ.S EMPTY
If no, branch
SUBQ.L #2,A7
If yes, then read them in buffer
SYSCALL .INCHR
MOVE.B (A7)+,(A0)+
BRA.S LOOP
Check for more
EMPTY
Przeglądanie stron 126
1 2 ... 122 123 124 125 126 127 128 129 130 131 132 ... 195 196

Komentarze do niniejszej Instrukcji

Brak uwag