HP 15c User Manual

Page 96

Advertising
background image

96

Section 8: Program Branching and Controls

Keystrokes

Display

| ¥

000-

Program mode.

´ bB

001-42,21,12

Start at "B" if payments to be
made at the beginning.

| " 0

002-43, 5, 0

Flag 0 clear (false); indicates
advance payments.

t 1

003- 22 1

Go to main routine.

´ b E

004-42,21,15

Start at "E" if payments to be
made at the end.

| F 0

005-43, 4, 0

Flag 0 set (true); indicates
payment in arrears.

´ b 1

006-42,21, 1

Routine 1 (main routine).

O1

007- 44 1

Stores i (from X-register).

1

008- 1

+

009- 40

(1+i).

®

010- 34

Puts n in X; (l + i) in Y.

011- 16

n.

y

012- 14

(1 + i)

-n

.

013- 16

– (1 + i)

-n

.

1

014- 1

+

015- 40

1 – (1 + i)

-n

.

l ÷ 1

016-45,10, 1

Recall division with R

1

(i) to

get [l– (l + i)

-n

]/i.

*

017- 20

Multiplies quantity by P.

| ? 0

018-43, 6, 0

Flag 0 set?

|

n

019- 43 32

End of calculation if flag 0 set
(for payments in arrears).

l 1

020- 45 1

Recalls i.

1

021- 1

+

022- 40

(1 + i).

*

023- 20

Multiplies quantity by final
term.

| n

024- 43 32

End of calculation if flag 0
clear.

Advertising