Prev: 3004 Up: Map Next: 3014
300F: THE 'SUBTRACTION' OPERATION (offset +03)
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 +03 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
Output
subtract 300F EX DE,HL Exchange the pointers.
3010 CALL negate Change the sign of the subtrahend.
3013 EX DE,HL Exchange the pointers back and continue into addition.
Prev: 3004 Up: Map Next: 3014