QDOS Internals

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

User Tools

Site Tools



These traps answer enquiries about languages. In addition SMS_LSET sets the language.

Call ParametersReturn Parameters
D0.B$31 or $32D0.LCorrupted?
D1.LLanguage code/0.D1.LLanguage code.
D2.LCar registration/0.D2.LCar registration.


No errors are returned by this trap.


  • All registers not shown above are not used on entry and are preserved on exit.
  • If D1.L is non zero it is treated as a country dialling code and the corresponding car registration code is returned in D2.L. If D1.L is zero and D2.L is non zero the dialling code corresponding to the car registration in D2.L is returned in D1.L. If both D1.L and D2.L are zero the values for the current language are returned in D1.L and D2.L.
  • The four byte car registration code consists of upper case letters padded to the right by spaces. Thus the value for the UK is "GBss", where 's' stands for space.
  • If no value can be found the default language is used.
  • For SMS_LSET after the values in D1.L and D2.L have been determined that language is set.


The example below shows how to obtain the car registration for Germany. Note that in this case D2.L does not need to be set since it will be overwritten by the requested registration code, which will be "Dsss", 's' standing for space.

        moveq   #49,d1          ; Dialling code for Germany.
        moveq   #31,d0          ; SMS_LENQ.
        trap    #1              ; Get registration in D2.L
qdosmsq/traps/trap_1/lenq.txt · Last modified: 2010/11/02 10:37 by george.gwilt