This trap sends a byte to a channel.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | $05 | D0.L | Error code. |
D1.B | Byte to send. | D1.L | Corrupted. |
D3.W | Timeout | D3.L | Preserved. |
A0.L | Channel ID. | A0.L | Preserved. |
ERR_NC | Not complete. |
ERR_NO | Channel not open. |
ERR_DF | Drive full. |
ERR_OR | Out of range. |
The example below shows the use of this trap call to send LF to a file. It is assumed that the channel ID is in A0.
Prt_LF moveq #10,d1 ; LF moveq #-1,d3 ; Timeout moveq #IO_SBYTE,d0 ; $05 trap #3 ; Send the byte. tst.l d0 ; OK? . . bne error ----> ; . . no!