The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

HP-67's Flag 3 to HP-41/42 Equivalent
Message #1 Posted by Matt Agajanian on 28 Mar 2012, 6:17 p.m.

Hello all.

As the HP-67 sets flag 3 when data has been input from the keyboard prior to executing go to or subroutine instructions in RUN mode, I presume flags 22 and 23 on the 41 and 42 behave the same way or are they implemented differently?

Thanks.

      
Re: HP-67's Flag 3 to HP-41/42 Equivalent
Message #2 Posted by Luiz C. Vieira (Brazil) on 28 Mar 2012, 10:00 p.m.,
in response to message #1 by Matt Agajanian

Yep, you are correct.

Flag 22 detects number entry and flag 23 detects ALPHA entry.

(edited for this additional info)

Usage is the same as flag 3 in the HP67/97, considering that the HP41 also detects ALPHA entry. Any time a number key is pressed (or an ALPHA character is keyed in while in ALPHA mode), related flag is set. So, in a program you want to detect if any number or ALPHA entry occurred:

1 - clear related flag (CF 22 or CF 23)
2 - prepare for data entry (either STOP program execution or PauSE it)
Obs: yes, if the program execution is paused, the HP41 resets pause extension for each number key (or ALPHA key, if applicable) you press; once PauSE expires, program resumes and related flag is set according to data entry
3 - check if any data entry occurred with FS?C 22 (or FS?C 23 for ALPHA) which are closer to the HP67/97 functionality; alternately you can use FS? 22 (or FS?C 23) if you want flag status to remain so you can test it later. Although this is not the same that happens with the HP67/97 (flag 3 is cleared after each FS? 3 instruction), it is somehow an extra functionality.

Hope this helps.

Cheers.

Luiz (Brazil)

Edited: 29 Mar 2012, 1:03 a.m.

      
Re: HP-67's Flag 3 to HP-41/42 Equivalent
Message #3 Posted by Dieter on 29 Mar 2012, 6:29 a.m.,
in response to message #1 by Matt Agajanian

As Luiz mentioned, the Flag 3 equivalent on the '41 is Flag 22. That's why the "official" flag command translation table is as follows:

 HP-41 series equivalent for HP67/97
 Flag #    Set      Clear     Test
-------------------------------------
   0       SF 00    CF 00     FS? 00
   1       SF 01    CF 01     FS? 01
   2       SF 02    CF 02     FS?C 02
   3       SF 22    CF 22     FS?C 22
Please note that on the 67/97 both Flag 2 and 3 are cleared by their test commands, so "F? 2" actually is equivalent to "FS?C 02".

Dieter


[ Return to Index | Top of Index ]

Go back to the main exhibit hall