AN OVERVIEW OF THE HP48
Hewlett Packard released their HP48 series calculators in 1991 as a successor to the well established HP41. The HP48 is perhaps the most powerful hand held calculator on the market today. There are two current variants; the HP48G and the HP48GX.
The HP48G and HP48GX have almost identical operating systems and differ only in terms of their memory and expandability (and cost !).
The HP48G has 29.6kB of user memory and is un-expandable. The HP48GX has 128kB of user memory which can be expanded to approximately 2300kB with the insertion of two plug-in RAM cards.
Hewlett Packard is soon to be releasing the HP48G+ which has 128kB of un-expandable user memory as a mid-range mid-price compromise between the two ( between the lawn-mower and the Rolls Royce, a Commodore??)
HOW DOES THE HP48 DIFFER FROM IT’S PREDECESSORS ?
The HP48 uses the same RPN style of operation as most HP calculators, however this is where the similarities cease. The HP48 has a larger multi-line (up to 7 lines) LCD display and has an unlimited stack (within the limits of memory), a significant improvement on the HP41/42. The Command set is also significantly greater. Programs can be created using a text editor on a PC and uploaded easily also alleviating the need to painfully re-enter the program after memory loss. Storage registers on the older series calculators are now called VARIABLES and almost anything can be stored in a variable (text, numbers, programs, matrices, plots etc…) The HP48 enables a branching directory structure.
The deficiencies of the HP48 are also notable. Because the 48 is a complex machine in a small package it is not as user friendly as the HP41/42. Many programs are slower to run and the quick keystroking advantages of the HP42 haven’t been preserved in the new range.
TERMINOLOGY USED IN THIS LEAFLET
Any function using the primary keyboard is delimited by [ NAME], where NAME is what is printed on the face of the key. For example the ENTER key will be referred to as [ENTER].
Any function using the left-shift keyboard is delimited by [L-S][ NAME ](SHIFTED-NAME), where name is what is printed on the face of the key and shifted-name is the performed function. For example; to show the previous menu press [L-S] [NXT] (PREV).
Any function using the right-shift keyboard is delimited by [R-S][ NAME](SHIFTED-NAME), where NAME is what is printed on the face of the key and shifted-name is the performed function. For example; to get to the root directory of the calculator press [R-S] [ HOME]
Any menu label function is delimited by | MENU-LABEL|, where MENU-LABELis the function shown in the menu label on the display.
THE KEYBOARD
There are six main keyboards used on the HP48
The primary keyboard is represented by the labels on the face of each key (usually white).
The left-shift keyboard (purple letters) is activated by pressing the purple LEFT SHIFT key herein referred to as the [L-S] key.
The right-shift keyboard (blue letters) is activated by pressing the blue RIGHT SHIFT key herein referred to as the [R-S] key.
The Primary alphabetical keyboard is activated by pressing the [a] key. Alpha keys are labelled in white with the letter represented, shown at the bottom right of the primary key.
The Alphabetical left-shift. By pressing theathen the left-shift key, a different character set is activated. These are generally lower-case.
The Alphabetical right-shift. By pressing theathen the right-shift key, a third character set is activated. These characters are generally Greek symbols.
Functions and programs can be also be assigned to user-specified keys, the USER keyboard.
CURSOR KEYS
The [$] key moves the cursor left.
The [#] key moves the cursor right.
The [!] key moves the cursor up.
The [’] key moves the cursor down.
The Delete key [DEL] deletes the current character in edit mode, otherwise it clears the entire stack.
The backspace key Deletes the previous character
The On/Cancel key [ON] halts most program operations
MENU KEYS
The six white keys below the display activate the menu item above each of them in the display.
To scroll across the menu display press the [NXT] key
To scroll in reverse press [L-S] [NXT] (PREV)
THE DISPLAY
The upper section of the display is called the STATUS AREA. On the left between the {HOME… } characters is the current directory path of the calculator. Important calculator settings are also shown here (e.g. DEG if in degrees mode, if the HP48 is in alpha mode (a) or whether the left-shift or right-shift keyboards are active ) All these are referred to as annunciators.
The main section of the display shows the first four levels of the STACK. To view higher levels of the stack the [!] is pressed.
Below the stack is the COMMAND LINE which is active if a number or command is being typed in.
At the bottom of the display are the six active MENU LABELS.
THE HP48 STACK
The HP48 like its predecessors uses a data stack. Numbers or other objects
are entered onto the stack into level one ‘bumping’ existing data
into higher levels (i.e. Last in First out LIFO). The HP48’s stack limit is only restricted by
available memory (unlike the HP41/42 which had a stack limit of 4).
The RPN style of operation and basic arithmetical tools on the HP48 are similar to its predecessors is and won’t be discussed in depth here.
A refresher example of RPN operation:
Compute (2*7)-(3*(9/11)) in RPN
2 7 * (the first term )
9 11 / (9/11)
3 * (the second term)
- the answer ! Displayed in level 1
CHANGING HP48 SETTINGS (MODES), SYSTEM FLAGS
The HP48 was designed with U.S. students in mathematics and engineers in mind. Consequently the factory settings will probably be required to be changed for use here in Australia. There are two ways to change the settings:
Method 1: [L-S] [CST] (MODES) which displays menus to change the settings
Method 2: Changing system flags
The first method is fairly self-explanatory and is comprehensively covered in the User Guide.
System flags (between -1 and -64) are either CLEAR or SET. Most by default are CLEAR
A summary of system flag settings that may need to be changed from the default settings:
( i.e. to be set)
-3 Symbolic constants (e.g.p) evaluate to numbers
-40 Display clock and date
-41 Display clock in 24hr format
-42 Date in Day/Month/Year format
-56 Error BEEP suppressed
-36 Input/Output overwrite
-60alocked with one keypress (not two)
A summary of system flag settings which are clear by default which must be clear in certain program operations:
-19 Vector created from real numbers (not complex)
-33 Input/output to serial port
-34 Print to IR printer
-35 ASCII output
-37 Single spaced printing (IR printer)
-38 Linefeed at end of each line (IR printer)
-51 Fraction mark (.)
-62 USER mode inactive ( active if set )
Appendix D of the User guide gives a full listing and explanation of system flag settings.
TO SET (CLEAR) SYSTEM FLAGS.
Type the flag number with +/- onto the stack and either:
press [a] [a] SF (or CF) or press [L-S] [CST] MODES |FLAG| |SF| (or |CF|)
TO DETERMINE WHETHER A FLAG IS SET (OR CLEAR)
Type the flag number with +/- onto the stack and either:
press [a] [a] FS? (or FC?) or press [L-S] [CST] (MODES) |FLAG| |FS?| (or |FC?|)
If the answer is yes 1 is returned, if the answer is no 0 is returned.
USER FLAGS
User flags are positive numbers to distinguish them from system flags which are always negative. These can be set and clear as required and are extremely useful in programming for condition testing. If User flags 1 to 5 are set, their number(s) appear in the annunciator area. User flags are set, cleared and tested in the same manner described above.
OTHER IMPORTANT SETTINGS
For a program to be ‘bullet-proof’, angle and co-ordinate formats and displays of numbers with the correct number of decimal places must be checked at the start of each program.
ANGLE FORMAT
To set the calculator in DEGREES mode
[L-S] [CST] (MODES) |ANGL| |DEG| or type DEG
To set the calculator in RADIANS mode
[L-S] [MTH] (RADIANS) or type RAD
RECTANGULAR / POLAR VECTOR MODE
To set the calculator in Rectangular mode (x,y) or (x,y,z)
[L-S] [CST] (MODES) |ANGL| |RECT| or type RECT
To set the calculator in Cylindrical Polar mode (R,q) or (R,q,Z)
[R-S] [MTH] (POLAR) or type CYLIN
To set the calculator in Spherical Polar mode (R,q) or (R,q,q)
[L-S] [CST] (MODES) |ANGL| |SPHER| or type SPHER
NUMBER OF DECIMAL PLACES DISPLAYED
To Display all significant figures
[L-S] [CST] (MODES) |FMT| |STD| or type STD
To specify number of decimal places to display
[L-S] [CST] (MODES) |FMT| n |FIX| ( n is the number of decimal places ) or type n FIX
HP48 DIRECTORIES, OBJECTS AND VARIABLES
DIRECTORIES
Unlike its predecessors the HP48 has a directory/sub-directory structure, similar in may ways to a PC.
The ‘root’ directory of the HP48 is called the HOME directory.
The directory path leading to the current directory is shown in the message area of the display within { HOME …….. }
To get to the HOME directory, from anywhere in the directory path
Press [R-S] [’] (HOME) or type HOME
OBJECTS or ‘Files’ and VARIABLES
HP48 ‘files’ are referred to as VARIABLES which are where OBJECTS are stored. In HP41/42 parlance these are what were referred to as registers.
TO VIEW VARIABLES IN THE CURRENT DIRECTORY
Press [VAR]
If there are more than 6 objects in the directory:
Press [NXT] to scroll across the selection.
To scroll in reverse
Press [L-S] [NXT] (PREV)
TO CREATE A SUB-DIRECTORY
Press [a] [a] Name of sub-directory [ENTER]
Then either: [L-S] [VAR] (MEMORY) |DIR| |CRDIR|
or [a] [a] CRDIR
Sub-directories are indicated by a little bar above its menu label.
TO REMOVE A SUB-DIRECTORY (BE CAREFUL !)
Put the name of the sub-directory on level one
then: [L-S] [VAR] (MEMORY) |DIR| |PGDIR|
TO GO UP A DIRECTORY LEVEL
Press [L-S] [’] (UPDIR) or type UPDIR
OBJECT TYPES:
Numbers
Alphabetical strings Delimited by ’ '
Programs Delimited by « »
Lists Delimited by { }
Vectors Delimited by [ ]
Matrices (Arrays) Delimited by [ [ ] ]
Algebraic terms Delimited by ’ ’
Names of objects Also delimited by ’ ’
WHERE TO STORE OBJECTS
Objects (i.e. programs, numbers etc..) can be stored in memory and the directory structure in three main ways:
GLOBAL VARIABLES
An object can be stored in a ‘variable’ for later retrieval.
Variables are shown in the menu bar by pressing [VAR]
These are called GLOBAL variables.
HOW TO STORE AN OBJECT IN A GLOBAL VARIABLE
Place the object on level one ( i.e. program, number, vector …)
Press [ ’ ] [a][a] Name of object [STO]
LOCAL VARIABLES
An object only used temporarily within a program ( i.e. not saved ) is called a local variable. After the program has run, local variables are cleared. These will be explained later. The advantage of using local variables is two-fold; they do not ‘clutter’ up the directory and take up space, and they enable a program to run at maximum speed.
THE STACK
Objects(e.g. numbers) can be left on the stack and manipulated by various stack manipulation commands (see later..)
TO DELETE (PURGE) AN OBJECT
Press [ ’ ] [a][a] Name of object [L-S] [EEX] (PURGE) or
Press [ ’ ] |Name| [L-S] [EEX] (PURGE)
TO COPY AN OBJECT OR SUB-DIRECTORY TO ANOTHER DIRECTORY
Put the name of the object on level, press [ENTER] to duplicate it
Press [R-S] [STO] (RCL) to recall the object to the stack
Get into the destination directory
Press [#] to swap
Press [STO]
TO MOVE AN OBJECT TO ANOTHER DIRECTORY
Follow the same steps for copying and purge the old object.
TO RENAME AN OBJECT OR SUB-DIRECTORY
Put the name of the object on level, press [ENTER] to duplicate it
Press [R-S] [STO] (RCL) to recall the object to the stack
Press [a] [a] NEWNAME [ENTER] [STO]
Purge the object OLDNAME
TO CHANGE THE ORDER OF OBJECTS IN THE VARIABLE MENU
Press [L-S] [+] ({})
Press the menu keys of each object in the desired order you wish them to appear in the menu display.
Press [ENTER]
Press [L-S] [VAR] |DIR| |ORDER|
TO CLEAR ALL THE VARIABLES IN THE CURRENT DIRECTORY
Type [a] [a] CLVAR
TO LIST ALL THE VARIABLES IN THE CURRENT DIRECTORY
Type [a] [a] VARS
To RECALL ‘VIEW’ THE CONTENTS OF A VARIABLE ON THE STACK
Put the name of the object on level 1
Press [R-S] [STO] (RCL)
TO EDIT AN OBJECT (INCLUDING PROGRAMS)
Put the name of the object on level 1
Press [L-S] [+/-] (EDIT)
After editing the object press [ENTER] to save changes
MANIPULATING THE STACK
For small programs, manipulation of the stack, ensures that a program will run at maximum speed, and economise on memory at the same time. Because the stack levels on the HP48 are almost unlimited great care has to be taken if local or global variables are not used to store intermediate values and results. A stack diagram should be drawn describing the contents of each level of the stack at the completion of each command.
CLEAR, DROP & SWAP commands are on the keyboard. Other stack commands are shown by pressing [L-S][!] or alternatively they can be typed in with the alpha keyboard.
STACK COMMANDS
CLEAR Clears the entire stack
DROP Deletes level one of the stack
SWAP Swaps levels and 1 & 2
OVER Copies level 2 into level 1, pushing old level 1 to 2
ROT Moves level 3 to level 1, pushing up the stack
ROLL Moves a specified level to level 1 ( e.g. 4 ROLL will move level 4 to level 1 )
ROLLD Moves level 1 to a specified level ( e.g. 7 ROLLD will move level 1 to level 7 )
PICK Copies a specified level to level 1 ( e.g. 5 PICK will copy level 5 to level 1 )
DEPTH Counts the number of active levels in the stack placing the number on level 1
DUP Copies level 1 ( i.e. levels 1 & 2 are the same )
DUP2 Copies levels 1 & 2 ( i.e. levels 3 & 4 will be the same as 1 & 2)
DUPN Copies a specified number of levels again (e.g. 6 DUPN will copy the first six levels of the stack again)
DROP2 deletes levels 1 & 2
DRPN a specified number of levels are deleted ( e.g. 4 DRPN will delete levels 1 to 4 )
MEMORY MANAGEMENT
TO CHECK THE AVAILABLE MEMORY OF THE CALCULATOR
[L-S] [VAR] (MEMORY) |MEM|
TO CHECK THE SIZE OF AN OBJECT
Put the name of the object on level one.
[L-S] [VAR] (MEMORY) |BYTES|