The Parameters in a PAB


This section shows the structure of a PAB and gives a brief description of each PAB parameter. If you use the unformatted display mode to store the parameters, you must enter each as a hexadecimal value. If you use STB to store a parameter, you can enter the byrte value using the currently selected number base. The parameters are shown here as hex values.


Structure of a PAB

A PAB consists of 12 bytes that contain the various parameters. Each parameter is stored in a one-byte or two-byte field, which is filled as needed for your particular application.

Note:

In this illustration, LSB means the Least Significant Byte of a byte pair.
pabdef

Device Number

The device number specifies the device that you want to access. For example, the device number for the printer emulation is 12 (0C hex). To find the device number, refer to the instructions related to the supported device emulations in RPD-95.

Command Code

The command code specifies the I/O command you want to send to the device. For a list of command codes, refer to "Command Codes" in Appendix B of this guide.

Logical Unit Number (LUNO)

The LUNO field is used only for devices that may contain a number of separately addressable files on one physical unit. (This field is ignored for other types of devices.) For example, if you want to use two or more files located on a single device, you must assign a unique, non-zero unit number to each file.

Note:

The disk emulation in RPD-95 supports a maximum of 16 files in use at one time.

Record Number

The record number specifies a particular record in a file. This is used only with devices that allow you to access relative (random access) files. Other types of devices, such as printers, ignore this field.

Buffer Size

The buffer size specifies the maximum number of bytes that can be received from the device. (This does not limit the size of data you can send to the device.)

Length of Data

The length of data specifies the number of bytes of data being sent to or received from the device.
  • If you are sending data to the device, you must include this value in the PAB.
  • If you are not sending data, you must let the device know there is no data by specifying 0 as the data length.
  • If you are receiving data from the device, the device returns the value to the PAB. The value will be the number of bytes of data the device is sending.

Returned Status

The returned status byte is used to indicate to you whether the I/O command was successful. A returned status byte of zero indicates no error occurred. A returned status byte that is non-zero indicates that the CIO command was not successful.

Buffer Pointer

The buffer pointer contains the address of the first (highest-numbered, highest-memory address) byte in the data buffer. The data will be placed in the buffer starting at the highest address, and proceeding to the lowest address in the buffer.

Back