Saturday, November 11, 2023

HP 42S/DM42 Programs in the Style of HP 65/67 Cards

HP 42S/DM42 Programs in the Style of HP 65/67 Cards


Programming Cards


In the 1970s, a programmable scientific calculators stored programs on magnetic cards.   The magnetic cards were then loaded on to calculator.   Two such calculators that used magnetic cards are the legendary HP 65 and HP 67, both from Hewlett Packard.    


The aim of these programs is to simulate classic programs from the HP 65 and HP 67 as they are stored on the cards, with prompts and messages to enhance the user experience.

The HP 65 had five user-definable keys A-E, while the HP 67 adds five additional user-defined labels a-e through a shift-key combination.

The MENU command on the HP 42S* creates a user key menu within a program, up to six keys.   I use this command to simulate running programs from loading cards.

(*and Free42, Plus42, Swiss Micros DM42)

The file included in the link below include four programs that are ported from various application books (pacs) of the HP 65 and HP 67.   


Demonstration Program:  demo.raw


When the program is run, a card is "simulated".   


I usually have the card in this format:

Left keys:  inputs, will sometimes give outputs

Key 4 (or 5): labeled CALC, get outputs

Key 6:  EXIT.  Exits the program.  Simulates removing the card.  


Demonstration


Key 1:  enter X coordinate

Key 2:  enter Y coordinate

Key 4:  calculate the norm

Key 6:  exit the program



Notes:  before GTO 30,  I have a pause command (PSE) so the menu returns.  

If I have multiple outputs, I have a stop command (STOP).  


Message convention: 

Prompts with a colon:  (:)  input

Prompts with an equals sign:  (=)  output


#  comments


00 { 134-Byte Prgm }

01▸LBL "DEMO"

02 "VECT NORM/ANG"         #  short description of the program

03 AVIEW

04 PSE                                        #  pauses the screen (allows for print)

05 "BY EWS"

06 AVIEW

07 PSE

08▸LBL 30                           # label 30 starts the menu

09 "→X"

10 KEY 1 XEQ 21

11 "→Y"

12 KEY 2 XEQ 22

13 "CALC"

14 KEY 4 XEQ 24

15 "EXIT"

16 KEY 6 XEQ 26

17 MENU                       # menu setup

18▸LBL 00

19 STOP

20 GTO 00                     # repeats the menu unless a menu key is pressed

21▸LBL 21                   # enter X

22 STO 01

23 "X:"

24 ARCL ST X   

25 AVIEW

26 PSE

27 GTO 30

28▸LBL 22                # enter Y

29 STO 02

30 "Y:"

31 ARCL ST X

32 AVIEW

33 PSE

34 GTO 30

35▸LBL 24            # calculate

36 RCL 02

37 RCL 01

38 →POL

39 "NORM="

40 ARCL ST X

41 AVIEW

42 STOP

43 "ANGLE="

44 ARCL ST Y

45 AVIEW

46 PSE

47 GTO 30

48▸LBL 26       # exit routine

49 CLMENU

50 EXITALL

51 .END.


Sample Output:


VECT NORM/ANG

BY EWS

X:5.7500

Y:6.8500

NORM=8.9434

ANGLE=49.9894


Program Space vs. Information Labels


When messages and alpha strings are added, along with the necessary AVIEW, PSE, and STOP commands, the program space requirements increase.   I put these messages to make the program as user friendly as possible.  



What's Included in the Zip Drive


Five programs:


Demonstration Program:  demo.raw

Sight Reduction Table:  str.raw

Physiologic Shunt and Fick:  phsy.raw

1-D Normal Shocks for Ideal Gases:  shock.raw

P and S Seismic Wave Velocity:  seismic.raw


PDF file of instructions and program listing



Download here (zip file):  

https://drive.google.com/file/d/1_0F_DHCGxcLbmCtrhMQbKShjrpBUgB7i/view?usp=share_link


Enjoy and please let me know, I plan to create another volume of these style of programs.  



Note:  The next blog entry will be on November 18, 2023


Eddie 


All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Spotlight: Akron Brass FireCalc Pocket Computer

Spotlight: Akron Brass FireCalc Pocket Computer Welcome to a special Monday Edition of Eddie’s Math and Calculator blog. Thi...