Description:
Pop the top byte off of the stack and divide the new top byte by the old top byte. Replace the new top byte with the remainder of the division result.
Pseudo Code:
stack[sp - 2] = stack[sp - 2] % stack[sp - 1]
sp = sp - 1
pc = pc + 1
Flags Affected:
Possible Errors:
Example:
modb
Before
| stack | | | top | | 1 | 0x05 | | 2 | 0x39 | | | bottom |
|
| | |
version: 1.0, build 80903
© Copyright 1994-2008 Acroname, Inc., Boulder, Colorado. All rights reserved.