QDOS Internals

Anything you never knew you wanted to know about the Sinclair QL.

User Tools

Site Tools


Table of Contents


These SMSQ/E traps set GD2 colour borders.

TrapValue of D0.BAction
IOW_BORP$53Set palette colour border
IOW_BORT$57Set true colour border
IOW_BORN$5BSet native colour border
Call ParametersReturn Parameters
D0.BSee aboveD0.LError return
D1.LColour D1.LCorrupted?
D2.LSize D2.LPreserved?
A0.LChannel ID A0.LPreserved.
A1.L A1.LCorrupted?


ERR_NCNot complete.
ERR_NOChannel not open.


  • All registers not shown above are not used on entry and are probably preserved on exit.
  • D1.L contains the colour right justified except for true colour which is left justified.
  • The most significant word of D2 contains the stipple key (-1 to 3).
  • The least significant word of D2 contains either -1 or the width.
  • A border with solid colour can be drawn with one call by setting -1 in the most significant word of D2 and the width in the least significant word.
  • A stippled border requires two calls. For the first a solid colour is drawn with D2.L = -1 and the colour in D1. For the second call the most significant word of D2 contains the stipple code, one of 0 to 3, the least significant word contains the border width and D1.L contains the second colour.


An example is shown here.

qdosmsq/traps/trap_3/borp.txt · Last modified: 2009/05/17 13:35 by george.gwilt