Section 8: Program Editing141
By pressing R/S as the listing of CATALOG 1 was in progress, you could stop the listing and the calculator would be positioned to the label or END displayed. You could then press SST or BST to locate and position the calculator to the desired program in program memory.
The PACK function
For your convenience during editing sessions, the HP-41C inserts extra blank lines in your programs. These blank lines are invisible to you; you cannot see them in program memory. They are placed in your programs to assure that while you are inserting and deleting instructions, the calculator responds to your commands as quickly as possible.
There are several ways that the HP-41C automatically removes these extra lines when you are through editing. This is called ‘‘packing.’’ Following is a summary of the times that the HP-41C automatically packs program memory.
  1. Any time you execute CLP (clear program), program is packed.
  2. Any time you attempt to insert a line into a program when there is not enough room in program memory, program memory is packed. When the packing is complete, the calculator will display PACKING and you should reinput the desired line.
  3. When you press GTO · · program memory will be packed. If there is still not enough room in program memory to insert an END , the calculator will display TRY AGAIN . There is now not enough room in program memory for any more instructions and you should change the program memory allocation before you continue.
  4. Any time you attempt to assign an HP-41C function to a key using ASN , and there is not enough room in program memory for the HP-41C to record the assignment, program memory will be packed. When the pack is complete, the HP-41C will display TRY AGAIN and you should again press the keys necessary to assign the function to a key.
You can cause program memory to be packed at any time by executing the PACK function. ( PACK is not programmable.)
A typical pack will take a few seconds. During this time, the display will show PACKING . The result of packing memory is that the programs will run faster after packing.
  1. The following program calculates the time it takes an object to fall to earth when dropped from a given height. (Friction from the air is not taken into account.) When the program is initialized by keying in the height h in meters into the X-register and the program is executed, the time t in seconds the object takes to fall to earth is computed according to the formula:
t = √ (2h/9.8)