Description:
Pop the top short on the stack and write it to the memory-mapped IO port specified by the address parameter.
Data (2 bytes):
address: address value that is the memory location where the short popped from the stack is to be stored.
Pseudo Code:
port[program[pc + 1] : program[pc + 2]] = (short) stack[sp - 2]
sp = sp - 2
pc = pc + 3
Flags Affected:
Possible Errors:
Example:
popsm
Before
| stack | | | top | | 1 | 0x0B | | 2 | 0x17 | | 3 | 0xAA | | 4 | 0x32 | | 5 | 0x02 | | | bottom |
|
| | After
| stack | | | top | | 1 | 0xAA | | 2 | 0x32 | | 3 | 0x02 | | | bottom |
|
|
version: 1.0, build 80903
© Copyright 1994-2008 Acroname, Inc., Boulder, Colorado. All rights reserved.