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 |
00 | Open - Prepares a peripheral device for use. |
01 | Close - Terminates the use of a device. |
03 | Read - Reads a record from a device and stores it in a data buffer. |
04 | Write - Sends the data stored in the data buffer to a device. |
06 | Delete - Deletes a file from a mass-storage device. (You must place the name of the file in the data buffer.) |
0C | Verify - Verifies that a record was read or written correctly. (This command applies only to a mass storage device.) |
0D | Format - Formats the storage medium in a mass-storage device. |
FF | Reset - 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