QDOS Internals

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

User Tools

Site Tools


Table of Contents


This trap fetches a channel name. SQMS Only.

Call ParametersReturn Parameters
D0.B$06D0.LError code.
D2.WMaximum length of stringD2.LPreserved.
A0.LChannel IDA0.LPreserved.
A1.LPointer to bufferA1.LPreserved.


ERR_NOChannel not open.
ERR_BPBad parameter.
ERR_NINot implemented.


  • All registers not listed above are not used and are preserved.
  • D2.W must be at least 43 otherwise a "bad parameter" error will be signalled.
  • This routine appears not to work with RAM or DOS files when it gives a "not implemented" error.


This shows a channel name being set in a buffer.

; A0 contains the channel ID

get_name  lea     ans,a1      ; ans will hold the name
          moveq   #43,d2      ; Must be greater than 42
          moveq   #$06,d0     ; IOA_CNAM
          trap    #2          ; Fetch the name
          tst.l   d0          ; OK? . .
          bra     oops        ; . . no!

; Now the name should be in "ans" as a QDOS string.

ans       ds.b    43
qdosmsq/traps/trap_2/cnam.txt · Last modified: 2009/07/07 07:38 by norman