Description:
Pop the top byte off the stack and place it in the stack as specified by the 0-based absolute (from bottom) offset parameter.
Data (2 bytes):
offset: offset into the stack where the byte popped from the top of the stack is to be stored.
Pseudo Code:
stack[(short) program[pc + 1]] = stack[sp - 1]
sp = sp - 1
pc = pc + 3
Flags Affected:
Possible Errors:
Example:
popbsa 0x0004
Before
| stack | | | top | | 1 | 0x03 | | 2 | 0xAA | | 3 | 0x32 | | 4 | 0x02 | | 5 | 0x23 | | 6 | 0x68 | | 7 | 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.