|
Section 10: Programming with ALPHA Strings154
|
|
Now run the LOG1 program to find the log of 12. Notice how the program
first prompts you for the number, then labels the output.
|
|
|
|
Data labeling can also be accomplished by recalling (using
ARCL ) the ALPHA string from a register, and
the result from the X-register (also using ARCL ).
|
|
Program Status
|
|
To detect the status of your executing program, you can place ALPHA
strings in strategic places in your programs. When the string is
displayed momentarily, you know exactly how far execution has
progressed.
|
|
Prompting for ALPHA Strings
|
|
You can prompt for the input of ALPHA information just like you
would for numbers. Using the AON
(ALPHA on) and AOFF (ALPHA off)
functions, you can even control the mode the calculator is set to when the
program stops for input.
|
|
AON places the HP-41C into ALPHA mode and
AOFF takes the calculator out of ALPHA mode.
|
|
Clearing the Display
|
|
To clear the contents of the display at any time during a running program, simply
key in CLD (clear display) as a line in the
program. This clears the display and then displays the X-register, or the
ALPHA register (if the calculator is in ALPHA mode).
|
|
Using ASHF (ALPHA Shift)
|
|
ASHF is a handy HP-41C function that shifts the
contents of the ALPHA register to the left by six characters. Manually or in
program, when you wish to store a long ALPHA string into several storage
registers, ASHF makes the task simple. (Remember,
each data storage register can hold up to six ALPHA characters.) When
ASHF is executed, the left-most six characters in the
ALPHA register are shifted off to the left and are lost. The remaining
characters in the ALPHA register all shift to the left by six positions.
|