Prev: 13385 Up: Map Next: 13422
13418: THE 'ABSOLUTE MAGNITUDE' FUNCTION (offset 42)
The address of this routine is found in the table of addresses. It is called via the calculator literal 42 by the routines at CIRCLE, DRAW, CD_PRMS1, PRINT_FP, get_argt and cos. It is also called indirectly via fp_calc_2.
This subroutine performs its unary operation by ensuring that the sign bit of a floating-point number is reset.
'Small integers' have to be treated separately. Most of the work is shared with the 'unary minus' operation.
Input
HL Address of the first byte of the number
abs 13418 LD B,255 B is set to 255.
13420 JR NEG_TEST The jump is made into 'unary minus'.
Prev: 13385 Up: Map Next: 13422