QDOS Internals

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

User Tools

Site Tools



This trap fetches a byte from a channel.

Call ParametersReturn Parameters
D0.B$01D0.LError code.
D1.L D1.BByte fetched.
A0.LChannel ID A0.LPreserved.
A1.L A1.LCorrupted.


ERR_NCNot complete.
ERR_NOChannel not open.
ERR_EFEnd of file.


  • All registers not shown above are not used on entry and are preserved on exit.
  • If a byte is fetched from the file it is put into D1.B.


The example shows how to cause a delay of up to 100 ticks. It is assumed that the ID of a con channel is in A0.

delay   moveq   #100,d3         ; Timeout of 100 ticks.
        moveq   #IO_FBYTE,d0
        trap    #3              ; Wait for up to 100 ticks.
qdosmsq/traps/trap_3/fbyt.txt · Last modified: 2009/02/22 10:42 by george.gwilt