Usage

Operation

Online help

To view this online help from the Simulator press <F1>.

By default, the Simulator uses the Mozilla Web Browser to display the on-line help. If you have not installed it on your system, the Simulator will automatically choose another browser. You can also specify your preferred browser in the Preferences dialogue box.

Using the mouse

Each key on the real HP-15C has three functions. A primary function in white, and two secondary functions in gold and blue. Pressing the key itself calls the primary function. To call a secondary function you press one of the two shift keys f or g, followed by the key with the secondary function. The Simulator behaves in exactly the same way, if you click the buttons with the mouse.

On the Simulator, you can access the secondary functions also directly by clicking on the gold and blue labels. You do not need to click the f or g button before.

If you click on a gold label while the blue functions are active, indicated by the letter "g" in the display, the blue function is called and not the gold one you clicked. The sequence g →H.MS will therefore not call the function →H.MS but →H. The behaviour is the same if the gold functions are active and you click on a blue label.

In general, clicking on any of the three parts of a Simulator button while a secondary function indicator is on will call the indicated secondary function of that button.

Using the keyboard

Each Simulator button is mapped to a single keyboard key (see Keyboard). Pressing that key has the same effect as clicking the button with the mouse. This allows it to use the Simulator in almost the same way as the real HP-15C. For example, the SIN button is mapped to key <S>; thus pressing <S> will compute the sine of the value in the display. To compute the inverse sine you can either click SIN-1 or key in the sequence <G><S> on the PC keyboard.

On the real HP-15C only two keys, SST and BST in PRGM mode, have auto-repeat functionality. On the Simulator, almost all keyboard keys have auto-repeat functionality. Exceptions from this rule are:

These keys behave different for the <KeyPress> (<ButtonPress>) and the <KeyRelease> (<ButtonRelease>) event and therefore have no auto-repeat functionality. See the keyboard page for a detailed description.

Combining mouse and keyboard

Mouse and keyboard operations can be mixed without any limitation. Let us assume you typed in a time value as a decimal number. To convert this value into hours, minutes, and seconds, the HP-15C provides the function →H.MS. Each of the following mouse/keyboard sequences will call this function:
• <F> <2> • f <2>
• f →H.MS
• <F> 2 • f 2 • →H.MS

Abbreviated keyboard sequences

Like the real HP-15C, the Simulator allows abbreviated key sequences for some of the gold secondary functions. In general, the f key is obsolete when it follows another prefix key in a key sequence. For example, the sequence f LBL f A can be keyed in as f LBL A and the sequence STO f RAN # can be abbreviated to STO RAN #.

Clipboard

The contents of the X register can be copied to and set from the clipboard with the standard keyboard shortcuts <Ctrl>-<C> and <Ctrl>-<V>.

If you copy a number to the clipboard its internal representation is used, not the format used in the display. Assume you set the display format to fixed format with two decimal places (f FIX 2). If you key in the number 4567,105 and press ENTER, it is being displayed as 4.567,11. The number becomes rounded to two decimal places and a digits group separator is added. Internally the number is stored in the form 4567.105. Without digits group separators, a period for the decimal point and with all decimal places.

When you exchange numbers using the clipboard, the operating system settings for the decimal point and the digits group separator should be considered. Unfortunately, there is no platform independent way to obtain the current locale. By default, the Simulator therefore uses the same settings as for the display. To allow different settings for clipboard and display, you can force the usage of "C locale" for the clipboard (see Preferences).

In the above example the number will either be copied as "4567,105" or as "4567.105", depending on the current settings.

Continuous memory

When the real HP-15C is turned off, the memory content is preserved. The Simulator mimics this behaviour by writing the memory to a file when it is 'turned off'.

Name and directory of the memory file depend on the operating system. While the name is fix, the directory is derived from environment variables:
OS Variable File name
UNIX/Linux $HOME .hp-15c.mem
Windows 95/98/ME $WINDIR HP-15C.mem
Windows NT 4.0 $HOMEDRIVE\$HOMEPATH HP-15C.mem
Windows 2000/XP $APPDATA HP-15C.mem

At start-up the Simulator checks for a memory file and tries to load it. If no file is found, all registers are set to zero and all status settings are set to their default value. If an existing file can not be read in, an error is reported and the default settings are used.

To save the memory manually, press <Ctrl>-<M>. To reload the previously saved memory press <Ctrl>-<L>.

The following items are saved in the memory file:

Some statuses are reset to their default value before writing them to the file:

← Operation ↑ Top

Modes

The HP-15C has two main modes: RUN mode and PRGM mode. RUN mode is the normal operation mode where you can do all your calculations. PRGM mode is used to enter programs that can then be executed in RUN mode. After the HP-15C is turned on, it is in RUN mode.

You can also choose between REAL mode and COMPLEX mode. By default, the HP-15C is in REAL mode.

RUN/PRGM mode and REAL/COMPLEX mode are independent from each other. For example, you can enter a program in REAL mode and than execute it in COMPLEX mode and vice versa.

← Modes ↑ Top

RUN mode

Reverse Polish Notation

Like all HP calculators of its time, the HP-15C uses Reverse Polish Notation (RPN). In the widely used Infix Notation terms are written in the form "13 + 29", whereas in RPN this term reads "13 29 +". RPN is a so-called postfix notation: Operators, here "+", do not stand not between the operands, but after them. For the HP-15C this means, that you first enter the digits of the first operand, hit the ENTER key, which pushes the input to the top of a stack (see below), then enter the digits of the second operand, then select the operation. The operation will operate on the numbers put on the stack.

The stack

The stack of the HP-15C consists of four registers, named X, Y, Z and T. The display always shows the contents of the X register. A fifth register LSTx (last X) stores the last operand used in an operation. This can be useful if you want to do consecutive operations with the same parameter.

When you key in a number, it is stored in the X register. Functions that require only one parameter, like square root or the exponential function, take the value in the X register, compute the result and write it to the X register. When you press ENTER, the stack content is pushed up, that is, the number in register X is copied to Y, that in Y is moved to Z, that in Z is moved to T. The number previously stored in T is discarded.

Operations that require two operands take the values in the Y and X registers, removes them from the stack and writes the computed result to the X register. The other registers are 'popped', that means, their contents are moved down one register. The value formerly in Z is moved to Y, and the value in T is copied to Z (thus leaving the same value in both Z and T).

Let us, for example, take the operation "6 × 7", which is keyed in as 6 ENTER 7 ×. The following figure shows the effect on the stack as the keys are pressed (Register Z is already loaded with a value from a previous operation):
6 ENTER 7 ×
T  0;00  1;11  1;11  1;11
Z  1;11  0;00  0;00  1;11
Y  0;00  6;00  6;00  0;00
X  6  6;00  7  42;00
LSTx  0;00  0;00  0;00  7;00

← RUN mode ↑ Top

COMPLEX mode

The imaginary stack

Operations with complex numbers use a second stack, the so-called imaginary stack. This stack holds the imaginary part of complex numbers, while the real parts are stored in the normal real stack. Like the real stack, the imaginary stack has the four registers X, Y, Z and T, plus the LSTx register. The imaginary stack is created automatically when you enter COMPLEX mode and it is destroyed when you leave it.

COMPLEX mode is switched on by one of the following functions:
HP-15C key Purpose
f I Creates a complex number from the values in the X and Y register of the real stack.
f Re↔Im Exchanges the real and the imaginary part of a complex number.
g SF 8 Sets flag 8, the COMPLEX flag.

Flag 8 indicates whether COMPLEX mode is on. The only way to switch off COMPLEX mode is to clear flag 8 (g CF 8). The letter "C" in the display status line indicates that the HP-15C is in COMPLEX mode:

complex_1.gif 353x79

Entering complex numbers

To enter a complex number, you load the real part of the number in the Y register and the imaginary part in the X register. To create the complex number click f I, which first creates the imaginary stack. The number in the real X register is then moved to the imaginary X register and the real stack is popped. The number previously in the real Y register now is in the real X register. Thus, the complex number is stored in the two X registers, the real and the complex one.

The following example shows how to enter the complex number 6+7i and the effect on the real and imaginary stack. The real stack already contains results from previous calculations:
6 ENTER 7 f I
T  0    1    1    1  0
Z  1    0    0    1  0
Y  0    6    6    0  0
X  6    6    7    6  7
LSTx -5   -5   -5   -5  0

As you can see from this example, the imaginary stack does not exist until you press f I. Registers in the imaginary stack not yet used are initialised with 0.

We will now add the complex number 2+3i to that in the X register. The second number is keyed-in in exactly the same way as the first one:
2 ENTER 3 f I +
T  1  0  0  0  0  0  0  0  0  0
Z  0  0  6  7  6  7  0  0  0  0
Y  6  7  2  0  2  0  6  7  0  0
X  2  0  2  0  3  0  2  3  8  10
LSTx -5  0 -5  0 -5  0 -5  0  2  3

Please note that when you press ENTER both stacks are pushed up.

Supported functions

The following functions make use of the imaginary stack:

All other functions ignore the imaginary stack.

← COMPLEX mode ↑ Top

PRGM mode

Writing programs

To write a program on the HP-15C you must switch to PRGM mode. To enter PRGM mode click g P/R or press <F9> on the keyboard. The display will change and the word "PRGM" appears in the bottom right corner of the display:

prgm_step_000.gif 353x79

You can now start to key in operations, as you would do in RUN mode. The HP-15C will record the keys as you type them in but does not execute any function. HP-15C programs are more like macros than like 'real' programs.
Each program must begin with a label; valid labels are the letters A-E and the numbers 0-9 and .0-.9. As an example, we will write a program that starts with label A. Click f LBL A or key in <F8> <Q>. This is the first program step and it is displayed like this:

prgm_step_001.gif 353x79

Each key on the HP-15C is identified by a two-digit code that is derived from its position on the keypad. The first digit gives the row (starting at 1) and the second digit gives the column (where 0 means 10). For example, LBL is on the first key in the second row and therefore has the key code 21. Digit keys differ from that rule; the (single) digit itself identifies them.
The codes in a three-key sequence are separated by a digits group separator. Codes in a two-key sequence are separated by blanks. There are also some four-key sequences like STO + . 5, which adds the contents of the X register to register 15. This sequence is displayed like this:

prgm_step_021.gif 353x79

To complete the program key in the following sequence:

2 × 9 . 8 ÷ √x g RTN

This little program computes the time it takes for an object to fall from a given height to the ground in the earth gravity field. The gravitational acceleration is approximated with 9.8 m/s2.

In PRGM mode you can right-click the display to display the program pop-up menu. The full description of this pop-up menu can be found in the Pop-up menu section.

prgm_mnemonics_col.gif 142x206

To run the program you must switch back to RUN mode. Press g P/R again.

Running a program

To run a program you press the GSB key followed by the program label. Thus, GSB A will run the program from the previous chapter. While a program is running, the word "running" is blinking in the display:

prgm_step_run.gif 353x79

Programs with an alpha label can also be run by clicking on the labels A through E. Programs with numeric labels can only be run using the GSB key. In addition to that, the Simulator provides several shortcuts to run programs. See the Program (RUN mode) section in the keyboard chapter for a complete list.

Any key pressed and any mouse click will interrupt a running program.

The GTO key can not be used to run a program. In RUN mode GTO A positions the program pointer on the step with label A, but does not run the program.

Handling program files

The current program is always part of the memory file and is therefore saved automatically every time you save the memory. Moreover, programs can also be saved separately: If you press <Ctrl>-<S>, the operating systems "Save file" dialogue box pops up. The Simulator supports the file extensions .15c and .txt; the default is .15c.

To open a program file press <Ctrl>-<O>. The operating systems "Open file" dialogue box will pop up. If a program is read in, all currently loaded programs are deleted. There is no option to merge programs upon reading. See the next section on the file format how to do this manually.

The Simulator remembers the last directory used, used for writing or reading a program file. This directory is used as the initial directory the next time you open a dialogue box.

Program file format

Simulator program files are simple text files. The following figure shows the program file for the little program used in the previous sections:
HP-15C simulator program
 # --------------------------------------------
 # Tcl/Tk HEWLETT·PACKARD 15C Simulator program
 # Created with version 1.1.0
 # --------------------------------------------

    000 {             }
    001 {    42 21 11 } f LBL A
    002 {           2 } 2
    003 {          20 } ×
    004 {           9 } 9
    005 {          48 } .
    006 {           8 } 8
    007 {          10 } ÷
    008 {          11 } √x
    009 {       43 32 } g RTN

 # --------------------------------------------

Like on the real HP-15C step 000 is always empty.

Each line in a program file must be of one of the following types:

Program files are encoded in UNICODE by default to preserve all special characters used in mnemonics. You can change the encoding to ASCII (see Preferences), but then mnemonics with special characters are not stored correctly. Key sequences are not affected because key codes contain only digits.
If a file is read in, only the key sequences are used. Line numbers and mnemonics are saved for documentation purposes only.

The Simulator uses the file format described so far, when it writes a program file. Since the files are simple text files, you can use any text editor that supports UNICODE to edit them. When you edit files the only thing you need to take care of are the key sequences. For example, you may want to increase the gravitational acceleration precision in the program example from 9.8 m/s2 to 9.81 m/s2. You just have to insert a new program step with the key code for digit 1 after line 006:
HP-15C simulator program
    ...
    003 {          20 } ×
    004 {           9 } 9
    005 {          48 } .
    006 {           8 } 8
                  { 1 }
    007 {          10 } ÷
    ...
      

Neither the line number nor the mnemonic must to be specified. Program steps are automatically renumbered when the file is read in. When you write back the program with the Simulator, the full file format will be used. Missing information, like the mnemonics, are added by the Simulator.

Omitting all optional information brings us to the simplest form of the example program file
Simplified file format
 {42 21 11}
 {2}
 {20}
 {9}
 {48}
 {8}
 {10}
 {11}
 {43 32}

Program help files

If you press <Ctrl>-<F1> the Simulator searches the directory from where you last loaded a program for an HTML-file with the same name as the program file but the extension .htm or .html. If a program help file is found, it is displayed in the help file browser.

The "progs" directory of this distribution contains an example program "Little_Gauss.15C" and its help file "Little_Gauss.htm".

← PRGM mode ↑ Top

Preferences

The preferences dialogue box allows you to change some Simulator parameters. It can be found in the ON pop-up menu: <Alt>-<O>-<Preferences…>

Pressing <OK> or <Apply> will activate the new settings for the current session. The settings are not saved to disk, and therefore not made persistent, until you save the current session. If you have unchecked "Save on exit" (see below) you must save the current session manually by pressing <Ctrl>-<M>.

The following items can be set in the dialogue box. Default values are used if no memory file is found at start-up.

System settings

Simulator settings

Font settings

The Simulator layout depends very much on the combination of fonts, font sizes and display resolution. The Simulator therefore provides predefined font sets for common display resolutions. These font sets have been fine adjusted to achieve a good reproduction of the real HP-15C aspect ratio.

The following table lists the available font sets for each platform and display resolution:
Platform Resolution Font set Fonts used in set
UNIX/Linux 70-80 DPI UNIX Standard fonts, small Helvetica
Bitstream Vera Sans
Courier
UNIX Standard fonts Helvetica
Courier
Microsoft fonts Arial
Microsoft Sans Serif
Tahoma
Courier New
81-135 DPI UNIX Standard fonts, small Helvetica
Courier
UNIX Standard fonts Helvetica
Courier
Microsoft fonts, small Arial
Microsoft Sans Serif
Courier New
Microsoft fonts Arial
Microsoft Sans Serif
Courier New
MS Windows
(all versions)
91-119 DPI
120-140 DPI
Microsoft fonts, small Arial
Arial narrow
Microsoft Sans Serif
Courier New
Microsoft fonts Arial
Arial narrow
Microsoft Sans Serif
Courier New
URW fonts Nimbus Sans L
Nimbus Sans L Condensed
Bitstream Vera Sans
Courier New

Remarks:

Help file browser

This setting allows you to set the browser used to display the online help.

When you run the simulator for the first time or if no browser is set, the Simulator checks for the following browsers in all directories from the PATH environment variable:
Platform Browser list
UNIX/Linux mozilla firefox netscape opera konqueror
Windows mozilla firefox netscape opera iexplore start hh

Remarks on some browsers:

All browsers found will be listed and the first from the list will be set as the help file browser. You can choose another browser from the list of specify one using the <Browse...> button

← Preferences ↑ Top

Differences

This section describes the differences between the real HP-15C and the Simulator.

← Differences ↑ Top

Pop-up menus →