qdosmsq:traps:trap_3:sova

Differences

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

Link to this comparison view

qdosmsq:traps:trap_3:sova [2009/03/02 17:20] (current)
george.gwilt created
Line 1: Line 1:
 +====== SD_SETMD/​IOW_SOVA ======
 +
 +This trap sets the character writing or plotting mode.
 +
 +^Call Parameters^^Return Parameters^^
 +|D0.B|$2C|D0.L|Error code.|
 +|D1.W|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 mode given in D1 is:
 +    * -1 ink XORed into the background.
 +    * 0 character background is strip colour; plotting is in ink colour.
 +    * 1 character background is transparent so it is not overwritten;​ plotting is in ink colour.
 +
 +===== Example =====
 +The example below shows how to use this trap call to make printing appear and then disappear. The mode is set to -1 then printing can be done. After a wait the printing is again done and it now disappears. It is assumed that A0 contains the channel ID.
 +
 +<​code>​
 +Setmd   ​moveq ​  #​-1,​d1 ​         ; Set XOR mode.
 +        moveq   #​-1,​d3 ​         ; Timeout.
 +        moveq   #​SD_SETMD,​d0 ​   ; $2C
 +        trap    #3              ; Set the mode
 +        tst.l   ​d0 ​             ; OK? . .
 +        bne     error ----> ​    ; . . no!
 +        bsr     ​print ​          ; Print something at 0,0
 +        bsr     ​wait ​           ; Wait for a bit.
 +        bsr     ​print ​          ; The printing disappears.
 +</​code>​
  
  • qdosmsq/traps/trap_3/sova.txt
  • Last modified: 2009/03/02 17:20
  • by george.gwilt