Prev: E0C4 Up: Map Next: E0E5
E0DD: HL = -HL
Used by the routines at TOUCHING_KNIGHT and KNIGHT_DIRECTION.
Complements both bytes and adds one. Used by TOUCHING_KNIGHT and KNIGHT_DIRECTION.
Input
HL A number
Output
HL Its negative
A What was H complemented
NEGATE_HL E0DD LD A,L
E0DE CPL
E0DF LD L,A
E0E0 LD A,H
E0E1 CPL
E0E2 LD H,A
E0E3 INC HL
E0E4 RET
Prev: E0C4 Up: Map Next: E0E5