Command Codes


Command codes specify the type of I/O command you want to send to a device. Not all devices, however, support all commands. If you are using a printer, for example, commands such as Read and Delete are invalid. To determine the I/O commands that apply to your device, refer to the device manual.


Commonly Used Commands

The following table lists the most commonly-used I/O commands and shows the hexadecimal code for each one. Some of these commands are discussed in more detail in this appendix.>


Hex Code

Command



00Open - Prepares a peripheral device for use.
01Close - Terminates the use of a device.
03Read - Reads a record from a device and stores it in a data buffer.
04Write - Sends the data stored in the data buffer to a device.
06Delete - Deletes a file from a mass-storage device. (You must place the name of the file in the data buffer.)
0CVerify - Verifies that a record was read or written correctly. (This command applies only to a mass storage device.)
0DFormat - Formats the storage medium in a mass-storage device.
FFReset - Closes any open files on the specified device and then resets and closes that device. (If you specify a device number of 00, the calculator closes all open files and resets all devices.)


Back