Description:
Convert the top short on the stack into a byte by chopping off the high byte. The stack shrinks by one byte and the Carry flag is set if the short value is out of the byte range (like an overflow).
Pseudo Code:
(byte)stack[sp - 2] = byte((short)stack[sp - 2])
sp = sp - 1
Flags Affected:
Possible Errors:
Example:
convsb
Before
| stack | | | top | | 1 | 0xF4 | | 2 | 0x73 | | | bottom |
|
| | |
version: 1.0, build n.a.
© Copyright 1994-2012 Acroname, Inc., Boulder, Colorado. All rights reserved.