IO_FBYTE/IOB_FBYT
This trap fetches a byte from a channel.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | $01 | D0.L | Error code. |
D1.L | D1.B | Byte fetched. | |
D3.W | Timeout. | D3.L | Preserved. |
A0.L | Channel ID | A0.L | Preserved. |
A1.L | A1.L | Corrupted. |
Errors
ERR_NC | Not complete. |
ERR_NO | Channel not open. |
ERR_EF | End of file. |
Notes
- All registers not shown above are not used on entry and are preserved on exit.
- If a byte is fetched from the file it is put into D1.B.
Example
The example shows how to cause a delay of up to 100 ticks. It is assumed that the ID of a con channel is in A0.
delay moveq #100,d3 ; Timeout of 100 ticks. moveq #IO_FBYTE,d0 trap #3 ; Wait for up to 100 ticks.