qdosmsq:traps:trap_3:spap

Differences

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

Link to this comparison view

qdosmsq:traps:trap_3:spap [2009/05/14 16:05] (current)
george.gwilt created
Line 1: Line 1:
 +====== SD_SETPA/​IOW_SPAP & SD_SETST/​IOW_SSTR & SD_SETIN/​IOW_SINK ======
 +
 +These traps set the colour of paper, strip and ink.
 +
 +^Trap^Value of D0.B^Action^
 +|SD_SETPA/​IOW_SPAP|$27|Sets paper colour|
 +|SD_SETST/​IOW_SSTR|$28|Sets strip colour|
 +|SD_SETIN/​IOW_SINK|$29|Sets ink colour|
 +
 +
 +^Call Parameters^^Return Parameters^^
 +|D0.B|See above|D0.L|Corrupted?​|
 +|D1.B|Colour |D1.L|Preserved.|
 +|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 paper colour is the background colour of a window used in clearing, scrolling and panning. The strip colour is used to highlight text. The ink colour is used for writing characters and printing graphics. Note that the S*BASIC "​PAPER"​ command sets both paper and strip to the same colour unlike SD_SETPAP/​IOW_SPAP which sets only the paper colour.
 +
 +===== Example =====
 +The example below shows the use of this trap call to set the ink to black. It is assumed that A0 contains the channel ID.
 +
 +<​code>​
 +ink     ​moveq ​  #​-1,​d3 ​         ; Timeout
 +        moveq   #​sd_setin,​d0 ​   ; $29
 +        moveq   #​0,​d1 ​          ; Black
 +        trap    #3              ; Set the ink
 +        tst.l   ​d0 ​             ; OK? . .
 +        bne     ​error ​          ; . . no!
 +</​code>​
 +
  
  • qdosmsq/traps/trap_3/spap.txt
  • Last modified: 2009/05/14 16:05
  • by george.gwilt