IO_PEND/IOB_TEST
This trap tests for pending input.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | $00 | D0.L | Error code. |
D1.L | D1.L | Corrupted. | |
D3.W | Timeout. | D3.L | Preserved. |
A0.L | Channel ID. | A0.L | Preserved. |
A1.L | A1.L | Corrupted. |
Errors
ERR_NC | No pending input. |
ERR_NO | Channel not found. |
ERR_RF | End of file. |
Notes
- All registers not shown above are not used on entry and are preserved on exit.
- If D0.L is zero there is data waiting to be read. It is assumed that the channel ID is in A0.L
Example
The example below shows the use of this trap to test for input pending on the channel whose ID is in A0.L.
test moveq #0,d0 ; IO_PEND trap #3 ; See if there's any input. bne.s none ; No input ... ; Input the data.