![]() |
Routines |
| Prev: D01B | Up: Map | Next: D02C |
|
Used by the routine at MoveObject.
Makes a signed number into a signed word.
|
||||||||||||
|
Put the number in the low byte. The high byte is zero, or FF if the number is negative.
|
||||||||||||
| SignExtendAToHL | D023 | LD L,A | Make the number the low byte. | |||||||||
| D024 | XOR A | Start with a high byte of zero. | ||||||||||
| D025 | BIT 7,L | Jump to SignExtendAToHL_Set if the number is not negative. | ||||||||||
| D027 | JR Z,SignExtendAToHL_Set | |||||||||||
| D029 | CPL | Make the high byte FF. | ||||||||||
| SignExtendAToHL_Set | D02A | LD H,A | Set the high byte. | |||||||||
| D02B | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: D01B | Up: Map | Next: D02C |