メモリー増設してなくても動くはず。がんばって。
1 CLEAR 500
10 DIM CB$(1,31)
100 V=&h0:CC$="00":KK$="0000"
110 A=PEEK(V):A$=LEFT$(CC$,2-LEN(HEX$(V)))+HEX$(A):AD$=LEFT$(KK$,4-LEN(HEX$(V)))+HEX$(V)
112 A1=PEEK(V+1):A2=PEEK(V+2):A3=PEEK(V+3)
113 A1$=LEFT$(CC$,2-LEN(HEX$(A1)))+HEX$(A1):A2$=LEFT$(CC$,2-LEN(HEX$(A2)))+HEX$(A2):A3$=LEFT$(CC$,2-LEN(HEX$(A3)))+HEX$(A3)
115 IF A=&hFD THEN GOTO 900
120 ON FIX(A/16)+1 GOSUB 2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3100,3200,3300,3400,3500
200 READ CK$
210 MM$=MID$(CK$,2,2):HH=VAL(LEFT$(CK$,1))
220 IF A$<>MM$ THEN GOTO 200
221 KC$=A$+" "+RIGHT$(CK$,LEN(CK$)-3)+" "
222 VV$=LEFT$(CC$,2-LEN(HEX$(PEEK(V+1))))+HEX$(PEEK(V+1))
224 WW$=LEFT$(CC$,2-LEN(HEX$(PEEK(V+2))))+HEX$(PEEK(V+2))
230 ON HH+1 GOTO 300,400,500,600,700,800,900
300 PRINT AD$;" ";KC$:V=V+1:GOTO 110
400 MID$(KC$,4,2)=VV$:XX=INSTR(KC$,"$")+1:MID$(KC$,XX,2)=VV$
410 PRINT AD$;" ";KC$:V=V+2:GOTO 110
500 MID$(KC$,4,5)=VV$+" "+WW$:XX=INSTR(KC$,"$")+1:MID$(KC$,XX,4)=WW$+VV$
510 PRINT AD$;" ";KC$:V=V+3:GOTO 110
600 RESTORE 650
602 FOR I=0 TO 7:READ CB$(O,I):NEXT I
604 FOR I=0 TO 31:READ CB$(1,I):NEXT I
606 HJ=PEEK(V+1):HJ$=LEFT$(CC$,2-LEN(HEX$(HJ)))+HEX$(HJ)
608 PRINT AD$;" ";A$;" ";HJ$;" ":V=V+2:GOTO 110
650 DATA B,C,D,E,H,L,(HL),A
660 DATA "RLC","RRC","RL","RR","SLA","SRA","SLL","SRL","BIT 0,","BIT 1,","BIT 2,","BIT 3,","BIT 4,"BIT 5,","BIT 6,",BIT 7,"
670 DATA "RES 0,","RES 1,","RES 2,","RES 3,","RES 4,","RES 5,","RES 6,","RES 7,"
680 DATA "SET 0,","SET 1,","SET 2,","SET 3,","SET 4,","SET 5,","SET 6,","SET 7,"
700 RESTORE 4000
705 IF A1=&h2 THEN GOTO 790
706 IF A1=&hBB OR A1=&hC2 THEN GOTO 790
707 IF A1=&hAF OR A1=&h8A THEN GOTO 790
708 IF A1=&h0 OR A1=&hBA THEN GOTO 795
709 IF A1=&hFF OR A1=&hDF THEN GOTO 795
710 READ CK$
720 MM$=MID$(CK$,5,2):WW$=LEFT$(CK$,1):IF WW$="4" THEN A1$="CB":GOTO 760
722 IF WW$="9" THEN PRINT AD$;" DD ";HEX$(PEEK(V+1)):V=V+2:GOTO 110
724 A1$=LEFT$(CC$,2-LEN(HEX$(A1)))+HEX$(A1)
726 IF A1$<>MM$ THEN GOTO 710
728 H2=VAL(LEFT$(CK$,1)+1
730 ON H2 GOTO 740,745,750,755,760,765
740 KC$=MID$(CK$,2,5)+" "+RIGHT$(CK$,LEN(CK$)-6)
742 PRINT AD$;" ";KC$:V=V+2:GOTO 110
745 A2$=LEFT$(CC$,2-LEN(HEX$(A2)))+HEX$(A2):KC$=MID$(CK$,2,5)+" "+A2$+" "+RIGHT$(CK$,LEN(CK$)-6)
746 I=INSTR(KC$,"$"):MID$(KC$,I+1,2)=A2$
747 PRINT AD$;" ";KC$:V=V+3:GOTO 110
750 REM
751 KC$=MID$(CK$,2,5)+" "+A2$+" "+A3$+" "+RIGHT$(CK$,LEN(CK$)-9)
752 N=INSTR(KC$,"$"):MID$(KC$,N+1,4)=A3$+A2$
753 PRINT AD$;" ";KC$:V=V+4:GOTO 110
755 KC$=MID$(CK$,2,5)+" "+A2$+" "+RIGHT$(CK$,LEN(CK$)-6)
757 S=INSTR(KC$,"$"):MID$(KC$,S+1,2)=A2$
759 PRINT AD$;" ";KC$:V=V+3:GOTO 110
760 WW$=MID$(CK$,5,2):IF A3$<>WW$ THEN GOTO 710
761 KC$="DD CB "+A2$+" "+A3$+" "+RIGHT$(CK$,LEN(CK$)-6)
762 PRINT AD$;" ";KC$:V=V+4:GOTO 110
765 REM
767 PRINT AD$;" DD 36 ";A2$;" ";A3$;" LD (IX+$";A2$;"),$";A3$
769 V=V+4:GOTO 110
790 REM
791 PRINT AD$;" DD ";A1$;" ";A2$;" ";A3$
792 V=V+4:GOTO 110
795 REM
796 PRINT AD$;" DD ";A1$;" ";A2$
797 V=V+3:GOTO 110
800 REM
802 IF A1=&h43 THEN GOTO 850
804 IF A1=&h4B THEN GOTO 852
806 IF A1=&h53 THEN GOTO 854
808 IF A1=&h5B THEN GOTO 856
810 IF A1=&h63 THEN GOTO 858
812 IF A1=&h6B THEN GOTO 860
814 IF A1=&h73 THEN GOTO 862
816 IF A1=&h7B THEN GOTO 864
820 RESTORE 5000
822 READ CK$
824 WW$=LEFT$(CK$,2)
826 IF A1$<>WW$ THEN GOTO 822
828 PRINT AD$;" ED ";LEFT$(CK$,2);" ";RIGHT$(CK$,LEN(CK$)-2):V=V+2:GOTO 110
850 PRINT AD$;" ED 43 ";A2$;" ";A3$;" LD ($";A3$;A2$;"),BC":V=V+4:GOTO 110
852 PRINT AD$;" ED 4B ";A2$;" ";A3$;" LD BC,($";A3$;A2$;")":V=V+4:GOTO 110
854 PRINT AD$;" ED 53 ";A2$;" ";A3$;" LD ($";A3$;A2$;"),DE":V=V+4:GOTO 110
856 PRINT AD$;" ED 5B ";A2$;" ";A3$;" LD DE,($";A3$;A2$;")":V=V+4:GOTO 110
858 PRINT AD$;" ED 63 ";A2$;" ";A3$;" LD ($";A3$;A2$;"),HL":V=V+4:GOTO 110
860 PRINT AD$;" ED 6B ";A2$;" ";A3$;" LD HL,($";A3$;A2$;")":V=V+4:GOTO 110
862 PRINT AD$;" ED 73 ";A2$;" ";A3$;" LD ($";A3$;A2$;"),SP":V=V+4:GOTO 110
864 PRINT AD$;" ED 7B ";A2$;" ";A3$;" LD SP,($";A3$;A2$;")":V=V+4:GOTO 110
900 REM
904 IF A1=&hCB THEN RESTORE 950:GOTO 940
906 RESTORE 6000
908 READ CK$
910 WW=VAL(LEFT$(CK$,1)):MM$=MID$(CK$,2,2)
912 IF A1$<>MM$ THEN GOTO 908
913 ON WW GOTO 920,925,930,935
914 PRINT AD$;" FD ";MM$;" ";RIGHT$(CK$,LEN(CK$)-3):V=V+2:GOTO 110
920 PRINT AD$;" ED ";MM$;" ";A2$;" ";RIGHT$(CK$,LEN(CK$)-3);A2$;")":V=V+3:GOTO 110
925 I=INSTR(CK$,"$"):MID$(CK$,I+1,4)=A3$+A2$
926 PRINT AD$;" FD ";A1$;" ";A2$;" ";A3$;RIGHT$(CK$,LEN(CK$)-3):V=V+4:GOTO 110
930 I=INSTR(CK$,"$"):MID$(CK$,I+1,2)=A2$
931 PRINT AD$;" FD ";A1$;" ";A2$;" ";RIGHT$(CK$,LEN(CK$)-3):V=V+3:GOTO 110
935 PRINT AD$;" FD 36 ";A2$;" ";A3$;" LD (IY+$";A2$;"),$";A3$:V=V+4:GOTO 110
940 READ CK$
941 WW$=LEFT$(CK$,2):IF WW$<>A3$ THEN GOTO 940
942 PRINT AD$;" FD CB ";A2$;" ";CK$;A2$;")":V=V+4:GOTO 110
950 DATA "06 RLC (IY+$","0E RRC (IY+$","16 RL (IY+$","1E RR (IY+$"
951 DATA "26 SLA (IY+$","2E SRA (IY+$","36 SLL (IY+$","3E SRL (IY+$"
952 DATA "46 BIT 0,(IY+$","4E BIT 1,(IY+$","56 BIT 2,(IY+$","5E BIT 3,(IY+$"
953 DATA "66 BIT 4,(IY+$","6E BIT 5,(IY+$","76 BIT 6,(IY+$","7E BIT 7,(IY+$"
954 DATA "86 RES 0,(IY+$","8E RES 1,(IY+$","96 RES 2,(IY+$","9E RES 3,(IY+$"
955 DATA "A6 RES 4,(IY+$","AE RES 5,(IY+$","B6 RES 6,(IY+$","BE RES 7,(IY+$"
956 DATA "C6 SET 0,(IY+$","CE SET 1,(IY+$","D6 SET 2,(IY+$","DE SET 3,(IY+$"
957 DATA "E6 SET 4,(IY+$","EE SET 5,(IY+$","F6 SET 6,(IY+$","FE SET 7,(IY+$"
1000 DATA "000NOP LD","201BC,$","002LD (BC),A","003 INC BC","004INC B","005DEC B","106LD B,$","007RLCA"
1001 DATA "008EX AF,AF'","009ADD HL,BC","00ALD A,(BC)","00BDEC BC","00CINC C","00DDEC C","10ELD C,$","00FRRCA"
1002 DATA "110DJNZ $","211LD DE,$","012LD (DE),A","013INC DE","014INC D","015DEC D",116LD D,$",017RLA"
1003 DATA "118JR $","019ADD HL,DE","01ALD A,(DE)","01BDEC DE","01CINC E","01DDEC E","11ELD E,$","01FRRA"
1004 DATA "120JR NZ,$","221LD HL,$","222LD ($ ),HL","023INC HL","024INC H","025DEC H","126LD H,$","027DAA"
1005 DATA "128JR Z,$","029ADD HL,HL","22ALD HL,($ )","02BDEC HL","02CINC L","02DDEC L","12ELD L,$","02FCPL"
1006 DATA "130JR NC,$ ","231LD SP,$","232LD ($ ),A","033INC SP","034INC (HL)","035DEC (HL)","136LD (HL),$","037SCF"
1007 DATA "138JR C,$","039ADD HL,SP","23ALD A,($ )"03BDEC SP","03CINC A","03DDEC A","13ELD A,$","03FCCF"
1008 DATA "040LD B,B","041LD B,C","042LD B,D","043LD B,E","044LD B,H","045LD B,L","046LD B,(HL)","047LD B,A"
1009 DATA "048LD C,B","049LD C,C","04ALD C,D","04BLD C,E","04CLD C,H","04DLD C,L","04ELD C,(HL)","04FLD C,A"
1010 DATA "050LD D,B","051LD D,C","052LD D,D","053LD D,E","054LD D,H","055LD D,L","056LD D,(HL)","057LD D,A"
1011 DATA "058LD E,B","059LD E,C","05ALD E,D","05BLD E,E","05CLD E,H","05DLD E,L","05ELD E,(HL)","05FLD E,A"
1012 DATA "060LD H,B","061LD H,C","062LD H,D","063LD H,E","064LD H,H","065LD H,L","066LD H,(HL)","067LD H,A"
1013 DATA "068LD L,B","069LD L,C","06ALD L,D","06BLD L,E","06CLD L,H","06DLD L,L"06ELD L,(HL)","06FLD L,A"
1014 DATA "070LD (HL),B","071LD (HL),C","072LD (HL),D","073LD (HL),E","074LD (HL),H","075LD (HL),L","076HALT"
1015 DATA "077LD (HL),A","078LD A,B","079LD A,C","07ALD A,D","07BLD A,E","07CLD A,H","07DLD A,L","07ELD A,(HL)","07FLD A,A"
1016 DATA "080ADD A,B","081ADD A,C","082ADD A,D","083ADD A,E","084ADD A,H","085ADD A,L","086ADD A,(HL)","087ADD A,A"
1017 DATA "088ADC A,B","089ADC A,C","08AADC A,D","08BADC A,E","08CADC A,H","08DADC A,L","08EADC A,(HL)","08FADC A,A"
1018 DATA "090SUB B","091SUB C","092SUB D","093 SUB E","094SUB H","095SUB L","096SUB (HL)","097SUB A"
1019 DATA "098SBC A,B","099SBC A,C","09ASBC A,D","09BSBC A,E","09CSBC A,H","09DSBC A,L","09ESBC A,(HL)","09FSBC A,A"
1020 DATA "0A0AND B","0A1AND C","0A2AND D","0A3AND E","0A4 AND H","0A5AND L","0A6AND (HL)","0A7AND A"
1021 DATA "0A8XOR B","0A9XOR C","0AAXOR D","0ABXOR E","0ACXOR H","0ADXOR L","0AEXOR (HL)","0AFXOR A"
1022 DATA "0B0OR B","0B1OR C","0B2OR D","0B3OR E","0B4OR H","0B5OR L","0B6OR (HL)"0B7OR A"
1023 DATA "0B8CP B","0B9CP C","0BACP D","0BBCP E","0BCCP H","0BDCP L","0BECP (HL)","0BFCP A"
1024 DATA "0C0RET NZ","0C1POP BC","2C2JP NZ,$","2C3JP $","2C4CALL NZ,$","0C5PUSH BC","1C6ADD A,$ ","0C7RST $00"
1025 DATA "0C8RET Z","0C9RET JP","2CAZ,$","3CB**","2CCCALL Z,$","2CDCALL $","1CEADC A,$","0CFRST $08"
1026 DATA "0D0RET NC","0D1POP DE","2D2JP NC,$","1D3OUT ($ ),A","2D4CALL NC,$","0D5PUSH DE","1D6SUB $","0D7RST $10"
1027 DATA "0D8RET C","0D9EXX","2DAJP C,$","1DBIN A,($ )","2DCCALL C,$","4DD//","1DESBC A,$","0DFRST $18"
1028 DATA "0E0RET PO","0E1POP HL","2E2JP PO,$","0E3EX (SP),HL","2E4CALL PO,$","0E5PUSH HL","1E6AND $","0E7RST $20"
1029 DATA "0E8RET PE","0E9JP (HL)","2EAJP PE,$","0EBEX DE,HL","2ECCALL PE,$","5ED!!","1EEXOR $","0EFRST $28"
1030 DATA "0F0RET P","0F1POP AF","2F2JP P,$","0F3DI","2F4CALL P,$","0FPUSH AF","1F6OR $","0F7RST $30"
1031 DATA "0F8RET M","0F9LD SP,HL","2FAJP M,$","0FBE1","2FCCALL M,$","6FD??","1FECP $","0FFRST $38"
2000 RESTORE 1000:RETURN
2100 RESTORE 1002:RETURN
2200 RESTORE 1004:RETURN
2300 RESTORE 1006:RETURN
2400 RESTORE 1008:RETURN
2500 RESTORE 1010:RETURN
2600 RESTORE 1012:RETURN
2700 RESTORE 1014:RETURN
2800 RESTORE 1016:RETURN
2900 RESTORE 1018:RETURN
3000 RESTORE 1020:RETURN
3100 RESTORE 1022:RETURN
3200 RESTORE 1024:RETURN
3300 RESTORE 1026:RETURN
3400 RESTORE 1028:RETURN
3500 RESTORE 1030:RETURN
4000 DATA "0DD 01ADD IX,BC","0DD 19ADD IX,DE","2DD 21LD IX,$ ","2DD 22LD ($ ),IX"
4001 DATA "0DD 23INC IX","0DD 29ADD IX,HL","2DD 2ALD IX,($ )","0DD 2BDEC IX"
4002 DATA "1DD 34INC (IX+$ )","1DD 35DEC (IX+$ )","5DD 36LD (IX+$ ),$ ","0DD 39ADD IX,SP"
4003 DATA "3DD 46LD B,(IX+$ )","3DD 4ELD C,(IX+$ )","3DD 56LD D,(IX+$ )","3DD 5ELD E,(IX+$ )"
4004 DATA "3DD 66LD H,(IX+$ )","3DD 6ELD L,(IX+$ )","3DD 70LD (IX+$ ),B","3DD 71LD (IX+$ ),C"
4005 DATA "3DD 72LD (IX+$ ),D","3DD 73LD (IX+$ ),E","3DD 74LD (IX+$ ),H","3DD 75LD (IX+$ ),L"
4006 DATA "3DD 77LD (IX+$ ),A","3DD 7ELD A,(IX+$ )","3DD 86ADD A,'IX+$ )","3DD 8EDEC A,(IX+$ )"
4007 DATA "3DD 96SUB (IX+$ )","3DD 9ESBC A,(IX+$ )","
4008 DATA "3DD B6OR (IX+$ )","3DD BECP (IX+$ )","4DD 06RLC (IX+$ )","4DD 0ERRC (IX+$ )"
4009 DATA "4DD16RL (IX+$ )","4DD 1ERR (IX+$ )","4DD 26SLA (IX+$ )","4DD 2ESRA (IX+$ )"
4010 DATA "4DD 3ESRL (IX+$ )","4DD 46BIT 0,(IX+$ )","4DD 4EBIT 1,(IX+$ )","4DD 56BIT 2,(IX+$ )"
4011 DATA "4DD 5EBIT 3,(IX+$ )","4DD 66BIT 4,(IX+$ )","4DD 6EBIT 5,(IX+$ )","4DD 76BIT 6,(IX+$ )"
4012 DATA "4DD 7EBIT 7,(IX+$ )","4DD 86RES 0,(IX+$ )","4DD 8ERES 1,(IX+$ )","4DD 96RES 2,(IX+$ )"
4013 DATA "4DD 9ERES 3,(IX+$ )","4DD A6RES 4,(IX+$ )","4DD AERES 5,(IX+$ )","4DD B6RES 6,(IX+$ )" 4014 DATA "4DD BERES 7,(IX+$ )","4DD C6SET 0,(IX+$ )","4DD CESET 1,(IX+$ )","4DD D6SET 2,(IX+$ )"
4015 DATA "4DD DESET 3,(IX+$ )","4DD E6SET 4,(IX+$ )","4DD EESET 5,(IX+$ )","4DD F6SET 6,(IX+$ )"
4016 DATA "4DD FESET 7,(IX+$ )","0DD E1POP IX","0DD E3EX (SP),IX","0DD E5PUSH IX","0DD E9JP (IX)","0DD F9LS SP,IX"
5000 DATA "40IN B,(C)","41 OUT (C),B","42SBC HL,BC","44NEG","45RETN","46IM 0","47LD I,A"
5007 DATA "48IN C,(C)","49OUT (C),C","4AADC HL,BC","4DRETI","4FLD R,A","50IN D,(C)","51OUT (C),D","52SBC HL,DE"
5015 DATA "56IM 1","57LD A,I","58IN E,(C)","59OUT (C),E","5AADC HL,DE","5EIM 2","5FLD A,R"
5023 DATA "60IN H,(C)","61OUT (C),H","62SBC HL,HL","67RRD","68IN L,(C)","69OUT (C),L"
5031 DATA "6AADC HL,HL","6FRLD","72SBC HL,SP","78IN A,(C)","79OUT (C),A","7AADC HL,SP","A0LDI",A1CPI","A2INI","A3OUTI","A8LDD"
5039 DATA "A9CPD","ABIND","ACOUTD","B0LDIR","B1CPIR","B2INIR","B3OTIR","B8LDDR","B9CPDR","BAINDR","BBOTDR","F0"
6000 DATA "001ADD IY,BC","019ADD IY,DE","221LD IY,$ ","222LD ($ ),IY"
6001 DATA "023INC IY","029ADD IY,HL","22ALD IY,($ ","22BDEC IY"
6002 DATA "334INC (IY+$ )","335DEC (IY+$ )","356LD D,(IY+$ )","35ELD E,(IY+$ )","047"
6004 DATA "366LD H,(IY+$ )","36ELD L,(IY+$ )","370LD (IY+$ ),B","371LD (IY+$ ),C","08B"
6005 DATA "372LD (IY+$ ),D","373LD (IY+$ ),E","374LD (IY+$ ),H","375LD (IY+$ ),L","377 (IY+$ ),A",37ELD A,(IY+$ )","000","002","0CF"
6006 DATA "386ADD A,(IY+$ )","38EDEC A,(IY+$ )","396SUB (IY+$ )","39ESBC A,(IY+$ )","3A6AND (IY+$ )","3AEXOR (IY+$ )","3B6OR (IY+$ )","3BECP (IY+$ )"
6007 DATA "0E1POP IY","0E3EX (SP),IY","0E5PUSH IY","0E6JP (IY)","0E9LD SP,IY"
1 CLEAR 500
10 DIM CB$(1,31)
100 V=&h0:CC$="00":KK$="0000"
110 A=PEEK(V):A$=LEFT$(CC$,2-LEN(HEX$(V)))+HEX$(A):AD$=LEFT$(KK$,4-LEN(HEX$(V)))+HEX$(V)
112 A1=PEEK(V+1):A2=PEEK(V+2):A3=PEEK(V+3)
113 A1$=LEFT$(CC$,2-LEN(HEX$(A1)))+HEX$(A1):A2$=LEFT$(CC$,2-LEN(HEX$(A2)))+HEX$(A2):A3$=LEFT$(CC$,2-LEN(HEX$(A3)))+HEX$(A3)
115 IF A=&hFD THEN GOTO 900
120 ON FIX(A/16)+1 GOSUB 2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3100,3200,3300,3400,3500
200 READ CK$
210 MM$=MID$(CK$,2,2):HH=VAL(LEFT$(CK$,1))
220 IF A$<>MM$ THEN GOTO 200
221 KC$=A$+" "+RIGHT$(CK$,LEN(CK$)-3)+" "
222 VV$=LEFT$(CC$,2-LEN(HEX$(PEEK(V+1))))+HEX$(PEEK(V+1))
224 WW$=LEFT$(CC$,2-LEN(HEX$(PEEK(V+2))))+HEX$(PEEK(V+2))
230 ON HH+1 GOTO 300,400,500,600,700,800,900
300 PRINT AD$;" ";KC$:V=V+1:GOTO 110
400 MID$(KC$,4,2)=VV$:XX=INSTR(KC$,"$")+1:MID$(KC$,XX,2)=VV$
410 PRINT AD$;" ";KC$:V=V+2:GOTO 110
500 MID$(KC$,4,5)=VV$+" "+WW$:XX=INSTR(KC$,"$")+1:MID$(KC$,XX,4)=WW$+VV$
510 PRINT AD$;" ";KC$:V=V+3:GOTO 110
600 RESTORE 650
602 FOR I=0 TO 7:READ CB$(O,I):NEXT I
604 FOR I=0 TO 31:READ CB$(1,I):NEXT I
606 HJ=PEEK(V+1):HJ$=LEFT$(CC$,2-LEN(HEX$(HJ)))+HEX$(HJ)
608 PRINT AD$;" ";A$;" ";HJ$;" ":V=V+2:GOTO 110
650 DATA B,C,D,E,H,L,(HL),A
660 DATA "RLC","RRC","RL","RR","SLA","SRA","SLL","SRL","BIT 0,","BIT 1,","BIT 2,","BIT 3,","BIT 4,"BIT 5,","BIT 6,",BIT 7,"
670 DATA "RES 0,","RES 1,","RES 2,","RES 3,","RES 4,","RES 5,","RES 6,","RES 7,"
680 DATA "SET 0,","SET 1,","SET 2,","SET 3,","SET 4,","SET 5,","SET 6,","SET 7,"
700 RESTORE 4000
705 IF A1=&h2 THEN GOTO 790
706 IF A1=&hBB OR A1=&hC2 THEN GOTO 790
707 IF A1=&hAF OR A1=&h8A THEN GOTO 790
708 IF A1=&h0 OR A1=&hBA THEN GOTO 795
709 IF A1=&hFF OR A1=&hDF THEN GOTO 795
710 READ CK$
720 MM$=MID$(CK$,5,2):WW$=LEFT$(CK$,1):IF WW$="4" THEN A1$="CB":GOTO 760
722 IF WW$="9" THEN PRINT AD$;" DD ";HEX$(PEEK(V+1)):V=V+2:GOTO 110
724 A1$=LEFT$(CC$,2-LEN(HEX$(A1)))+HEX$(A1)
726 IF A1$<>MM$ THEN GOTO 710
728 H2=VAL(LEFT$(CK$,1)+1
730 ON H2 GOTO 740,745,750,755,760,765
740 KC$=MID$(CK$,2,5)+" "+RIGHT$(CK$,LEN(CK$)-6)
742 PRINT AD$;" ";KC$:V=V+2:GOTO 110
745 A2$=LEFT$(CC$,2-LEN(HEX$(A2)))+HEX$(A2):KC$=MID$(CK$,2,5)+" "+A2$+" "+RIGHT$(CK$,LEN(CK$)-6)
746 I=INSTR(KC$,"$"):MID$(KC$,I+1,2)=A2$
747 PRINT AD$;" ";KC$:V=V+3:GOTO 110
750 REM
751 KC$=MID$(CK$,2,5)+" "+A2$+" "+A3$+" "+RIGHT$(CK$,LEN(CK$)-9)
752 N=INSTR(KC$,"$"):MID$(KC$,N+1,4)=A3$+A2$
753 PRINT AD$;" ";KC$:V=V+4:GOTO 110
755 KC$=MID$(CK$,2,5)+" "+A2$+" "+RIGHT$(CK$,LEN(CK$)-6)
757 S=INSTR(KC$,"$"):MID$(KC$,S+1,2)=A2$
759 PRINT AD$;" ";KC$:V=V+3:GOTO 110
760 WW$=MID$(CK$,5,2):IF A3$<>WW$ THEN GOTO 710
761 KC$="DD CB "+A2$+" "+A3$+" "+RIGHT$(CK$,LEN(CK$)-6)
762 PRINT AD$;" ";KC$:V=V+4:GOTO 110
765 REM
767 PRINT AD$;" DD 36 ";A2$;" ";A3$;" LD (IX+$";A2$;"),$";A3$
769 V=V+4:GOTO 110
790 REM
791 PRINT AD$;" DD ";A1$;" ";A2$;" ";A3$
792 V=V+4:GOTO 110
795 REM
796 PRINT AD$;" DD ";A1$;" ";A2$
797 V=V+3:GOTO 110
800 REM
802 IF A1=&h43 THEN GOTO 850
804 IF A1=&h4B THEN GOTO 852
806 IF A1=&h53 THEN GOTO 854
808 IF A1=&h5B THEN GOTO 856
810 IF A1=&h63 THEN GOTO 858
812 IF A1=&h6B THEN GOTO 860
814 IF A1=&h73 THEN GOTO 862
816 IF A1=&h7B THEN GOTO 864
820 RESTORE 5000
822 READ CK$
824 WW$=LEFT$(CK$,2)
826 IF A1$<>WW$ THEN GOTO 822
828 PRINT AD$;" ED ";LEFT$(CK$,2);" ";RIGHT$(CK$,LEN(CK$)-2):V=V+2:GOTO 110
850 PRINT AD$;" ED 43 ";A2$;" ";A3$;" LD ($";A3$;A2$;"),BC":V=V+4:GOTO 110
852 PRINT AD$;" ED 4B ";A2$;" ";A3$;" LD BC,($";A3$;A2$;")":V=V+4:GOTO 110
854 PRINT AD$;" ED 53 ";A2$;" ";A3$;" LD ($";A3$;A2$;"),DE":V=V+4:GOTO 110
856 PRINT AD$;" ED 5B ";A2$;" ";A3$;" LD DE,($";A3$;A2$;")":V=V+4:GOTO 110
858 PRINT AD$;" ED 63 ";A2$;" ";A3$;" LD ($";A3$;A2$;"),HL":V=V+4:GOTO 110
860 PRINT AD$;" ED 6B ";A2$;" ";A3$;" LD HL,($";A3$;A2$;")":V=V+4:GOTO 110
862 PRINT AD$;" ED 73 ";A2$;" ";A3$;" LD ($";A3$;A2$;"),SP":V=V+4:GOTO 110
864 PRINT AD$;" ED 7B ";A2$;" ";A3$;" LD SP,($";A3$;A2$;")":V=V+4:GOTO 110
900 REM
904 IF A1=&hCB THEN RESTORE 950:GOTO 940
906 RESTORE 6000
908 READ CK$
910 WW=VAL(LEFT$(CK$,1)):MM$=MID$(CK$,2,2)
912 IF A1$<>MM$ THEN GOTO 908
913 ON WW GOTO 920,925,930,935
914 PRINT AD$;" FD ";MM$;" ";RIGHT$(CK$,LEN(CK$)-3):V=V+2:GOTO 110
920 PRINT AD$;" ED ";MM$;" ";A2$;" ";RIGHT$(CK$,LEN(CK$)-3);A2$;")":V=V+3:GOTO 110
925 I=INSTR(CK$,"$"):MID$(CK$,I+1,4)=A3$+A2$
926 PRINT AD$;" FD ";A1$;" ";A2$;" ";A3$;RIGHT$(CK$,LEN(CK$)-3):V=V+4:GOTO 110
930 I=INSTR(CK$,"$"):MID$(CK$,I+1,2)=A2$
931 PRINT AD$;" FD ";A1$;" ";A2$;" ";RIGHT$(CK$,LEN(CK$)-3):V=V+3:GOTO 110
935 PRINT AD$;" FD 36 ";A2$;" ";A3$;" LD (IY+$";A2$;"),$";A3$:V=V+4:GOTO 110
940 READ CK$
941 WW$=LEFT$(CK$,2):IF WW$<>A3$ THEN GOTO 940
942 PRINT AD$;" FD CB ";A2$;" ";CK$;A2$;")":V=V+4:GOTO 110
950 DATA "06 RLC (IY+$","0E RRC (IY+$","16 RL (IY+$","1E RR (IY+$"
951 DATA "26 SLA (IY+$","2E SRA (IY+$","36 SLL (IY+$","3E SRL (IY+$"
952 DATA "46 BIT 0,(IY+$","4E BIT 1,(IY+$","56 BIT 2,(IY+$","5E BIT 3,(IY+$"
953 DATA "66 BIT 4,(IY+$","6E BIT 5,(IY+$","76 BIT 6,(IY+$","7E BIT 7,(IY+$"
954 DATA "86 RES 0,(IY+$","8E RES 1,(IY+$","96 RES 2,(IY+$","9E RES 3,(IY+$"
955 DATA "A6 RES 4,(IY+$","AE RES 5,(IY+$","B6 RES 6,(IY+$","BE RES 7,(IY+$"
956 DATA "C6 SET 0,(IY+$","CE SET 1,(IY+$","D6 SET 2,(IY+$","DE SET 3,(IY+$"
957 DATA "E6 SET 4,(IY+$","EE SET 5,(IY+$","F6 SET 6,(IY+$","FE SET 7,(IY+$"
1000 DATA "000NOP LD","201BC,$","002LD (BC),A","003 INC BC","004INC B","005DEC B","106LD B,$","007RLCA"
1001 DATA "008EX AF,AF'","009ADD HL,BC","00ALD A,(BC)","00BDEC BC","00CINC C","00DDEC C","10ELD C,$","00FRRCA"
1002 DATA "110DJNZ $","211LD DE,$","012LD (DE),A","013INC DE","014INC D","015DEC D",116LD D,$",017RLA"
1003 DATA "118JR $","019ADD HL,DE","01ALD A,(DE)","01BDEC DE","01CINC E","01DDEC E","11ELD E,$","01FRRA"
1004 DATA "120JR NZ,$","221LD HL,$","222LD ($ ),HL","023INC HL","024INC H","025DEC H","126LD H,$","027DAA"
1005 DATA "128JR Z,$","029ADD HL,HL","22ALD HL,($ )","02BDEC HL","02CINC L","02DDEC L","12ELD L,$","02FCPL"
1006 DATA "130JR NC,$ ","231LD SP,$","232LD ($ ),A","033INC SP","034INC (HL)","035DEC (HL)","136LD (HL),$","037SCF"
1007 DATA "138JR C,$","039ADD HL,SP","23ALD A,($ )"03BDEC SP","03CINC A","03DDEC A","13ELD A,$","03FCCF"
1008 DATA "040LD B,B","041LD B,C","042LD B,D","043LD B,E","044LD B,H","045LD B,L","046LD B,(HL)","047LD B,A"
1009 DATA "048LD C,B","049LD C,C","04ALD C,D","04BLD C,E","04CLD C,H","04DLD C,L","04ELD C,(HL)","04FLD C,A"
1010 DATA "050LD D,B","051LD D,C","052LD D,D","053LD D,E","054LD D,H","055LD D,L","056LD D,(HL)","057LD D,A"
1011 DATA "058LD E,B","059LD E,C","05ALD E,D","05BLD E,E","05CLD E,H","05DLD E,L","05ELD E,(HL)","05FLD E,A"
1012 DATA "060LD H,B","061LD H,C","062LD H,D","063LD H,E","064LD H,H","065LD H,L","066LD H,(HL)","067LD H,A"
1013 DATA "068LD L,B","069LD L,C","06ALD L,D","06BLD L,E","06CLD L,H","06DLD L,L"06ELD L,(HL)","06FLD L,A"
1014 DATA "070LD (HL),B","071LD (HL),C","072LD (HL),D","073LD (HL),E","074LD (HL),H","075LD (HL),L","076HALT"
1015 DATA "077LD (HL),A","078LD A,B","079LD A,C","07ALD A,D","07BLD A,E","07CLD A,H","07DLD A,L","07ELD A,(HL)","07FLD A,A"
1016 DATA "080ADD A,B","081ADD A,C","082ADD A,D","083ADD A,E","084ADD A,H","085ADD A,L","086ADD A,(HL)","087ADD A,A"
1017 DATA "088ADC A,B","089ADC A,C","08AADC A,D","08BADC A,E","08CADC A,H","08DADC A,L","08EADC A,(HL)","08FADC A,A"
1018 DATA "090SUB B","091SUB C","092SUB D","093 SUB E","094SUB H","095SUB L","096SUB (HL)","097SUB A"
1019 DATA "098SBC A,B","099SBC A,C","09ASBC A,D","09BSBC A,E","09CSBC A,H","09DSBC A,L","09ESBC A,(HL)","09FSBC A,A"
1020 DATA "0A0AND B","0A1AND C","0A2AND D","0A3AND E","0A4 AND H","0A5AND L","0A6AND (HL)","0A7AND A"
1021 DATA "0A8XOR B","0A9XOR C","0AAXOR D","0ABXOR E","0ACXOR H","0ADXOR L","0AEXOR (HL)","0AFXOR A"
1022 DATA "0B0OR B","0B1OR C","0B2OR D","0B3OR E","0B4OR H","0B5OR L","0B6OR (HL)"0B7OR A"
1023 DATA "0B8CP B","0B9CP C","0BACP D","0BBCP E","0BCCP H","0BDCP L","0BECP (HL)","0BFCP A"
1024 DATA "0C0RET NZ","0C1POP BC","2C2JP NZ,$","2C3JP $","2C4CALL NZ,$","0C5PUSH BC","1C6ADD A,$ ","0C7RST $00"
1025 DATA "0C8RET Z","0C9RET JP","2CAZ,$","3CB**","2CCCALL Z,$","2CDCALL $","1CEADC A,$","0CFRST $08"
1026 DATA "0D0RET NC","0D1POP DE","2D2JP NC,$","1D3OUT ($ ),A","2D4CALL NC,$","0D5PUSH DE","1D6SUB $","0D7RST $10"
1027 DATA "0D8RET C","0D9EXX","2DAJP C,$","1DBIN A,($ )","2DCCALL C,$","4DD//","1DESBC A,$","0DFRST $18"
1028 DATA "0E0RET PO","0E1POP HL","2E2JP PO,$","0E3EX (SP),HL","2E4CALL PO,$","0E5PUSH HL","1E6AND $","0E7RST $20"
1029 DATA "0E8RET PE","0E9JP (HL)","2EAJP PE,$","0EBEX DE,HL","2ECCALL PE,$","5ED!!","1EEXOR $","0EFRST $28"
1030 DATA "0F0RET P","0F1POP AF","2F2JP P,$","0F3DI","2F4CALL P,$","0FPUSH AF","1F6OR $","0F7RST $30"
1031 DATA "0F8RET M","0F9LD SP,HL","2FAJP M,$","0FBE1","2FCCALL M,$","6FD??","1FECP $","0FFRST $38"
2000 RESTORE 1000:RETURN
2100 RESTORE 1002:RETURN
2200 RESTORE 1004:RETURN
2300 RESTORE 1006:RETURN
2400 RESTORE 1008:RETURN
2500 RESTORE 1010:RETURN
2600 RESTORE 1012:RETURN
2700 RESTORE 1014:RETURN
2800 RESTORE 1016:RETURN
2900 RESTORE 1018:RETURN
3000 RESTORE 1020:RETURN
3100 RESTORE 1022:RETURN
3200 RESTORE 1024:RETURN
3300 RESTORE 1026:RETURN
3400 RESTORE 1028:RETURN
3500 RESTORE 1030:RETURN
4000 DATA "0DD 01ADD IX,BC","0DD 19ADD IX,DE","2DD 21LD IX,$ ","2DD 22LD ($ ),IX"
4001 DATA "0DD 23INC IX","0DD 29ADD IX,HL","2DD 2ALD IX,($ )","0DD 2BDEC IX"
4002 DATA "1DD 34INC (IX+$ )","1DD 35DEC (IX+$ )","5DD 36LD (IX+$ ),$ ","0DD 39ADD IX,SP"
4003 DATA "3DD 46LD B,(IX+$ )","3DD 4ELD C,(IX+$ )","3DD 56LD D,(IX+$ )","3DD 5ELD E,(IX+$ )"
4004 DATA "3DD 66LD H,(IX+$ )","3DD 6ELD L,(IX+$ )","3DD 70LD (IX+$ ),B","3DD 71LD (IX+$ ),C"
4005 DATA "3DD 72LD (IX+$ ),D","3DD 73LD (IX+$ ),E","3DD 74LD (IX+$ ),H","3DD 75LD (IX+$ ),L"
4006 DATA "3DD 77LD (IX+$ ),A","3DD 7ELD A,(IX+$ )","3DD 86ADD A,'IX+$ )","3DD 8EDEC A,(IX+$ )"
4007 DATA "3DD 96SUB (IX+$ )","3DD 9ESBC A,(IX+$ )","
4008 DATA "3DD B6OR (IX+$ )","3DD BECP (IX+$ )","4DD 06RLC (IX+$ )","4DD 0ERRC (IX+$ )"
4009 DATA "4DD16RL (IX+$ )","4DD 1ERR (IX+$ )","4DD 26SLA (IX+$ )","4DD 2ESRA (IX+$ )"
4010 DATA "4DD 3ESRL (IX+$ )","4DD 46BIT 0,(IX+$ )","4DD 4EBIT 1,(IX+$ )","4DD 56BIT 2,(IX+$ )"
4011 DATA "4DD 5EBIT 3,(IX+$ )","4DD 66BIT 4,(IX+$ )","4DD 6EBIT 5,(IX+$ )","4DD 76BIT 6,(IX+$ )"
4012 DATA "4DD 7EBIT 7,(IX+$ )","4DD 86RES 0,(IX+$ )","4DD 8ERES 1,(IX+$ )","4DD 96RES 2,(IX+$ )"
4013 DATA "4DD 9ERES 3,(IX+$ )","4DD A6RES 4,(IX+$ )","4DD AERES 5,(IX+$ )","4DD B6RES 6,(IX+$ )" 4014 DATA "4DD BERES 7,(IX+$ )","4DD C6SET 0,(IX+$ )","4DD CESET 1,(IX+$ )","4DD D6SET 2,(IX+$ )"
4015 DATA "4DD DESET 3,(IX+$ )","4DD E6SET 4,(IX+$ )","4DD EESET 5,(IX+$ )","4DD F6SET 6,(IX+$ )"
4016 DATA "4DD FESET 7,(IX+$ )","0DD E1POP IX","0DD E3EX (SP),IX","0DD E5PUSH IX","0DD E9JP (IX)","0DD F9LS SP,IX"
5000 DATA "40IN B,(C)","41 OUT (C),B","42SBC HL,BC","44NEG","45RETN","46IM 0","47LD I,A"
5007 DATA "48IN C,(C)","49OUT (C),C","4AADC HL,BC","4DRETI","4FLD R,A","50IN D,(C)","51OUT (C),D","52SBC HL,DE"
5015 DATA "56IM 1","57LD A,I","58IN E,(C)","59OUT (C),E","5AADC HL,DE","5EIM 2","5FLD A,R"
5023 DATA "60IN H,(C)","61OUT (C),H","62SBC HL,HL","67RRD","68IN L,(C)","69OUT (C),L"
5031 DATA "6AADC HL,HL","6FRLD","72SBC HL,SP","78IN A,(C)","79OUT (C),A","7AADC HL,SP","A0LDI",A1CPI","A2INI","A3OUTI","A8LDD"
5039 DATA "A9CPD","ABIND","ACOUTD","B0LDIR","B1CPIR","B2INIR","B3OTIR","B8LDDR","B9CPDR","BAINDR","BBOTDR","F0"
6000 DATA "001ADD IY,BC","019ADD IY,DE","221LD IY,$ ","222LD ($ ),IY"
6001 DATA "023INC IY","029ADD IY,HL","22ALD IY,($ ","22BDEC IY"
6002 DATA "334INC (IY+$ )","335DEC (IY+$ )","356LD D,(IY+$ )","35ELD E,(IY+$ )","047"
6004 DATA "366LD H,(IY+$ )","36ELD L,(IY+$ )","370LD (IY+$ ),B","371LD (IY+$ ),C","08B"
6005 DATA "372LD (IY+$ ),D","373LD (IY+$ ),E","374LD (IY+$ ),H","375LD (IY+$ ),L","377 (IY+$ ),A",37ELD A,(IY+$ )","000","002","0CF"
6006 DATA "386ADD A,(IY+$ )","38EDEC A,(IY+$ )","396SUB (IY+$ )","39ESBC A,(IY+$ )","3A6AND (IY+$ )","3AEXOR (IY+$ )","3B6OR (IY+$ )","3BECP (IY+$ )"
6007 DATA "0E1POP IY","0E3EX (SP),IY","0E5PUSH IY","0E6JP (IY)","0E9LD SP,IY"