Voyager listings typically consist of what the calculator shows in the display, line No. and keycodes, complemented with some comments, kind of translation to mnemonix close to those known from HP41. The comments are important to grasp the code, the keycodes are essential to compare if all was copied correctly. A short example:
- Code: Select all
1-42,21, 6 LBL 6
2- 45 1 RCL 1
3- 14 y^x
4- 43 32 RTN
5-42,21,11 LBL A
6- 0 0
7- 36 ENTER^
8- 1 1
9-42,20, 6 INTEGRATE 6
10-42, 5, 0 DSE 0
11- 22 11 GTO A
12- 31 STOP
13- 32 12 GSB B
14- 34 x<>y
15- 43 15 %CH
16- 43 32 RTN
17-42,21,12 LBL B
18- 45 1 RCL 1
19- 26 EEX
20- 40 +
21- 15 1/x
Attached AHK script will import such listings to the well known HP 15C Virtual Calculator in almost no time, listings of 200 lines within fractions of a second. To use it you must install (besides the virtual 15C) version 2 of AHK.
First, edit the script and correct the location where you installed the virtual 15C. Look for the line starting with Run "C:\Program and adopt it to your setup.
Next run the script. It will start the virtual 15C. If the calculator has the focus additional keys are active:
Ins, F12 and the middle mouse button (if activated in Windows) will show a file select dialog to pick a program listing to import.
'w' (like west) will f-shift, 'e' (like east) will g-shift. Ctrl+v will paste the first number found in the first text line in the clipboard to the X-register. If in PRGM mode the number is entered at the current position of the program pointer.
The number is matched with the regular expression "i)-?(\d[\., ']?)+(e-?\d{1,2})?" -- change it in the script if it does not fit your needs. My goal was to allow blanks, single quotation marks and dots or commas for digit grouping and comma or dot as decimal separator. This kind of fuzzy logic is neither bulletproof nor watertight, so take care and if necessary adjust what you put to the clipboard.
One more word about importing programs. It remains users' task to either clear program memory first or set the program pointer to the line where to insert or append the imported program. Make sure there is enough free memory to type the program, otherwise you may end with a little mess
![Smile :)](./images/smilies/icon_e_smile.gif)
If running the script from a command line, the file to import may be given as argument.
Ending the virtual 15C ends also the script, while ending the script leaves the 15C up and running.
Enjoy