::.. I/O Request Vector ..::

I/O-Request Vector (IY-Vector)

I/O-Request Vector (IY-Vector)

I/O-Request Vector (Details)
Byte-
offset
Field Explanation
0 Logical Unit Number Logical Unit Number when calling the central RIO I/O call. Based on the current logical assignment the OS redirects the call to the appropriate device driver.
In the RIO-OS, the units 1, 2 and 3 are preset with the logical functions Console input (CONIN) Console output (CONOUT) and volume output (SYSLST).
The Logical Unit Nmber is ignored when calling a low-level driver outside of the RIO-OS (The drivers PCON and FLOPPY in the PROM).
1 Request Code ? Operation code, it specifies the desired I/O operation.
2, 3 Data Transfer Address Memory address from/to which the data transfer begins.
The buffer must be large enough to accommodate the number of bytes contained in the data length field.
4, 5 Data Length Number of bytes to be transferred, either read or written.
Upon completion, the device driver replaces this field by the actual number of bytes transferred during the operation.
6, 7 Completion Return Address The 16bit address at which the program should be continued after completion of the request.
If the device driver is called with the option for IMMEDIATE RETURN (Bit 0=1 in the request code), it returns the control to the calling program as soon as possible. The driver then works interrupt driven in the background. When the operation is finished, the last interrupt service routine jumps to the Completion Return Address. The routine the driver jumps to may not change any register and must be terminated with a RET instruction (no RETI instruction!). The calling program must, as long as the operation is not completed, no change data in the request vector or in the data buffer.
If RETURN ON COMPLETION is required (Bit 0=0 in the request code), the field is ignored and the driver returns to the calling programm only after completion.
8, 9 Error Return Address Alternative return address in case of faulty execution.
If not equal to zero (0000), the address is used as the return address from the device driver in the event of occurrence of an error. The routine the driver jumps to in this case must be terminated with a RET instruction and must be neutral (PUSH and POP all used registers).
10 Completion Code ? The completion code is set by the device driver and informs the calling program about the completion of the request and any errors encountered.
11, 12 Supplemental Parameter Information Some drivers and request codes require more parameters than the base vector provides.
Depending on the driver and request code, this field contains either an additional 2 bytes parameter or a pointer (16bit address) to a memory area used to store the additional information.