Prev: 44464 Up: Map Next: 44512
44502: 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 44502 PUSH DE Stash DE on the stack.
44503 EX DE,HL Move the number to DE.
44504 LD HL,0 HL=0.
44507 AND A Subtract the number from zero.
44508 SBC HL,DE
44510 POP DE Restore DE from the stack.
44511 RET Return.
View the equivalent code in;
Prev: 44464 Up: Map Next: 44512