ops.dat (12217B)
1 # Tab 18, tabs 18, :set ts=18 2 # op args size bytes format cpu 3 .SECTION sym,string? 0 none section Z80,R800,GB80 4 .TEXT none 0 none text Z80,R800,GB80 5 .DATA none 0 none data Z80,R800,GB80 6 .BSS none 0 none bss Z80,R800,GB80 7 .DB imm8+ 0 none defb Z80,R800,GB80 8 .DEFB imm8+ 0 none defb Z80,R800,GB80 9 .BYTE imm8+ 0 none defb Z80,R800,GB80 10 .DW imm16+ 0 none defw Z80,R800,GB80 11 .DEFW imm16+ 0 none defw Z80,R800,GB80 12 .SHORT imm16+ 0 none defw Z80,R800,GB80 13 .WORD imm16+ 0 none defw Z80,R800,GB80 14 .DD imm32+ 0 none defd Z80,R800,GB80 15 .DEFD imm32+ 0 none defd Z80,R800,GB80 16 .LONG imm32+ 0 none defd Z80,R800,GB80 17 .INT imm16+ 0 none defd Z80,R800,GB80 18 .DQ imm64+ 0 none defq Z80,R800,GB80 19 .DEFQ imm64+ 0 none defq Z80,R800,GB80 20 .EQU sym,imm16 0 none equ Z80,R800,GB80 21 .EQU imm16 0 none equ Z80,R800,GB80 22 = imm16 0 none equ Z80,R800,GB80 23 .SIZE sym,imm16 0 none size Z80,R800,GB80 24 .SIZE imm16 0 none size Z80,R800,GB80 25 .COMM sym,imm16 0 none common Z80,R800,GB80 26 .COMM imm16 0 none common Z80,R800,GB80 27 .TYPE sym,imm16 0 none type Z80,R800,GB80 28 .TYPE imm16 0 none type Z80,R800,GB80 29 .GLOBL sym+ 0 none global Z80,R800,GB80 30 .PUBLIC sym+ 0 none global Z80,R800,GB80 31 .EXTERN sym+ 0 none extrn Z80,R800,GB80 32 .EXTRN sym+ 0 none extrn Z80,R800,GB80 33 .STRING string+ 0 none string Z80,R800,GB80 34 .ASCII string+ 0 none ascii Z80,R800,GB80 35 .ALIGN imm16+ 0 none align Z80,R800,GB80 36 .END none 0 none end Z80,R800,GB80 37 .INCLUDE string 0 none include Z80,R800,GB80 38 39 40 41 # p is any register from B, C, D, E, IXL, IXH, A 42 # q is any register from B, C, D, E, IYL, IYH, A 43 # r is any register from B, C, D, E, L, H, A 44 # dd is any register from BC, DE, HL, SP 45 # qq is any register from BC, DE, HL, AF 46 # pp is any register from BC, DE, IX, SP 47 # rr is any register from BC, DE, IY, SP 48 # cc is any flag from NZ, Z, NC, C, PO, PE, P, M 49 # ss is any flag from C, NC, Z, NZ 50 51 # 8 bit load group 52 LD r,imm8 2 0x06 ld8 Z80,R800,GB80 53 LD p,imm8 3 0xdd,0x06 ld8 Z80,R800 54 LD q,imm8 3 0xfd,0x06 ld8 Z80,R800 55 LD (HL),imm8 2 0x36 ld8 Z80,R800,GB80 56 57 LD r,r 1 0x40 ld8 Z80,R800,GB80 58 LD p,p 2 0xdd,0x40 ld8 Z80,R800 59 LD q,q 2 0xfd,0x40 ld8 Z80,R800 60 LD (HL),r 1 0x70 ld8 Z80,R800,GB80 61 LD r,(HL) 1 0x46 ld8 Z80,R800,GB80 62 63 LD r,(IX+n) 3 0xdd,0x46 idx Z80,R800 64 LD r,(IY+n) 3 0xfd,0x46 idx Z80,R800 65 LD (IX+n),r 3 0xdd,0x70 idx Z80,R800 66 LD (IY+n),r 3 0xfd,0x70 idx Z80,R800 67 68 LD (HL),imm8 2 0x36 ld8 Z80,R800,GB80 69 LD (IX+n),imm8 4 0xdd,0x36 idx Z80,R800 70 LD (IY+n),imm8 4 0xfd,0x36 idx Z80,R800 71 72 LD A,(BC) 1 0x0a noargs Z80,R800,GB80 73 LD A,(DE) 1 0x1a noargs Z80,R800,GB80 74 LD A,(n) 3 0x3a dir Z80,R800 75 76 LD (BC),A 1 0x2 noargs Z80,R800,GB80 77 LD (DE),A 1 0x12 noargs Z80,R800,GB80 78 LD (n),A 3 0x32 dir Z80,R800 79 80 LD A,(n) 3 0xfa dir GB80 81 LD A,(HL+) 1 0x2a ld8 GB80 #TODO 82 LD A,(HL-) 1 0x3a ld8 GB80 #TODO 83 LD A,($FF00+n) 2 0xf0 dir GB80 #TODO 84 LD A,($FF00+C) 2 0xf2 dir GB80 #TODO 85 86 LD (n),A 3 0xea dir GB80 87 LD (HL+),A 1 0x22 ld8 GB80 #TODO 88 LD (HL-),A 1 0x32 ld8 GB80 #TODO 89 LD ($FF00+n),A 2 0xe0 dir GB80 #TODO 90 LD ($FF00+C),A 2 0xe2 dir GB80 #TODO 91 92 LD A,I 2 0xed,0x57 noargs Z80,R800 93 LD A,R 2 0xed,0x5f noargs Z80,R800 94 LD I,A 2 0xed,0x47 noargs Z80,R800 95 LD R,A 2 0xed,0x4f noargs Z80,R800 96 97 # 16 bit load group 98 LD dd,imm16 3 0x01 ld16 Z80,R800,GB80 99 LD IX,imm16 4 0xdd,0x21 ld16 Z80,R800 100 LD IY,imm16 4 0xfd,0x21 ld16 Z80,R800 101 102 LD HL,(n) 3 0x2a ld16 Z80,R800,GB80 103 LD dd,(n) 4 0xed,0x4b ld16 Z80,R800 104 LD IX,(n) 4 0xdd,0x2a ld16 Z80,R800 105 LD IY,(n) 4 0xfd,0x2a ld16 Z80,R800 106 107 LD (n),HL 3 0x22 ld16 Z80,R800,GB80 108 LD (n),dd 4 0xed,0x43 ld16 Z80,R800 109 LD (n),IX 4 0xdd,0x22 ld16 Z80,R800 110 LD (n),IY 4 0xfd,0x22 ld16 Z80,R800 111 112 LD SP,HL 1 0xf9 noargs Z80,R800,GB80 113 LD SP,IX 2 0xdd,0xf9 noargs Z80,R800 114 LD SP,IY 2 0xfd,0xf9 noargs Z80,R800 115 116 PUSH qq 1 0xc5 ld16 Z80,R800,GB80 117 PUSH IX 2 0xdd,0xe5 ld16 Z80,R800 118 PUSH IY 2 0xfd,0xe5 ld16 Z80,R800 119 POP qq 1 0xc1 ld16 Z80,R800,GB80 120 POP IX 2 0xdd,0xe1 ld16 Z80,R800 121 POP IY 2 0xfd,0xe1 ld16 Z80,R800 122 123 # 8 bit ALU group 124 ADD A,r 1 0x80 alu8 Z80,R800,GB80 125 ADD A,p 2 0xdd,0x80 alu8 Z80,R800 126 ADD A,q 2 0xfd,0x80 alu8 Z80,R800 127 ADD A,imm8 2 0xc6 alu8 Z80,R800,GB80 128 ADD A,(HL) 1 0x86 alu8 Z80,R800,GB80 129 ADD A,(IX+n) 3 0xdd,0x86 alu8 Z80,R800 130 ADD A,(IY+n) 3 0xfd,0x86 alu8 Z80,R800 131 132 ADC A,r 1 0x88 alu8 Z80,R800,GB80 133 ADC A,p 2 0xdd,0x88 alu8 Z80,R800 134 ADC A,q 2 0xfd,0x88 alu8 Z80,R800 135 ADC A,imm8 2 0xce alu8 Z80,R800,GB80 136 ADC A,(HL) 1 0x8e alu8 Z80,R800,GB80 137 ADC A,(IX+n) 3 0xdd,0x8e alu8 Z80,R800 138 ADC A,(IY+n) 3 0xfd,0x8e alu8 Z80,R800 139 140 SUB A,r 1 0x90 alu8 Z80,R800,GB80 141 SUB A,p 2 0xdd,0x90 alu8 Z80,R800 142 SUB A,q 2 0xfd,0x90 alu8 Z80,R800 143 SUB A,imm8 2 0xd6 alu8 Z80,R800,GB80 144 SUB A,(HL) 1 0x96 alu8 Z80,R800,GB80 145 SUB A,(IX+n) 3 0xdd,0x96 alu8 Z80,R800 146 SUB A,(IY+n) 3 0xfd,0x96 alu8 Z80,R800 147 148 SBC A,r 1 0x98 alu8 Z80,R800,GB80 149 SBC A,p 2 0xdd,0x98 alu8 Z80,R800 150 SBC A,q 2 0xfd,0x98 alu8 Z80,R800 151 SBC A,imm8 2 0xde alu8 Z80,R800,GB80 152 SBC A,(HL) 1 0x9e alu8 Z80,R800,GB80 153 SBC A,(IX+n) 3 0xdd,0x9e alu8 Z80,R800 154 SBC A,(IY+n) 3 0xfd,0x9e alu8 Z80,R800 155 156 AND A,r 1 0xa0 alu8 Z80,R800,GB80 157 AND A,p 2 0xdd,0xa0 alu8 Z80,R800 158 AND A,q 2 0xfd,0xa0 alu8 Z80,R800 159 AND A,imm8 2 0xe6 alu8 Z80,R800,GB80 160 AND A,(HL) 1 0xa6 alu8 Z80,R800,GB80 161 AND A,(IX+n) 3 0xdd,0xa6 alu8 Z80,R800 162 AND A,(IY+n) 3 0xfd,0xa6 alu8 Z80,R800 163 164 OR A,r 1 0xb0 alu8 Z80,R800,GB80 165 OR A,p 2 0xdd,0xb0 alu8 Z80,R800 166 OR A,q 2 0xfd,0xb0 alu8 Z80,R800 167 OR A,imm8 2 0xf6 alu8 Z80,R800,GB80 168 OR A,(HL) 1 0xb6 alu8 Z80,R800,GB80 169 OR A,(IX+n) 3 0xdd,0xb6 alu8 Z80,R800 170 OR A,(IY+n) 3 0xfd,0xb6 alu8 Z80,R800 171 172 XOR A,r 1 0xa8 alu8 Z80,R800,GB80 173 XOR A,p 2 0xdd,0xa8 alu8 Z80,R800 174 XOR A,q 2 0xfd,0xa8 alu8 Z80,R800 175 XOR A,imm8 2 0xee alu8 Z80,R800,GB80 176 XOR A,(HL) 1 0xae alu8 Z80,R800,GB80 177 XOR A,(IX+n) 3 0xdd,0xae alu8 Z80,R800 178 XOR A,(IY+n) 3 0xfd,0xae alu8 Z80,R800 179 180 CP A,r 1 0xb8 alu8 Z80,R800,GB80 181 CP A,p 2 0xdd,0xb8 alu8 Z80,R800 182 CP A,q 2 0xfd,0xb8 alu8 Z80,R800 183 CP A,imm8 2 0xfe alu8 Z80,R800,GB80 184 CP A,(HL) 1 0xbe alu8 Z80,R800,GB80 185 CP A,(IX+n) 3 0xdd,0xbe alu8 Z80,R800 186 CP A,(IY+n) 3 0xfd,0xbe alu8 Z80,R800 187 188 INC r 1 0x04 alu8 Z80,R800,GB80 189 INC p 2 0xdd,0x04 alu8 Z80,R800 190 INC q 2 0xfd,0x04 alu8 Z80,R800 191 INC (HL) 1 0x34 alu8 Z80,R800,GB80 192 INC (IX+n) 3 0xdd,0x34 alu8 Z80,R800 193 INC (IY+n) 3 0xfd,0x34 alu8 Z80,R800 194 195 DEC r 1 0x05 alu8 Z80,R800,GB80 196 DEC p 2 0xdd,0x05 alu8 Z80,R800 197 DEC q 2 0xfd,0x05 alu8 Z80,R800 198 DEC (HL) 1 0x35 alu8 Z80,R800,GB80 199 DEC (IX+n) 3 0xdd,0x35 alu8 Z80,R800 200 DEC (IY+n) 3 0xfd,0x35 alu8 Z80,R800 201 202 ADD SP,dd 2 0xE8 alu8 GB80 203 LD HL,SP+imm8 2 0xF8 alu8 GB80 204 205 # 16 bit ALU group 206 ADD HL,dd 1 0x09 alu16 Z80,R800,GB80 207 ADC HL,dd 2 0xed,0x4a alu16 Z80,R800 208 SBC HL,dd 2 0xed,0x42 alu16 Z80,R800 209 ADD IX,pp 2 0xdd,0x09 alu16 Z80,R800 210 ADD IY,rr 2 0xfd,0x09 alu16 Z80,R800 211 212 INC dd 1 0x03 alu16 Z80,R800,GB80 213 INC IX 2 0xdd,0x23 alu16 Z80,R800 214 INC IY 2 0xfd,0x23 alu16 Z80,R800 215 216 DEC dd 1 0x0b alu16 Z80,R800,GB80 217 DEC IX 2 0xdd,0x2b alu16 Z80,R800 218 DEC IY 2 0xfd,0x2b alu16 Z80,R800 219 220 # General purpose arithmetic and CPU control group 221 DAA none 1 0x27 noargs Z80,R800,GB80 222 CPL none 1 0x2f noargs Z80,R800,GB80 223 NEG none 2 0xed,0x44 noargs Z80,R800 224 CCF none 1 0x3f noargs Z80,R800,GB80 225 SCF none 1 0x37 noargs Z80,R800,GB80 226 NOP none 1 0x00 noargs Z80,R800,GB80 227 HALT none 1 0x76 noargs Z80,R800,GB80 228 STOP none 2 0x10,0x00 noargs GB80 229 DI none 1 0xf3 noargs Z80,R800,GB80 230 EI none 1 0xfb noargs Z80,R800,GB80 231 IM imm8 2 0xed,0x46 im Z80,R800 232 233 # Exchange, block transfer and search groups 234 EX DE,HL 1 0xeb noargs Z80,R800 235 EX AF,AF' 1 0x08 noargs Z80,R800 236 EXX none 1 0xd9 noargs Z80,R800 237 EX (SP),HL 1 0xe3 noargs Z80,R800 238 EX (SP),IX 2 0xdd,0xe3 noargs Z80,R800 239 EX (SP),IY 2 0xfd,0xe3 noargs Z80,R800 240 241 LDI none 2 0xed,0xa0 noargs Z80,R800 242 LDIR none 2 0xed,0xb0 noargs Z80,R800 243 LDD none 2 0xed,0xa8 noargs Z80,R800 244 LDDR none 2 0xed,0xb8 noargs Z80,R800 245 246 CPI none 2 0xed,0xa1 noargs Z80,R800 247 CPIR none 2 0xed,0xb1 noargs Z80,R800 248 CPD none 2 0xed,0xa9 noargs Z80,R800 249 CPDR none 2 0xed,0xb9 noargs Z80,R800 250 251 # Rotate and shift group 252 RLCA none 1 0x07 noargs Z80,R800,GB80 253 RLA none 1 0x17 noargs Z80,R800,GB80 254 RRCA none 1 0x0f noargs Z80,R800,GB80 255 RRA none 1 0x1f noargs Z80,R800,GB80 256 257 RLD none 2 0xed,0x6f noargs Z80,R800 258 RRD none 2 0xed,0x67 noargs Z80,R800 259 260 RLC r 2 0xcb,0x00 rot_bit Z80,R800,GB80 261 RLC (HL) 2 0xcb,0x06 rot_bit Z80,R800,GB80 262 RLC (IX+n) 4 0xdd,0xcb,0,0x06 rot_bit Z80,R800 263 RLC (IY+n) 4 0xfd,0xcb,0,0x06 rot_bit Z80,R800 264 RLC (IX+n),r 4 0xdd,0xcb,0,0x00 rot_bit Z80,R800 265 RLC (IY+n),r 4 0xfd,0xcb,0,0x00 rot_bit Z80,R800 266 267 RL r 2 0xcb,0x10 rot_bit Z80,R800,GB80 268 RL (HL) 2 0xcb,0x16 rot_bit Z80,R800,GB80 269 RL (IX+n) 4 0xdd,0xcb,0,0x16 rot_bit Z80,R800 270 RL (IY+n) 4 0xfd,0xcb,0,0x16 rot_bit Z80,R800 271 RL (IX+n),r 4 0xdd,0xcb,0,0x10 rot_bit Z80,R800 272 RL (IY+n),r 4 0xfd,0xcb,0,0x10 rot_bit Z80,R800 273 274 RRC r 2 0xcb,0x08 rot_bit Z80,R800,GB80 275 RRC (HL) 2 0xcb,0x0e rot_bit Z80,R800,GB80 276 RRC (IX+n) 4 0xdd,0xcb,0,0x0e rot_bit Z80,R800 277 RRC (IY+n) 4 0xfd,0xcb,0,0x0e rot_bit Z80,R800 278 RRC (IX+n),r 4 0xdd,0xcb,0,0x08 rot_bit Z80,R800 279 RRC (IY+n),r 4 0xfd,0xcb,0,0x08 rot_bit Z80,R800 280 281 RR r 2 0xcb,0x18 rot_bit Z80,R800,GB80 282 RR (HL) 2 0xcb,0x1e rot_bit Z80,R800,GB80 283 RR (IX+n) 4 0xdd,0xcb,0,0x1e rot_bit Z80,R800 284 RR (IY+n) 4 0xfd,0xcb,0,0x1e rot_bit Z80,R800 285 RR (IX+n),r 4 0xdd,0xcb,0,0x18 rot_bit Z80,R800 286 RR (IY+n),r 4 0xfd,0xcb,0,0x18 rot_bit Z80,R800 287 288 SLA r 2 0xcb,0x20 rot_bit Z80,R800,GB80 289 SLA (HL) 2 0xcb,0x26 rot_bit Z80,R800,GB80 290 SLA (IX+n) 4 0xdd,0xcb,0,0x26 rot_bit Z80,R800 291 SLA (IY+n) 4 0xfd,0xcb,0,0x26 rot_bit Z80,R800 292 SLA (IX+n),r 4 0xdd,0xcb,0,0x20 rot_bit Z80,R800 293 SLA (IY+n),r 4 0xfd,0xcb,0,0x20 rot_bit Z80,R800 294 295 SWAP r 2 0xcb,0x30 rot_bit GB80 296 SWAP (HL) 2 0xcb,0x36 rot_bit GB80 297 298 SLL r 2 0xcb,0x30 rot_bit Z80 299 SLL (HL) 2 0xcb,0x36 rot_bit Z80 300 SLL (IX+n) 4 0xdd,0xcb,0,0x36 rot_bit Z80 301 SLL (IY+n) 4 0xfd,0xcb,0,0x36 rot_bit Z80 302 SLL (IX+n),r 4 0xdd,0xcb,0,0x30 rot_bit Z80 303 SLL (IY+n),r 4 0xfd,0xcb,0,0x30 rot_bit Z80 304 305 SRA r 2 0xcb,0x28 rot_bit Z80,R800,GB80 306 SRA (HL) 2 0xcb,0x2e rot_bit Z80,R800,GB80 307 SRA (IX+n) 4 0xdd,0xcb,0,0x2e rot_bit Z80,R800 308 SRA (IY+n) 4 0xfd,0xcb,0,0x2e rot_bit Z80,R800 309 SRA (IX+n),r 4 0xdd,0xcb,0,0x28 rot_bit Z80,R800 310 SRA (IY+n),r 4 0xfd,0xcb,0,0x28 rot_bit Z80,R800 311 312 SRL r 2 0xcb,0x38 rot_bit Z80,R800,GB80 313 SRL (HL) 2 0xcb,0x3e rot_bit Z80,R800,GB80 314 SRL (IX+n) 4 0xdd,0xcb,0,0x3e rot_bit Z80,R800 315 SRL (IY+n) 4 0xfd,0xcb,0,0x3e rot_bit Z80,R800 316 SRL (IX+n),r 4 0xdd,0xcb,0,0x38 rot_bit Z80,R800 317 SRL (IY+n),r 4 0xfd,0xcb,0,0x38 rot_bit Z80,R800 318 319 # Bit manipulation group 320 BIT imm3,r 2 0xcb,0x40 rot_bit Z80,R800,GB80 321 BIT imm3,(HL) 2 0xcb,0x46 rot_bit Z80,R800 322 BIT imm3,(IX+n) 4 0xdd,0xcb,0,0x46 rot_bit Z80,R800 323 BIT imm3,(IY+n) 4 0xfd,0xcb,0,0x46 rot_bit Z80,R800 324 325 SET imm3,r 2 0xcb,0xc0 rot_bit Z80,R800,GB80 326 SET imm3,(HL) 2 0xcb,0xc6 rot_bit Z80,R800,GB80 327 SET imm3,(IX+n) 4 0xdd,0xcb,0,0xc6 rot_bit Z80,R800 328 SET imm3,(IY+n) 4 0xfd,0xcb,0,0xc6 rot_bit Z80,R800 329 SET imm3,(IX+n),r 4 0xdd,0xcb,0,0xc0 rot_bit Z80,R800 330 SET imm3,(IY+n),r 4 0xfd,0xcb,0,0xc0 rot_bit Z80,R800 331 332 RES imm3,r 2 0xcb,0x80 rot_bit Z80,R800,GB80 333 RES imm3,(HL) 2 0xcb,0x86 rot_bit Z80,R800,GB80 334 RES imm3,(IX+n) 4 0xdd,0xcb,0,0x86 rot_bit Z80,R800 335 RES imm3,(IY+n) 4 0xfd,0xcb,0,0x86 rot_bit Z80,R800 336 RES imm3,(IX+n),r 4 0xdd,0xcb,0,0x80 rot_bit Z80,R800 337 RES imm3,(IY+n),r 4 0xfd,0xcb,0,0x80 rot_bit Z80,R800 338 339 # Input and output group 340 IN A,(n) 2 0xdb inout Z80,R800 341 IN r,(C) 2 0xed,0x40 inout Z80,R800 342 IN F,(C) 2 0xed,0x70 inout Z80,R800 343 INI none 2 0xed,0xa2 noargs Z80,R800 344 INIR none 2 0xed,0xb2 noargs Z80,R800 345 IND none 2 0xed,0xaa noargs Z80,R800 346 INDR none 2 0xed,0xba noargs Z80,R800 347 348 OUT (n),A 2 0xd3 inout Z80,R800 349 OUT (C),r 2 0xed,0x41 inout Z80,R800 350 OUT (C),0 2 0xed,0x71 inout Z80,R800 351 OUTI none 2 0xed,0xa3 noargs Z80,R800 352 OTIR none 2 0xed,0xb3 noargs Z80,R800 353 OUTD none 2 0xed,0xab noargs Z80,R800 354 OTDR none 2 0xed,0xbb noargs Z80,R800 355 356 # Jump group 357 JP imm16 3 0xc3 jp Z80,R800,GB80 358 JP cc,imm16 3 0xc2 jp Z80,R800,GB80 359 JR imm16 2 0x18 jr Z80,R800,GB80 360 JR ss,imm16 2 0x00 jr Z80,R800,GB80 361 JP HL 1 0xe9 noargs Z80,R800,GB80 362 JP IX 2 0xdd,0xe9 noargs Z80,R800 363 JP IY 2 0xfd,0xe9 noargs Z80,R800 364 DJNZ imm16 2 0x10 jr Z80,R800 365 366 # Call and return group 367 CALL imm16 3 0xcd jp Z80,R800,GB80 368 CALL cc,imm16 3 0xc4 jp Z80,R800,GB80 369 RET none 1 0xc9 noargs Z80,R800,GB80 370 RET cc 1 0xc0 jp Z80,R800,GB80 371 RETI none 2 0xed,0x4d noargs Z80,R800 372 RETI none 1 0xd9 noargs GB80 373 RETN none 2 0xed,0x45 noargs Z80,R800 374 RST rst 1 0xc7 rst Z80,R800,GB80