| Routines

12303: THE 'SUBTRACTION' OPERATION (offset 3)

Used by the routine at compare. The address of this routine is found in the table of addresses. It is called via the calculator literal 3 by the routines at BEEP, NEXT_LOOP, CIRCLE, DRAW, CD_PRMS1, S_RND, PRINT_FP, series, n_mod_m, int, exp, ln, get_argt, cos, sin, atn, asn and acs. It is also called indirectly via fp_calc_2. This subroutine simply changes the sign of the subtrahend and carries on into addition. Note that HL points to the minuend and DE points to the subtrahend. (See addition for more details.)
Input
DE | Address of the first byte of the subtrahend
HL | Address of the first byte of the minuend
subtract | 12303 | EX DE,HL | Exchange the pointers.
| 12304 | CALL negate | Change the sign of the subtrahend.
| 12307 | EX DE,HL | Exchange the pointers back and continue into addition.