QDOS Internals

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

User Tools

Site Tools


IO_SERQ/IOU_SSQ - Vector $E8

This vector can be used in a simple device driver to deal with queues.

Call ParametersReturn Parameters
D0.LTrap #3 valueD0.LError code.
D1.LIOSS value.D1.LIOSS value.
D2.LIOSS value.D2.LIOSS value.
D3.LIOSS value.D3.LIOSS value.
A0.LChannel ID. A0.LPreserved.
A1.LIOSS value.A1.LIOSS value.
A2.LUnused A2.LCorrupted.
A3.LUnused A3.LCorrupted.
A6.LSystem variables address A6.LPreserved.


ERR_BPWrong Trap #3 code
ERR_NCQueue full (for input) or empty (for output)


  • All registers not shown above are not used on entry and are preserved on exit.
  • Must be called in supervisor mode only.
  • This vector can be used as the IO routine in the device driver for a queue. It makes use of IO_SERIO with IO_QTEST, IO_QOUT and IO_QIN as the three fundamental routines.
  • When the channel block is set, by the OPEN routine, the 7th and 8th long words must point to the queues for input and output respectively. The two pointers could be the same, of course.
  • It is expected that this vector will be used to provide communication between tasks. Thus one task could open a channel to the queue for entering data and a second task could open a channel to the same queue to extract data from it. Attempts to add items to a full queue or extract data from an empty one result in a Not Complete error. This causes the operating system to retry the operation until completion. Thus one task requesting data from a queue initially empty will have its request satisfied as soon as another task puts data into the queue.
  • The only values allowed in D0 are for the ten IOSS values shown below. Other values give the error bad parameter.
  • Warning 1 - In pre SMSQ/E roms this vector can work up to a point if the same task provides input to the queue and also extracts data from it. But there is trouble if a queue becomes too full for input or is empty when output is requested. In this case the error Not Complete produced by IO_SERQ causes the Trap #3 routine to be called again and again until completion - which is never.
  • Warning 2 - In SMSQ/E up to version 3.13 the vector contains a fault. Until SMSQ/E is corrected DO NOT USE THE VECTOR.
qdosmsq/vectors/ssq.txt · Last modified: 2011/05/04 10:30 by george.gwilt