Description:
Pop the top byte on the stack and use it as a 1-based relative (from top) offset parameter. Pop the new top short off the stack and place it in the stack as specified by the offset parameter.
Pseudo Code:
offset = stack[sp - 1]
shortVal = (short) stack[sp - 3];
sp = sp - 3
stack[sp - offset] = shortVal;
pc = pc + 1
Flags Affected:
Possible Errors:
Example:
popssx
Before
| stack | | | top | | 1 | 0x02 | | 2 | 0x7F | | 3 | 0x03 | | 4 | 0xAA | | 5 | 0x32 | | 6 | 0xFF | | 7 | 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.