This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
qdosmsq:traps:trap_3:suml [2009/02/24 15:43] george.gwilt created |
qdosmsq:traps:trap_3:suml [2021/01/30 16:45] (current) petri Add missing Trap #3 call to code example |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== IOB_SUML & IO_SSTRG/ | ||
+ | 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_SUML is the same as IO_SSTRG/ | ||
+ | * 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. | ||
+ | |||
+ | < | ||
+ | |||
+ | strg dc.w strg_e-strg-2 | ||
+ | ds.b "This is the string" | ||
+ | strg_e | ||
+ | ds.w 0 ; Set to even byte | ||
+ | |||
+ | |||
+ | print | ||
+ | move.w | ||
+ | move.w | ||
+ | moveq # | ||
+ | trap #3 ; Do it | ||
+ | tst.l | ||
+ | bne error ----> | ||
+ | </ |