Post Reply 
HP-71B Custom Key Definitions to save lots of keystrokes
02-08-2021, 03:10 PM
Post: #1
HP-71B Custom Key Definitions to save lots of keystrokes
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

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP-71B Custom Key Definitions to save lots of keystrokes - rprosperi - 02-08-2021 03:10 PM



User(s) browsing this thread: 1 Guest(s)