The emulator allows for unattended write and load of program and data card files. This feature is similar to the original feature of the HP67/HP97 calculators, except this extends the idea to a more reliable system. You don't have to wedge cards into the "reader" - the emulator uses special file naming conventions to create a type of card "feeder" mechanism.
Programs and data card files stored in the "HP Programs" folder get special processing.
This feature allows for the emulator to automatically load a "card" file when it encounters a MERGE instruction. This feature is enabled through a naming convention of the program card filename. If a program card file name is of the form: pgmname_0.hp97, (where pgmname is replaced with your program name) when a MERGE/PAUSE instruction is executed in the program, the emulator will look for a card file named: pgmname_1.hp97 to load automatically. Programs which need this feature must have "_0" appended to their card file names.
If pgmname_N.hp97 (where N is a number >= 1) is the currently loaded file, the emulator will look for pgmname_(N+1).hp97. If the N+1 file cannot be found, then the emulator will look for the starting file again - pgmname_0.hp97.
The loaded card can be either a program or data card - so the developer can "stack" program and data cards, as needed, to solve a specific problem. This technique can be use to create programs of nearly unlimited size and data input capacity.
When the emulator encounters a WRITE instruction, it normally prompts for a filename to write the data to. If an empty file named: pgmname_Data.hp97 is created in the "HP Programs" directory, then the emulator will automatically create an output file named: pgmname_DataN.hp97 - where "N" is the next highest integer compared to any files currently in the directory. It will always write the next highest numbered file as data output.
So, if these files are in the HP Programs directory:
The next file will be: pgmname_Data2.hp97
This technique allows an unlimited number (virtually) of values to be stored as output from calculations. Combined, the use of these features extends the emulator to solve nearly any size problem.
Data can be saved to a file by making sure that the PRGM-RUN switch is set to RUN and pressing WRITE DATA [W/DATA] which causes the emulator to prompt you by displaying a "Save File" dialog. Fill in a filename and the emulator's primary and secondary registers R0-R9 and A-E are recorded.
To load data, while in RUN mode, select "Insert card" from the pop-up menu and select the data card file.
It is possible to merge some of the steps on a card file with the current program memory. To merge a card file with the current memory, set the PRGM-RUN switch to RUN. Use GTO . nnn to set the calculator to the last step of the loaded program that you want to preserve. Press MERGE and select the card file from the "Open File" dialog.
It is also possible to merge some of the data on a data card file with the current data memory. First store a number between 0 through 25 in the "I" register. This is the highest register you want to overwrite from the card file. Press MERGE and select the data card file from the "Open File" dialog. Registers 0 thru ( i ) , inclusive, will be replaced by the values in the card file in the same register positions.
These instructions are recordable so it's possible to design programs that use PAUSE to merge data or programs during their operation. If such a MERGE / PAUSE is recorded into a program, you can select the card file when the program prompts you. If the data or program is to be merged, a MERGE instruction should be recorded before the PAUSE. (For data, "I" should be set appropriately. For a merged program, the program in memory will be overwritten immediately following the PAUSE instruction.) Execution will resume after the card file has been selected.
The F3 flag is set by data card load.
To write data to a card in a program, just insert a WRITE DATA [W/DATA] instruction. The emulator will prompt the user for a card file name to which data will be written when the WRITE DATA instruction is executed.Next Page