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. |
ERR_NC | No pending input. |
ERR_NO | Channel not found. |
ERR_RF | End of file. |
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.