Convert I/O (CIO)/OP=85

Format

OP AF BF A Syllable B Syllable

OP = 85

AF Unused and reserved. Can be specified as an indirect field length. A literal flag causes an invalid instruction fault (IEX=21).
BF Variant, which can be specified as an indirect field length. The following variant can be specified:

  • BF = 00 Convert Descriptor and Nail Memory Area
  • BF = 01 Convert Descriptor and do not Nail Memory Area

The use of other BF values causes an Invalid Instruction fault (IEX=26).

The A Syllable which represents the initial descriptor can be indexed, indirect, or extended. The final address controller must specify UN or cause an Invalid Instruction fault (IEX=03). When checking the initial descriptor, the B-address can be equal to or greater than the A-address.
The B Syllable which represents resultant descriptor can be indexed, indirect or extended. The final address controller must specify UN or cause an Invalid Instruction fault (IEX=03).

Note This instruction can only be executed with the Privileged Enable toggle set, or an Invalid Instruction fault (IEX=02) occurs.

Function

CIO converts the relative type of information provided in the initial descriptor to the format required by the resultant descriptor, which is a subset of a full IOCB.

The format of the initial descriptor is:

Information Digits
Task Number 00-03
Environment Number 04-09
Memory Area Number 10-11
A-Address 12-17
B-Address 18-23

The format of the resultant descriptor is:

Information Digits
Buffer Begin Address 00-09
Buffer Size 10-19
Buffer MAST Number 30-35
I/O Result Descriptor 76-113

Description

CIO examines the A- and B-addresses in the initial descriptor and checks that:

  • The addresses are even; otherwise, the overflow flag is set, the comparison flags are set to NULL, and the instruction is terminated.
  • The addresses do not contain undigits; otherwise, the overflow flag is set, the comparison flags are set to HIGH, and the instruction is terminated.
  • The B-address is greater than or equal to the A-address; otherwise, the overflow flag is set, the comparison flags are set to LOW, and the instruction is terminated.

If CIO does not detect any faults, the overflow flag is reset, and the difference between the A- and B-addresses in the initial descriptor is placed in the “buffer size” field of the resultant descriptor.

CIO locates and resolves the destination entry by:

In addition to the checks within the procedures, CIO checks that:

  • The MAT entry limit is greater than the base plus the B-address. If not, the overflow flag is set, the comparison flags are set to EQUAL, and the instruction is terminated.
  • The MAST number is decimal and that 40 times the MAST number is smaller than 1 million digits; otherwise, an invalid instruction fault (IEX=07) is reported.

If CIO detects no faults, the “buffer begin address” and the MAST number are written into their respective fields in the resultant descriptor.

If CIO detects that BF=01, the instruction is terminated.

If CIO detects that BF=00, the MAST entry associated with the I/O buffer memory area must be examined. The MAST number is an array subscript into the MAST that locates the MAST entry. CIO obtains exclusive access to the MAST entry and performs the following checks on the status digit field of the MAST entry:

  • If the inhibited I/O memory area flag is set, CIO sets the comparison flags to LOW, relinquishes rights to the MAST entry access, and terminates the instruction.
  • If the inhibited I/O memory area flag is reset and the “number of I/Os in process” field in the MAST entry overflows when incremented by one, CIO sets the comparison flags to HIGH, relinquishes rights to MAST entry access, and terminates the instruction.
  • If the inhibited I/O memory area flag is reset and the number of I/Os in process field in the MAST entry does not overflow when incremented by one, CIO sets the comparison flags to EQUAL, relinquishes rights to MAST entry access, and terminates the instruction.

Comparison Flags

The comparison flags are set if one of the following fault conditions is detected in the A or B addresses of the initial descriptor.

  • NULL if A or B are odd
  • HIGH if A or B contain undigits
  • LOW if A is greater than B
  • EQUAL If Base + B is greater than the limit of the memory area.

Also the comparison flags are set if the MAST entry associated with the I/O buffer is examined:

  • LOW if the inhibited I/O memory area bit is set
  • HIGH if the inhibited I/O memory area bit is reset and the number of I/O's in process field would overflow if incremented by one.
  • EQUAL if the inhibited I/O memory area bit is reset and the number of I/O's in process field would not overflow if incremented by one.

Overflow Flag

The overflow flag is set if one of the following fault conditions is detected in the A- or B-addresses:

  • A or B are odd
  • A or B contains undigits
  • A is greater than B
  • Base + B is greater than the limit of the memory area containing A and B.

Otherwise the overflow flag is reset.

instructions/cio.txt · Last modified: 2009/08/17 16:56 by scott
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki