Section 7: Simple Programming119
Remember that the HP-41C will automatically insert an END for you when you press GTO · · .
When you press GTO · · to begin a new program, the new instructions are added after the last END instruction in program memory. The HP-41C makes program memory management so easy that you need not worry about where programs are positioned in program memory. Just press GTO · · before you begin each program and the positioning is done for you.
There is a permanent END located at the current bottom of program memory. It cannot be deleted and instructions cannot be inserted after it. For this reason, even though the basic HP-41C actually has 64 registers, a portion of one register is consumed by the permanent END , designated .END. when displayed. Thus you see 00 REG 46 when you press GTO · · the first time.
For the purpose of this book, a ‘‘program’’ or a ‘‘program file’’ is everything between (and including) the initial LBL for the program and the END of the program.
Clearing Programs
You can clear any program you have loaded into program memory by simply executing CLP (clear program) and specifying the program name.
CLP clears all instructions of a program including the program label and the program’s END instruction. For this reason, it is important to include END instructions in your programs. For example, if program memory looked like this ...
  01 LBLTTEST1    
  Program ‘‘TEST1.’’
  02 LOG    
  03 +    
  04 STO 10    
  05 RTN    
  06 LBLTTEST2    
  Program ‘‘TEST2.’’
  07 LOG    
  08 –    
  09 STO 11    
  10 RTN    
... and you cleared TEST1, all of the instructions from line 00 of TEST1 down to the first END (if one existed) would be cleared. But if you include END instructions, you can