Description:
Push a byte from the stack as specified by the 1-based relative (from top) offset parameter and push it onto the top of the stack.
Data (1 byte):
byte: byte value that represents the offset from the top of the stack stack to the value being pushed.
Pseudo Code:
offset = program[pc + 1];
byteVal = stack[sp - offset];
stack[sp] = byteVal;
sp = sp + 1
pc = pc + 2
Flags Affected:
Possible Errors:
Example:
pushsb 3
Before
| stack | | | top | | 1 | 0x80 | | 2 | 0x00 | | 3 | 0xAA | | 4 | 0x32 | | 5 | 0x02 | | | bottom |
|
| | After
| stack | | | top | | 1 | 0xAA | | 2 | 0x80 | | 3 | 0x00 | | 4 | 0xAA | | 5 | 0x32 | | 6 | 0x02 | | | bottom |
|
|
version: 1.0, build n.a.
© Copyright 1994-2012 Acroname, Inc., Boulder, Colorado. All rights reserved.