qdosmsq:traps:trap_3:rclr

SD_RECOL/IOW_RCLR

This trap recolours a window.

Call ParametersReturn Parameters
D0.B$26D0.LError code.
D1.LUnused.D1.LCorrupted.
D3.WTimeout.D3.LPreserved.
A0.LChannel ID.A0.LPreserved.
A1.LPointer to colour list.A1.LCorrupted.
ERR_NCNot complete.
ERR_NOChannel not open.
  • All registers not shown above are not used on entry and are preserved on exit.
  • The colour list to which A1.L points is eight bytes long containing the new colours. For mode 4 only bytes 0, 2, 4 and 6 need be specified.
  • The contents of the window are left unaltered. Only the colours are changed.
  • This trap does not work with GD2 colours.

The example below shows the use of this trap call to alter colours. It is assumed that the mode is 8 and that the ID of the window's channel is in A0. This will change black to green, blue to yellow and so on.

color   moveq   #$26,d0         ; SD_RECOL
        lea     newcol,a1       ; Colour list
        moveq   #-1,d3          ; Timeout
        trap    #3              ; Alter the colours
        ...                     

newcol  dc.b    4,6,1,7,0,3,5,2 ; New mode 8 colours for black, blue,
                                ; red etc.
  • qdosmsq/traps/trap_3/rclr.txt
  • Last modified: 2010/11/18 11:29
  • by george.gwilt