Description:
Pop the top short on the stack and place it in the stack as specified by the 1-based relative (from top) offset parameter.
Data (1 byte):
offset: offset into the stack where the short popped from the top of the stack is to be stored.
Pseudo Code:
offset = program[pc + 1];
shortVal = stack[sp - 2];
sp = sp - 2
stack[sp - offset] = shortVal;
pc = pc + 2
Flags Affected:
Possible Errors:
Example:
popss 2
Before
| stack | | | top | | 1 | 0x7F | | 2 | 0x03 | | 3 | 0xAA | | 4 | 0x32 | | 5 | 0xFF | | 6 | 0xFF | | | bottom |
|
| | After
| stack | | | top | | 1 | 0x7F | | 2 | 0x03 | | 3 | 0xFF | | 4 | 0xFF | | | bottom |
|
|
version: 1.0, build n.a.
© Copyright 1994-2012 Acroname, Inc., Boulder, Colorado. All rights reserved.