Hewlett Packard HP 97

Version Française
WikipédiA



Desktop calculator with card reader and thermal printer.

Specifications Precision Thermal printer Card reader Standard Pac Commented example


A good desktop calculator, light with a battery that makes it portable.

Great features:

  • Real numbers with 10 digits precision.
  • 26 registers (0-9, S0-S9, A-E, I)
  • 224 steps for programming.
    • functions requiring several keys are merged into one signle step.
    • Direct and indirect addressing.
    • Lot of tests for conditional branching.
    • 10 subroutines you can cal directly with A-E keys.
  • magnetic card reader
    • read/write programs and data.
    • Usable at run time.
  • Thermal printer with alphanumeric listings.
  • Chargeable battery.
  • place to insert your card with reminders of the actions of the A-E keys.


The selectors:
  • ON/OFF to power up the machine. All memory is lost when powered down.
  • MAN/TRACE/NORM to set the printer behaviour.
  • PRGM/RUN for programming or running.
Precision

Forensic

Precision test on scientific functions, what is computed is:
arcsin(arccos(arctan(tan(cos(sin(9))))))
in degrees.

Result: 9.000417403.

The expected answer is 9 !
Hebdogiciel

LBL A
20 STO I
2
LBL a SQR DSZ I GTO a
20 STO I X<>Y
LBL b X² DSZ I GTO b
RTN
Result: 1.999897829

The expected answer is 2 !


Thermal printer

According to the MAN/TRACE/NORM selector, the printer has different behaviours.

The mode "MAN" only outputs what the user asks for from the keyboard or from the program.

In the paragraph Commented example, you can see the alphanumeric capabilities of the printer when listing a program.
The mode "NORM" prints every action keyed in by the user. To print a result, you must explicitly use Printx, what was done for the las line here under.

The mode "TRACE" prints every action and every result.

Card reader

According to the PRGM/RUN selector, the card reader can load or save programs.

In mode "RUN" the program is read from the card when you insert it.

When set in mode "PRGM", the computer saves the whole program from memory to the card.

If there are more than 112 steps to save, the display Crd asks you to insert the second track of the card.

Standard pac



Commented example

Here is a program that adds the fraction arithmetic capabilities to the HP97. You can use the 4 basic operations and simplify a fraction.
To achieve this, the display will be read as two parts: the integer par will be the numerator and the decimal part will be the denominator with 5 digits for each.

45.00018
will stand for 45/18.
The labels are used this way:

e: INIT
A: + B: - C: × D: ÷ E: simp

The routine "e" (INIT) initialize the program. Register E = 100000 and display set to 5 decimals. The routine "9" (UNPACK) turns a number nnnnn.ddddd into nnnnn in X and ddddd in I. If ddddd is zero, it is replaced by 1, the correct denominator for an integer. The routine "8" (GCD) computes the GCD of X and I to simplify the fraction. The routine "E" (SIMP) simplify a fraction. Calls UNPACK and then GCD.
The routine "A" (ADD) computes the sum of two fractions. The routine "B" (SUB) changes the sign of the second fraction to compute the difference.

  • Step 47: save second fraction in B.


  • Step 48-52: recall first fraction, call UNPACK and store numerator in C and denominator in D.


  • Step 53-54: recall second fraction, call UNPACK.


  • Step 55-62: compute the numerator of the sum, and if negative set Flag 2.


  • Step 63-70: compute the denominator, turn it into decimal part and, according to Flag 2, is added or substracted to the numerator.


  • Step 71: simplify the result.
The routine "C" (MUL) compute the product of two fractions. The routine "D" (DIV) set Flag 2 to mark the division.

  • Step 76-77: clear the sign flags.


  • Step 78: store second fraction in memory.


  • Step 79-86: recall first fraction fraction, call UNPACK and if negative set Flag 0. Store numerator in C and denominator in D.


  • Step 87-91: recall second fraction, call UNPACK and if negative set Flag 1.


  • Step 92-93: if Flag 2 is set, reverse second fraction for division.


  • Step 94-95: compute the numerator.


  • Step 96-101: compute the denominator, turn it into decimal part and reassemble the fraction.


  • Step 102-105: apply signs according to flags.


  • Step 106: simplify the result.


Example: to simplify the fraction 24/18, key in the following number:

.
Press "E" (SIMP) that returns the result:



that means 4/3.




Since December, 15th, 2007