Description:
Pop the top short off the stack and use it as a 0-based absolute (from bottom) offset parameter. Pop the new top byte off the stack and place it in the stack as specified by the offset parameter.
Pseudo Code:
absIndex = (short) stack[sp - 2]
byteVal = stack[sp - 3]
stack[absIndex] = byteVal
sp = sp - 3
pc = pc + 1
Flags Affected:
Possible Errors:
Example:
popbsax
Before
| stack | | | top | | 1 | 0x03 | | 2 | 0x00 | | 3 | 0x03 | | 4 | 0xAA | | 5 | 0x32 | | 6 | 0x02 | | 7 | 0x23 | | 8 | 0x68 | | 9 | 0x26 | | | bottom |
|
| | After
| stack | | | top | | 1 | 0xAA | | 2 | 0x32 | | 3 | 0x03 | | 4 | 0x23 | | 5 | 0x68 | | 6 | 0x26 | | | bottom |
|
|
version: 1.0, build n.a.
© Copyright 1994-2012 Acroname, Inc., Boulder, Colorado. All rights reserved.