-
Notifications
You must be signed in to change notification settings - Fork 0
Opcodes
Opcodes used by the HP-35s (Emulation) software.
Each instruction is stored in a block of 3 bytes.
On the simulator, if you save the state and check the produced *.ep file, the programs are stored at the very end of the file, in reverse order (last 3 bytes are the 1st hex representation of an instruction).
Example:
Byte | Description |
---|---|
01 | is apparently a multi purposes bitset of flags |
01 | is a parameter, here it means A (LBL B would be 01 02 7B ) |
7B | is the opcode of LBL
|
01 00 oc
01: instruction
00: zero byte (no operands)
oc: opcode
Instruction | Hexcode |
---|---|
+/- |
01 00 2f |
+ |
01 00 32 |
- |
01 00 33 |
* |
01 00 34 |
/ |
01 00 35 |
! |
01 00 3c |
sqrt |
01 00 3f |
xroot |
01 00 57 |
1000 |
01 00 0f |
1,000 |
01 00 0e |
1/x |
01 00 3b |
10^x |
01 00 37 |
% |
01 00 41 |
pi |
01 00 2d |
Z+ |
01 00 5b |
Z- |
01 00 5c |
zx |
01 00 25 |
Zx |
01 00 28 |
Zx^2 |
01 00 2a |
Zxy |
01 00 2c |
zy |
01 00 26 |
Zy |
01 00 29 |
Zy^2 |
01 00 2b |
ACOS |
01 00 47 |
ACOSH |
01 00 4c |
ASIN |
01 00 46 |
ASINH |
01 00 4d |
ATAN |
01 00 48 |
ATANH |
01 00 4e |
ALG |
01 00 04 |
ALL |
01 00 13 |
AND |
01 00 a6 |
b |
01 00 1f |
BIN |
01 00 08 |
/c |
01 00 31 |
->°C |
01 00 65 |
%CHG |
01 00 55 |
CLZ |
01 00 19 |
CLx |
01 00 17 |
CLVARS |
01 00 18 |
CLSTK |
01 00 1A |
->CM |
01 00 67 |
COS |
01 00 44 |
DEC |
01 00 05 |
DEG |
01 00 09 |
->DEG |
01 00 61 |
ENG |
01 00 12 |
<-ENG |
01 00 94 |
ENG-> |
01 00 93 |
ENTER |
01 00 01 |
e^x |
01 00 36 |
->°F |
01 00 66 |
FP |
01 00 53 |
->GAL |
01 00 6A |
GRAD |
01 00 0b |
HEX |
01 00 06 |
->HMS |
01 00 60 |
HMS-> |
01 00 5f |
->IN |
01 00 68 |
INT/ |
01 00 50 |
INTG |
01 00 52 |
IP |
01 00 54 |
->KG |
01 00 63 |
->KM |
01 00 5e |
->L |
01 00 69 |
LASTx |
01 00 97 |
->LB |
01 00 64 |
LN |
01 00 38 |
LOG |
01 00 39 |
m |
01 00 1e |
->MILE |
01 00 5d |
n |
01 00 27 |
NAND |
01 00 ab |
nCr |
01 00 58 |
NOR |
01 00 aa |
NOT |
01 00 a9 |
nPr |
01 00 59 |
OCT |
01 00 07 |
OR |
01 00 a8 |
PSE |
01 00 78 |
rta |
01 00 15 |
RAD |
01 00 0a |
->RAD |
01 00 62 |
RADIX, |
01 00 0d |
RADIX. |
01 00 0c |
RANDOM |
01 00 2e |
RMDR |
01 00 51 |
RND |
01 00 42 |
RPN |
01 00 03 |
RTN |
01 00 77 |
Rv |
01 00 95 |
R^ |
01 00 96 |
SEED |
01 00 30 |
SGN |
01 00 4f |
SIN |
01 00 43 |
STOP |
01 00 79 |
sx |
01 00 23 |
sy |
01 00 24 |
TAN |
01 00 45 |
x!=0? |
01 00 71 |
x<=0? |
01 00 72 |
x<0? |
01 00 73 |
x>0? |
01 00 74 |
x>=0? |
01 00 75 |
x=0? |
01 00 76 |
x^2 |
01 00 3d |
\x- |
01 00 02 |
\x^ |
01 00 1b |
XOR |
01 00 a7 |
\x-w |
01 00 22 |
x<>y |
01 00 8f |
x!=y? |
01 00 6b |
x<=y? |
01 00 6c |
x<y? |
01 00 6d |
x>y? |
01 00 6e |
x>=y? |
01 00 6f |
x=y? |
01 00 70 |
xiy |
01 00 14 |
x+yi |
01 00 16 |
\y- |
01 00 21 |
\y^ |
01 00 1c |
y^x |
01 00 56 |
01 no oc
01: instruction
no: number 00..0Bh = 0..12
oc: opcode
Instruction | Hexcode |
---|---|
CF |
01 no 91 |
ENG |
01 no 12 |
FIX |
01 no 10 |
FS? |
01 no 92 |
SCI |
01 no 11 |
SF |
01 no 90 |
01 va oc
01: instruction
va: variable 00..1Ah, 1Bh, 1Ch = A..Z, (I), (J)
oc: opcode
Instruction | Hexcode |
---|---|
LBL |
01 va 7b * |
INPUT |
01 va 7c * |
$FN_d |
01 va 83 |
DSE |
01 va 81 |
FN= |
01 va 7f |
ISG |
01 va 80 |
RCL |
01 va 89 |
RCL+ |
01 va 8a |
RCL- |
01 va 8b |
RCL* |
01 va 8c |
RCL/ |
01 va 8d |
SOLVE |
01 va 82 |
STO |
01 va 84 |
STO+ |
01 va 85 |
STO- |
01 va 86 |
STO* |
01 va 87 |
STO/ |
01 va 88 |
VIEW |
01 va 7a |
x<> |
01 va 8e |
* Valid range for
va
is only from00
to1Ah
Instruction | Hexcode |
---|---|
GTO |
90 lo hi |
XEQ |
91 lo hi |
The jump command GTO
has the hexcode 90
in the first byte. The two following bytes (little endian) contain the absolute jump address starting at 0001
for A001
.
Example
Instruction | Hexcode |
---|---|
GTO A010 |
90 0a 00 |
GTO F001 |
90 a9 13 |
The jump command XEQ
has the hexcode 91
in the first byte. The two following bytes contain the absolute jump address.
91 lo hi
91: instruction
lo: low byte
hi: high byte
Example
Instruction | Hexcode |
---|---|
XEQ A001 |
91 01 00 |
XEQ B003 |
91 eb 03 |
The 41 constants are stored in a separate ROM segment.
80 co 00
80: instruction
co: constant 00..28h
00: zero byte (no opcode)
Instruction | Trigraph | Hexcode | Description |
---|---|---|---|
c |
\016 |
80 00 00 |
Speed of light in vacuum |
g |
\^g |
80 01 00 |
Standard acceleration of gravity |
G |
\018 |
80 02 00 |
Gravitation constant |
Vm |
\^V\^m |
80 03 00 |
Molar volume of ideal gas |
NA |
\^N\015 |
80 04 00 |
Avogadro constant |
Rb |
\^R\oo |
80 05 00 |
Rydberg constant |
eV |
\^e\^V |
80 06 00 |
Elementary charge |
me |
\^m\^e |
80 07 00 |
Electron mass |
mp |
\^m\^p |
80 08 00 |
Proton mass |
mn |
\^m\^n |
80 09 00 |
Neutron mass |
mu |
\^m\Gm |
80 0a 00 |
Muon mass |
k |
\^k |
80 0b 00 |
Boltzmann constant |
h |
\^h |
80 0c 00 |
Planck constant |
hbar |
\023 |
80 0d 00 |
Planck constant over 2 pi |
Ph0 |
\O/\021 |
80 0e 00 |
Magnetic flux quantum |
a0 |
\^a\021 |
80 0f 00 |
Bohr radius |
e0 |
\Ge\021 |
80 10 00 |
Electric constant |
R |
\020 |
80 11 00 |
Molar gas constant |
F |
\017 |
80 12 00 |
Faraday constant |
u |
\^u |
80 13 00 |
Atomic mass constant |
u0 |
\Gm\021 |
80 14 00 |
Magnetic constant |
uB |
\Gm\^B |
80 15 00 |
Bohr magneton |
uN |
\Gm\^N |
80 16 00 |
Nuclear magneton |
up |
\Gm\^p |
80 17 00 |
Proton magnetic moment |
ue |
\Gm\^e |
80 18 00 |
Electron magnetic moment |
un |
\Gm\^n |
80 19 00 |
Neutron magnetic moment |
uu |
\Gm\Gm |
80 1a 00 |
Muon magnetic moment |
re |
\^r\^e |
80 1b 00 |
Classical electron radius |
Z0 |
\^Z\021 |
80 1c 00 |
Characteristic impendence of vacuum |
lc |
\Gl\^c |
80 1d 00 |
Compton wavelength |
lcn |
\Gl\^c\^n |
80 1e 00 |
Neutron Compton wavelength |
lcp |
\Gl\^c\^p |
80 1f 00 |
Proton Compton wavelength |
a |
\Ga |
80 20 00 |
Fine structure constant |
z |
\157 |
80 21 00 |
Stefan–Boltzmann constant |
t |
\024 |
80 22 00 |
Celsius temperature |
atm |
\167\^t\^m |
80 23 00 |
Standard atmosphere |
gp |
\Gg\^p |
80 24 00 |
Proton gyromagnetic ratio |
C1 |
\^C\^1 |
80 25 00 |
First radiation constant |
C2 |
\^C\^2 |
80 26 00 |
Second radiation constant |
G0 |
\^G\021 |
80 27 00 |
Conductance quantum |
e |
\^e |
80 28 00 |
The base number of natural logarithm |
The first valid entry has the offset 0776h
.
81 lo hi
81: instruction
lo: low offset
hi: high offset
Instruction | Hexcode |
---|---|
EQN |
81 lo hi |
The first valid entry has the offset 0776h
.
83 lo hi
83: instruction
lo: low offset
hi: high offset
Instruction | Hexcode |
---|---|
expr |
83 lo hi * |
ALOG |
83 lo hi |
EXP |
83 lo hi |
IDIV |
83 lo hi |
INV |
83 lo hi |
REGT |
83 lo hi |
REGX |
83 lo hi |
REGY |
83 lo hi |
REGZ |
83 lo hi |
SQ |
83 lo hi |
SQRT |
83 lo hi |
XROOT |
83 lo hi |
*These include constants and numbers in mode ALG
- HP-35s Startpage
- Assembler
- Emulator
- Applications Book (en|de)
- Introduction
- Machine Related Operations
- Number Theory and Algebra
- Geometry and Trigonometry
- Miscellany
- Appendix