qdosmsq:traps:trap_3:wpap

IOP_WPAP

This SMSQ/E trap sets the wallpaper.

Call ParametersReturn Parameters
D0.B$6BD0.LError code
D1.LColour code D1.LPreserved?
D2.LImage code D2.LPreserved?
D3.WTimeoutD3.LPreserved.
A0.LChannel ID A0.LPreserved.
A1.LAddress of ImageA1.LPreserved.
ERR_NCNot complete.
ERR_NOChannel not open.
  • All registers not shown above are not used on entry and are probably preserved on exit.
  • The code in D1.L has the following meanings:
    • -1 if the background colour is not to be changed.
    • 0 for a black background.
    • 1-255 for a stippled QL colour background.
    • n*256 for a 24 bit true colour background.
  • The code in D2.L is -1 for no background image and 0 for an image.
  • The address in A1 is only needed when D2 = 0. In this case the image to which A1 points must be a snapshot of the screen in the current mode and resolution.

The example below shows the use of this trap call to set a QL colour background. It is assumed that A0 contains the ID of a valid screen channel.

wallp   moveq   #-1,d3          ; Timeout
        moveq   #119,d1         ; A QL stipple colour
        moveq   #-1,d2          ; No image
        moveq   #iop_wpap,d0    ; $6B
        trap    #3              ; Set the background colour
        tst.l   d0              ; OK? . .
        bne     error           ; . . no!
  • qdosmsq/traps/trap_3/wpap.txt
  • Last modified: 2009/05/17 10:07
  • by george.gwilt