The Read and Write Commands


This section provides additional information for using the Read and Write commands.


Read Command

The Read command, code 03, reads the next record in an open device and then stores that data in the calculator's data buffer.

When you send a Read command, pay particular attention to two of the parameters in the PAB.
  • Record number
    If you are using a device that allows you to access relative files, be sure to include the correct record number. (If you are performing successive read operations, you must increment the record number each time.)

  • Data length
    Enter 0000 (because you are not sending any data to the device).

After the read operation is complete, the data length field of the PAB contains the number of bytes received from the device.

Write Command

The Write command, code 04, instructs the calculator to send the information in the data buffer to the device.

Before you send a Write command, be sure to place the applicable information into the data buffer. You should also pay particular attention to two of the parameters in the PAB.
  • Record number
    If you are using a device that allows you to access relative files, be sure to include the correct record number. If you are performing successive Write operations, you must increment the record number each time. For Write commands to a device where records do not apply, such as a printer, you can use 0000.

  • Data length
    Enter the number of bytes of data you are sending to the device.


Back