From: Leo C Date: Wed, 3 Aug 2016 14:11:07 +0000 (+0200) Subject: Add Z180 instructions X-Git-Tag: v0.1~3 X-Git-Url: http://cloudbase.mooo.com/gitweb/ddt180.git/commitdiff_plain/b0b4005cd9685b3c32e7f336a9ae34d816dae6c7?hp=eb982d46688793f5ff002bda472ef67a3b3c969c Add Z180 instructions --- diff --git a/ddtz.z80 b/ddtz.z80 index 5d28291..f964dc3 100644 --- a/ddtz.z80 +++ b/ddtz.z80 @@ -611,6 +611,7 @@ sub_0303h: ld hl,b_0cc3_start ;0303 21 c3 0c ! . . ld b,07fh ;0306 06 7f . jr l030ch ;0308 18 02 . . + sub_030ah: ld b,0ffh ;030a 06 ff . . l030ch: @@ -695,6 +696,7 @@ l0366h: get_lastarg_def: call get_arg_def ;0369 cd 6e 03 . n . jr l0366h ;036c 18 f8 . . + get_arg_def: push hl ;036e e5 . call expr ;036f cd be 03 . . . @@ -703,6 +705,7 @@ get_arg_def: l0375h: pop hl ;0375 e1 . ret ;0376 c9 . + sub_0377h: call b_037c_start ;0377 cd 7c 03 . | . jr l0366h ;037a 18 ea . . @@ -723,7 +726,7 @@ get_arg_range: defb 03eh ;038b 3e > l038ch: pop af ;038c f1 . - call sub_039ah ;038d cd 9a 03 . . . + call get_range ;038d cd 9a 03 . . . jr nc,l0398h ;0390 30 06 0 . ex af,af' ;0392 08 . pop bc ;0393 c1 . @@ -734,7 +737,7 @@ l0398h: pop af ;0398 f1 . ret ;0399 c9 . -sub_039ah: +get_range: call next_arg ;039a cd ca 02 . . . cp 'S' ;039d fe 53 . S jr nz,l03a2h ;039f 20 01 . @@ -1278,7 +1281,7 @@ l063eh: push hl ;0643 e5 . push de ;0644 d5 . ld iy,(REG.PC) ;0645 fd 2a 60 00 . * ` . - call sub_1965h ;0649 cd 65 19 . e . + call prnt_disas_instr ;0649 cd 65 19 . e . exx ;064c d9 . ex af,af' ;064d 08 . call crlf ;064e cd a3 02 . . . @@ -3005,7 +3008,7 @@ l1211h: ld (last_A),hl ;1214 22 64 12 " d . ld (l0062h),hl ;1217 22 62 00 " b . push hl ;121a e5 . - call sub_192dh ;121b cd 2d 19 . - . + call prnt_disas_line ;121b cd 2d 19 . - . pop iy ;121e fd e1 . . ld c,b ;1220 48 H ld de,(offs.@) ;1221 ed 5b 64 00 . [ d . @@ -3070,149 +3073,230 @@ sub_1268h: jp (hl) ;1288 e9 . b_1289_start: - defw l1551h ;1289 51 15 Q . - defb 088h ;128b 88 . - defw l1571h ;128c 71 15 q . - defb 080h ;128e 80 . - defw l15a8h ;128f a8 15 . . - defb 0a0h ;1291 a0 . - defw l1609h ;1292 09 16 . . - defb 040h ;1294 40 @ - defw l162dh ;1295 2d 16 - . - defb 0c4h ;1297 c4 . - defw l153bh ;1298 3b 15 ; . - defb 03fh ;129a 3f ? - defw l15a8h ;129b a8 15 . . - defb 0b8h ;129d b8 . - defw l1544h ;129e 44 15 D . - defb 0a9h ;12a0 a9 . - defw l1544h ;12a1 44 15 D . - defb 0b9h ;12a3 b9 . - defw l1544h ;12a4 44 15 D . - defb 0a1h ;12a6 a1 . - defw l1544h ;12a7 44 15 D . - defb 0b1h ;12a9 b1 . - defw l153bh ;12aa 3b 15 ; . - defb 02fh ;12ac 2f / - defw l153bh ;12ad 3b 15 ; . - defb 027h ;12af 27 ' - defw l1798h ;12b0 98 17 . . - defb 005h ;12b2 05 . - defw l153bh ;12b3 3b 15 ; . - defb 0f3h ;12b5 f3 . - defw l1699h ;12b6 99 16 . . - defb 010h ;12b8 10 . - defw l153bh ;12b9 3b 15 ; . - defb 0fbh ;12bb fb . - defw l1749h ;12bc 49 17 I . - defb 0e3h ;12be e3 . - defw l153bh ;12bf 3b 15 ; . - defb 0d9h ;12c1 d9 . - defw l153bh ;12c2 3b 15 ; . - defb 076h ;12c4 76 v - defw l16b4h ;12c5 b4 16 . . - defb 046h ;12c7 46 F - defw l16edh ;12c8 ed 16 . . - defb 040h ;12ca 40 @ - defw l1798h ;12cb 98 17 . . - defb 004h ;12cd 04 . - defw l1544h ;12ce 44 15 D . - defb 0aah ;12d0 aa . - defw l1544h ;12d1 44 15 D . - defb 0bah ;12d3 ba . - defw l1544h ;12d4 44 15 D . - defb 0a2h ;12d6 a2 . - defw l1544h ;12d7 44 15 D . - defb 0b2h ;12d9 b2 . - defw l1653h ;12da 53 16 S . - defb 0c2h ;12dc c2 . - defw l16a0h ;12dd a0 16 . . - defb 020h ;12df 20 - defw l1352h ;12e0 52 13 R . - defb 040h ;12e2 40 @ - defw l1544h ;12e3 44 15 D . - defb 0a8h ;12e5 a8 . - defw l1544h ;12e6 44 15 D . - defb 0b8h ;12e8 b8 . - defw l1544h ;12e9 44 15 D . - defb 0a0h ;12eb a0 . - defw l1544h ;12ec 44 15 D . - defb 0b0h ;12ee b0 . - defw l1544h ;12ef 44 15 D . - defb 044h ;12f1 44 D - defw l153bh ;12f2 3b 15 ; . - defb 000h ;12f4 00 . - defw l15a8h ;12f5 a8 15 . . - defb 0b0h ;12f7 b0 . - defw l1544h ;12f8 44 15 D . - defb 0bbh ;12fa bb . - defw l1544h ;12fb 44 15 D . - defb 0b3h ;12fd b3 . - defw l1721h ;12fe 21 17 ! . - defb 041h ;1300 41 A - defw l1544h ;1301 44 15 D . - defb 0abh ;1303 ab . - defw l1544h ;1304 44 15 D . - defb 0a3h ;1306 a3 . - defw l16d9h ;1307 d9 16 . . - defb 0c1h ;1309 c1 . - defw l16d9h ;130a d9 16 . . - defb 0c5h ;130c c5 . - defw l1609h ;130d 09 16 . . - defb 080h ;130f 80 . - defw l1645h ;1310 45 16 E . - defb 0c0h ;1312 c0 . - defw l1544h ;1313 44 15 D . - defb 04dh ;1315 4d M - defw l1544h ;1316 44 15 D . - defb 045h ;1318 45 E - defw l15d5h ;1319 d5 15 . . - defb 010h ;131b 10 . - defw l153bh ;131c 3b 15 ; . - defb 017h ;131e 17 . - defw l15d5h ;131f d5 15 . . - defb 000h ;1321 00 . - defw l153bh ;1322 3b 15 ; . - defb 007h ;1324 07 . - defw l1544h ;1325 44 15 D . - defb 06fh ;1327 6f o - defw l15d5h ;1328 d5 15 . . - defb 018h ;132a 18 . - defw l153bh ;132b 3b 15 ; . - defb 01fh ;132d 1f . - defw l15d5h ;132e d5 15 . . - defb 008h ;1330 08 . - defw l153bh ;1331 3b 15 ; . - defb 00fh ;1333 0f . - defw l1544h ;1334 44 15 D . - defb 067h ;1336 67 g - defw l16cah ;1337 ca 16 . . - defb 0c7h ;1339 c7 . - defw l1551h ;133a 51 15 Q . - defb 098h ;133c 98 . - defw l153bh ;133d 3b 15 ; . - defb 037h ;133f 37 7 - defw l1609h ;1340 09 16 . . - defb 0c0h ;1342 c0 . - defw l15d5h ;1343 d5 15 . . - defb 020h ;1345 20 - defw l15d5h ;1346 d5 15 . . - defb 028h ;1348 28 ( - defw l15d5h ;1349 d5 15 . . - defb 038h ;134b 38 8 - defw l15a8h ;134c a8 15 . . - defb 090h ;134e 90 . - defw l15a8h ;134f a8 15 . . - defb 0a8h ;1351 a8 . - -l1352h: - call sub_182eh ;1352 cd 2e 18 . . . + defw as.ADC_SBC ;ADC 1289 51 15 Q . + defb 088h ; 128b 88 . + defw as.ADD ;ADD 128c 71 15 q . + defb 080h ; 128e 80 . + defw as.AND_CP_OR_SUB_XOR ;AND 128f a8 15 . . + defb 0a0h ; 1291 a0 . + defw as.BITOP ;BIT 1292 09 16 . . + defb 040h ; 1294 40 @ + defw as.CALL ;CALL 1295 2d 16 - . + defb 0c4h ; 1297 c4 . + defw as.opc.noarg ;CCF 1298 3b 15 ; . + defb 03fh ; 129a 3f ? + defw as.AND_CP_OR_SUB_XOR ;CP 129b a8 15 . . + defb 0b8h ; 129d b8 . + defw gen.opc.ED2 ;CPD 129e 44 15 D . + defb 0a9h ; 12a0 a9 . + defw gen.opc.ED2 ;CPDR 12a1 44 15 D . + defb 0b9h ; 12a3 b9 . + defw gen.opc.ED2 ;CPI 12a4 44 15 D . + defb 0a1h ; 12a6 a1 . + defw gen.opc.ED2 ;CPIR 12a7 44 15 D . + defb 0b1h ; 12a9 b1 . + defw as.opc.noarg ;CPL 12aa 3b 15 ; . + defb 02fh ; 12ac 2f / + defw as.opc.noarg ;DAA 12ad 3b 15 ; . + defb 027h ; 12af 27 ' + defw as.DEC_INC ;DEC 12b0 98 17 . . + defb 005h ; 12b2 05 . + defw as.opc.noarg ;DI 12b3 3b 15 ; . + defb 0f3h ; 12b5 f3 . + defw as.DJNZ ;DJNZ 12b6 99 16 . . + defb 010h ; 12b8 10 . + defw as.opc.noarg ;EI 12b9 3b 15 ; . + defb 0fbh ; 12bb fb . + defw as.EX ;EX 12bc 49 17 I . + defb 0e3h ; 12be e3 . + defw as.opc.noarg ;EXX 12bf 3b 15 ; . + defb 0d9h ; 12c1 d9 . + defw as.opc.noarg ;HALT 12c2 3b 15 ; . + defb 076h ; 12c4 76 v + defw as.IM ;IM 12c5 b4 16 . . + defb 046h ; 12c7 46 F + defw as.IN ;IN 12c8 ed 16 . . + defb 040h ; 12ca 40 @ + defw as.DEC_INC ;INC 12cb 98 17 . . + defb 004h ; 12cd 04 . + defw gen.opc.ED2 ;IND 12ce 44 15 D . + defb 0aah ; 12d0 aa . + defw gen.opc.ED2 ;INDR 12d1 44 15 D . + defb 0bah ; 12d3 ba . + defw gen.opc.ED2 ;INI 12d4 44 15 D . + defb 0a2h ; 12d6 a2 . + defw gen.opc.ED2 ;INIR 12d7 44 15 D . + defb 0b2h ; 12d9 b2 . + defw as.JP ;JP 12da 53 16 S . + defb 0c2h ; 12dc c2 . + defw as.JR ;JR 12dd a0 16 . . + defb 020h ; 12df 20 + defw as.LD ;LD 12e0 52 13 R . + defb 040h ; 12e2 40 @ + defw gen.opc.ED2 ;LDD 12e3 44 15 D . + defb 0a8h ; 12e5 a8 . + defw gen.opc.ED2 ;LDDR 12e6 44 15 D . + defb 0b8h ; 12e8 b8 . + defw gen.opc.ED2 ;LDI 12e9 44 15 D . + defb 0a0h ; 12eb a0 . + defw gen.opc.ED2 ;LDIR 12ec 44 15 D . + defb 0b0h ; 12ee b0 . + defw gen.opc.ED2 ;NEG 12ef 44 15 D . + defb 044h ; 12f1 44 D + defw as.opc.noarg ;NOP 12f2 3b 15 ; . + defb 000h ; 12f4 00 . + defw as.AND_CP_OR_SUB_XOR ;OR 12f5 a8 15 . . + defb 0b0h ; 12f7 b0 . + defw gen.opc.ED2 ;OTDR 12f8 44 15 D . + defb 0bbh ; 12fa bb . + defw gen.opc.ED2 ;OTIR 12fb 44 15 D . + defb 0b3h ; 12fd b3 . + defw as.OUT ;OUT 12fe 21 17 ! . + defb 041h ; 1300 41 A + defw gen.opc.ED2 ;OUTD 1301 44 15 D . + defb 0abh ; 1303 ab . + defw gen.opc.ED2 ;OUTI 1304 44 15 D . + defb 0a3h ; 1306 a3 . + defw as.POP_PUSH ;POP 1307 d9 16 . . + defb 0c1h ; 1309 c1 . + defw as.POP_PUSH ;PUSH 130a d9 16 . . + defb 0c5h ; 130c c5 . + defw as.BITOP ;RES 130d 09 16 . . + defb 080h ; 130f 80 . + defw as.RET ;RET 1310 45 16 E . + defb 0c0h ; 1312 c0 . + defw gen.opc.ED2 ;RETI 1313 44 15 D . + defb 04dh ; 1315 4d M + defw gen.opc.ED2 ;RETN 1316 44 15 D . + defb 045h ; 1318 45 E + defw as.SHIFTOP ;RL 1319 d5 15 . . + defb 010h ; 131b 10 . + defw as.opc.noarg ;RLA 131c 3b 15 ; . + defb 017h ; 131e 17 . + defw as.SHIFTOP ;RLC 131f d5 15 . . + defb 000h ; 1321 00 . + defw as.opc.noarg ;RLCA 1322 3b 15 ; . + defb 007h ; 1324 07 . + defw gen.opc.ED2 ;RLD 1325 44 15 D . + defb 06fh ; 1327 6f o + defw as.SHIFTOP ;RR 1328 d5 15 . . + defb 018h ; 132a 18 . + defw as.opc.noarg ;RRA 132b 3b 15 ; . + defb 01fh ; 132d 1f . + defw as.SHIFTOP ;RRC 132e d5 15 . . + defb 008h ; 1330 08 . + defw as.opc.noarg ;RRCA 1331 3b 15 ; . + defb 00fh ; 1333 0f . + defw gen.opc.ED2 ;RRD 1334 44 15 D . + defb 067h ; 1336 67 g + defw as.RST ;RST 1337 ca 16 . . + defb 0c7h ; 1339 c7 . + defw as.ADC_SBC ;SBC 133a 51 15 Q . + defb 098h ; 133c 98 . + defw as.opc.noarg ;SCF 133d 3b 15 ; . + defb 037h ; 133f 37 7 + defw as.BITOP ;SET 1340 09 16 . . + defb 0c0h ; 1342 c0 . + defw as.SHIFTOP ;SLA 1343 d5 15 . . + defb 020h ; 1345 20 + defw as.SHIFTOP ;SRA 1346 d5 15 . . + defb 028h ; 1348 28 ( + defw as.SHIFTOP ;SRL 1349 d5 15 . . + defb 038h ; 134b 38 8 + defw as.AND_CP_OR_SUB_XOR ;SUB 134c a8 15 . . + defb 090h ; 134e 90 . + defw as.AND_CP_OR_SUB_XOR ;XOR 134f a8 15 . . + defb 0a8h ; 1351 a8 . + + defw as.IN0 ;IN0 + defb 000h ; + defw as.MLT ;MLT + defb 04ch ; + defw gen.opc.ED2 ;OTDM + defb 08bh ; + defw gen.opc.ED2 ;OTDMR + defb 09bh ; + defw gen.opc.ED2 ;OTIM + defb 083h ; + defw gen.opc.ED2 ;OTIMR + defb 093h ; + defw as.OUTO ;OUT0 + defb 001h ; + defw gen.opc.ED2 ;SLP + defb 076h ; + defw as.TST ;TST + defb 004h ; + defw as.TSTIO ;TSTIO + defb 074h ; + +as.TST: + call arg.r_HL_A ; + jr nc,as.tst_0 + rlca + rlca + rlca + add a,b + ld b,a + jp gen.opc.ED2 +as.tst_0: + ld b,064h +as.TSTIO: + call arg.imm_8bit ; + jr as.store_io0 + +as.IN0: + call arg.r_HL_A ; + jr nc,error7 + cp 006h + jr z,error7 + rlca + rlca + rlca + add a,b + ld b,a + call assert_comma ; + call arg.addr_8bit ; + jr as.store_io0 + +as.OUTO: + call arg.addr_8bit ; + call assert_comma ; + call arg.r_HL_A ; + jr nc,error7 + cp 006h + jr z,error7 + rlca + rlca + rlca + add a,b + ld b,a + +as.store_io0: + call assert_eol + ld (iy+000h),0edh + ld (iy+001h),b + ld (iy+002h),l + ld c,003h + ret + +as.MLT: + call arg.ww ; + jr nc,error7 + add a,b + ld b,a + jp gen.opc.ED2 + +error7: + jp ERROR + +as.LD: + call arg.r_HL_A ;1352 cd 2e 18 . . . jr c,l13d4h ;1355 38 7d 8 } - call sub_1855h ;1357 cd 55 18 . U . + call arg.IDX_displcmnt ;1357 cd 55 18 . U . jp c,l1471h ;135a da 71 14 . q . - call sub_181bh ;135d cd 1b 18 . . . + call arg.ww ;135d cd 1b 18 . . . jp c,l149ch ;1360 da 9c 14 . . . - call sub_183dh ;1363 cd 3d 18 . = . + call arg.IX_IY ;1363 cd 3d 18 . = . jp c,l14f5h ;1366 da f5 14 . . . ld a,(de) ;1369 1a . cp 'I' ;136a fe 49 . I @@ -3222,14 +3306,14 @@ l1352h: cp '(' ;1374 fe 28 . ( jp nz,ERROR ;1376 c2 07 01 . . . inc de ;1379 13 . - call sub_181bh ;137a cd 1b 18 . . . + call arg.ww ;137a cd 1b 18 . . . jp c,l1528h ;137d da 28 15 . ( . call test_expr ;1380 cd 09 18 . . . call test_paren_close ;1383 cd c5 18 . . . call assert_comma ;1386 cd be 18 . . . - call sub_181bh ;1389 cd 1b 18 . . . + call arg.ww ;1389 cd 1b 18 . . . jr c,l13c2h ;138c 38 34 8 4 - call sub_183dh ;138e cd 3d 18 . = . + call arg.IX_IY ;138e cd 3d 18 . = . jr nc,l13aah ;1391 30 17 0 . ld b,022h ;1393 06 22 . " l1395h: @@ -3248,7 +3332,7 @@ l13aah: jp nz,ERROR ;13ad c2 07 01 . . . inc de ;13b0 13 . ld b,032h ;13b1 06 32 . 2 -l13b3h: +as.store_3: call assert_eol ;13b3 cd d6 02 . . . ld (iy+000h),b ;13b6 fd 70 00 . p . ld (iy+001h),l ;13b9 fd 75 01 . u . @@ -3266,11 +3350,11 @@ l13c9h: jr l139bh ;13ce 18 cb . . l13d0h: ld b,022h ;13d0 06 22 . " - jr l13b3h ;13d2 18 df . . + jr as.store_3 ;13d2 18 df . . l13d4h: ld b,a ;13d4 47 G call assert_comma ;13d5 cd be 18 . . . - call sub_182eh ;13d8 cd 2e 18 . . . + call arg.r_HL_A ;13d8 cd 2e 18 . . . jr nc,l13f0h ;13db 30 13 0 . push af ;13dd f5 . ld a,b ;13de 78 x @@ -3285,9 +3369,9 @@ l13d4h: jp z,ERROR ;13e9 ca 07 01 . . . l13ech: ld b,a ;13ec 47 G - jp l153bh ;13ed c3 3b 15 . ; . + jp as.opc.noarg ;13ed c3 3b 15 . ; . l13f0h: - call sub_1855h ;13f0 cd 55 18 . U . + call arg.IDX_displcmnt ;13f0 cd 55 18 . U . jr nc,l1413h ;13f3 30 1e 0 . ld a,b ;13f5 78 x rlca ;13f6 07 . @@ -3296,6 +3380,7 @@ l13f0h: add a,046h ;13f9 c6 46 . F cp 076h ;13fb fe 76 . v jp z,ERROR ;13fd ca 07 01 . . . + l1400h: ld b,a ;1400 47 G call assert_eol ;1401 cd d6 02 . . . @@ -3323,11 +3408,11 @@ l1426h: ld b,057h ;142c 06 57 . W l142eh: inc de ;142e 13 . - jp l1544h ;142f c3 44 15 . D . + jp gen.opc.ED2 ;142f c3 44 15 . D . l1432h: cp '(' ;1432 fe 28 . ( jr z,l144ch ;1434 28 16 ( . - call sub_17ffh ;1436 cd ff 17 . . . + call arg.imm_8bit ;1436 cd ff 17 . . . ld a,b ;1439 78 x rlca ;143a 07 . rlca ;143b 07 . @@ -3335,7 +3420,7 @@ l1432h: add a,006h ;143d c6 06 . . l143fh: ld b,a ;143f 47 G -l1440h: +as.store_2: call assert_eol ;1440 cd d6 02 . . . ld (iy+000h),b ;1443 fd 70 00 . p . ld (iy+001h),l ;1446 fd 75 01 . u . @@ -3346,29 +3431,31 @@ l144ch: ld a,b ;144d 78 x cp 007h ;144e fe 07 . . jp nz,ERROR ;1450 c2 07 01 . . . - call sub_181bh ;1453 cd 1b 18 . . . + call arg.ww ;1453 cd 1b 18 . . . jr nc,l1466h ;1456 30 0e 0 . cp 030h ;1458 fe 30 . 0 jp nc,ERROR ;145a d2 07 01 . . . add a,00ah ;145d c6 0a . . ld b,a ;145f 47 G call test_paren_close ;1460 cd c5 18 . . . - jp l153bh ;1463 c3 3b 15 . ; . + jp as.opc.noarg ;1463 c3 3b 15 . ; . l1466h: call test_expr ;1466 cd 09 18 . . . call test_paren_close ;1469 cd c5 18 . . . ld b,03ah ;146c 06 3a . : - jp l13b3h ;146e c3 b3 13 . . . + jp as.store_3 ;146e c3 b3 13 . . . + l1471h: call assert_comma ;1471 cd be 18 . . . - call sub_182eh ;1474 cd 2e 18 . . . + call arg.r_HL_A ;1474 cd 2e 18 . . . jr nc,l1483h ;1477 30 0a 0 . cp 006h ;1479 fe 06 . . jp z,ERROR ;147b ca 07 01 . . . add a,070h ;147e c6 70 . p jp l1400h ;1480 c3 00 14 . . . + l1483h: - call sub_17ffh ;1483 cd ff 17 . . . + call arg.imm_8bit ;1483 cd ff 17 . . . call assert_eol ;1486 cd d6 02 . . . ld a,(prefix_ixiy) ;1489 3a cc 18 : . . ld (iy+000h),a ;148c fd 77 00 . w . @@ -3383,7 +3470,7 @@ l149ch: ld hl,t_HL.AF ;14a0 21 af 1f ! . . call sub_0318h ;14a3 cd 18 03 . . . jr c,l14c3h ;14a6 38 1b 8 . - call sub_183dh ;14a8 cd 3d 18 . = . + call arg.IX_IY ;14a8 cd 3d 18 . = . jr nc,l14cch ;14ab 30 1f 0 . ld a,b ;14ad 78 x cp 030h ;14ae fe 30 . 0 @@ -3401,7 +3488,7 @@ l14c3h: cp 030h ;14c4 fe 30 . 0 jr nz,error6 ;14c6 20 5d ] ld b,0f9h ;14c8 06 f9 . . - jr l153bh ;14ca 18 6f . o + jr as.opc.noarg ;14ca 18 6f . o l14cch: ld a,(de) ;14cc 1a . cp '(' ;14cd fe 28 . ( @@ -3417,14 +3504,14 @@ l14cch: jp l13c9h ;14e0 c3 c9 13 . . . l14e3h: ld b,02ah ;14e3 06 2a . * - jp l13b3h ;14e5 c3 b3 13 . . . + jp as.store_3 ;14e5 c3 b3 13 . . . l14e8h: call test_expr ;14e8 cd 09 18 . . . call assert_eol ;14eb cd d6 02 . . . ld a,001h ;14ee 3e 01 > . add a,b ;14f0 80 . ld b,a ;14f1 47 G - jp l13b3h ;14f2 c3 b3 13 . . . + jp as.store_3 ;14f2 c3 b3 13 . . . l14f5h: call assert_comma ;14f5 cd be 18 . . . ld a,(de) ;14f8 1a . @@ -3452,7 +3539,7 @@ l151fh: ld a,(de) ;151f 1a . inc de ;1520 13 . cp 'A' ;1521 fe 41 . A - jr z,l1544h ;1523 28 1f ( . + jr z,gen.opc.ED2 ;1523 28 1f ( . error6: jp ERROR ;1525 c3 07 01 . . . @@ -3467,25 +3554,25 @@ l1528h: cp 'A' ;1536 fe 41 . A jr nz,error6 ;1538 20 eb . inc de ;153a 13 . -l153bh: +as.opc.noarg: call assert_eol ;153b cd d6 02 . . . ld (iy+000h),b ;153e fd 70 00 . p . ld c,001h ;1541 0e 01 . . ret ;1543 c9 . -l1544h: +gen.opc.ED2: call assert_eol ;1544 cd d6 02 . . . ld (iy+000h),0edh ;1547 fd 36 00 ed . 6 . . ld (iy+001h),b ;154b fd 70 01 . p . ld c,002h ;154e 0e 02 . . ret ;1550 c9 . -l1551h: +as.ADC_SBC: ld hl,t_HL.AF ;1551 21 af 1f ! . . call sub_0318h ;1554 cd 18 03 . . . - jr nc,l15a8h ;1557 30 4f 0 O + jr nc,as.AND_CP_OR_SUB_XOR ;1557 30 4f 0 O call assert_comma ;1559 cd be 18 . . . - call sub_181bh ;155c cd 1b 18 . . . + call arg.ww ;155c cd 1b 18 . . . jp nc,ERROR ;155f d2 07 01 . . . push af ;1562 f5 . ld a,b ;1563 78 x @@ -3498,13 +3585,13 @@ l156ch: add a,b ;156d 80 . l156eh: ld b,a ;156e 47 G - jr l1544h ;156f 18 d3 . . -l1571h: + jr gen.opc.ED2 ;156f 18 d3 . . +as.ADD: ld hl,t_HL.AF ;1571 21 af 1f ! . . call sub_0318h ;1574 cd 18 03 . . . jr c,l159ah ;1577 38 21 8 ! - call sub_183dh ;1579 cd 3d 18 . = . - jr nc,l15a8h ;157c 30 2a 0 * + call arg.IX_IY ;1579 cd 3d 18 . = . + jr nc,as.AND_CP_OR_SUB_XOR ;157c 30 2a 0 * call assert_comma ;157e cd be 18 . . . ld hl,t_BC.DE.IX.SP ;1581 21 bd 1f ! . . ld a,(prefix_ixiy) ;1584 3a cc 18 : . . @@ -3512,7 +3599,7 @@ l1571h: jr nz,l158eh ;1589 20 03 . ld hl,t_BC.DE.IY.SP ;158b 21 b4 1f ! . . l158eh: - call sub_1818h ;158e cd 18 18 . . . + call arg.reg_16bit ;158e cd 18 18 . . . jp nc,ERROR ;1591 d2 07 01 . . . add a,009h ;1594 c6 09 . . l1596h: @@ -3520,11 +3607,11 @@ l1596h: jp l14b4h ;1597 c3 b4 14 . . . l159ah: call assert_comma ;159a cd be 18 . . . - call sub_181bh ;159d cd 1b 18 . . . + call arg.ww ;159d cd 1b 18 . . . jp nc,ERROR ;15a0 d2 07 01 . . . add a,009h ;15a3 c6 09 . . jp l13ech ;15a5 c3 ec 13 . . . -l15a8h: +as.AND_CP_OR_SUB_XOR: ld a,(de) ;15a8 1a . cp 'A' ;15a9 fe 41 . A jr nz,l15b8h ;15ab 20 0b . @@ -3537,11 +3624,11 @@ l15a8h: l15b7h: pop af ;15b7 f1 . l15b8h: - call sub_182eh ;15b8 cd 2e 18 . . . + call arg.r_HL_A ;15b8 cd 2e 18 . . . jr c,l15cbh ;15bb 38 0e 8 . - call sub_1855h ;15bd cd 55 18 . U . + call arg.IDX_displcmnt ;15bd cd 55 18 . U . jr c,l15cfh ;15c0 38 0d 8 . - call sub_17ffh ;15c2 cd ff 17 . . . + call arg.imm_8bit ;15c2 cd ff 17 . . . ld a,b ;15c5 78 x add a,046h ;15c6 c6 46 . F jp l143fh ;15c8 c3 3f 14 . ? . @@ -3552,10 +3639,11 @@ l15cfh: ld a,b ;15cf 78 x add a,006h ;15d0 c6 06 . . jp l1400h ;15d2 c3 00 14 . . . -l15d5h: - call sub_182eh ;15d5 cd 2e 18 . . . + +as.SHIFTOP: + call arg.r_HL_A ;15d5 cd 2e 18 . . . jr c,l15fah ;15d8 38 20 8 - call sub_1855h ;15da cd 55 18 . U . + call arg.IDX_displcmnt ;15da cd 55 18 . U . jp nc,ERROR ;15dd d2 07 01 . . . ld a,b ;15e0 78 x add a,006h ;15e1 c6 06 . . @@ -3569,6 +3657,7 @@ l15e4h: ld (iy+003h),b ;15f4 fd 70 03 . p . ld c,004h ;15f7 0e 04 . . ret ;15f9 c9 . + l15fah: add a,b ;15fa 80 . l15fbh: @@ -3578,12 +3667,13 @@ l15fbh: ld (iy+000h),0cbh ;1602 fd 36 00 cb . 6 . . ld c,002h ;1606 0e 02 . . ret ;1608 c9 . -l1609h: - call sub_17d3h ;1609 cd d3 17 . . . + +as.BITOP: + call arg.bit ;1609 cd d3 17 . . . call assert_comma ;160c cd be 18 . . . - call sub_182eh ;160f cd 2e 18 . . . + call arg.r_HL_A ;160f cd 2e 18 . . . jr c,l1624h ;1612 38 10 8 . - call sub_1855h ;1614 cd 55 18 . U . + call arg.IDX_displcmnt ;1614 cd 55 18 . U . jp nc,ERROR ;1617 d2 07 01 . . . ld a,l ;161a 7d } rlca ;161b 07 . @@ -3602,9 +3692,10 @@ l1624h: rlca ;1629 07 . add a,b ;162a 80 . jr l15fbh ;162b 18 ce . . -l162dh: + +as.CALL: push de ;162d d5 . - call sub_18a5h ;162e cd a5 18 . . . + call arg.cc_ZCPS ;162e cd a5 18 . . . jr nc,l163ch ;1631 30 09 0 . add a,b ;1633 80 . ld b,a ;1634 47 G @@ -3617,9 +3708,10 @@ l163ch: l163eh: pop af ;163e f1 . call test_expr ;163f cd 09 18 . . . - jp l13b3h ;1642 c3 b3 13 . . . -l1645h: - call sub_18a5h ;1645 cd a5 18 . . . + jp as.store_3 ;1642 c3 b3 13 . . . + +as.RET: + call arg.cc_ZCPS ;1645 cd a5 18 . . . jr nc,l164eh ;1648 30 04 0 . add a,b ;164a 80 . ld b,a ;164b 47 G @@ -3627,10 +3719,11 @@ l1645h: l164eh: ld b,0c9h ;164e 06 c9 . . l1650h: - jp l153bh ;1650 c3 3b 15 . ; . -l1653h: + jp as.opc.noarg ;1650 c3 3b 15 . ; . + +as.JP: push de ;1653 d5 . - call sub_18a5h ;1654 cd a5 18 . . . + call arg.cc_ZCPS ;1654 cd a5 18 . . . jr c,l1666h ;1657 38 0d 8 . l1659h: pop de ;1659 d1 . @@ -3639,6 +3732,7 @@ l1659h: jr c,l1674h ;1660 38 12 8 . ld b,0c3h ;1662 06 c3 . . jr l166eh ;1664 18 08 . . + l1666h: add a,b ;1666 80 . ld b,a ;1667 47 G @@ -3647,14 +3741,14 @@ l1666h: pop af ;166d f1 . l166eh: call test_expr ;166e cd 09 18 . . . - jp l13b3h ;1671 c3 b3 13 . . . + jp as.store_3 ;1671 c3 b3 13 . . . l1674h: call assert_eol ;1674 cd d6 02 . . . ld a,b ;1677 78 x and a ;1678 a7 . jr nz,l1680h ;1679 20 05 . ld b,0e9h ;167b 06 e9 . . - jp l153bh ;167d c3 3b 15 . ; . + jp as.opc.noarg ;167d c3 3b 15 . ; . l1680h: ld b,0ddh ;1680 06 dd . . dec a ;1682 3d = @@ -3662,7 +3756,7 @@ l1680h: ld b,0fdh ;1685 06 fd . . l1687h: ld l,0e9h ;1687 2e e9 . . - jp l1440h ;1689 c3 40 14 . @ . + jp as.store_2 ;1689 c3 40 14 . @ . l168ch: DC '(HL)' @@ -3670,12 +3764,12 @@ l168ch: DC '(IY)' DB 0 -l1699h: +as.DJNZ: call next_arg ;1699 cd ca 02 . . . ld b,010h ;169c 06 10 . . jr l16aeh ;169e 18 0e . . -l16a0h: - call sub_18ach ;16a0 cd ac 18 . . . +as.JR: + call arg.cc_ZC ;16a0 cd ac 18 . . . jr c,l16a9h ;16a3 38 04 8 . ld b,018h ;16a5 06 18 . . jr l16aeh ;16a7 18 05 . . @@ -3684,11 +3778,11 @@ l16a9h: ld b,a ;16aa 47 G call assert_comma ;16ab cd be 18 . . . l16aeh: - call sub_17dch ;16ae cd dc 17 . . . - jp l1440h ;16b1 c3 40 14 . @ . + call arg.j_displ ;16ae cd dc 17 . . . + jp as.store_2 ;16b1 c3 40 14 . @ . -l16b4h: - call sub_17ffh ;16b4 cd ff 17 . . . +as.IM: + call arg.imm_8bit ;16b4 cd ff 17 . . . ld a,l ;16b7 7d } cp 003h ;16b8 fe 03 . . jr nc,error2 ;16ba 30 5c 0 \ @@ -3699,10 +3793,10 @@ l16b4h: jr z,l16c7h ;16c3 28 02 ( . ld b,05eh ;16c5 06 5e . ^ l16c7h: - jp l1544h ;16c7 c3 44 15 . D . + jp gen.opc.ED2 ;16c7 c3 44 15 . D . -l16cah: - call sub_17ffh ;16ca cd ff 17 . . . +as.RST: + call arg.imm_8bit ;16ca cd ff 17 . . . ld a,l ;16cd 7d } push af ;16ce f5 . add a,b ;16cf 80 . @@ -3710,12 +3804,12 @@ l16cah: pop af ;16d1 f1 . and 0c7h ;16d2 e6 c7 . . jr nz,error2 ;16d4 20 42 B - jp l153bh ;16d6 c3 3b 15 . ; . + jp as.opc.noarg ;16d6 c3 3b 15 . ; . -l16d9h: - call sub_183dh ;16d9 cd 3d 18 . = . +as.POP_PUSH: + call arg.IX_IY ;16d9 cd 3d 18 . = . jr c,l16e7h ;16dc 38 09 8 . - call sub_1812h ;16de cd 12 18 . . . + call arg.zz ;16de cd 12 18 . . . jr nc,error2 ;16e1 30 35 0 5 add a,b ;16e3 80 . jp l13ech ;16e4 c3 ec 13 . . . @@ -3724,8 +3818,8 @@ l16e7h: add a,020h ;16e8 c6 20 . jp l1596h ;16ea c3 96 15 . . . -l16edh: - call sub_182eh ;16ed cd 2e 18 . . . +as.IN: + call arg.r_HL_A ;16ed cd 2e 18 . . . jr nc,error2 ;16f0 30 26 0 & cp 006h ;16f2 fe 06 . . jr z,error2 ;16f4 28 22 ( " @@ -3739,14 +3833,14 @@ l16edh: call assert_comma ;16ff cd be 18 . . . call sub_171bh ;1702 cd 1b 17 . . . jr c,l1715h ;1705 38 0e 8 . - call sub_17f3h ;1707 cd f3 17 . . . + call arg.addr_8bit ;1707 cd f3 17 . . . ld b,0dbh ;170a 06 db . . - jp l1440h ;170c c3 40 14 . @ . + jp as.store_2 ;170c c3 40 14 . @ . l170fh: call assert_comma ;170f cd be 18 . . . call sub_171bh ;1712 cd 1b 17 . . . l1715h: - jp c,l1544h ;1715 da 44 15 . D . + jp c,gen.opc.ED2 ;1715 da 44 15 . D . error2: jp ERROR ;1718 c3 07 01 . . . @@ -3754,11 +3848,11 @@ sub_171bh: ld hl,t__C_ ;171b 21 f4 1f ! . . jp sub_0318h ;171e c3 18 03 . . . -l1721h: +as.OUT: call sub_171bh ;1721 cd 1b 17 . . . jr nc,l1739h ;1724 30 13 0 . call assert_comma ;1726 cd be 18 . . . - call sub_182eh ;1729 cd 2e 18 . . . + call arg.r_HL_A ;1729 cd 2e 18 . . . jr nc,error2 ;172c 30 ea 0 . cp 006h ;172e fe 06 . . jr z,error2 ;1730 28 e6 ( . @@ -3769,15 +3863,15 @@ l1721h: jp l156eh ;1736 c3 6e 15 . n . l1739h: - call sub_17f3h ;1739 cd f3 17 . . . + call arg.addr_8bit ;1739 cd f3 17 . . . call assert_comma ;173c cd be 18 . . . cp 'A' ;173f fe 41 . A jr nz,error2 ;1741 20 d5 . inc de ;1743 13 . ld b,0d3h ;1744 06 d3 . . - jp l1440h ;1746 c3 40 14 . @ . + jp as.store_2 ;1746 c3 40 14 . @ . -l1749h: +as.EX: ld hl,b_176d_start ;1749 21 6d 17 ! m . call sub_030ah ;174c cd 0a 03 . . . jp nc,ERROR ;174f d2 07 01 . . . @@ -3813,14 +3907,14 @@ l178eh: db 0ddh,0e3h ;1794 dd . db 0fdh,0e3h ;1796 fd . -l1798h: - call sub_183dh ;1798 cd 3d 18 . = . +as.DEC_INC: + call arg.IX_IY ;1798 cd 3d 18 . = . jr c,l17b3h ;179b 38 16 8 . - call sub_181bh ;179d cd 1b 18 . . . + call arg.ww ;179d cd 1b 18 . . . jr c,l17bfh ;17a0 38 1d 8 . - call sub_182eh ;17a2 cd 2e 18 . . . + call arg.r_HL_A ;17a2 cd 2e 18 . . . jr c,l17cch ;17a5 38 25 8 % - call sub_1855h ;17a7 cd 55 18 . U . + call arg.IDX_displcmnt ;17a7 cd 55 18 . U . jp nc,ERROR ;17aa d2 07 01 . . . ld a,b ;17ad 78 x add a,030h ;17ae c6 30 . 0 @@ -3850,13 +3944,15 @@ l17cch: l17cfh: add a,b ;17cf 80 . jp l13ech ;17d0 c3 ec 13 . . . -sub_17d3h: - call sub_17ffh ;17d3 cd ff 17 . . . + +arg.bit: + call arg.imm_8bit ;17d3 cd ff 17 . . . ld a,l ;17d6 7d } cp 008h ;17d7 fe 08 . . jr nc,error3 ;17d9 30 34 0 4 ret ;17db c9 . -sub_17dch: + +arg.j_displ: call test_expr ;17dc cd 09 18 . . . push bc ;17df c5 . push iy ;17e0 fd e5 . . @@ -3873,15 +3969,15 @@ sub_17dch: jr nz,error3 ;17f0 20 1d . ret ;17f2 c9 . -sub_17f3h: +arg.addr_8bit: ld a,(de) ;17f3 1a . cp '(' ;17f4 fe 28 . ( - jr nz,sub_17ffh ;17f6 20 07 . + jr nz,arg.imm_8bit ;17f6 20 07 . inc de ;17f8 13 . - call sub_17ffh ;17f9 cd ff 17 . . . + call arg.imm_8bit ;17f9 cd ff 17 . . . jp test_paren_close ;17fc c3 c5 18 . . . -sub_17ffh: +arg.imm_8bit: call test_expr ;17ff cd 09 18 . . . sub_1802h: ld a,h ;1802 7c | @@ -3899,16 +3995,16 @@ test_expr: error3: jp ERROR ;180f c3 07 01 . . . -sub_1812h: +arg.zz: push hl ;1812 e5 . ld hl,t_BC.DE.HL.AF ;1813 21 ab 1f ! . . jr l181fh ;1816 18 07 . . -sub_1818h: +arg.reg_16bit: push hl ;1818 e5 . jr l181fh ;1819 18 04 . . -sub_181bh: +arg.ww: push hl ;181b e5 . ld hl,t_BC.DE.HL.SP ;181c 21 a2 1f ! . . l181fh: @@ -3926,7 +4022,7 @@ l182bh: pop hl ;182c e1 . ret ;182d c9 . -sub_182eh: +arg.r_HL_A: call skipbl ;182e cd bf 02 . . . push bc ;1831 c5 . push hl ;1832 e5 . @@ -3937,7 +4033,7 @@ sub_182eh: pop bc ;183b c1 . ret ;183c c9 . -sub_183dh: +arg.IX_IY: push hl ;183d e5 . push bc ;183e c5 . ld hl,t_IX.IY ;183f 21 c8 1f ! . . @@ -3954,7 +4050,8 @@ l1852h: pop bc ;1852 c1 . pop hl ;1853 e1 . ret ;1854 c9 . -sub_1855h: + +arg.IDX_displcmnt: push hl ;1855 e5 . push bc ;1856 c5 . ld a,(de) ;1857 1a . @@ -3983,7 +4080,7 @@ l186eh: l1882h: push af ;1882 f5 . inc de ;1883 13 . - call sub_17ffh ;1884 cd ff 17 . . . + call arg.imm_8bit ;1884 cd ff 17 . . . pop af ;1887 f1 . cp '+' ;1888 fe 2b . + jr z,l1894h ;188a 28 08 ( . @@ -4011,12 +4108,12 @@ l18a1h: and a ;18a3 a7 . ret ;18a4 c9 . -sub_18a5h: +arg.cc_ZCPS: ld hl,t_tstfl_ZCPS ;18a5 21 dc 1f ! . . ld c,007h ;18a8 0e 07 . . jr l18b1h ;18aa 18 05 . . -sub_18ach: +arg.cc_ZC: ld hl,t_tstfl_ZC ;18ac 21 cd 1f ! . . ld c,003h ;18af 0e 03 . . l18b1h: @@ -4058,16 +4155,16 @@ l18dbh: push hl ;18db e5 . pop iy ;18dc fd e1 . . call next_arg ;18de cd ca 02 . . . - call sub_039ah ;18e1 cd 9a 03 . . . + call get_range ;18e1 cd 9a 03 . . . jr nc,l1905h ;18e4 30 1f 0 . call assert_eol ;18e6 cd d6 02 . . . - ld b,010h ;18e9 06 10 . . + ld b,16 ;18e9 06 10 . . l18ebh: push bc ;18eb c5 . push iy ;18ec fd e5 . . pop hl ;18ee e1 . push hl ;18ef e5 . - call sub_192dh ;18f0 cd 2d 19 . - . + call prnt_disas_line ;18f0 cd 2d 19 . - . call crlf ;18f3 cd a3 02 . . . pop iy ;18f6 fd e1 . . ld c,b ;18f8 48 H @@ -4090,7 +4187,7 @@ l190fh: push iy ;1910 fd e5 . . pop hl ;1912 e1 . push hl ;1913 e5 . - call sub_192dh ;1914 cd 2d 19 . - . + call prnt_disas_line ;1914 cd 2d 19 . - . call crlf ;1917 cd a3 02 . . . pop iy ;191a fd e1 . . ld e,b ;191c 58 X @@ -4104,13 +4201,13 @@ l190fh: ret c ;192a d8 . jr l190fh ;192b 18 e2 . . -sub_192dh: +prnt_disas_line: call out.hl.@ ;192d cd a4 01 . . . call z,outbl ;1930 cc 9f 02 . . . call outbl ;1933 cd 9f 02 . . . sub a ;1936 97 . ld (con_col),a ;1937 32 72 02 2 r . - call sub_1965h ;193a cd 65 19 . e . + call prnt_disas_instr ;193a cd 65 19 . e . and a ;193d a7 . ret z ;193e c8 . @@ -4135,7 +4232,7 @@ prnt_offset: ld a,')' ;1960 3e 29 > ) jp outchar ;1962 c3 5d 02 . ] . -sub_1965h: +prnt_disas_instr: sub a ;1965 97 . ld (l1ffdh),a ;1966 32 fd 1f 2 . . call disas_get_instrlen ;1969 cd 8c 19 . . . @@ -4143,7 +4240,7 @@ sub_1965h: push bc ;196e c5 . call prnt_mnemonic ;196f cd b9 1e . . . ex de,hl ;1972 eb . - call sub_19c1h ;1973 cd c1 19 . . . + call call_hl ;1973 cd c1 19 . . . pop bc ;1976 c1 . ld a,(l1ffdh) ;1977 3a fd 1f : . . ld hl,(l1ffbh) ;197a 2a fb 1f * . . @@ -4192,8 +4289,8 @@ l19b1h: scf ;19bf 37 7 ret ;19c0 c9 . -sub_19c1h: - jp (hl) ;19c1 e9 . +; TODO: + nop ;jp (hl) ;19c1 e9 . disas_pfx.DDFD: inc iy ;19c2 fd 23 . # @@ -4278,6 +4375,11 @@ disas_pfx.ED: call lookup_opc ;1a27 cd 97 1a . . . ld b,2 ;1a2a 06 02 . . ret c ;1a2c d8 . + + ld hl,l228bh + call lookup_opc + ld b,3 + ret c ld hl,b_1c40_start ;1a2d 21 40 1c ! @ . call lookup_opc ;1a30 cd 97 1a . . . ld b,4 ;1a33 06 04 . . @@ -4372,493 +4474,258 @@ l1aa8h: scf ;1ab4 37 7 ret ;1ab5 c9 . -; 1 byte opcodes (no parameters) +; 1 byte opcodes (no parameters) +; Format: db opcode, t_MNEMONICS-index b_1ab6_start: - defb 076h ;1ab6 76 v - defb 039h ;1ab7 39 9 - defb 0d9h ;1ab8 d9 . - defb 036h ;1ab9 36 6 - defb 0f3h ;1aba f3 . - defb 02ch ;1abb 2c , - defb 0fbh ;1abc fb . - defb 032h ;1abd 32 2 - defb 000h ;1abe 00 . - defb 069h ;1abf 69 i - defb 007h ;1ac0 07 . - defb 09eh ;1ac1 9e . - defb 00fh ;1ac2 0f . - defb 0adh ;1ac3 ad . - defb 017h ;1ac4 17 . - defb 098h ;1ac5 98 . - defb 01fh ;1ac6 1f . - defb 0a7h ;1ac7 a7 . - defb 027h ;1ac8 27 ' - defb 026h ;1ac9 26 & - defb 02fh ;1aca 2f / - defb 023h ;1acb 23 # - defb 037h ;1acc 37 7 - defb 0bah ;1acd ba . - defb 03fh ;1ace 3f ? - defb 010h ;1acf 10 . - defb 0ffh ;1ad0 ff . + db 076h,039h ;halt + db 0d9h,036h ;exx + db 0f3h,02ch ;di + db 0fbh,032h ;ei + db 000h,069h ;nop + db 007h,09eh ;rlca + db 00fh,0adh ;rrca + db 017h,098h ;rla + db 01fh,0a7h ;rra + db 027h,026h ;daa + db 02fh,023h ;cpl + db 037h,0bah ;scf + db 03fh,010h ;ccf + db 0ffh + ; 1 byte opcodes +; Format: db mask, match, t_MNEMONICS-index +; dw argument formating fuction b_1ad1_start: - defb 0c0h ;1ad1 c0 . - defb 040h ;1ad2 40 @ - defb 056h ;1ad3 56 V - defw l1c88h ;1ad4 88 1c . . - - defb 0f8h ;1ad6 f8 . - defb 080h ;1ad7 80 . - defb 003h ;1ad8 03 . - defw l1c91h ;1ad9 91 1c . . - - defb 0f8h ;1adb f8 . - defb 088h ;1adc 88 . - defb 000h ;1add 00 . - defw l1c91h ;1ade 91 1c . . - - defb 0f8h ;1ae0 f8 . - defb 090h ;1ae1 90 . - defb 0c9h ;1ae2 c9 . - defw l1e30h ;1ae3 30 1e 0 . - - defb 0f8h ;1ae5 f8 . - defb 098h ;1ae6 98 . - defb 0b7h ;1ae7 b7 . - defw l1c91h ;1ae8 91 1c . . - - defb 0f8h ;1aea f8 . - defb 0a0h ;1aeb a0 . - defb 006h ;1aec 06 . - defw l1e30h ;1aed 30 1e 0 . - - defb 0f8h ;1aef f8 . - defb 0a8h ;1af0 a8 . - defb 0cch ;1af1 cc . - defw l1e30h ;1af2 30 1e 0 . - - defb 0f8h ;1af4 f8 . - defb 0b0h ;1af5 b0 . - defb 06ch ;1af6 6c l - defw l1e30h ;1af7 30 1e 0 . - - defb 0f8h ;1af9 f8 . - defb 0b8h ;1afa b8 . - defb 013h ;1afb 13 . - defw l1e30h ;1afc 30 1e 0 . - - defb 0c7h ;1afe c7 . - defb 0c0h ;1aff c0 . - defb 08bh ;1b00 8b . - defw l1e9dh ;1b01 9d 1e . . - - defb 0c7h ;1b03 c7 . - defb 0c7h ;1b04 c7 . - defb 0b4h ;1b05 b4 . - defw l1c98h ;1b06 98 1c . . - - defb 0ffh ;1b08 ff . - defb 0c9h ;1b09 c9 . - defb 08bh ;1b0a 8b . - defw l1c97h ;1b0b 97 1c . . - - defb 0cfh ;1b0d cf . - defb 0c1h ;1b0e c1 . - defb 081h ;1b0f 81 . - defw l1e86h ;1b10 86 1e . . - - defb 0cfh ;1b12 cf . - defb 0c5h ;1b13 c5 . - defb 084h ;1b14 84 . - defw l1e86h ;1b15 86 1e . . - - defb 0ffh ;1b17 ff . - defb 0e3h ;1b18 e3 . - defb 034h ;1b19 34 4 - defw l1ca0h ;1b1a a0 1c . . - - defb 0ffh ;1b1c ff . - defb 0e9h ;1b1d e9 . - defb 052h ;1b1e 52 R - defw l1caeh ;1b1f ae 1c . . - - defb 0ffh ;1b21 ff . - defb 0ebh ;1b22 eb . - defb 034h ;1b23 34 4 - defw l1cbbh ;1b24 bb 1c . . - - defb 0ffh ;1b26 ff . - defb 0f9h ;1b27 f9 . - defb 056h ;1b28 56 V - defw l1cc1h ;1b29 c1 1c . . - - defb 0cfh ;1b2b cf . - defb 003h ;1b2c 03 . - defb 041h ;1b2d 41 A - defw l1e8bh ;1b2e 8b 1e . . - - defb 0cfh ;1b30 cf . - defb 00bh ;1b31 0b . - defb 029h ;1b32 29 ) - defw l1e8bh ;1b33 8b 1e . . - - defb 0c7h ;1b35 c7 . - defb 004h ;1b36 04 . - defb 041h ;1b37 41 A - defw l1e28h ;1b38 28 1e ( . - - defb 0c7h ;1b3a c7 . - defb 005h ;1b3b 05 . - defb 029h ;1b3c 29 ) - defw l1e28h ;1b3d 28 1e ( . - - defb 0ffh ;1b3f ff . - defb 008h ;1b40 08 . - defb 034h ;1b41 34 4 - defw l1ccdh ;1b42 cd 1c . . - - defb 0cfh ;1b44 cf . - defb 009h ;1b45 09 . - defb 003h ;1b46 03 . - defw l1cd3h ;1b47 d3 1c . . - - defb 0efh ;1b49 ef . - defb 002h ;1b4a 02 . - defb 056h ;1b4b 56 V - defw l1cdch ;1b4c dc 1c . . - - defb 0efh ;1b4e ef . - defb 00ah ;1b4f 0a . - defb 056h ;1b50 56 V - defw l1ce5h ;1b51 e5 1c . . - - defb 000h ;1b53 00 . + db 0c0h,040h,056h ;ld r,r + dw l1c88h + db 0f8h,080h,003h ;add a,r + dw l1c91h + db 0f8h,088h,000h ;adc a,r + dw l1c91h + db 0f8h,090h,0c9h ; + dw l1e30h + db 0f8h,098h,0b7h ; + dw l1c91h + db 0f8h,0a0h,006h ; + dw l1e30h + db 0f8h,0a8h,0cch ; + dw l1e30h + db 0f8h,0b0h,06ch ; + dw l1e30h + db 0f8h,0b8h,013h ; + dw l1e30h + db 0c7h,0c0h,08bh ;ret cc + dw l1e9dh + db 0c7h,0c7h,0b4h ;rst + dw l1c98h + db 0ffh,0c9h,08bh ;ret + dw l1c97h + db 0cfh,0c1h,081h ;pop rr + dw l1e86h + db 0cfh,0c5h,084h ;push rr + dw l1e86h + db 0ffh,0e3h,034h ;ex (sp),hl + dw l1ca0h + db 0ffh,0e9h,052h ;jp (hl) + dw l1caeh + db 0ffh,0ebh,034h ;ex de,hl + dw l1cbbh + db 0ffh,0f9h,056h ;ld sp,hl + dw l1cc1h + db 0cfh,003h,041h ;inc rr + dw l1e8bh + db 0cfh,00bh,029h ;dec rr + dw l1e8bh + db 0c7h,004h,041h ;inc r + dw l1e28h + db 0c7h,005h,029h ;dec r + dw l1e28h + db 0ffh,008h,034h ;ex af,af' + dw l1ccdh + db 0cfh,009h,003h ;add hl,rr + dw l1cd3h + db 0efh,002h,056h ;ld (rr),a ;rr=bc,de + dw l1cdch + db 0efh,00ah,056h ;ld a,(rr) ;rr=bc,de + dw l1ce5h + db 0 ; 2 byte opdodes b_1b54_start: - defb 0c7h ;1b54 c7 . - defb 006h ;1b55 06 . - defb 056h ;1b56 56 V - defw l1cfah ;1b57 fa 1c . . - - defb 0ffh ;1b59 ff . - defb 0c6h ;1b5a c6 . - defb 003h ;1b5b 03 . - defw l1cf5h ;1b5c f5 1c . . - - defb 0ffh ;1b5e ff . - defb 0ceh ;1b5f ce . - defb 000h ;1b60 00 . - defw l1cf5h ;1b61 f5 1c . . - - defb 0ffh ;1b63 ff . - defb 0d6h ;1b64 d6 . - defb 0c9h ;1b65 c9 . - defw l1d09h ;1b66 09 1d . . - - defb 0ffh ;1b68 ff . - defb 0deh ;1b69 de . - defb 0b7h ;1b6a b7 . - defw l1cf5h ;1b6b f5 1c . . - - defb 0ffh ;1b6d ff . - defb 0e6h ;1b6e e6 . - defb 006h ;1b6f 06 . - defw l1d09h ;1b70 09 1d . . - - defb 0ffh ;1b72 ff . - defb 0eeh ;1b73 ee . - defb 0cch ;1b74 cc . - defw l1d09h ;1b75 09 1d . . - - defb 0ffh ;1b77 ff . - defb 0f6h ;1b78 f6 . - defb 06ch ;1b79 6c l - defw l1d09h ;1b7a 09 1d . . - - defb 0ffh ;1b7c ff . - defb 0feh ;1b7d fe . - defb 013h ;1b7e 13 . - defw l1d09h ;1b7f 09 1d . . - - defb 0ffh ;1b81 ff . - defb 010h ;1b82 10 . - defb 02eh ;1b83 2e . - defw l1d1ah ;1b84 1a 1d . . - - defb 0ffh ;1b86 ff . - defb 018h ;1b87 18 . - defb 054h ;1b88 54 T - defw l1d1ah ;1b89 1a 1d . . - - defb 0e7h ;1b8b e7 . - defb 020h ;1b8c 20 - defb 054h ;1b8d 54 T - defw l1d0fh ;1b8e 0f 1d . . - - defb 0ffh ;1b90 ff . - defb 0d3h ;1b91 d3 . - defb 076h ;1b92 76 v - defw l1d37h ;1b93 37 1d 7 . - - defb 0ffh ;1b95 ff . - defb 0dbh ;1b96 db . - defb 03fh ;1b97 3f ? - defw l1d29h ;1b98 29 1d ) . - - defb 000h ;1b9a 00 . + db 0c7h,006h,056h ;ld r,nn + dw l1cfah + db 0ffh,0c6h,003h ;add a,nn + dw l1cf5h + db 0ffh,0ceh,000h ;adc a,nn + dw l1cf5h + db 0ffh,0d6h,0c9h ;sub a,nn + dw l1d09h + db 0ffh,0deh,0b7h ;sbc a,nn + dw l1cf5h + db 0ffh,0e6h,006h ;and a,nn + dw l1d09h + db 0ffh,0eeh,0cch ;xor nn + dw l1d09h + db 0ffh,0f6h,06ch ;or nn + dw l1d09h + db 0ffh,0feh,013h ;cp a,nn + dw l1d09h + db 0ffh,010h,02eh ;djnz + dw l1d1ah + db 0ffh,018h,054h ;jr + dw l1d1ah + db 0e7h,020h,054h ;jr,cc + dw l1d0fh + db 0ffh,0d3h,076h ;out (nn),a + dw l1d37h + db 0ffh,0dbh,03fh ;in a,(nn) + dw l1d29h + db 0 ; 3 byte opcodes b_1b9b_start: - defb 0c7h ;1b9b c7 . - defb 0c2h ;1b9c c2 . - defb 052h ;1b9d 52 R - defw l1d42h ;1b9e 42 1d B . - - defb 0c7h ;1ba0 c7 . - defb 0c4h ;1ba1 c4 . - defb 00ch ;1ba2 0c . - defw l1d42h ;1ba3 42 1d B . - - defb 0cfh ;1ba5 cf . - defb 001h ;1ba6 01 . - defb 056h ;1ba7 56 V - defw l1d5ah ;1ba8 5a 1d Z . - - defb 0ffh ;1baa ff . - defb 0c3h ;1bab c3 . - defb 052h ;1bac 52 R - defw l1d48h ;1bad 48 1d H . - - defb 0ffh ;1baf ff . - defb 0cdh ;1bb0 cd . - defb 00ch ;1bb1 0c . - defw l1d48h ;1bb2 48 1d H . - - defb 0ffh ;1bb4 ff . - defb 022h ;1bb5 22 " - defb 056h ;1bb6 56 V - defw l1d62h ;1bb7 62 1d b . - - defb 0ffh ;1bb9 ff . - defb 02ah ;1bba 2a * - defb 056h ;1bbb 56 V - defw l1d6bh ;1bbc 6b 1d k . - - defb 0ffh ;1bbe ff . - defb 032h ;1bbf 32 2 - defb 056h ;1bc0 56 V - defw l1d74h ;1bc1 74 1d t . - - defb 0ffh ;1bc3 ff . - defb 03ah ;1bc4 3a : - defb 056h ;1bc5 56 V - defw l1d7fh ;1bc6 7f 1d  . - - defb 000h ;1bc8 00 . - -; prefix ED + 1 byte opcode + db 0c7h,0c2h,052h ; + dw l1d42h + db 0c7h,0c4h,00ch ; + dw l1d42h + db 0cfh,001h,056h ; + dw l1d5ah + db 0ffh,0c3h,052h ; + dw l1d48h + db 0ffh,0cdh,00ch ; + dw l1d48h + db 0ffh,022h,056h ; + dw l1d62h + db 0ffh,02ah,056h ; + dw l1d6bh + db 0ffh,032h,056h ; + dw l1d74h + db 0ffh,03ah,056h ; + dw l1d7fh + db 0 + +; Prefix ED + 1 byte opcode, no arguments +; Format: opcode, t_MNEMONICS index b_1bc9_start: - defb 044h ;1bc9 44 D - defb 066h ;1bca 66 f - defb 045h ;1bcb 45 E - defb 092h ;1bcc 92 . - defb 04dh ;1bcd 4d M - defb 08eh ;1bce 8e . - defb 067h ;1bcf 67 g - defb 0b1h ;1bd0 b1 . - defb 06fh ;1bd1 6f o - defb 0a2h ;1bd2 a2 . - defb 0a0h ;1bd3 a0 . - defb 05fh ;1bd4 5f _ - defb 0a1h ;1bd5 a1 . - defb 01ch ;1bd6 1c . - defb 0a2h ;1bd7 a2 . - defb 04bh ;1bd8 4b K - defb 0a3h ;1bd9 a3 . - defb 07dh ;1bda 7d } - defb 0a8h ;1bdb a8 . - defb 058h ;1bdc 58 X - defb 0a9h ;1bdd a9 . - defb 015h ;1bde 15 . - defb 0aah ;1bdf aa . - defb 044h ;1be0 44 D - defb 0abh ;1be1 ab . - defb 079h ;1be2 79 y - defb 0b0h ;1be3 b0 . - defb 062h ;1be4 62 b - defb 0b1h ;1be5 b1 . - defb 01fh ;1be6 1f . - defb 0b2h ;1be7 b2 . - defb 04eh ;1be8 4e N - defb 0b3h ;1be9 b3 . - defb 072h ;1bea 72 r - defb 0b8h ;1beb b8 . - defb 05bh ;1bec 5b [ - defb 0b9h ;1bed b9 . - defb 018h ;1bee 18 . - defb 0bah ;1bef ba . - defb 047h ;1bf0 47 G - defb 0bbh ;1bf1 bb . - defb 06eh ;1bf2 6e n - defb 0ffh ;1bf3 ff . + db 044h,066h ;neg + db 045h,092h ;retn + db 04dh,08eh ;reti + db 067h,0b1h ;rrd + db 06fh,0a2h ;rld + db 0a0h,05fh ;ldi + db 0a1h,01ch ;cpi + db 0a2h,04bh ;ini + db 0a3h,07dh ;outi + db 0a8h,058h ;ldd + db 0a9h,015h ;cpd + db 0aah,044h ;ind + db 0abh,079h ;outd + db 0b0h,062h ;ldir + db 0b1h,01fh ;cpir + db 0b2h,04eh ;inir + db 0b3h,072h ;otir + db 0b8h,05bh ;lddr + db 0b9h,018h ;cpdr + db 0bah,047h ;indr + db 0bbh,06eh ;otdr + db 08bh,0d5h ;otdm + db 09bh,0d9h ;otdmr + db 083h,0deh ;otim + db 093h,0e2h ;otimr + db 076h,0ebh ;slp + db 0ffh ; b_1bf4_start: - defb 0e7h ;1bf4 e7 . - defb 040h ;1bf5 40 @ - defb 03fh ;1bf6 3f ? - defw l1db3h ;1bf7 b3 1d . . - - defb 0f7h ;1bf9 f7 . - defb 060h ;1bfa 60 ` - defb 03fh ;1bfb 3f ? - defw l1db3h ;1bfc b3 1d . . - - defb 0ffh ;1bfe ff . - defb 078h ;1bff 78 x - defb 03fh ;1c00 3f ? - defw l1db3h ;1c01 b3 1d . . - - defb 0e7h ;1c03 e7 . - defb 041h ;1c04 41 A - defb 076h ;1c05 76 v - defw l1dbfh ;1c06 bf 1d . . - - defb 0f7h ;1c08 f7 . - defb 061h ;1c09 61 a - defb 076h ;1c0a 76 v - defw l1dbfh ;1c0b bf 1d . . - - defb 0ffh ;1c0d ff . - defb 079h ;1c0e 79 y - defb 076h ;1c0f 76 v - defw l1dbfh ;1c10 bf 1d . . - - defb 0cfh ;1c12 cf . - defb 042h ;1c13 42 B - defb 0b7h ;1c14 b7 . - defw l1dcah ;1c15 ca 1d . . - - defb 0cfh ;1c17 cf . - defb 04ah ;1c18 4a J - defb 000h ;1c19 00 . - defw l1dcah ;1c1a ca 1d . . - - defb 0ffh ;1c1c ff . - defb 046h ;1c1d 46 F - defb 03dh ;1c1e 3d = - defw l1d85h ;1c1f 85 1d . . - - defb 0ffh ;1c21 ff . - defb 056h ;1c22 56 V - defb 03dh ;1c23 3d = - defw l1d89h ;1c24 89 1d . . - - defb 0ffh ;1c26 ff . - defb 05eh ;1c27 5e ^ - defb 03dh ;1c28 3d = - defw l1d8dh ;1c29 8d 1d . . - - defb 0ffh ;1c2b ff . - defb 047h ;1c2c 47 G - defb 056h ;1c2d 56 V - defw l1d92h ;1c2e 92 1d . . - - defb 0ffh ;1c30 ff . - defb 057h ;1c31 57 W - defb 056h ;1c32 56 V - defw l1d97h ;1c33 97 1d . . - - defb 0ffh ;1c35 ff . - defb 04fh ;1c36 4f O - defb 056h ;1c37 56 V - defw l1d9ch ;1c38 9c 1d . . - - defb 0ffh ;1c3a ff . - defb 05fh ;1c3b 5f _ - defb 056h ;1c3c 56 V - defw l1da1h ;1c3d a1 1d . . - - defb 000h ;1c3f 00 . + db 0e7h,040h,03fh ;in r,(c) ;r=bcde + dw l1db3h ; + db 0f7h,060h,03fh ;in r,(c) ;r=hl + dw l1db3h ; + db 0ffh,078h,03fh ;in r,(c) ;r=a + dw l1db3h ; + db 0e7h,041h,076h ;out (c),r ;r=bcde + dw l1dbfh ; + db 0f7h,061h,076h ;out (c),r ;r=hl + dw l1dbfh ; + db 0ffh,079h,076h ;out (c),r ;r=a + dw l1dbfh ; + db 0cfh,042h,0b7h ;sbc hl,rr + dw l1dcah ; + db 0cfh,04ah,000h ;adc hl,rr + dw l1dcah ; + db 0ffh,046h,03dh ;im 0 + dw l1d85h ; + db 0ffh,056h,03dh ;im 1 + dw l1d89h ; + db 0ffh,05eh,03dh ;im 2 + dw l1d8dh ; + db 0ffh,047h,056h ;ld i,a + dw l1d92h ; + db 0ffh,057h,056h ;ld a,i + dw l1d97h ; + db 0ffh,04fh,056h ;ld r,a + dw l1d9ch ; + db 0ffh,05fh,056h ;ld a,r + dw l1da1h + db 0cfh,04ch,0d2h ;mlt rr + dw l1e8bh + db 0c7h,004h,0eeh ;tst r + dw l1e28h + db 0 + +l228bh: + db 0e7h,000h,0cfh ; + dw l230ch + db 0f7h,020h,0cfh ; + dw l230ch + db 0ffh,038h,0cfh ;in0 a,(m) + dw l230ch + db 0e7h,001h,0e7h ; + dw l2315h + db 0f7h,021h,0e7h ; + dw l2315h + db 0ffh,039h,0e7h ;out0 (m),a + dw l2315h + db 0ffh,064h,0eeh ;tst m + dw l1d09h + db 0ffh,074h,0f1h ;tstio m + dw l1d09h + db 0 b_1c40_start: - defb 0efh ;1c40 ef . - defb 043h ;1c41 43 C - defb 056h ;1c42 56 V - defw l1dd3h ;1c43 d3 1d . . - - defb 0ffh ;1c45 ff . - defb 073h ;1c46 73 s - defb 056h ;1c47 56 V - defw l1dd3h ;1c48 d3 1d . . - - defb 0efh ;1c4a ef . - defb 04bh ;1c4b 4b K - defb 056h ;1c4c 56 V - defw l1ddch ;1c4d dc 1d . . - - defb 0ffh ;1c4f ff . - defb 07bh ;1c50 7b { - defb 056h ;1c51 56 V - defw l1ddch ;1c52 dc 1d . . - - defb 000h ;1c54 00 . - -; DD/FD CB + db 0efh,043h,056h ;ld (mn),ww ;ww=bc,de + dw l1dd3h + db 0ffh,073h,056h ;ld (mn),sp + dw l1dd3h + db 0efh,04bh,056h ;ld ww,(mn) ;ww=bc,de + dw l1ddch + db 0ffh,07bh,056h ;ld sp,(mn) + dw l1ddch + db 0 + +; CB b_1c55_start: - defb 0f8h ;1c55 f8 . - defb 000h ;1c56 00 . - defb 09bh ;1c57 9b . - defw l1e03h ;1c58 03 1e . . - - defb 0f8h ;1c5a f8 . - defb 008h ;1c5b 08 . - defb 0aah ;1c5c aa . - defw l1e03h ;1c5d 03 1e . . - - defb 0f8h ;1c5f f8 . - defb 010h ;1c60 10 . - defb 096h ;1c61 96 . - defw l1e03h ;1c62 03 1e . . - - defb 0f8h ;1c64 f8 . - defb 018h ;1c65 18 . - defb 0a5h ;1c66 a5 . - defw l1e03h ;1c67 03 1e . . - - defb 0f8h ;1c69 f8 . - defb 020h ;1c6a 20 - defb 0c0h ;1c6b c0 . - defw l1e03h ;1c6c 03 1e . . - - defb 0f8h ;1c6e f8 . - defb 028h ;1c6f 28 ( - defb 0c3h ;1c70 c3 . - defw l1e03h ;1c71 03 1e . . - - defb 0f8h ;1c73 f8 . - defb 038h ;1c74 38 8 - defb 0c6h ;1c75 c6 . - defw l1e03h ;1c76 03 1e . . - - defb 0c0h ;1c78 c0 . - defb 040h ;1c79 40 @ - defb 009h ;1c7a 09 . - defw l1de4h ;1c7b e4 1d . . - - defb 0c0h ;1c7d c0 . - defb 080h ;1c7e 80 . - defb 088h ;1c7f 88 . - defw l1de4h ;1c80 e4 1d . . - - defb 0c0h ;1c82 c0 . - defb 0c0h ;1c83 c0 . - defb 0bdh ;1c84 bd . - defw l1de4h ;1c85 e4 1d . . - - defb 000h ;1c87 00 . + db 0f8h,000h,09bh ;rlc g + dw l1e03h + db 0f8h,008h,0aah ;rrc g + dw l1e03h + db 0f8h,010h,096h ;rl g + dw l1e03h + db 0f8h,018h,0a5h ;rr g + dw l1e03h + db 0f8h,020h,0c0h ;sla g + dw l1e03h + db 0f8h,028h,0c3h ;sra g + dw l1e03h + db 0f8h,038h,0c6h ;srl g + dw l1e03h + db 0c0h,040h,009h ;bit b,g + dw l1de4h + db 0c0h,080h,088h ;res b,g + dw l1de4h + db 0c0h,0c0h,0bdh ;set b,g + dw l1de4h + db 0 l1c88h: call l1e28h ;1c88 cd 28 1e . ( . @@ -4869,6 +4736,18 @@ l1c91h: jp l1e30h ;1c94 c3 30 1e . 0 . l1c97h: ret ;1c97 c9 . + +;----------------------------------------------------- +l230ch: + call l1e28h + call prnt_char_comma + jp sub_1d2ch +l2315h: + call sub_1d2ch + call prnt_char_comma + jp l1e28h +;----------------------------------------------------- + l1c98h: ld a,(iy+000h) ;1c98 fd 7e 00 . ~ . and 038h ;1c9b e6 38 . 8 @@ -4930,6 +4809,7 @@ l1d09h: ld a,(iy+001h) ;1d09 fd 7e 01 . ~ . l1d0ch: jp out_hex ;1d0c c3 18 02 . . . + l1d0fh: ld a,(iy+000h) ;1d0f fd 7e 00 . ~ . and 018h ;1d12 e6 18 . . @@ -5180,7 +5060,7 @@ l1ebch: inc c ;1ebf 0c . ld a,c ;1ec0 79 y cp 5 ;1ec1 fe 05 . . - jr nz,l1ebch ;1ec3 20 f7 . + jr c,l1ebch ;1ec3 20 f7 . ret ;1ec5 c9 . t_MNEMONICS: @@ -5251,7 +5131,6 @@ t_MNEMONICS: DC 'SRL' DC 'SUB' DC 'XOR' - if 0 DC 'IN0' DC 'MLT' DC 'OTDM' @@ -5262,7 +5141,6 @@ t_MNEMONICS: DC 'SLP' DC 'TST' DC 'TSTIO' - endif DB 0 t_BCDEHL_HL_A: @@ -5377,78 +5255,37 @@ l2037h: ret ;2038 c9 . b_2039_start: - defb 0ffh ;2039 ff . - defb 0ddh ;203a dd . - defb 000h ;203b 00 . - defw l20a7h ;203c a7 20 . - - defb 0ffh ;203e ff . - defb 0fdh ;203f fd . - defb 000h ;2040 00 . - defw l20ach ;2041 ac 20 . - - defb 0ffh ;2043 ff . - defb 0edh ;2044 ed . - defb 000h ;2045 00 . - defw l20b8h ;2046 b8 20 . + db 0ffh,0ddh,000h + dw l20a7h + db 0ffh,0fdh,000h + dw l20ach + db 0ffh,0edh,000h + dw l20b8h b_2048_start: - defb 0ffh ;2048 ff . - defb 0cdh ;2049 cd . - defb 000h ;204a 00 . - defw l2080h ;204b 80 20 . - - defb 0ffh ;204d ff . - defb 0c3h ;204e c3 . - defb 000h ;204f 00 . - defw l208bh ;2050 8b 20 . - - defb 0ffh ;2052 ff . - defb 0e9h ;2053 e9 . - defb 000h ;2054 00 . - defw l20a2h ;2055 a2 20 . - - defb 0ffh ;2057 ff . - defb 0c9h ;2058 c9 . - defb 000h ;2059 00 . - defw l20dch ;205a dc 20 . - - defb 0ffh ;205c ff . - defb 0cfh ;205d cf . - defb 000h ;205e 00 . - defw l2115h ;205f 15 21 . ! - - defb 0c7h ;2061 c7 . - defb 0c7h ;2062 c7 . - defb 000h ;2063 00 . - defw l20f9h ;2064 f9 20 . - - defb 0c7h ;2066 c7 . - defb 0c4h ;2067 c4 . - defb 000h ;2068 00 . - defw l2080h ;2069 80 20 . - - defb 0f7h ;206b f7 . - defb 010h ;206c 10 . - defb 000h ;206d 00 . - defw l2093h ;206e 93 20 . - - defb 0e7h ;2070 e7 . - defb 020h ;2071 20 - defb 000h ;2072 00 . - defw l2093h ;2073 93 20 . - - defb 0c7h ;2075 c7 . - defb 0c2h ;2076 c2 . - defb 000h ;2077 00 . - defw l208bh ;2078 8b 20 . - - defb 0c7h ;207a c7 . - defb 0c0h ;207b c0 . - defb 000h ;207c 00 . - defw l20c5h ;207d c5 20 . - - defb 000h ;207f 00 . + db 0ffh,0cdh,000h + dw l2080h + db 0ffh,0c3h,000h + dw l208bh + db 0ffh,0e9h,000h + dw l20a2h + db 0ffh,0c9h,000h + dw l20dch + db 0ffh,0cfh,000h + dw l2115h + db 0c7h,0c7h,000h + dw l20f9h + db 0c7h,0c4h,000h + dw l2080h + db 0f7h,010h,000h + dw l2093h + db 0e7h,020h,000h + dw l2093h + db 0c7h,0c2h,000h + dw l208bh + db 0c7h,0c0h,000h + dw l20c5h + db 0 l2080h: ld a,(b_21e2_start) ;2080 3a e2 21 : . !