| popsmx | Index |
Description:
Pseudo Code:
Flags Affected:
| D | H | C | Z | N |
Possible Errors:
| tvmStackUnderflow | - | There were not enough bytes in the stack to get the I/O Port reference or the data short. |
| tvmStackIOErr | - | The write operation to the memory-mapped IO port is invalid. |
Example:
popsmx
Here the address for the aPortIICRead port (0x0001) is on top of the stack (as an unsigned short). The next unsigned short from the top is 0xA103 which is the data for the read operation. This tells the VM to read 0x03 bytes from an IIC device with an address of 0xA1. Popping the short into the aPortIICRead port begins the read operation. The read operation returns 0x23, 0x56, 0x45. This example is unusual because we are popping a value into a port to cause an IIC read which then puts data back onto the stack.
|
| |||||||||||||||||||||||||||||||||||||