QDOS Internals

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

User Tools

Site Tools


Table of Contents


This trap returns the pointer to a message.

Call ParametersReturn Parameters
A1.LMessage code.A1.LPointer to message.


No errors are returned by this trap.


  • All registers not shown above are not used on entry and are preserved on exit.
  • A message group is a set of messages such as error messages or months of the year. To find the pointer to the Rth message in the Gth group the code in A1.L should be set as the negated value of G*2^7 + R-1.
  • A1 can be set to the actual address of a message with the MSB set. In that case the address with the top bit cleared is returned. (Why would anyone want to do that?)


The example below shows the use of this trap call to obtain the address of the second message in the third message table.

        moveq   #2,d0           ; For the third message table
        lsl.l   #7,d0           ; Multiply by 2^7
        addq.w  #2,d0           ; For the second message
        neg.w   d0              ; Negate it
        movea.w d0,a1           ; Set A1
        moveq   #$34,d0         ; SMS_MPTR
        trap    #1              ; Set pointer to A1.L
qdosmsq/traps/trap_1/mptr.txt · Last modified: 2010/11/01 16:20 by george.gwilt