qdosmsq:vectors:ssq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
qdosmsq:vectors:ssq [2011/05/04 10:28]
george.gwilt Complete the redefinition
qdosmsq:vectors:ssq [2011/05/04 10:30] (current)
george.gwilt Correct some links
Line 1: Line 1:
 +====== IO_SERQ/IOU_SSQ - Vector $E8======
 +This vector can be used in a [[qdosmsq:memory:sdrives|simple device driver]] to deal with queues.
 +
 +^Call Parameters^^Return Parameters^^
 +|D0.L|Trap #3 value|D0.L|Error code.|
 +|D1.L|IOSS value.|D1.L|IOSS value.|
 +|D2.L|IOSS value.|D2.L|IOSS value.|
 +|D3.L|IOSS value.|D3.L|IOSS value.|
 +|A0.L|Channel ID. |A0.L|Preserved.|
 +|A1.L|IOSS value.|A1.L|IOSS value.|
 +|A2.L|Unused |A2.L|Corrupted.|
 +|A3.L|Unused |A3.L|Corrupted.|
 +|A6.L|System variables address |A6.L|Preserved.|
 +
 +===== Errors =====
 +
 +
 +|ERR_BP|Wrong Trap #3 code|
 +|ERR_NC|Queue full (for input) or empty (for output)|
 +
 +===== Notes =====
 +  * 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 [[ssio|IO_SERIO]] with [[setq|IO_QTEST]], [[setq|IO_QOUT]] and [[setq|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.
 +    * [[qdosmsq:traps:trap_3:test|IO_PEND]]
 +    * [[qdosmsq:traps:trap_3:fbyt|IO_FBYTE]]
 +    * [[qdosmsq:traps:trap_3:flin|IO_FLINE]]
 +    * [[qdosmsq:traps:trap_3:flin|IO_FSTRG]]
 +    * [[qdosmsq:traps:trap_3:sbyt|IO_SBYTE]]
 +    * [[qdosmsq:traps:trap_3:suml|IO_SSTRG]]
 +    * [[qdosmsq:traps:trap_3:shdr|FS_HEADS]]
 +    * [[qdosmsq:traps:trap_3:rhdr|FS_HEADR]]
 +    * [[qdosmsq:traps:trap_3:load|FS_LOAD]]
 +    * [[qdosmsq:traps:trap_3:save|FS_SAVE]]
 +  * **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