![]() |
Routines |
| Prev: E0C4 | Up: Map | Next: E0E5 |
|
Used by the routines at CheckPlayerCollision and FindDirectionToPlayer.
Makes HL negative.
|
||||||||||||
|
Invert both bytes, then add one.
|
||||||||||||
| NegateHL | E0DD | LD A,L | Invert the low byte. | |||||||||
| E0DE | CPL | |||||||||||
| E0DF | LD L,A | |||||||||||
| E0E0 | LD A,H | Invert the high byte. | ||||||||||
| E0E1 | CPL | |||||||||||
| E0E2 | LD H,A | |||||||||||
| E0E3 | INC HL | Add one. | ||||||||||
| E0E4 | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: E0C4 | Up: Map | Next: E0E5 |