qdosmsq:traps:trap_3:suml

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
qdosmsq:traps:trap_3:suml [2009/07/07 07:41]
norman Changed a few SMSQ only routines to be more specific that the don't work on QDOS.
qdosmsq:traps:trap_3:suml [2009/07/07 07:42] (current)
norman
Line 1: Line 1:
 +====== IOB_SUML & IO_SSTRG/IOB_SMUL ======
  
 +These traps send strings of bytes to a channel. **IOB_SUML is SMSQ Only.**
 +
 +^Call Parameters^^Return Parameters^^
 +|D0.B|$06 or $07|D0.L|Error code.|
 +|D1.L| |D1.L|Number of bytes sent.|
 +|D2.L|Number of bytes to send. |D2.L|Preserved.|
 +|D3.W|Timeout.|D3.L|Preserved.|
 +|A0.L|Channel ID. |A0.L|Preserved.|
 +|A1.L|Pointer to buffer.|A1.L|Pointer to one byte after the last sent.|
 +
 +===== Errors =====
 +
 +|ERR_NC|Not complete.|
 +|ERR_NO|Channel not open.|
 +|ERR_DF|Drive full.|
 +
 +
 +===== Notes =====
 +  * All registers not shown above are not used on entry and are preserved on exit.
 +  * D0.B is $06 for IOB_SUML and $07 for IO_SSTRG/IOB_SMUL.
 +  * IOB_SUML is the same as IO_SSTRG/IOB_SMUL except that there is no translation of the characters.
 +  * If the output is to a CON or SCR channel LF is generated when the character to be printed is at the right hand end of the window.
 +
 +===== Example =====
 +The example below shows the use of this trap call to print a string to the channel whose ID is in A0.
 +
 +<code>
 +
 +strg    dc.w    strg_e-strg-2     ; Length of string
 +        ds.b    "This is the string"
 +strg_e  ds.b    0
 +        ds.w    0                 ; Set to even byte
 +
 +
 +print   lea     strg,a1
 +        move.w  (a1)+,d2          ; Number of characters
 +        move.w  #-1,d3            ; Timeout
 +        moveq   #FS_SSTRG,d0      ; Send (with translation)
 +        tst.l   d0                ; OK? . .
 +        bne     error ---->       ; . . no!
 +</code>
  • qdosmsq/traps/trap_3/suml.txt
  • Last modified: 2009/07/07 07:42
  • by norman