Command 2107: Acquires the status of the specified memory I/O port in bytes
Acquires the status of the specified memory I/O port.
Each port contains 8 memory bits.
Command Syntax
| bit | Name | Description | |
|---|---|---|---|
| Parameter 1 | 15 | byteportNumber | Specifies the byte port of the memory I/O. |
| 14 | |||
| | | |||
| 1 | |||
| 0 |
Response Syntax
| bit | Name | Description | |
|---|---|---|---|
| Response 1 | 15 | reserved | Returns “0”. |
| | | |||
| 8 | |||
| 7 | returnValue | Returns the integer from 0 to 255. The return value is 8 bits, with each bit corresponding to 1 memory I/O bit. | |
| 6 | |||
| 5 | |||
| 4 | |||
| 3 | |||
| 2 | |||
| 1 | |||
| 0 |
Description
By using the command, you can check values of eight memory I/O bits at the same time.
Since eight channels can be checked at a time, the return values are integers ranging from 0-255. See the chart below to check the correspondence of the integer return values and each memory I/O bit.
Memory I/O Bit Result (Using Port #0)
| Return Value | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|
| 1 | off | off | off | off | off | off | off | on |
| 5 | off | off | off | off | off | on | on | on |
| 15 | off | off | off | off | on | on | on | on |
| 255 | on | on | on | on | on | on | on | on |
Memory I/O Bit Result (Using Port #31)
| Return Value | 255 | 254 | 253 | 252 | 251 | 250 | 249 | 248 |
|---|---|---|---|---|---|---|---|---|
| 3 | off | off | off | off | off | off | on | on |
| 7 | off | off | off | off | off | on | on | on |
| 32 | off | off | on | off | off | off | off | off |
| 255 | on | on | on | on | on | on | on | on |
Example
When acquiring the status of Port #0.
The status of Port #0 is 32.
| Command | Response |
| 083BH 0000H | 083BH 0010H |