4 extrn ?const,?conin,?cono
25 MEMDUMP_CNT equ 16 ;mem dump bytes per line
26 BP_CNT equ 12 ;number of breakbpoints
29 ;--------------------------------------------------
32 ; copy code to common memory and execute it there
39 ; mark end of common code snippet
54 ; repeat execution of last common code snippet
63 ;----------------------------------------------------------
66 DB 'DDT/Z - HD64180 (ROM)'
70 DB 'DDT/Z180 (ROM) Commands:',CR,LF
71 DB '> @ examine/substitute the displacement register @',CR,LF
72 DB '> A [address] Assemble',CR,LF
73 DB '> B[X] display [or clear] all Breakpoints',CR,LF
74 DB ' B breakp [:count] [breakp..] set Breakpoints',CR,LF
75 DB ' BX address [address..] clear Breakpoints',CR,LF
76 DB '>>C[N][J] [count] trace over Calls [No list] [Jumps only]',CR,LF
77 DB ' C[N][J] W|U expression trace over Calls While|Until ...',CR,LF
78 DB '>>D [startadr] [endadr] Display memory in hex and ascii',CR,LF
79 DB '> G [startadr] [;breakp..] Go [to start] [temporary breakpoints]',CR,LF
80 DB '> H [expression [expression]] compute expressions / show High/max load adr.',CR,LF
81 DB '>>I [port] Input a byte from port',CR,LF
82 DB '>>L [startadr] [endadr] List disassembled code',CR,LF
83 DB '> M[V] startadr endadr destadr Move memory [and verify]',CR,LF
84 DB '>>O [byte] [port] Output a byte to port',CR,LF
85 DB '> Q[J] startadr endadr bytes Qery memory for byte string [Justified]',CR,LF
86 DB '> R [displacement] Read intel hex from console [add displacemt]',CR,LF
87 DB '> S address Substitute memory',CR,LF
88 DB '>>T[N][J] [count] Trace [No list] [Jumps only] [count steps]',CR,LF
89 DB ' T[N][J] W|U expression Trace While|Until expression',CR,LF
90 DB '> V startadr endadr destadr Verify (compare) two memory areas',CR,LF
91 DB '> X[register] eXamine [and substitute] registers',CR,LF
92 DB '> Y[0..9] eXamine [and substitute] Y variables',CR,LF
93 DB '> Z startadr endadr bytes Zap (fill) memory with a byte string',CR,LF
98 ld a,(wstrtflg) ;check warm start flag
105 ld bc,topcodend-topcodbeg
127 ld (CMD_ERR),hl ;0767
129 ld (OFFS.pc),hl ;076d
131 ld hl,(CMD_RPT) ;0773
136 call nz,OUTCHAR ;0781
142 ld (CMD_RPT),hl ;0792
157 ld hl,(CMD_ERR) ;07ab
273 jr z,inl_e ;Accept line
275 jr z,inl_e ;Accept line
278 call DELC ;Delete Char
283 call DELC ;Delete Char
288 call DELL ;Delete Line
298 ld a,'^' ;Controle characters
436 call nz,sub_0917h ;0921
600 ld de,$stack-50 ;09ee
631 ld hl,b_0x132A_start ;0a0e
650 db 3eh ;0a26 ld a,0c5h
665 call z,sub_0d20h ;0a38
699 call get_arg_range ;0a59
702 call skip_to_nextarg ;0a5e
720 call get_arg_def ;0a74
737 db 0e6h ;0a87 and 037h (clear carry)
766 call skip_to_nextarg ;0aa5
801 call do_subexpr ;0acc
807 call do_subexpr ;0ad6
840 ld hl,tab_eq_le_ge ;0afb
862 ld hl,tab_func_eqlege ;0b1c
889 call do_binary_op ;0b3e
1006 ld hl,tab_op_a ;0bba
1009 ld hl,tab_func_opa ;0bc1
1021 defw do_op_add ;0bd6
1022 defw do_op_sub ;0bd8
1023 defw do_op_mlt ;0bda
1024 defw do_op_div ;0bdc
1025 defw do_op_mod ;0bde
1026 defw do_op_and ;0be0
1028 defw do_op_xor ;0be4
1032 call do_factor ;0be8
1038 call get.number ;0bf2
1047 ld hl,(MAXLOD) ;0c03
1053 ld hl,(offs.@) ;0c0f
1056 ld hl,(OFFS.pc) ;0c15
1060 jr z,fact_factneg ;0c1d
1062 jr z,fact_factinv ;0c21
1064 jr z,fact_factor ;0c25
1066 jr z,fact_reg.CPU ;0c29
1068 jr z,fact_reg.Y ;0c2d
1072 jp z,EXPR_BRCKT ;0c35 [ expression ]
1074 jr z,fact_factstring ;0c3a
1080 call get.decdigit ;0c3f
1119 call sub_1315h ;0c70
1132 call fact_factor ;0c80
1143 call fact_factor ;0c8b
1179 call get.hexdigit ;0cbe
1184 call get.hexdigit ;0cc4
1193 call get.hexdigit ;0cd5
1211 call get.decdigit ;0cec
1221 call get.decdigit ;0cfd
1228 call get.decdigit ;0d07
1232 add hl,hl ;0d0e hl *= 10
1280 call assert_eol ;0d41
1285 ld hl,b_0x0DFD_start ;0d4a
1286 ld de,b_0x0E1D_start ;0d4d
1289 call prnt_regs ;0d52
1293 ld iy,(REG.PC) ;0d59
1294 call sub_1f77h ;0d5d
1304 call prnt_regs ;0d6f
1311 call sub_1f5bh ;0d7c
1317 call prnt_flags ;0d85
1318 ld a,(reg.iff) ;0d88
1326 call prnt_flags ;0d98
1332 call sub_0dbeh ;0da1
1334 call sub_0dbeh ;0da6
1337 call sub_0dbeh ;0dad
1340 call sub_0dbeh ;0db4
1342 call sub_0dbeh ;0db9
1440 ld (REG.PC),hl ;0e51
1448 call sub_0f24h ;0e62
1455 ld a,(ix+000h) ;0e6e
1457 ld (ix+000h),a ;0e73
1458 call sub_11c5h ;0e76
1478 jp c,assert_eol ;0e99
1480 call sub_0ea7h ;0e9d
1482 call skip_to_nextarg ;0ea1
1492 ld e,(ix+002h) ;0eb0
1493 ld d,(ix+003h) ;0eb3
1497 ld (ix+000h),000h ;0ebb
1498 call sub_11c5h ;0ebf
1509 bit 0,(ix+000h) ;0ed1
1512 bit 4,(ix+000h) ;0ed9
1518 ld l,(ix+002h) ;0ee7
1519 ld h,(ix+003h) ;0eea
1524 ld l,(ix+004h) ;0ef8
1525 ld h,(ix+005h) ;0efb
1527 ld l,(ix+006h) ;0f01
1528 ld h,(ix+007h) ;0f04
1562 call nz,sub_0ea7h ;0f3d
1564 call sub_0f68h ;0f41
1566 ld (ix+002h),l ;0f45
1567 ld (ix+003h),h ;0f48
1568 call sub_0f80h ;0f4b
1569 ld (ix+004h),l ;0f4e
1570 ld (ix+005h),h ;0f51
1571 call sub_0f91h ;0f54
1572 ld (ix+006h),l ;0f57
1573 ld (ix+007h),h ;0f5a
1574 call skip_to_nextarg ;0f5d
1576 ld (ix+000h),a ;0f61
1583 ld a,(ix+000h) ;0f6e
1621 ld de,sexpbufe ;0fb1
1643 push hl ;0fd2 save rom enable stat
1657 ld (reg.iff),a ;0fe6
1675 ld hl,(REG.PC) ;100a
1677 ld (REG.PC),hl ;100e
1679 ld hl,MSG_trap ;1011
1687 call sub_1059h ;1022
1693 call sub_0e68h ;102e
1694 call prnt_cpustat ;1031
1698 DB CR,LF,'Undefined opcode trap'
1713 ld a,(ix+000h) ;1066
1716 ld e,(ix+002h) ;106d
1717 ld d,(ix+003h) ;1070
1718 ld hl,(REG.PC) ;1073
1721 call z,sub_1087h ;107a
1733 ld e,(ix+006h) ;108b
1734 ld d,(ix+007h) ;108e
1742 ld e,(ix+004h) ;109d
1743 ld d,(ix+005h) ;10a0
1748 ld (ix+004h),e ;10a8
1749 ld (ix+005h),d ;10ab
1751 bit 4,(ix+000h) ;10ae
1766 bit 5,(ix+000h) ;10c5
1767 res 5,(ix+000h) ;10c9
1769 ld l,(ix+002h) ;10cf
1770 ld h,(ix+003h) ;10d2
1776 ld a,(ix+001h) ;10df
1781 res 3,(ix+000h) ;10e7
1790 ld a,(ix+000h) ;10f9
1793 ld e,(ix+002h) ;1100
1794 ld d,(ix+003h) ;1103
1795 ld hl,(REG.PC) ;1106
1806 call sub_0f68h ;1117
1807 ld (ix+004h),001h ;111a
1808 ld (ix+005h),000h ;111e
1809 ld (ix+002h),l ;1122
1810 ld (ix+003h),h ;1125
1811 ld (ix+006h),000h ;1128
1812 ld (ix+007h),000h ;112c
1819 ld (ix+000h),a ;113a
1826 ld a,(ix+000h) ;1144
1829 set 5,(ix+000h) ;114a
1830 ld l,(ix+002h) ;114e
1831 ld h,(ix+003h) ;1151
1838 ld (ix+001h),a ;1159
1863 ld (ix+001h),e ;1159
1889 call nz,prnt_cpustat ;118b
1890 call sub_10f3h ;118e
1895 call sub_26e7h ;119a
1899 ld sp,$stack ;11a2 set/restore user cpu state
1927 jp $go ;11c2 common ram, switch banks and go to user prog
1930 ld a,(ix+000h) ;11c5
1933 ld e,(ix+006h) ;11cb
1934 ld d,(ix+007h) ;11ce
1942 ld (ix+006h),a ;11d8
1943 ld (ix+007h),a ;11db
1952 call sub_11ffh ;11ee
1967 ld e,(iy+006h) ;1204
1968 ld d,(iy+007h) ;1207
1976 ld (iy+006h),e ;1217
1977 ld (iy+007h),d ;121a
1981 call get.decdigit ;121e
1985 call assert_eol ;1225
1987 call sub_1248h ;1229
1990 call assert_eol ;122f
1994 call sub_1248h ;1234
2009 add a,'0'+080h ;124b
2022 call sub_1315h ;1260
2024 call assert_eol ;1266
2031 ld hl,b_0x132A_start ;1273
2032 call sub_0a48h ;1276
2077 ld (reg.iff),a ;12bb
2079 call sub_12d1h ;12bf
2086 call sub_12d1h ;12ca
2094 call assert_eol ;12d7
2101 ld hl,tab_pr_flags ;12e3
2123 ld (reg.iff),a ;1305
2132 call sub_0a0eh ;1315
2137 ld hl,b_0x136C_start ;131c
2259 call get_lastarg_def ;13d5
2276 jp z,assert_eol ;13f9
2286 call get_bytes_m ;1407
2290 call assert_eol ;140c
2300 ld (CMD_RPT),hl ;141e
2301 ld hl,(lst.IP) ;1421
2302 call get_lastarg_def ;1424
2303 ld (lst.IP),hl ;1427
2326 call out.bin.b ;144c
2330 ld (CMD_RPT),hl ;1455
2331 ld hl,(lst.OD) ;1458
2332 call get_arg_def ;145b
2336 call skip_to_nextarg ;1463
2337 ld hl,(lst.OP) ;1466
2338 call get_lastarg_def ;1469
2339 ld (lst.OP),hl ;146c
2364 call get_arg3 ;1490 get from, size, to
2402 push af ;14c9 save 'V' flag
2408 jr nc,bm_mvdown ;14d3
2428 jr z,cmp_mem ;14ed validate?
2433 call skip_to_nextarg ;14f6
2437 call assert_eol ;14fe
2451 call out.hl ;1511 val
2453 call sub_0928h ;1517 -val
2455 call out.hl.dec ;151d dec
2457 call out.hl.decm ;1523 -dec
2459 call out.bin.w ;1529 bin
2462 call out.ascii ;1530
2472 call get_arg_range ;153f
2475 call sub_15a7h ;1544
2478 call sub_1594h ;1548
2488 ld bc,MEMDUMP_CNT ;1559
2505 call get_arg_range ;156c
2508 call sub_15a7h ;1571
2555 ld hl,ci.buf+1 ;15a7
2556 call get_bytes ;15aa
2557 ld de,ci.buf+1 ;15ad
2565 db 0e6h ;15b8 and 037h (clear carry, skip next opc)
2570 call skip_to_nextarg ;15bb
2575 call sub_0a68h ;15c4
2658 ld (CMD_RPT),hl ;162f
2661 call sub_0a82h ;1638
2698 call sub_168fh ;1673
2726 ; Read Intel Hex File from console.
2729 call get_lastarg_def ;169e get offset from command line
2734 call i.getchar ;16a8
2737 jr nz,w_recstart ;16af
2738 ld c,0 ;16b1 init checksum
2739 call i.gethexbyte ;16b3 record len
2741 call i.gethexbyte ;16b7 address high
2743 call i.gethexbyte ;16bb address low
2745 call i.gethexbyte ;16bf record type (ignored)
2747 and a ;16c3 record len == 0?
2750 call i.gethexbyte ;16c6
2755 call i.storebyte ;16cd
2758 djnz l16c6h ;16d2 repeat for record len
2759 call i.gethexbyte ;16d4 checksum
2762 jp nz,ERROR ;16d9 exit if checksum error
2763 jr w_recstart ;16dc next record
2766 call i.gethexbyte ;16df
2770 call sub_16f6h ;16e5
2776 call sub_16f6h ;16ed
2785 call i.getchar ;16f6
2787 call sub_0d26h ;16fb
2800 ld de,TPA ;170a lowest allowed load address
2803 ld de,$stcka ;1713 highest allowed load address
2811 ld de,(MAXLOD) ;1728
2814 ld (MAXLOD),hl ;1731
2819 ld (hl),a ;173a store byte
2824 call assert_eol ;173c
2826 ld hl,MSG_high ;173f
2832 ld hl,(MAXLOD) ;1751
2843 call get_lastarg_def ;176c
2847 ld (CMD_ERR),hl ;1775
2853 ld (OFFS.pc),hl ;1782
2855 call sub_1f3fh ;1786
2858 ld de,(offs.@) ;178c
2866 ld a,(CON.COL) ;179b
2881 call nz,sub_17cdh ;17b7
2893 ld hl,t_MNEMONICS ;17d0
2894 call sub_0a15h ;17d3
2901 ld hl,b_0x17EE_start ;17e0
2955 defw gen.opc.ED2 ;1803
2961 defw gen.opc.ED2 ;1806
2967 defw gen.opc.ED2 ;1809
2973 defw gen.opc.ED2 ;180c
3051 defw gen.opc.ED2 ;1833
3057 defw gen.opc.ED2 ;1836
3063 defw gen.opc.ED2 ;1839
3069 defw gen.opc.ED2 ;183c
3093 defw gen.opc.ED2 ;1848
3099 defw gen.opc.ED2 ;184b
3105 defw gen.opc.ED2 ;184e
3111 defw gen.opc.ED2 ;1851
3117 defw gen.opc.ED2 ;1854
3135 defw gen.opc.ED2 ;185d
3141 defw gen.opc.ED2 ;1860
3153 defw gen.opc.ED2 ;1866
3159 defw gen.opc.ED2 ;1869
3189 defw gen.opc.ED2 ;1878
3195 defw gen.opc.ED2 ;187b
3225 defw gen.opc.ED2 ;188a
3255 defw gen.opc.ED2 ;1899
3332 defw gen.opc.ED2 ;18c0
3338 defw gen.opc.ED2 ;18c3
3344 defw gen.opc.ED2 ;18c6
3356 defw gen.opc.ED2 ;18cc
3373 call sub_1e41h ;18d5
3382 call sub_1ed1h ;18e3
3383 call sub_1e06h ;18e6
3385 call assert_eol ;18e9
3387 ld (iy+000h),0edh ;18f0
3388 ld (iy+001h),b ;18f4
3389 ld (iy+002h),l ;18f7
3394 call sub_1e06h ;18fd
3395 call sub_1ed1h ;1900
3396 call sub_1e41h ;1903
3407 call sub_1e2eh ;1913
3411 jp gen.opc.ED2 ;191a
3413 call sub_1e41h ;191d
3420 jp gen.opc.ED2 ;1927
3424 call sub_1e12h ;192c
3429 call sub_1e41h ;1934
3431 call sub_1e68h ;193a
3433 call sub_1e2eh ;1940
3435 call sub_1e50h ;1946
3445 call sub_1e2eh ;195d
3448 call sub_1ed8h ;1966
3449 call sub_1ed1h ;1969
3450 call sub_1e2eh ;196c
3452 call sub_1e50h ;1971
3456 call assert_eol ;1978
3457 ld a,(pfx.IXY) ;197b
3460 ld (iy+000h),a ;1982
3461 ld (iy+001h),b ;1985
3462 ld (iy+002h),l ;1988
3463 ld (iy+003h),h ;198b
3474 call assert_eol ;199a
3476 ld (iy+000h),b ;19a1
3477 ld (iy+001h),l ;19a4
3478 ld (iy+002h),h ;19a7
3488 call assert_eol ;19b4
3496 call sub_1ed1h ;19c0
3497 call sub_1e41h ;19c3
3514 call sub_1e68h ;19db
3525 call assert_eol ;19ec
3526 ld a,(pfx.IXY) ;19ef
3528 ld (iy+000h),a ;19f6
3529 ld (iy+001h),b ;19f9
3530 ld (iy+002h),c ;19fc
3552 jp gen.opc.ED2 ;1a1e
3556 call sub_1e12h ;1a25
3557 ld a,b ;1a28 ld r,nn
3565 call assert_eol ;1a2f
3567 ld (iy+000h),b ;1a36
3568 ld (iy+001h),l ;1a39
3577 call sub_1e2eh ;1a46
3583 call sub_1ed8h ;1a53
3587 call sub_1ed8h ;1a5c
3591 call sub_1ed1h ;1a64
3592 call sub_1e41h ;1a67
3599 call sub_1e12h ;1a76
3600 call assert_eol ;1a79
3601 ld a,(pfx.IXY) ;1a7c
3603 ld (iy+000h),a ;1a83 dd/fd
3604 ld (iy+001h),036h ;1a86
3605 ld (iy+002h),c ;1a8a displacement
3606 ld (iy+003h),l ;1a8d nn
3612 call sub_1ed1h ;1a94
3614 call sub_0a23h ;1a9a
3616 call sub_1e50h ;1a9f
3623 call assert_eol ;1aab
3624 ld a,(pfx.IXY) ;1aae
3626 ld (iy+000h),a ;1ab5
3627 ld (iy+001h),b ;1ab8
3643 call sub_1ed8h ;1ad0
3655 call assert_eol ;1ae6
3661 call sub_1ed1h ;1af0
3667 call sub_1ed8h ;1afc
3676 call sub_1ed1h ;1b0d
3681 call sub_1ed1h ;1b15
3687 jr z,gen.opc.ED2 ;1b1e
3695 call sub_1ed8h ;1b2a
3696 call sub_1ed1h ;1b2d
3702 call assert_eol ;1b36
3704 ld (iy+000h),b ;1b3d
3709 call assert_eol ;1b43
3711 ld (iy+000h),0edh ;1b4a
3712 ld (iy+001h),b ;1b4e
3718 call sub_0a23h ;1b57
3720 call sub_1ed1h ;1b5c
3721 call sub_1e2eh ;1b5f
3734 jr gen.opc.ED2 ;1b72
3737 call sub_0a23h ;1b77
3739 call sub_1e50h ;1b7c
3741 call sub_1ed1h ;1b81
3742 ld hl,t_BC.DE.IX.SP ;1b84
3743 ld a,(pfx.IXY) ;1b87
3746 ld hl,t_BC.DE.IY.SP ;1b8e
3748 call sub_1e2bh ;1b91
3755 call sub_1ed1h ;1b9d
3756 call sub_1e2eh ;1ba0
3766 call skip_to_nextarg ;1bb2
3773 call sub_1e41h ;1bbb
3775 call sub_1e68h ;1bc0
3777 call sub_1e12h ;1bc5
3789 call sub_1e41h ;1bd8
3791 call sub_1e68h ;1bdd
3797 call assert_eol ;1be7
3798 ld a,(pfx.IXY) ;1bea
3800 ld (iy+000h),a ;1bf1
3801 ld (iy+001h),0cbh ;1bf4
3802 ld (iy+002h),c ;1bf8
3803 ld (iy+003h),b ;1bfb
3811 call assert_eol ;1c03
3813 ld (iy+000h),0cbh ;1c0a
3814 ld (iy+001h),b ;1c0e
3819 call sub_1de6h ;1c14
3820 call sub_1ed1h ;1c17
3821 call sub_1e41h ;1c1a
3823 call sub_1e68h ;1c1f
3844 call sub_1eb8h ;1c39
3848 call skip_to_nextarg ;1c40
3859 call sub_1eb8h ;1c50
3870 call sub_1eb8h ;1c5f
3874 ld hl,b_0x1C97_start ;1c65
3875 call sub_0a15h ;1c68
3882 call skip_to_nextarg ;1c73
3889 call assert_eol ;1c7f
3911 call skip_to_nextarg ;1ca4
3915 call sub_1ebfh ;1cab
3922 call sub_1ed1h ;1cb6
3924 call sub_1defh ;1cb9
3927 call sub_1e12h ;1cbf
3938 jp gen.opc.ED2 ;1cd2
3940 call sub_1e12h ;1cd5
3950 call sub_1e50h ;1ce4
3952 call sub_1e25h ;1ce9
3961 call sub_1e41h ;1cf8
3972 call sub_1ed1h ;1d0a
3973 call sub_1d26h ;1d0d
3975 call sub_1e06h ;1d12
3979 call sub_1ed1h ;1d1a
3980 call sub_1d26h ;1d1d
3982 jp c,gen.opc.ED2 ;1d20
3989 call sub_1d26h ;1d2c
3991 call sub_1ed1h ;1d31
3992 call sub_1e41h ;1d34
4002 call sub_1e06h ;1d44
4003 call sub_1ed1h ;1d47
4010 ld hl,b_0x1D80_start ;1d54
4011 call sub_0a15h ;1d57
4014 call assert_eol ;1d5e
4016 ld hl,b_0x1DA1_start ;1d63
4021 ld (iy+000h),a ;1d6d
4029 ld (iy+001h),a ;1d7a
4055 call sub_1e50h ;1dab
4057 call sub_1e2eh ;1db0
4059 call sub_1e41h ;1db5
4061 call sub_1e68h ;1dba
4092 call sub_1e12h ;1de6
4107 call sub_1e15h ;1dfc
4116 jr nz,sub_1e12h ;1e09
4118 call sub_1e12h ;1e0c
4140 ld hl,t_BC.DE.HL.AF ;1e26
4147 ld hl,t_BC.DE.HL.SP ;1e2f
4150 call sub_0a15h ;1e33
4166 ld hl,t_BCDEHL_HL_A ;1e46
4167 call sub_0a15h ;1e49
4176 call sub_0a15h ;1e55
4183 ld (pfx.IXY),a ;1e61
4198 call sub_0a15h ;1e74
4206 ld (pfx.IXY),a ;1e81
4218 call sub_1e12h ;1e97 get displacement
4246 ld hl,t_tstfl_ZCPS ;1eb8
4250 ld hl,t_tstfl_ZC ;1ebf
4254 call sub_0a15h ;1ec5
4265 call skip_to_nextarg ;1ed1
4277 ld (CMD_RPT),hl ;1ee2
4284 call skip_to_nextarg ;1ef0
4285 call sub_0aa5h ;1ef3
4287 call assert_eol ;1ef8
4294 call sub_1f3fh ;1f02
4305 call assert_eol ;1f17
4317 call sub_1f3fh ;1f26
4335 ld (CON.COL),a ;1f49
4336 call sub_1f77h ;1f4c
4341 ld a,(CON.COL) ;1f54
4345 ld de,(offs.@) ;1f5b
4361 call sub_1f9eh ;1f7b
4364 call sub_2581h ;1f81
4366 call sub_1fdbh ;1f85
4373 ld hl,b_0x1F9B_start ;1f91
4384 ld (is.pfx.IXY),a ;1f9f
4386 ld a,(iy+000h) ;1fa6
4389 jp z,disas_pfx.ED ;1fab
4396 ld a,(iy+000h) ;1fba
4407 ld (is.pfx.IXY),a ;1fcb
4408 call sub_1fdch ;1fce
4411 call sub_1fb6h ;1fd3
4423 ld hl,b_0x2011_start ;1fde
4424 call sub_20bbh ;1fe1
4428 call sub_20bbh ;1fea
4432 ld a,(iy+000h) ;1ff4
4437 ld a,(iy+002h) ;1fff
4498 ld hl,b_0x2200_start ;203d
4499 call sub_209dh ;2040
4503 call lookup_opc ;2049
4507 call lookup_opc ;2052
4511 call lookup_opc ;205b
4517 ld a,(is.pfx.IXY) ;2065
4523 call lookup_opc ;2070
4528 ld hl,b_0x218B_start ;2078
4529 call lookup_opc ;207b
4532 ld hl,b_0x20ED_start ;2081
4533 call sub_209dh ;2084
4536 ld hl,b_0x2108_start ;208a
4537 call lookup_opc ;208d
4540 ld hl,b_0x21D2_start ;2093
4541 call lookup_opc ;2096
4560 ld hl,t_MNEMONICS ;20b0
4574 jr nz,sub_20bbh ;20c6
4580 ld a,(iy+000h) ;20ce
4592 jr nz,lookup_opc ;20dc
4601 ld hl,t_MNEMONICS ;20e5
4607 b_0x20ED_start: ; 1 byte opcodes (no parameters)
4636 b_0x2108_start: ; 1 byte opcodes
4637 defb 0c0h ;2108 ld r,r
4642 defb 0f8h ;210d add a,r
4647 defb 0f8h ;2112 adc a,r
4683 defb 0c0h ;2136 ret cc
4697 defb 0cfh ;2144 pop rr
4702 defb 0cfh ;2149 push rr
4707 defb 0ffh ;214e ex (sp),hl
4712 defb 0ffh ;2153 jp (hl)
4717 defb 0ffh ;2158 ex de,hl
4722 defb 0ffh ;215d ld sp,hl
4727 defb 0cfh ;2162 inc rr
4732 defb 0cfh ;2167 dec rr
4737 defb 0c7h ;216c inc r
4742 defb 0c7h ;2171 dec r
4747 defb 0ffh ;2176 ex af,af'
4752 defb 0cfh ;217b add hl,rr
4757 defb 0efh ;2180 ld (rr),a ;rr=bc,de
4762 defb 0efh ;2185 ld a,(rr) ;rr=bc,de
4769 b_0x218B_start: ; 2 byte opdodes
4770 defb 0c7h ;218b ld r,nn
4775 defb 0ffh ;2190 add a,nn
4780 defb 0ffh ;2195 adc a,nn
4785 defb 0ffh ;219a sub a,nn
4795 defb 0ffh ;21a4 and a,nn
4810 defb 0ffh ;21b3 cp a,nn
4815 defb 0ffh ;21b8 djnz
4825 defb 0e7h ;21c2 jr,cc
4831 defb 0d3h ;21c8 out (nn),a
4835 defb 0ffh ;21cc in a,(nn)
4842 b_0x21D2_start: ; 3 byte opcodes
4890 b_0x2200_start: ; prefix ED + 1 byte opcode
4893 defb 045h ;2202 retn
4895 defb 04dh ;2204 reti
4917 defb 0b0h ;221a ldir
4925 defb 0b8h ;2222 lddr
4933 defb 08bh ;222a otdm
4935 defb 09bh ;222c otdmr
4937 defb 083h ;222e otim
4939 defb 093h ;2230 otimr
4946 defb 0e7h ;2235 in r,(c) ;r=bcde
4951 defb 0f7h ;223a in r,(c) ;r=hl
4956 defb 0ffh ;223f in r,(c) ;r=a
4971 defb 0ffh ;224e out (c),r ;r=a
4976 defb 0cfh ;2253 sbc hl,rr
4981 defb 0cfh ;2258 adc hl,rr
4986 defb 0ffh ;225d im 0
4991 defb 0ffh ;2262 im 1
4996 defb 0ffh ;2267 im 2
5001 defb 0ffh ;226c ld i,a
5021 defb 0cfh ;2280 mlt rr
5026 defb 0c7h ;2285 tst r
5217 call sub_257ch ;22ff
5220 call sub_2579h ;2305
5226 call sub_257ch ;230f
5230 call sub_257ch ;2318
5234 ld a,(iy+000h) ;2322
5239 ld hl,b_0x2333_start ;232a
5256 ld hl,b_0x2354_start ;234b
5264 ld hl,b_0x1D80_start ;2357
5268 call sub_257ch ;2360
5271 call sub_2372h ;2366
5272 call sub_257ch ;2369
5275 call sub_2579h ;236f
5283 call sub_2579h ;237f
5287 call sub_257ch ;2387
5288 ld a,(is.pfx.IXY) ;238a
5291 ld a,(iy+002h) ;2392
5296 ld a,(iy+001h) ;239b
5302 ld a,(iy+000h) ;23a5
5305 call sub_2568h ;23aa
5306 call sub_257ch ;23ad
5309 ld c,(iy+001h) ;23b4
5322 call sub_2579h ;23c3
5327 ld a,(iy+001h) ;23cf
5332 call sub_257ch ;23d8
5338 call sub_257ch ;23e3
5341 ld l,(iy+001h) ;23ea
5342 ld h,(iy+002h) ;23ed
5353 call sub_257ch ;23ff
5356 call sub_24c6h ;2404
5357 call sub_257ch ;2407
5361 call sub_257ch ;2410
5364 call sub_24c6h ;2416
5365 call sub_257ch ;2419
5369 call sub_2579h ;2421
5382 ld hl,b_0x2449_start ;2434
5406 call sub_257ch ;2458
5412 call sub_257ch ;2467
5416 call sub_257ch ;2470
5419 call sub_24c6h ;2476
5420 call sub_257ch ;2479
5424 call sub_257ch ;2482
5427 ld a,(is.pfx.IXY) ;2487
5431 ld a,(iy+001h) ;2491
5436 ld a,(iy+002h) ;249a
5446 call sub_257ch ;24a8
5450 ld a,(is.pfx.IXY) ;24ae
5454 ld a,(iy+001h) ;24b8
5459 ld a,(iy+002h) ;24c1
5467 ld l,(iy+001h) ;24cf
5468 ld h,(iy+002h) ;24d2
5471 call sub_23f2h ;24d7
5476 ld a,(iy+000h) ;24e3
5484 ld a,(iy+000h) ;24ef
5490 ld a,(is.pfx.IXY) ;24f8
5494 ld hl,b_0x2538_start ;2500
5495 ld a,(is.pfx.IXY) ;2503
5498 ld hl,b_0x253B_start ;2509
5502 ld a,(iy+001h) ;2513
5521 ld hl,t_BCDEHL_HL_A ;2533
5530 ld a,(is.pfx.IXY) ;253e
5531 ld hl,t_HL.IX.IY ;2541
5534 ld hl,t_BC.DE.HL.AF ;2546
5537 ld hl,t_BC.DE.HL.SP ;254b
5540 ld a,(iy+000h) ;2552
5552 ld a,(iy+000h) ;2565
5559 ld hl,t_tstfl_ZCPS ;256d
5563 call sub_0a48h ;2573
5732 ld hl,(REG.PC) ;26e7
5736 ld iy,(REG.PC) ;26ee
5737 call sub_1f9eh ;26f2
5741 ld hl,(REG.PC) ;26fb
5743 call sub_1117h ;26ff
5744 ld iy,(REG.PC) ;2702
5745 ld hl,b_0x2717_start ;2706
5746 call lookup_opc ;2709
5751 call c,sub_1117h ;2712
5840 ld l,(iy+001h) ;276d
5841 ld h,(iy+002h) ;2770
5848 ld c,(iy+001h) ;2779
5854 ld hl,(REG.PC) ;2780
5867 ld hl,(reg.ix) ;278d
5871 ld hl,(reg.iy) ;2792
5874 ld a,(iy+001h) ;2799
5884 ld a,(iy+001h) ;27a6
5895 ld a,(iy+000h) ;27b7
5917 ld hl,(REG.SP) ;27da
5924 call sub_1117h ;27e5
5935 ld a,(iy+000h) ;27f9
5963 ld (CMD_RPT),hl ;281b
5977 call sub_289fh ;2833
5980 call get_lastarg_def ;283b
5982 ld (TCCSTR),hl ;283e
5986 call sub_26e7h ;2845
5989 call sub_0e68h ;284a
5993 ld iy,(REG.PC) ;2853
5994 call sub_28c1h ;2857
5997 call lookup_opc ;285f
6003 ld de,(TCCSTR) ;286a
6016 ld hl,(TCCSTR) ;2881
6018 ld (TCCSTR),hl ;2885
6023 call sub_26e7h ;288c
6049 call assert_eol ;28b7
6106 ;------------------------------------------
6108 ;------------------------------------------
6114 ; The following 2 params are changeable by user.
6115 ; Should these moved to top ram?
6118 rst DRSTNUM ;rst used by ddtz
6121 ei ;ints enabled/disabled while ddtz is running
6293 ;------------------------------------------
6295 .phase sysram_start+stacksize
6297 $stcka equ $ - stacksize
6305 reg.l2: db 0 ; 0fe50h
6306 reg.h2: db 0 ; 0fe51h
6307 reg.e2: db 0 ; 0fe52h
6308 reg.d2: db 0 ; 0fe53h
6309 reg.c2: db 0 ; 0fe54h
6310 reg.b2: db 0 ; 0fe55h
6311 reg.f2: db 0 ; 0fe56h
6312 reg.a2: db 0 ; 0fe57h
6314 reg.i: db high ivtab
6315 reg.iy: dw 0 ; 0fe5ah
6316 reg.ix: dw 0 ; 0fe5ch
6317 reg.e: db 0 ; 0fe5eh
6318 reg.d: db 0 ; 0fe5fh
6319 reg.c: db 0 ; 0fe60h
6320 reg.b: db 0 ; 0fe61h
6322 udcntl: db CWAITIO ; 0fe62h (mem-, io- wait)
6323 uromen: db ROM_DIS ; 0fe63h
6326 ucbar: db USR$CBAR ; 0fe65h
6327 reg.f: db 0 ; 0fe66h
6328 reg.a: db 0 ; 0fe67h
6329 reg.l: db 0 ; 0fe68h
6330 reg.h: db 0 ; 0fe69h
6331 reg.sp: dw TOPRAM ; 0fe6ah
6335 out (000h),a ;064c fe6c
6336 out0 (dcntl),l ;064e
6343 ld sp,(reg.sp) ;065a
6346 db 0C3h ;jp TPA ;065f feff ($+1): reg.pc
6351 ld (reg.l),hl ;0662 fe82: bpent:
6354 ld (reg.pc),hl ;0667
6355 ld (reg.sp),sp ;066a
6366 ld a,CWAITROM+CWAITIO ;0681
6367 out0 (dcntl),a ;0683
6378 out (000h),a ;0692 feb2