QDOS Internals

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

User Tools

Site Tools


Table of Contents


This trap sets or reads the display mode.

Call ParametersReturn Parameters
D1.B mode key D1.B display mode
D2.B type key D2.B display type


No errors are returned by this trap.


  • All registers not shown above except A0 and A4 are not used on entry and are preserved on exit.
  • If D1.B is -1 on entry, the mode is read and returned in D1.B. Otherwise the mode indicated in D1.B is set. The mode keys are:
    • 0 mode is 4 colour
    • 2 mode is 2 colour (SMS)
    • 8 mode is 8 colour
    • 12 mode is 16 colour (Thor XVI)
    • 32 mode is 64k colour (QPC2) [GD2 colours] - NB Return only
    • 33 mode is 64k colour Q40/60 etc [GD2 colours] - NB Return only
  • If D2.B is -1, the type of display is read and returned in D2.B. Otherwise the type indicated is set. The type keys are:
    • 0 monitor
    • 1 625-line TV
    • 2 525-line TV
qdosmsq/traps/trap_1/dmod.txt · Last modified: 2012/06/17 11:13 by george.gwilt