HP Forums
HP-67's Flag 3 to HP-41/42 Equivalent - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: HP-67's Flag 3 to HP-41/42 Equivalent (/thread-215859.html)

HP-67's Flag 3 to HP-41/42 Equivalent - Matt Agajanian - 03-28-2012

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?


Re: HP-67's Flag 3 to HP-41/42 Equivalent - Luiz C. Vieira (Brazil) - 03-28-2012

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.


Luiz (Brazil)

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

Re: HP-67's Flag 3 to HP-41/42 Equivalent - Dieter - 03-29-2012

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".