qdosmsq:traps:trap_3:sbyt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

qdosmsq:traps:trap_3:sbyt [2009/03/02 16:47] (current)
george.gwilt created
Line 1: Line 1:
 +====== IO_SBYTE/​IOB_SBYT ======
 +
 +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.|
 +
 +===== Errors =====
 +
 +|ERR_NC|Not complete.|
 +|ERR_NO|Channel not open.|
 +|ERR_DF|Drive full.|
 +|ERR_OR|Out of range.|
 +
 +
 +===== Notes =====
 +  * All registers not shown above are not used on entry and are preserved on exit.
 +  ​
 +===== Example =====
 +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.
 +
 +<​code>​
 +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!
 +</​code>​
 +
  
  • qdosmsq/traps/trap_3/sbyt.txt
  • Last modified: 2009/03/02 16:47
  • by george.gwilt