HP 48SX Command Reference Programmer's Reference Manual · 393 commands · grouped by function

Every command in the Command Dictionary, arranged by category and subgroup. Hover any entry for its stack diagram (arguments in order → results), one-line description, type and manual page. Commands that belong to more than one topic (e.g. SIZE, SUB, AND) are listed in each. The RPL language itself — objects, locals, tests, loops, flags, errors — and the drawn soft-menu trees are on the HP 50g sheet, whose command set is a superset of the 48’s; the 48SX’s own menus differ in places, so use its manual for exact key paths.

Type: Command Function Analytic italic → X alias (HP 28 compatibility)
Colour keythe machineentry, stack & displayprogrammingmathematicsdata objectssymbolic, solvers & financevariables & memoryinput, output & interfaceplotting & graphics
HEWLETT · PACKARD48SXABCDEFMTHGPRINTPRGHI/OCSTIMODESVARJMEMORYKLIBRARYNXTLPREV'MUPHOMESTONDEFRCLEVALO→Q→NUMPGRAPHQREVIEWRSWAPSINSASINCOSTACOSTANUATANΣ√xVˣ√yW10ˣLOG1/xXLNENTEREQUATIONMATRIX+/−YEDITVISITEEXZ2D3DDELPURGEDROPCLRαUSRENTRY7SOLVE8PLOT9ALGEBRA÷( )#4TIME5STAT6UNITS×[ ]_1RADPOLAR2LASTSTACKARG3LASTCMDMENU" "< >ONCONTOFF0=.,SPCπ+{ }::HP 48SX

The keyboard

Forty-nine keys, and every one does up to three things. The legend on the key is the main function; the orange label above-left comes after the orange left shift , the blue label above-right after the blue right shift . The white letter at a key’s corner is what α types. The six blank keys under the display take whatever menu is showing — NXT pages through it — and are A–F in alpha mode.

The 48SX prints its shifts sparingly: the top row has orange labels only, the number pad mostly one each. Blue on a key that shows no blue label still does something — the manual calls these the “unnamed” right-shift operations, such as the arrow keys’ cursor moves and on ON for OFF.

Drawn from the keyboard figure and the key-position table in the HP 48 owner’s manual (pp. 1-2 and 1-4), with the colour of each label checked against the Programmer’s Reference Manual cover photograph. The 48G series moved and recoloured several of these; this is the S/SX layout.

Stack

16

Duplicate & Drop

DUPDuplicate Object
DUP2Duplicate 2 Objects
DUPNDuplicate n Objects
DROPDrop Object
DROP2Drop 2 Objects
DROPNDrop n Objects
CLEARClear

Reorder

SWAPSwap Objects
OVEROver
ROTRotate Objects
ROLLRoll Objects
ROLLDRoll Down
PICKPick Object

Inspect

DEPTHDepth
LASTARGLast Arguments
LASTLast Arguments → LASTARG

Arithmetic

61

Basic

+Add
-Subtract
*Multiply
/Divide
^Power
Square Root
SQSquare
INVInverse (1/x)
NEGNegate
XROOTxth Root of y

Sign & Magnitude

ABSAbsolute Value
SIGNSign
MAXMaximum
MINMinimum
MODModulo

Parts & Rounding

IPInteger Part
FPFractional Part
FLOORFloor
CEILCeiling
RNDRound
TRNCTruncate
MANTMantissa
XPONExponent

Percent

%Percent
%CHPercent Change
%TPercent of Total

Exponential & Log

EXPExponential
LNNatural Logarithm
LOGCommon Logarithm
ALOGCommon Antilogarithm
EXPMExponential Minus 1
LNP1Natural Log of x Plus 1

Trigonometric

SINSine
COSCosine
TANTangent
ASINArc Sine
ACOSArc Cosine
ATANArc Tangent

Hyperbolic

SINHHyperbolic Sine
COSHHyperbolic Cosine
TANHHyperbolic Tangent
ASINHArc Hyperbolic Sine
ACOSHInverse Hyperbolic Cosine
ATANHArc Hyperbolic Tangent

Angle Conversion

D→RDegrees to Radians
R→DRadians to Degrees
→HMSDecimal to Hours-Minutes-Seconds
HMS→Hours-Minutes-Seconds to Decimal
HMS+Hours-Minutes-Seconds Plus
HMS-Hours-Minutes-Seconds Minus

Combinatorics & Random

!Factorial (Gamma)
FACTFactorial (Gamma) → !
COMBCombinations
PERMPermutations
RANDRandom Number
RDZRandomize

Constants

πPi
ee
ii
MAXRMaximum Real
MINRMinimum Real

Complex Numbers

8

Parts

REReal Part
IMImaginary Part
ARGArgument
CONJConjugate

Convert

R→CReal to Complex
C→RComplex to Real
→V2Stack to Vector/Complex Number
V→Vector/Complex Number to Stack

Arrays & Vectors

22

Build & Split

→ARRYStack to Array
ARRY→Array to Stack
→V2Stack to Vector/Complex Number
→V3Stack to 3-Element Vector
V→Vector/Complex Number to Stack
CONConstant Array
IDNIdentity Matrix
RDMRedimension Array

Elements

GETGet Element
GETIGet and Increment Index
PUTPut Element
PUTIPut and Increment Index
SIZESize

Linear Algebra

DETDeterminant
TRNTranspose Matrix
INVInverse (1/x)
DOTDot Product
CROSSCross Product
RSDResidual

Norms

ABSAbsolute Value
CNRMColumn Norm
RNRMRow Norm

Lists & Strings

15

Lists

→LISTStack to List
LIST→List to Stack
OBJ→Object to Stack

Strings

→STRObject to String
STR→Evaluate String
CHRCharacter
NUMCharacter Number

Common (list / string)

SUBSubset
POSPosition
REPLReplace
SIZESize
GETGet Element
PUTPut Element

Tagged Objects

→TAGStack to Tag
DTAGDelete Tag

Binary Integers

21

Base

BINBinary Mode
OCTOctal Mode
DECDecimal Mode
HEXHexadecimal Mode

Wordsize & Convert

STWSStore Wordsize
RCWSRecall Wordsize
R→BReal to Binary
B→RBinary to Real

Shift

SLShift Left
SRShift Right
SLBShift Left Byte
SRBShift Right Byte
ASRArithmetic Shift Right

Rotate

RLRotate Left
RRRotate Right
RLBRotate Left Byte
RRBRotate Right Byte

Bitwise Logic

ANDAND
OROR
XORExclusive OR
NOTNOT

Tests & Logic

13

Comparison

<Less Than
Less Than or Equal
>Greater Than
Greater Than or Equal
==Logical Equality
Not Equal
SAMESame

Logic

ANDAND
OROR
XORExclusive OR
NOTNOT

Conditional Functions

IFTIf-Then
IFTEIf-Then-Else

Symbolic Algebra

24

Rewrite & Simplify

COLCTCollect Like Terms
EXPANExpand Products
ISOLIsolate Variable
QUADSolve Quadratic Equation
SHOWShow Variable
↑MATCHBottom-up Match and Replace
↓MATCHMatch Pattern Down

Calculus

Derivative
Integral
ΣSummation
TAYLRTaylor’s Polynomial

Numeric Evaluation

→NUMEvaluate to Number
→QTo Quotient
→QπTo Quotient Times π
ROOTRoot-Finder

Expression Structure

APPLYApply Function to Arguments
QUOTEQuote Argument
|Where (Substitute)
=Equals
EQ→Equation to Stack
RATIOPrefix Divide
DEFINEDefine Variable or Function

Current Equation

STEQStore in EQ
RCEQRecall from EQ

Units

147

Unit Objects

→UNITStack to Unit Object
UVALUnit Value
CONVERTConvert Units
UBASEConvert to SI Base Units
UFACTFactor Unit

The 16 unit catalogues

keyspress = multiply · = convert · = divide
LENGTHUNITS 2 · menu 43
AREAUNITS 3 · menu 44
VOLUMEUNITS 4 · menu 45
TIMEUNITS 5 · menu 46
SPEEDUNITS 6 · menu 47
MASSUNITS 7 · menu 48
FORCEUNITS 8 · menu 49
ENERGYUNITS 9 · menu 50
POWERUNITS 10 · menu 51
PRESSUREUNITS 11 · menu 52
TEMPERATUREUNITS 12 · menu 53
ELECTRIC CURRENTUNITS 13 · menu 54
ANGLEUNITS 14 · menu 55
LIGHTUNITS 15 · menu 56
RADIATIONUNITS 16 · menu 57
VISCOSITYUNITS 17 · menu 58

Every unit, with its exact SI value 126

°degree · 1.74532925199 ×10⁻² r
Aampere · 1 A
aare · 100 m²
acreacre · 4046.87260987 m²
arcminminute of arc · 2.90888208666 ×10⁻⁴ r
arcssecond of arc · 4.8481368111 ×10⁻⁶ r
atmatmosphere · 101325 kg/m·s²
auastronomical unit · 1.495979 ×10¹¹ m
bbarn · 1 ×10⁻²⁸ m²
barbar · 100000 kg/m·s²
bblbarrel · .158987294928 m³
Bqbecquerel · 1 1/s
Btuinternational table Btu · 1055.05585262 kg·m²/s²
bubushel · .03523907 m³
Ccoulomb · 1 A·s
cspeed of light · 299792458 m/s
°Cdegree Celsius · 1K or 274.15 K
calcalorie · 4.1868 kg·m²/s²
cdcandela · 1 cd
chainchain · 20.1168402337 m
Cicurie · 3.7 ×10¹⁰ 1/s
ctcarat · .0002 kg
cuUS cup · 2.365882365 ×10⁻⁴ m³
dday · 86400 s
dBdecibel · 1 (dimensionless value)
dyndyne · .00001 kg/m·s²
ergerg · .0000001 kg·m²/s²
eVelectron volt · 1.60217733 ×10⁻¹⁹ kg·m²/s²
Ffarad · 1 A²·s⁴/kg·m²
°Fdegrees Fahrenheit · 0.555555555556 K or 255.927777778 K
fathfathom · 1.82880365761 m
fbmboard foot · .002359737216 m³
fcfootcandle · 10.7639104167 cd·sr/m²
Fdyfaraday · 96487 A·s
fermifermi · 1 ×10⁻¹⁵ m
flamfootlambert · 3.42625909964 cd/m²
ftinternational foot · .3048 m
ftUSsurvey foot · .304800609601 m
ggram · .001 kg
gastandard freefall · 9.80665 m/s²
galUS gallon · .003785411784 m³
galCCanadian gallon · .00454609 m³
galUKUK gallon · .004546092 m³
gfgram-force · .00980665 kg·m/s²
gmolgram-mole · 1 mol
gradgradian · 1.57079632679 ×10⁻² r
graingrain · .00006479891 kg
Gygray · 1 m²/s²
Hhenry · 1 kg·m²/A²·s²
hHour · 3600 s
hphorsepower · 745.699871582 kg·m²/s³
Hzhertz · 1/s
ininch · .0254 m
inH2Oinches of water, 60 oF · 248.84 kg/m·s²
inHginches of mercury, 0 oC · 3386.38815789 kg/m·s²
Jjoule · 1 kg·m²/s²
Kkelvins · 1 K
kgkilogram · 1 kg
kipkilopound-force · 4448.22161526 kg·m/s²
knotnautical miles per hour · .514444444444 m/s
kphkilometers per hour · .277777777778 m/s
lliter · .001 m³
lamlambert · 3183.09886184 cd/m²
lbavoirdupois pound · .45359237 kg
lbfpound -force · 4.44822161526 kg·m/s²
lbmolpound-mole · 453.59237 mol
lbttroy pound · .3732417216 kg
lmlumen · 1 cd·sr
lxlux · 1 cd·sr/m²
lyrlight year · 9.46052840488 ×10¹⁵ m
mmeter · 1 m
mhomho · 1 A²·s³/kg·m²
miinternational mile · 1609.344 m
milmil · .0000254 m
minminute · 60 s
miUSUS statute mile · 1609.34721869 m
mmHgmillimeter of mercury (torr · 133.322368421 kg/m·s²
molmole · 1 mol
mphmiles per hour · .44704 m/s
Nnewton · 1 kg·m/s²
nminautical mile · 1852 m
ozounce · .028349523125 kg
ozflUS fluid ounce · 2.95735295625 ×10⁻⁵ m³
ozttroy ounce · .311034768 kg
ozUKUK fluid ounce · 2.8413075 ×10⁻⁵ m³
Ppoise · .1 kg/m·s
Papascal · 1 kg/m·s²
pcparsec · 3.08567818585 ×10¹⁶ m
pdlpoundal · .138254954376 kg·m/s²
phphot · 10000 cd·sr/m²
pkpeck · .0088097675 m³
psipounds per square inch · 6894.75729317 kg·m/s²
ptpint · .000473176473 m³
qtquart · .000946352946 m³
Rroentgen · .000258 A·s/kg
rradian · 1 r
°Rdegrees Rankine · 0.555555555556 K
radrad · .01 m²/s²
rdrod · 5.02921005842 m
remrem · .01 m²/s²
rpmrevolutions per minute · 60 1/s
Ssiemens · 1 A²·s³/kg·m²
ssecond · 1 s
sbstilb · 10000 cd/m²
slugslug · 14.5939029372 kg
srsteradian · 1 sr
Ststokes · .0001 m²/s
ststere · 1 m³
Svsievert · 1 m²/s²
Ttesla · 1 kg/A·s²
tmetric ton · 1000 kg
tbsptablespoon · 1.47867647813 ×10⁻⁵ m³
thermEEC therm · 105506000 kg·m²/s²
tonshort ton · 907.18474 kg
tonUklong ton (UK · 1016.0469088 kg
torrtorr (mmHg · 133.322368421 kg/m·s²
tspteaspoon · 4.92892159375 ×10⁻⁶ m³
uunified atomic mass · 1.6605402 ×10⁻²⁷ kg
Vvolt · 1 kg·m²/A·s³
Wwatt · 1 kg·m/s³
Wbweber · 1 kg·m²/A·s²
ydinternational yard · .9144 m
yryear · 31556925.9747 s
µmicron · 1 ×10⁻⁶ m
ÅAngstrom · 1 ×10⁻¹⁰ m
ohm · 1 kg·m²/A²·s³

Program Control

31

Conditionals

IFIf Conditional Structure
THENThen
ELSEElse
ENDEnd Program Structure
CASECASE Conditional Structure

Definite Loops

STARTSTART Definite Loop Structure
FORFOR Definite Loop Structure
NEXTNext
STEPStep

Indefinite Loops

DODO Indefinite Loop Structure
UNTILUntil
WHILEWHILE Indefinite Loop Structure
REPEATRepeat
ENDEnd Program Structure

Error Trapping

IFERRIf Error Conditional Structure
DOERRDo Error
ERRNError Number
ERRMError Message
ERR0Clear Last Error Number

Local Variables

Create Local Variable(s)

Execution

EVALEvaluate Object
SYSEVALEvaluate System Object
HALTHalt Program
CONTContinue Program Execution
KILLCancel Halted Programs
WAITWait

User Interaction

PROMPTPrompt
INPUTInput
KEYKey
DISPDisplay
BEEPBeep

Flags

8

Set & Clear

SFSet Flag
CFClear Flag

Test

FS?Flag Set?
FC?Flag Clear?
FS?CFlag Set? Clear
FC?CFlag Clear? Clear

Save & Restore

RCLFRecall Flags
STOFStore Flags

Variables & Memory

37

Store & Recall

STOStore
RCLRecall
PURGEPurge
DEFINEDefine Variable or Function

Storage Arithmetic

STO+Store Plus
STO-Store Minus
STO*Store Times
STO/Store Divide
SINVStore Inverse
SNEGStore Negate
SCONJStore Conjugate
INCRIncrement
DECRDecrement

Directories

HOMEHOME Directory
UPDIRUp Directory
CRDIRCreate Directory
PGDIRPurge Directory
PATHCurrent Path
VARSVariables
TVARSTyped Variables
ORDEROrder Variables
CLVARClear Variables
CLUSRClear Variables → CLVAR

Object Info

TYPEType
VTYPEVariable Type
BYTESByte Size
SIZESize
NEWOBNew Object
MEMMemory Available

Ports & Libraries

ARCHIVEArchive HOME
RESTORERestore HOME
FREEFree RAM Card
MERGEMerge RAM Card
PVARSPort-Variables
LIBSLibraries
ATTACHAttach Library
DETACHDetach Library

Modes & Display

21

Number Format

STDStandard
FIXFix
SCIScientific
ENGEngineering

Angle Mode

DEGDegrees
RADRadians
GRADGrads Mode

Display Control

CLLCDClear LCD
DISPDisplay
FREEZEFreeze Display
TEXTShow Stack Display
→LCDGraphics Object to LCD
LCD→LCD to Graphics Object
OFFOff

Menus

MENUDisplay Menu
TMENUTemporary Menu
RCLMENURecall Menu Number

User Keyboard

ASNAssign
STOKEYSStore Key Assignments
RCLKEYSRecall Key Assignments
DELKEYSDelete Key Assignments

Plotting

33

Plot Type

FUNCTIONFunction Plot Type
CONICConic Plot Type
POLARPolar Plot Type
PARAMETRICParametric Plot Type
TRUTHTruth Plot Type
BARBar Plot Type
HISTOGRAMHistogram Plot Type
SCATTERScatter Plot Type

Ranges & Variables

XRNGx-Axis Display Range
YRNGy-Axis Display Range
INDEPIndependent Variable
DEPNDDependent Variable
RESResolution
AXESAxes

Scaling

AUTOAutoscale
CENTRCenter
SCALEScale Plot
*HMultiply Height
*WMultiply Width
PMINPICT Minimum
PMAXPICT Maximum
PDIMPICT Dimension

Draw

DRAWDraw Plot
DRAXDraw Axes
LABELLabel Axes
ERASEErase PICT
GRAPHGraphics Environment
PVIEWPICT View
PICTPICT

Statistical Plots

BARPLOTDraw Bar Plot
HISTPLOTDraw Histogram Plot
SCATRPLOTDraw Scatter Plot
SCLΣScale Sigma

Graphics (PICT / GROB)

16

Primitives

LINEDraw Line
TLINEToggle Line
BOXBox
ARCDraw Arc

Pixels

PIXONPixel On
PIXOFFPixel Off
PIX?Pixel On?

Graphics Objects

→GROBStack to Graphics Object
BLANKBlank Graphics Object
GORGraphics OR
GXORGraphics Exclusive OR
SUBSubset
REPLReplace
SIZESize

Coordinates

C→PXComplex to Pixel
PX→CPixel to Complex

Statistics

37

Data (ΣDAT)

Σ+Sigma Plus
Σ-Sigma Minus
CLΣClear Sigma
STOΣStore Sigma
RCLΣRecall Sigma
Number of Rows

Summary

TOTTotal
MEANMean
SDEVStandard Deviation
VARVariance
MAXΣMaximum Sigma
MINΣMinimum Sigma
BINSSort Into Frequency Bins

Sums

ΣXSum of x-values
ΣYSum of y-values
ΣX^2Sum of Squares of x-values
ΣY^2Sum of Squares of y-values
ΣX*YSum of x Times y

Columns

XCOLIndependent Column
YCOLDependent Column
COLΣSigma Columns

Regression

LRLinear Regression
CORRCorrelation
COVCovariance
ΣLINERegression Model Formula
PREDXPredicted x-value
PREDYPredicted y-value
PREDVPredicted y-value → PREDY

Curve Fit Model

LINFITLinear Curve Fit
LOGFITLogarithmic Curve Fit
EXPFITExponential Curve Fit
PWRFITPower Curve Fit
BESTFITBest-Fitting Model

Distributions

UTPCUpper Chi-Square Distribution
UTPFUpper Snedecor’s F Distribution
UTPNUpper Normal Distribution
UTPTUpper Student’s t Distribution

Time & Alarms

15

Clock

DATEDate
→DATESet Date
TIMETime
→TIMESet System Time
TICKSTicks
CLKADJAdjust System Clock
TSTRDate and Time String

Date Arithmetic

DATE+New Date
DDAYSDelta Days

Alarms

STOALARMStore Alarm
RCLALARMRecall Alarm
DELALARMDelete Alarm
FINDALARMFind Alarm
ACKAcknowledge Alarm
ACKALLAcknowledge All Alarms

I/O & Communications

28

Kermit

SENDSend Object
RECVReceive Object
RECNReceive Renamed Object
KGETKermit Get
SERVERServer Mode
FINISHFinish Server Mode
PKTPacket
KERRMKermit Error Message

Serial

OPENIOOpen /0 Port
CLOSEIOClose 1/0 Port
XMITSerial Transmit
SRECVSerial Receive
BUFLENBuffer Length
SBRKSerial Break
STIMESerial Time-Out

Parameters (IOPAR)

BAUDBaud Rate
PARITYParity
CKSMChecksum
TRANSIO1/O Translation

Printing

PR1Print Level 1
PRSTPrint Stack
PRSTCPrint Stack (Compact)
PRVARPrint Variable
PRLCDPrint LCD
CRCarriage Right
DELAYDelay
OLDPRTOld Printer

System

WSLOGWarmstart Log