qdosmsq:traps:trap_3:suml

IOB_SUML & IO_SSTRG/IOB_SMUL

These traps send strings of bytes to a channel. IOB_SUML is SMSQ Only.

Call ParametersReturn Parameters
D0.B$06 or $07D0.LError code.
D1.L D1.LNumber of bytes sent.
D2.LNumber of bytes to send. D2.LPreserved.
D3.WTimeout.D3.LPreserved.
A0.LChannel ID. A0.LPreserved.
A1.LPointer to buffer.A1.LPointer to one byte after the last sent.
ERR_NCNot complete.
ERR_NOChannel not open.
ERR_DFDrive full.
  • 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.

The example below shows the use of this trap call to print a string to the channel whose ID is in A0.

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!
  • qdosmsq/traps/trap_3/suml.txt
  • Last modified: 2009/07/07 07:42
  • by norman