| CHAPTER 4 |
| Using terminal commands |
APPLIES TO | A720B and A723, but see also the comments in “Remote” on |
| page 49. |
DESCRIPTION | A complex command acting upon the I/O ports of a device. |
PARAMETERS | A control byte specifying the command, the bit of the port the |
| command is acting on, and two |
| the control byte; for some commands, one or both of them may be |
| missing. However, if they are needed for a certain command but |
| not given, null values are implied. |
| The control byte’s significance is shown in Figure 14. |
47
Command Code
Port Number
Figure 14. Control Byte Layout
•The Port Number selects a the port that will be affected by the command. For the A720/A723, only 0000 and 0001 are accepted.
•The Command Code specifies the operation that will be applied to the selected port.
Table 5 shows the command codes definitions.
Table 5. Command Code Definitions
Code | Description | Parameters | Returns |
0000 | RDP – Read Data Port. This command reads the | None | A |
| whole |
| result (OK or ERROR). |
| Number has no significance for this command. |
|
|
|
|
|
|
0001 | RDDR – Read Data Direction Register. This com- | None | A |
| mand reads the whole |
| result (OK or ERROR). |
| Register and returns its value; the Port Number |
|
|
| has no significance for this command. |
|
|
|
|
|
|
0010 | CAI – Configure the port specified by Port Num- | The port number. | Result (OK or ERROR). |
| ber as input (acts upon the Data Direction Regis- |
|
|
| ter). |
|
|
|
|
|
|
0011 | CAO – Configure the port specified by Port | The port number. | Result (OK or ERROR). |
| Number as output (acts upon the Data Direction |
|
|
| Register). |
|
|