Description:
Pop N bytes off of the stack and throw them away. The data is lost and no flags are altered with this operation.
Data (1 byte):
unsigned byte: Single byte value desgnating how many bytes to pop. The maximum is therefore 255 bytes.
Pseudo Code:
byteVal = program[pc + 1]
sp = sp - byteVal
pc = pc + 2
Flags Affected:
Possible Errors:
Example:
popn 5
Before
| stack | | | top | | 1 | 0x0B | | 2 | 0x17 | | 3 | 0xAA | | 4 | 0x32 | | 5 | 0x02 | | 6 | 0x23 | | 7 | 0x68 | | 8 | 0x26 | | | bottom |
|
| | After
| stack | | | top | | 1 | 0x23 | | 2 | 0x68 | | 3 | 0x26 | | | bottom |
|
|
version: 1.0, build n.a.
© Copyright 1994-2012 Acroname, Inc., Boulder, Colorado. All rights reserved.