qdosmsq:traps:trap_3:sula

Differences

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

Link to this comparison view

qdosmsq:traps:trap_3:sula [2009/05/19 16:44] (current)
george.gwilt created
Line 1: Line 1:
 +====== SD_SETFL/​IOW_SFLA & SD_SETUL/​IOW_SULA ======
 +
 +
 +These traps set on or off flashing and underlining.
 +^Trap^Value in D0.B^Action^
 +|SD_SETFL/​IOW_SFLA|$2A|Set flash mode|
 +|SD_SETUL/​IOW_SULA|$2B|Set underline mode|
 +
 +^Call Parameters^^Return Parameters^^
 +|D0.B|See above|D0.L|Error return.|
 +|D1.B|Set mode |D1.L|Corrupted.|
 +|D3.W|Timeout |D3.L|Preserved.|
 +|A0.L|Channel ID |A0.L|Preserved.|
 +|A1.L| |A1.L|Corrupted.|
 +
 +===== Errors =====
 +
 +
 +|ERR_NC|Not complete.|
 +|ERR_NO|Channel not open.|
 +
 +
 +===== Notes =====
 +  * All registers not shown above are not used on entry and are preserved on exit.
 +  * The value in D1.B determines whether the mode is to be on or off. A value of 0 sets it off. Other values set it on.
 +
 +===== Example =====
 +The example below shows the use of this trap call to print As with the A underlined. It is assumed that A0 contains the window'​s ID.
 +
 +<​code>​
 +udline ​ moveq   #​-1,​d3 ​         ; Timeout
 +        moveq   #​1,​d1 ​          ; To set underlining on
 +        bsr     ​ul ​             ; Call sd_setul
 +        moveq   #"​A",​d1 ​        ; To print A
 +        bsr     ​prt ​            ; Call io_sbyte
 +        moveq   #​0,​d1 ​          ; To set underlining off
 +        bsr     ul
 +        moveq   #"​s",​d1 ​        ; To print s
 +        bsr     prt
 +
 +
 +ul      moveq   #​sd_setul,​d0
 +ul_1    trap    #3
 +        tst.l   ​d0 ​             ; OK? . .
 +        bne     ​error ​          ; . . no!
 +        rts
 +
 +prt     ​moveq ​  #​io_sbyte,​d0
 +        bra     ul_1
 +       
 +</​code>​
 +
  
  • qdosmsq/traps/trap_3/sula.txt
  • Last modified: 2009/05/19 16:44
  • by george.gwilt