94

Section 8: Program Branching and Controls

Keystrokes

Display

 

 

 

l*1

010-45,20, 1

Recall multiplication with the

 

 

 

 

 

contents of R1 (N0), yielding Nt,

 

 

 

 

 

the mci of 131I remaining after t

 

 

 

 

 

days

´©

011-

42

31

Pauses to display Nt.

l2

012-

45

2

Recalls limit value to X-register.

T9

013-43,30, 9

x y ? Tests whether limit value

 

 

 

 

 

(in X) meets or exceeds Nt

 

 

 

 

 

(in Y).

n

014-

43

32

If so, program ends.

3

 

015-

 

3

If not, program continues.

O+0

016-44,40, 0

Adds 3 days to t in R0.

tA

017-

22

11

Go to ―A‖ and repeat execution

 

 

 

 

 

to find a new Nt from a new t.

Notice that without lines 012 to 014, the loop would run indefinitely (until stopped from the keyboard).

Let's run the program, using t1 = 2 days, N0 = 100 mci, and a limit value of half of N0 (50 mci).

Keystrokes

Display

¥

 

2 O0

2.0000

100 O1

100.0000

50 O2

50.0000

´A

2.0000

 

84.0896

5.0000

64.8420

8.0000

50.0000

50.0000

Run mode (display will vary).

t1.

N0.

Limit value for Nt.

t1.

N1.

t2.

N2.

t3.

N3.

Nt limit; program ends.