Section 7: Simple Programming116
an overlay, or if the function is a standard HP-41C function, place its corresponding label in place of an overlay. When the calculator is in USER mode, simply put the overlay in place. Notice also that blank sticky-back labels are provided so you can write on them and stick them in place on an overlay.
The reassigned keys remain reassigned in USER mode until you clear the corresponding programs from program memory or reassign the key location again. For example, CIRCLE will remain assigned to the LN key location until you clear CIRCLE from program memory or reassign the LN key again.
Program Memory
You may remember from section 5 that program memory and storage registers both store information in the calculator’s memory. Memory can be defined for use either as program memory or storage registers. When a portion on memory is defined for use as a program memory, the calculator stores the program information in these registers. A single, complete operation stored into program memory is called an instruction or line.
What Are Instructions and Lines?
The HP-41C has been designed so that you need not worry about program memory structure—all you need to do is key in your program instructions—the HP-41C takes care of the memory, automatically. If you find that you need to know the relationship between instructions and program memory, appendix D lists all HP-41C instructions and the byte requirements of each, as well as a brief explanation of how program memory is structured.
An instruction or line in a program is a series of keystrokes that make up one complete operation in a program. Each complete instruction is given a line number. Line numbers are what appear in the display when you load a program. Depending on the kind of instructions keyed in, you can store up to seven instructions in each program memory register. But again, you need not be concerned with the details of program memory because the HP-41C takes care of them for you.
Instructions consist of a single function and all of the inputs necessary to complete the operation. Complete numbers in a program are treated as single instructions and take up only one line (e.g., 124.57 is one line). Examples of instructions are COS , FIX 6 and TONE 3. COS alone is a complete instruction because it performs a single operation and does not require additional input or data. But FIX and TONE alone are not complete instructions. Since FIX and TONE both require number inputs to complete the operation, their instructions are not complete until the number is included. FIX 4 and TONE 8 are examples of complete operations.