96 Section 8: Program Branching and Controls
Start at "B" if payments to be
made at the beginning.
Flag 0 clear (false); indicates
advance payments.
Start at "E" if payments to be
made at the end.
Flag 0 set (true); indicates
payment in arrears.
Routine 1 (main routine).
Stores i (from X-register).
Puts n in X; (l + i) in Y.
Recall division with R
1
(i) to
get [lîš± (l + i)
-n
]/i.
Multiplies quantity by P.
End of calculation if flag 0 set
(for payments in arrears).
Multiplies quantity by final
term.
End of calculation if flag 0
clear.