![]() |
Routines |
| Prev: D002 | Up: Map | Next: D023 |
|
Used by the routines at HandlePointer and CheckOverlap.
Makes HL negative.
|
||||||||||||
|
Invert both bytes, then add one.
|
||||||||||||
| NegateHL | D01B | LD A,L | Invert the low byte. | |||||||||
| D01C | CPL | |||||||||||
| D01D | LD L,A | |||||||||||
| D01E | LD A,H | Invert the high byte. | ||||||||||
| D01F | CPL | |||||||||||
| D020 | LD H,A | |||||||||||
| D021 | INC HL | Add one. | ||||||||||
| D022 | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: D002 | Up: Map | Next: D023 |