Jaap's Psion II Page

Home / Psion / HD6303 Instruction Set

The HD6303 Instruction Set


Below is a list of all assembler mnemonics for the Psion's HD6303 microprocessor. The list is ordered numerically. Each decimal number is followed by its hex equivalent, the length of the instruction in bytes (L), the execution time (T), the mnemonic, and the effect the instruction has on the flags. The execution time is given as the number of clock ticks it takes for the instruction to be executed. The Psion has a clock of 921600Hz, so there are 921600 clock ticks per second.

The last two columns contain the character sets for the LZ and the CM/XP. The character set of the Psion CM/XP is that of the standard HD44780 LCD controller chip by Hitachi. The second half of this character set (160-222) contains the basic Japanese katakana, which are transcribed here in romaji.
The Psion LZ uses a customised LCD controller chip (the 66780) so that its character set more closely matches the standard extended ASCII character set.

Notation:

r Relative jump (1 byte)
d 1 byte offset added to X to refer to a memory address
# 1 byte immediate value
## 2 byte immediate value
0m 1 byte zero-page address
mm      2 byte address

Dec Hex L T Mnemonic HINZVC LZ Character set CM/XP Character set ===================================================================== 0 00 1 1 TRAP -1---- UDG 0/NO KEY UDG 0/No key 1 01 1 1 NOP ------ UDG 1/ON-CLEAR UDG 1/ON-CLEAR 2 02 - - - UDG 2/MODE UDG 2/MODE 3 03 - - - UDG 3/UP UDG 3/UP 4 04 1 1 LSRD --0XXX UDG 4/DOWN UDG 4/DOWN 5 05 1 1 ASLD --XXXX UDG 5/LEFT UDG 5/LEFT 6 06 1 1 TAP XXXXXX UDG 6/RIGHT UDG 6/RIGHT 7 07 1 1 TPA ------ UDG 7/Shft-DEL UDG 7/Shft-DEL 8 08 1 1 INX ---X-- Backspace/DEL Backspace/DEL 9 09 1 1 DEX ---X-- Tab Tab 10 0A 1 1 CLV ----0- Line feed Line feed 11 0B 1 1 SEV ----1- Home Home 12 0C 1 1 CLC -----0 Cls Cls 13 0D 1 1 SEC -----1 Lft of line/EXE Lft of line/EXE 14 0E 1 1 CLI -0---- Clr ln 1/Shft-EXE Clear line 1 15 0F 1 1 SEI -1---- Clr ln 2/Shft-SPC Clear line 2 16 10 1 1 SBA --XXXX Beep Beep 17 11 1 1 CBA --XXXX Refresh lines 1+2 Refresh lines 1+2 18 12 - - - Refresh line 1 Refresh line 1 19 13 - - - Refresh line 2 Refresh line 2 20 14 - - - Refresh line 3 21 15 - - - Refresh line 4 22 16 1 1 TAB --XX0- Clear line 3 23 17 1 1 TBA --XX0- Clear line 4 24 18 1 2 XGDX ------ Dots on line 2 25 19 1 2 DAA --XXXc Dots on line 3 26 1A 1 4 SLP ------ Clear to end 27 1B 1 1 ABA X-XXXX 28 1C - - - 29 1D - - - 30 1E - - - 31 1F - - - 32 20 2 3 BRA r ------ Space Space 33 21 2 3 BRN r ------ ! ! 34 22 2 3 BHI r > ------ " " 35 23 2 3 BLS r <= ------ # # 36 24 2 3 BCC r >= ------ $ $ 37 25 2 3 BCS r < ------ % % 38 26 2 3 BNE r <> ------ & & 39 27 2 3 BEQ r = ------ ' ' 40 28 2 3 BVC r ------ ( ( 41 29 2 3 BVS r ------ ) ) 42 2A 2 3 BPL r ------ * * 43 2B 2 3 BMI r ------ + + 44 2C 2 3 BGE r >=s ------ , , 45 2D 2 3 BLT r <s ------ - - 46 2E 2 3 BGT r >s ------ . . 47 2F 2 3 BLE r <=s ------ / / 48 30 1 1 TSX ------ 0 0 49 31 1 1 INS ------ 1 1 50 32 1 3 PULA ------ 2 2 51 33 1 3 PULB ------ 3 3 52 34 1 1 DES ------ 4 4 53 35 1 1 TXS ------ 5 5 54 36 1 4 PSHA ------ 6 6 55 37 1 4 PSHB ------ 7 7 56 38 1 4 PULX ------ 8 8 57 39 1 5 RTS ------ 9 9 58 3A 1 1 ABX ------ : : 59 3B 1 10 RTI XXXXXX ; ; 60 3C 1 5 PSHX ------ < < 61 3D 1 7 MUL -----b = = 62 3E 1 9 WAI -a---- > > 63 3F 1 12 SWI -1---- ? ? 64 40 1 1 NEGA --XXXX @ @ 65 41 - - - A A 66 42 - - - B B 67 43 1 1 COMA --XX01 C C 68 44 1 1 LSRA --0XXX D D 69 45 - - - E E 70 46 1 1 RORA --XXXX F F 71 47 1 1 ASRA --XXXX G G 72 48 1 1 ASLA --XXXX H H 73 49 1 1 ROLA --XXXX I I 74 4A 1 1 DECA --XXX- J J 75 4B - - - K K 76 4C 1 1 INCA --XXX- L L 77 4D 1 1 TSTA --XX00 M M 78 4E - - - N N 79 4F 1 1 CLRA --0100 O O 80 50 1 1 NEGB --XXXX P P 81 51 - - - Q Q 82 52 - - - R R 83 53 1 1 COMB --XX01 S S 84 54 1 1 LSRB --0XXX T T 85 55 - - - U U 86 56 1 1 RORB --XXXX V V 87 57 1 1 ASRB --XXXX W W 88 58 1 1 ASLB --XXXX X X 89 59 1 1 ROLB --XXXX Y Y 90 5A 1 1 DECB --XXX- Z Z 91 5B - - - [ [ 92 5C 1 1 INCB --XXX- \ ¥ 93 5D 1 1 TSTB --XX00 ] ] 94 5E - - - ^ ^ 95 5F 1 1 CLRB --0100 _ _ 96 60 2 6 NEG d,X --XXXX ` ` 97 61 3 7 AIM #,d,X --XX0- a a 98 62 3 7 OIM #,d,X --XX0- b b 99 63 2 6 COM d,X --XX01 c c 100 64 2 6 LSR d,X --0XXX d d 101 65 3 7 EIM #,d,X --XX0- e e 102 66 2 6 ROR d,X --XXXX f f 103 67 2 6 ASR d,X --XXXX g g 104 68 2 6 ASL d,X --XXXX h h 105 69 2 6 ROL d,X --XXXX i i 106 6A 2 6 DEC d,X --XXX- j j 107 6B 3 5 TIM #,d,X --XX0- k k 108 6C 2 6 INC d,X --XXX- l l 109 6D 2 4 TST d,X --XX00 m m 110 6E 2 3 JMP d,X ------ n n 111 6F 2 5 CLR d,X --0100 o o 112 70 3 6 NEG mm --XXXX p p 113 71 3 6 AIM #,0m --XX0- q q 114 72 3 6 OIM #,0m --XX0- r r 115 73 3 6 COM mm --XX01 s s 116 74 3 6 LSR mm --0XXX t t 117 75 3 6 EIM #,0m --XX0- u u 118 76 3 6 ROR mm --XXXX v v 119 77 3 6 ASR mm --XXXX w w 120 78 3 6 ASL mm --XXXX x x 121 79 3 6 ROL mm --XXXX y y 122 7A 3 6 DEC mm --XXX- z z 123 7B 3 4 TIM #,0m --XX0- { { 124 7C 3 6 INC mm --XXX- | | 125 7D 3 4 TST mm --XX00 } } 126 7E 3 3 JMP mm ------ → → 127 7F 3 5 CLR mm --0100 ← ← 128 80 2 2 SUBA # --XXXX Ç 129 81 2 2 CMPA # --XXXX ü 130 82 2 2 SBCA # --XXXX é 131 83 3 3 SUBD ## --XXXX â 132 84 2 2 ANDA # --XX0- ä 133 85 2 2 BITA # --XX0- à 134 86 2 2 LDAA # --XX0- å 135 87 - - - ç 136 88 2 2 EORA # --XX0- ê 137 89 2 2 ADCA # X-XXXX ë 138 8A 2 2 ORAA # --XX0- è 139 8B 2 2 ADDA # X-XXXX ï 140 8C 3 3 CPX ## --XXXX î 141 8D 2 5 BSR r ------ ì 142 8E 3 3 LDS ## --XX0- Ä 143 8F - - - Å 144 90 2 3 SUBA 0m --XXXX É 145 91 2 3 CMPA 0m --XXXX æ 146 92 2 3 SBCA 0m --XXXX Æ 147 93 2 4 SUBD 0m --XXXX ô 148 94 2 3 ANDA 0m --XX0- ö 149 95 2 3 BITA 0m --XX0- ò 150 96 2 3 LDAA 0m --XX0- û 151 97 2 3 STAA 0m --XX0- ù 152 98 2 3 EORA 0m --XX0- ÿ 153 99 2 3 ADCA 0m X-XXXX Ö 154 9A 2 3 ORAA 0m --XX0- Ü 155 9B 2 3 ADDA 0m X-XXXX ø 156 9C 2 4 CPX 0m --XXXX £ 157 9D 2 5 JSR 0m ------ Ø 158 9E 2 4 LDS 0m --XX0- x 159 9F 2 4 STS 0m --XX0- Guilder 160 A0 2 4 SUBA d,X --XXXX á Space 161 A1 2 4 CMPA d,X --XXXX í square 162 A2 2 4 SBCA d,X --XXXX ó topleft hook 163 A3 2 5 SUBD d,X --XXXX ú bottomright hook 164 A4 2 4 ANDA d,X --XX0- ñ diagonal dash 165 A5 2 4 BITA d,X --XX0- Ñ dot 166 A6 2 4 LDAA d,X --XX0- ª o (small) 167 A7 2 4 STAA d,X --XX0- º a (small) 168 A8 2 4 EORA d,X --XX0- ¿ i (small) 169 A9 2 4 ADCA d,X X-XXXX ↑ u (small) 170 AA 2 4 ORAA d,X --XX0- ↓ e (small) 171 AB 2 4 ADDA d,X X-XXXX ½ o (small) 172 AC 2 5 CPX d,X --XXXX ¼ ya(small) 173 AD 2 5 JSR d,X ------ ¡ yu(small) 174 AE 2 5 LDS d,X --XX0- « yo(small) 175 AF 2 5 STS d,X --XX0- » tsu(small) 176 B0 3 4 SUBA mm --XXXX S, - 177 B1 3 4 CMPA mm --XXXX s, a 178 B2 3 4 SBCA mm --XXXX G~ i 179 B3 3 5 SUBD mm --XXXX g~ u 180 B4 3 4 ANDA mm --XX0- I. e 181 B5 3 4 BITA mm --XX0- Á o 182 B6 3 4 LDAA mm --XX0- Â ka 183 B7 3 4 STAA mm --XX0- À ki 184 B8 3 4 EORA mm --XX0- ?? ku 185 B9 3 4 ADCA mm X-XXXX ?? ke 186 BA 3 4 ORAA mm --XX0- Γ ko 187 BB 3 4 ADDA mm X-XXXX ?? sa 188 BC 3 5 CPX mm --XXXX ?? shi 189 BD 3 6 JSR mm ------ Ξ su 190 BE 3 5 LDS mm --XX0- ¥ se 191 BF 3 5 STS mm --XX0- Π so 192 C0 2 2 SUBB # --XXXX φ ta 193 C1 2 2 CMPB # --XXXX Ψ chi 194 C2 2 2 SBCB # --XXXX α tsu 195 C3 3 3 ADDD ## --XXXX γ te 196 C4 2 2 ANDB # --XX0- δ to 197 C5 2 2 BITB # --XX0- ε na 198 C6 2 2 LDAB # --XX0- ã ni 199 C7 - - - Ã nu 200 C8 2 2 EORB # --XX0- ζ ne 201 C9 2 2 ADCB # X-XXXX η no 202 CA 2 2 ORAB # --XX0- θ ha 203 CB 2 2 ADDB # X-XXXX κ hi 204 CC 3 3 LDD ## --XX0- λ fu 205 CD - - - ξ he 206 CE 3 3 LDX ## --XX0- σ ho 207 CF - - - ?? ma 208 D0 2 3 SUBB 0m --XXXX τ mi 209 D1 2 3 CMPB 0m --XXXX υ mu 210 D2 2 3 SBCB 0m --XXXX Ê me 211 D3 2 4 ADDD 0m --XXXX Ë mo 212 D4 2 3 ANDB 0m --XX0- È ya 213 D5 2 3 BITB 0m --XX0- ψ yu 214 D6 2 3 LDAB 0m --XX0- Í yo 215 D7 2 3 STAB 0m --XX0- Î ra 216 D8 2 3 EORB 0m --XX0- Ï ri 217 D9 2 3 ADCB 0m X-XXXX ω ru 218 DA 2 3 ORAB 0m --XX0- α' re 219 DB 2 3 ADDB 0m X-XXXX ε' ro 220 DC 2 4 LDD 0m --XX0- η' wa 221 DD 2 4 STD 0m --XX0- ω' n 222 DE 2 4 LDX 0m --XX0- Ì `` 223 DF 2 4 STX 0m --XX0- ° ° 224 E0 2 4 SUBB d,X --XXXX Ó α 225 E1 2 4 CMPB d,X --XXXX ß ä 226 E2 2 4 SBCB d,X --XXXX Ô ß 227 E3 2 5 ADDD d,X --XXXX Ò ε 228 E4 2 4 ANDB d,X --XX0- õ µ 229 E5 2 4 BITB d,X --XX0- Õ σ 230 E6 2 4 LDAB d,X --XX0- µ ρ 231 E7 2 4 STAB d,X --XX0- ρ ?? 232 E8 2 4 EORB d,X --XX0- √ √ 233 E9 2 4 ADCB d,X X-XXXX -1 -1 234 EA 2 4 ORAB d,X --XX0- Û i 235 EB 2 4 ADDB d,X X-XXXX Ù x 236 EC 2 5 LDD d,X --XX0- ¢ ¢ 237 ED 2 5 STD d,X --XX0- Ý ?? 238 EE 2 5 LDX d,X --XX0- ý ñ 239 EF 2 5 STX d,X --XX0- Ú ö 240 F0 3 4 SUBB mm --XXXX ?? ?? 241 F1 3 4 CMPB mm --XXXX ± ?? 242 F2 3 4 SBCB mm --XXXX Θ Θ 243 F3 3 5 ADDD mm --XXXX ∞ ∞ 244 F4 3 4 ANDB mm --XX0- Ω Ω 245 F5 3 4 BITB mm --XX0- Grey block ü 246 F6 3 4 LDAB mm --XX0- Σ Σ 247 F7 3 4 STAB mm --XX0- π π 248 F8 3 4 EORB mm --XX0- ¾ x~ 249 F9 3 4 ADCB mm X-XXXX Heart ?? 250 FA 3 4 ORAB mm --XX0- Diamond sen 251 FB 3 4 ADDB mm X-XXXX Club man 252 FC 3 5 LDD mm --XX0- Spade en 253 FD 3 5 STD mm --XX0- ÷ ÷ 254 FE 3 5 LDX mm --XX0- Hard space Hard space 255 FF 3 5 STX mm --XX0- Black block Black block

Flags:

-      Unchanged
0 Cleared
1 Set
X Changed according to data
a Set when interrupt occurs. If previously set, an NMI is needed to exit wait state.
b Most significant bit of B, i.e. bit 7 of product.
c Carry will be set if the result is too large. This not only happens if highest nibble overflows by the adjustment, but also if carry was already set from a previous instruction (usually addition).