Section 11: Branching and Looping167
Keystrokes Display    
1
  14 1 _    
   
STO  +  01 
  13 STO + 01    
   
XEQ 
       
   
ALPHA DSE ALPHA 00
  16 DSE 00    
  The loop control number is stored in R00. The counter test value (fff) is zero and the increment value (cc) is 01. When iiiii reaches zero, the net line in the program is skipped. Until then, the program loops back to LBL 01.
g GTO 01 
  17 GTO 01    
  The end of the loop.
RCL 01
  18 RCL 01    
  Recalls the year.
g FIX
  19 FIX 0    
   
XEQ 
       
   
ALPHA PSE ALPHA 
  20 PSE    
  Pauses to display the year.
g FIX
  21 FIX 2    
   
RCL 02
  22 RCL 02    
  Recalls the final amount.
g GTO · · 
  00 REG 39    
   
Now run the program to find the amount in the savings account after 6 years; after 355 years. (This will take a couple of minutes to run, time enough to take a short break.)
Keystrokes Display    
PRGM 
  0.0000    
  Takes the HP-41C out of PRGM mode.
XEQ 
       
   
ALPHA GOTHAM ALPHA 
  YEARS?    
  The program prompts and stops for input.
R/S 
  1,630    
  After 6 years, in 1630, the account would have been worth $34.04.
 
  34.04    
 
XEQ 
       
   
ALPHA GOTHAM ALPHA 
  YEARS?    
   
355 R/S 
  1,979    
   
 
  2.31 10  
  After 355 years, in 1979, the account would be worth about $23.1 billion.
g CLX 
  0.00    
   
g FIX 4 
  0.0000    
  Returns to FIX 4.