|
|
|
Section 14: Flags continue228
|
|
Example: DeDe Daldre has a program in her HP-41C that helps her
keep track of her reading speed. In her job with Dul Publishing, she works
as a proofreader and she has found that she must proof and mark corrections on one
complete line every five seconds in order to keep up with her daily quota of
5760 lines.
|
|
At the end of each line, without lifting her eyes from the page, she presses any
number key (usually 0). If more than about five seconds go by without her pressing
a number key again, the program sounds the audible tone. By placing
PSE (pause) instructions in the program, in
combination with the other program instructions, the HP-41C can time approximately
the five seconds required in this program. The following flowchart will help you
understand the flow of the program. The numeric data entry flag (flag 22) is used
to detect the press of a number key, and the audio enable flag (flag 26) is used
to control the audible tone.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Pause
Pause
Pause
Pause
Pause
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
No
|
|
No
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|