HP Forums

Full Version: HP-71B Custom Key Definitions to save lots of keystrokes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
With all the interest with the 71B at the moment, due to the 3rd wave of FRAM71 boards arriving at new owner’s mailboxes, Dave asked me to share some key assignments I made several years ago and shared when first getting back into using the 71B on a near-daily basis. Fortunately I still had some magnetic tapes from the 80’s that survived, so I was able to cheat by stealing my own work back in the day.
If you’ve not used key assignments on your 71B, definitely check out pp. 121-128 in the 71B Owner’s Manual for a good explanation of how these work, AND you should know that you’re typing a lot more than you need to… 

Below is a list of my normal key assignments (saved in the special file ‘keys:MAIN’); most of them are simple and obvious, but a few of them use embedded Escape Sequences to move the cursor during data entry, to save a lot of repetitive typing.

Code:
DEF KEY '#46','RUN ';
DEF KEY 'fQ','CALL CLOCK':
DEF KEY 'fR','RUN RPN':
DEF KEY 'fT',':TAPE()’&CHR$(8)&CHR$(27)&”N”;
DEF KEY 'fP', ’:PORT()’&CHR$(8)&CHR$(27)&”N”;
DEF KEY ‘fE’,’PEEK$(“”,)’&CHR$(8)&CHR$(8)&CHR$(8)&CHR$(27)&”N”;
DEF KEY ‘fO’,’POKE “”,””’&CHR$(8)&CHR$(8)&CHR$(8)&CHR$(8)&CHR$(27)&”N”;
DEF KEY 'fA','CAT ALL':
DEF KEY 'fX','DCAT ';
DEF KEY ‘fC’,’CHR$()’&CHR$(8)&CHR$(27)&”N”;
DEF KEY 'fM',':MAIN';

The key (get it?) technique in those assignments is to use the two following unintuitive character sequences embedded in the key definitions, which are then ‘typed’ automatically when you use the key assignment:

Code:
CHR$(8)             does a non-destructive backspace (aka move cursor left)
CHR$(27)&”N”        toggles into insert mode

The effect is to automatically type out arcane command strings fully and then move the cursor back to where you need to fill-in the specific device ID you want to access, for example to fill in the ‘3’ in the string ‘:PORT(3)’ while having the closing parenthesis already typed.

Here are some examples of several equivalent commands to illustrate how much typing these assignments can save. In addition to saving keys, it also avoids errors, which occur all too often when typing in these tedious character sequences again and again. The upper line of each pair is the manual way to type the command and the lower line is the shortcut way to type the equivalent command using the key assignments:

Code:
COPY FILE TO :TAPE(2) [END LINE]
COPY FILE TO [f][T]2 [END LINE]

COPY FILE1:PORT(3) TO :PORT(2) [END LINE]
COPY FILE1[f][P] 3 TO [f][P]2 [END LINE]

C$=PEEK$(“2C000”,32) [END LINE]
C$=[f][E]2C000[>][>]32 [END LINE]

DEF KEY ‘fC’,’CHR$()’&CHR$(8)&CHR$(27)&”N”;
DEF KEY ‘fC’,[f][C]

The last example assignment is very handy for creating these kinds of commands with a lot less typing and mistakes.

Note that key definitions are saved in the file keys:HOME, and this file can be copied to IRAM or mass storage (Tape, Card, LIF volume, etc.) like any other file, so it’s easy to save your assignments. But also note that if you LIST KEYS to see the key definitions, they do not appear the same as shown above because the embedded escape sequences are not visible; you will only see the viewable characters.

The assignments shown are just examples to illustrate the technique, you should customize your key definitions, and especially which keys these commands are assigned-to, to match your own needs and preferences.

The techniques used in these assignments are not new, nor discovered by me; like most ‘discoveries’ on these great old machines, they were actually found long ago by the masters. In this case, the information was discovered, explored and diligently documented in these 2 articles from nearly 40 years ago:

“HP-71 Key Assignments” by Jake Schwartz, Computer Journal of PPC, V3N3, M/J 1984, pp 35-36
“Letter to the Editor”, by Tom Cadwallader, CHHU Chronicle, V2N7, N/D 1985, pp 20-21
Thanks Bob, much appreciated.
Great Thanks,
But if i type "RUN RPN" i get "ERR:File Not Found"
;-)
(02-08-2021 03:47 PM)Chr Yoko Wrote: [ -> ]Great Thanks,
But if i type "RUN RPN" i get "ERR:File Not Found"
;-)

You need to have the RPN (a BIN file) program installed; it's among the many swap disk collections, easy to find. This was written by Chris Capaner and sold though EduCalc starting in late '84 I believe.

RPN was a straightforward, easy to use non-programmble RPN calculator which made the 71B useful as a calculator! That silly Calc Mode that the dev. team crowed about so much was an abomination, and as Valentin often points out, took away valuable ROM space that could have been used for far better things. IMHO, even large blocks of zeros would have been better use, as they would not have wasted so much time trying to convince folks that Calc Mode was a good thing. They even got Joe Horn to like it, for a little while, and he had Papal dispensation and should have been immune. Powerful beings, those HP dev guys were...
...and don't forget there are three different kinds of key assignments, and you can have as many KEYS files as you want and swap them out for different situations, and have a different overlay for each.

Related, there's INLINE in the CUSTUTIL LEX file from HP which gives vastly enhanced input capability. It allows you to determine the cursor position and type, which keys terminate and which one did so you can conditionally act on the particular key, and more.
The next thing to do is create an ML file with all your key assignments for use with the JPC ROM. This way they'll all be restored should you experience a Memory Lost.

Dave
(02-08-2021 08:24 PM)rprosperi Wrote: [ -> ]... That silly Calc Mode that the dev. team crowed about so much was an abomination ... They even got Joe Horn to like it, for a little while, and he had Papal dispensation and should have been immune. Powerful beings, those HP dev guys were...

I was young and impressionable at the time. Forgive me. Big Grin
(02-09-2021 02:07 AM)Dave Frederickson Wrote: [ -> ]The next thing to do is create an ML file with all your key assignments for use with the JPC ROM. This way they'll all be restored should you experience a Memory Lost.

Is that different from storing your various keys files to mass storage (which is easy to do)? I used a startup file on mass storage which would load in my various LEX and utilities files, and keys files, set the command stack to the maximum depth, etc., so just loading and running the one file did a lot.
(02-09-2021 03:20 AM)Joe Horn Wrote: [ -> ]
(02-08-2021 08:24 PM)rprosperi Wrote: [ -> ]... That silly Calc Mode that the dev. team crowed about so much was an abomination ... They even got Joe Horn to like it, for a little while, and he had Papal dispensation and should have been immune. Powerful beings, those HP dev guys were...

I was young and impressionable at the time. Forgive me. Big Grin

All is forgiven my friend.... Oh wait! That's your line! Smile
(02-08-2021 08:24 PM)rprosperi Wrote: [ -> ]
(02-08-2021 03:47 PM)Chr Yoko Wrote: [ -> ]Great Thanks,
But if i type "RUN RPN" i get "ERR:File Not Found"
;-)

You need to have the RPN (a BIN file) program installed; it's among the many swap disk collections, easy to find. This was written by Chris Capaner and sold though EduCalc starting in late '84 I believe.

RPN was a straightforward, easy to use non-programmble RPN calculator which made the 71B useful as a calculator! That silly Calc Mode that the dev. team crowed about so much was an abomination, and as Valentin often points out, took away valuable ROM space that could have been used for far better things. IMHO, even large blocks of zeros would have been better use, as they would not have wasted so much time trying to convince folks that Calc Mode was a good thing. They even got Joe Horn to like it, for a little while, and he had Papal dispensation and should have been immune. Powerful beings, those HP dev guys were...

Thanks Bob for this part of history 8-)

As for the Calc mode, i agree that it requires a bit of adaptation for a brain that is hardwired into RPN mode ....

Using the RES function ({f}END_LINE) helps a bit reducing the pain :
>2+5
7
>RES*2
14
(02-09-2021 03:20 AM)Joe Horn Wrote: [ -> ]
(02-08-2021 08:24 PM)rprosperi Wrote: [ -> ]... That silly Calc Mode that the dev. team crowed about so much was an abomination ... They even got Joe Horn to like it, for a little while, and he had Papal dispensation and should have been immune. Powerful beings, those HP dev guys were...

I was young and impressionable at the time. Forgive me. Big Grin

We may need to see some sack cloth and ashes first. Wink
(02-09-2021 03:20 AM)Joe Horn Wrote: [ -> ]
(02-08-2021 08:24 PM)rprosperi Wrote: [ -> ]... That silly Calc Mode that the dev. team crowed about so much was an abomination ... They even got Joe Horn to like it, for a little while, and he had Papal dispensation and should have been immune. Powerful beings, those HP dev guys were...

I was young and impressionable at the time. Forgive me. Big Grin


I forgive you, too, but it seems you were still "young and impressionable" back in 2009 (after 25 years of HP-71B), judging by this PDF document:

The HP-71B “Math Machine” 25 Years Old

Quoting from it, you say:
  • "The calculator which solved the RPN vs AOS problem was the HP-71B. Its “CALC Mode” [...] It’s a brilliant design that HP should revive before somebody else does. I would in fact recommend that all future HP algebraic calculators implement this method of expression entry."

Mother of God ! Sad

Regards.
V.
My small definitions

In startup sequence I use the string: STARTUP“DOW$´ ´&´-´&´ ´&DATE$[7,8]&´.´&DATE$[4,5]&´´&TIME$[1,5]“

In my MEM-Lost program I only use the DEF KEY "#46","RUN " but after this article I think about to extend this :-)

regards
Erwin
I am clearly in the minority here, but I like the Calc mode. Using () to get the previous answer is pretty handy. Also when you are doing a sum of numbers, but want access to the running sum (Entering a check register, for example) it was handy to have all the possible pending operations completed.
(02-10-2021 07:34 PM)KeithB Wrote: [ -> ]I am clearly in the minority here, but I like the Calc mode. Using () to get the previous answer is pretty handy. Also when you are doing a sum of numbers, but want access to the running sum (Entering a check register, for example) it was handy to have all the possible pending operations completed.

The Calc mode is not that bad, but I never found a real interest in it. On my HP-71, I usually prefer the immediate mode to do simple calculations.
The Calc mode has one (big) limitation related to sums, you have the impression that you can do an arbitrary long sum, as in RPN, but you actually can't, the sum is limited to 96 characters (the length of the HP-71 input line). You have the break the operation in several parts.

J-F
(02-10-2021 07:34 PM)KeithB Wrote: [ -> ]I am clearly in the minority here, but I like the Calc mode.
I also like it. It's far from an HP-41, but it get the job done. The intermediate result with edit possibility using the arrows keys in the middle of an entry is very handy.
"The Calc mode has one (big) limitation related to sums, you have the impression that you can do an arbitrary long sum, as in RPN, but you actually can't, the sum is limited to 96 characters (the length of the HP-71 input line). You have the break the operation in several parts."

Which is where () comes in handy.
In the middle of your sum, the machine beeps, so you complete what you have with the last full number, hit return, hit () and continue.
(02-10-2021 08:17 PM)J-F Garnier Wrote: [ -> ]The Calc mode is not that bad, [...]

Et tu, Brute ?   Sad

V.
Just to add to the discussion, a reminder of Joe Horn's Calc>RPN article. :-)

Gene

[attachment=9088]
(02-10-2021 11:05 PM)Valentin Albillo Wrote: [ -> ]
(02-10-2021 08:17 PM)J-F Garnier Wrote: [ -> ]The Calc mode is not that bad, [...]

Et tu, Brute ?   Sad

V.

I'm glad I wasn't drinking anything when I read this, or it would now be all over my keyboard and monitor. Extremely well-played Valentin. Big Grin

I've no love at all for Calc mode, but I can admit that RES (get last Result) comes in pretty handy when using a 71 that doesn't have RPN or C71 installed. But that's as far as I can go...
Pages: 1 2
Reference URL's