Prev: ADB0 Up: Map Next: ADE0
ADD6: Negate HL
Used by the routine at Set_Up_Line.
Makes HL negative by subtracting it from zero. DE is not changed.
Input
HL Number
Output
HL Zero less the number
NegateHL ADD6 PUSH DE Stash DE on the stack.
ADD7 EX DE,HL Move the number to DE.
ADD8 LD HL,$0000 HL=00.
ADDB AND A Subtract the number from zero.
ADDC SBC HL,DE
ADDE POP DE Restore DE from the stack.
ADDF RET Return.
View the equivalent code in;
Prev: ADB0 Up: Map Next: ADE0