Compucolor.org – Virtual Media

Listing of file='DISPRT.BAS;01' on disk='vmedia/taylor_4-sector.ccvf'

10 PLOT 12,15
20 PRINT "DISASSEMBLER"
30 GOSUB 50000
40 AD= 0:LO= 0:DI= 15
100 POKE  33265,0
120 PRINT :INPUT "ADDRESS RANGE> ";QS$
122 POKE  33265,14
125 IF LEN (QS$)> 2GOTO 150
130 IF MID$ (QS$,1,1)< > "+"GOTO  1000
135 HI= AD+ DI
140 GOTO 200
150 QP= 1
155 GOSUB 10016
160 LO= QN
165 GOSUB 10016
170 HI= QN
175 DI= HI- LO
180 IF LO> HIGOTO 100
190 AD= LO
200 PLOT 12
210 PRINT "         ADDRESS  CONTENTS    MNEMONIC        ASCII"
220 PRINT "          (HEX)  (HEX)(DEC)":PRINT
230 LN =  3
260 CO= PEEK (AD)
270 QN= CO
280 GOSUB 20016
290 CO$= QS$
295 IF LEN (CO$)= 1THEN CO$= "0"+ CO$
300 QN= AD
310 GOSUB 20016
320 AD$= QS$
325 J= LEN (AD$)
330 IF J> 3GOTO 340
335 FOR I= 1TO 4- J:AD$= "0"+ AD$:NEXT I
340 M$= MN$(CO)
345 QC= CO
350 QS$= ""
360 GOSUB 30000
370 AS$= QS$
380 OP$= "  "
390 IF BY(CO)> 1GOTO 600
400 PRINT "         ";AD$;"/    ";
410 FI =  5- LEN (STR$ (CO))
420 PRINT " ";CO$;" ";CO;" ";SPC( FI);" ";
430 FI =  8- LEN (M$)
440 PRINT " ";M$;SPC( FI);"";
450 FI =  6- LEN (OP$)
460 PRINT OP$;" ";
470 PRINT  SPC( FI);" ";
480 PRINT " '";AS$;"' "
490 LN= LN+ 1
500 AD= AD+ 1
510 IF AD> HIGOTO 100
520 IF  LN< 50 GOTO  260
550 GOTO 200
600 AD= AD+ 1
610 QN= PEEK (AD)
620 QC= QN
630 GOSUB 20016
640 OP$= QS$
645 IF LEN (OP$)= 1THEN OP$= "0"+ OP$
650 QS$= AS$
660 GOSUB 30000
670 AS$= QS$
680 IF BY(CO)< > 3GOTO 400
690 AD= AD+ 1
700 QN= PEEK (AD)
710 QC= QN
720 GOSUB 20016
725 IF LEN (QS$)= 1THEN QS$= "0"+ QS$
730 OP$= QS$+ OP$
740 QS$= AS$
750 GOSUB 30000
760 AS$= QS$
770 GOTO 400
1000 POKE  33265,0
1010 END
10000 GOTO 10008
10002 QB= 2
10004 GOTO 10020
10008 QB= 8
10010 GOTO  10020
10016 QB= 16
10020 QN= 0:QL= LEN (QS$)
10030 FOR QI= QPTO QL
10040 QC= ASC (MID$ (QS$,QI,1))- 48
10050 IF QC> 9THEN QC= QC- 7
10060 IF  QC > =  QB GOTO  10100
10070 IF QC< 0GOTO 10100
10080 QN= QN* QB+ QC
10090 NEXT QI
10100 QP= QI+ 1
10110 RETURN
20000 GOTO 20008
20002 QB= 2
20004 GOTO 20020
20008 QB= 8
20010 GOTO 20020
20016 QB= 16
20020 QS$= "":QD= QN
20030 QT= QD- INT (QD/ QB)* QB
20040 IF QT> 9THEN QT= QT+ 7
20050 QS$= CHR$ (QT+ 48)+ QS$
20060 QD= INT (QD/ QB)
20070 IF QD< > 0GOTO 20030
20080 RETURN
30000 IF QC> 126THEN QC= QC- 128
30001 IF  QC= 127 THEN  QC= 63
30002 IF  QC< 0 THEN  QC= 63
30010 IF QC> 31GOTO  30020
30012 QC =  QC+ 64
30014 QS$= QS$+ CHR$ (94)+ CHR$ (QC)
30016 RETURN
30020 QS$= QS$+ CHR$ (QC)
30030 RETURN
50000 DIM MN$(255)
51000 MN$(0)= "NOP"
51001 MN$(1)= "LXI  B,"
51002 MN$(2)= "STAX B"
51003 MN$(3)= "INX  B"
51004 MN$(4)= "INR  B"
51005 MN$(5)= "DCR  B"
51006 MN$(6)= "MVI  B,"
51007 MN$(7)= "RLC"
51008 MN$(8)= "---"
51009 MN$(9)= "DAD  B"
51010 MN$(10)= "LDAX B"
51011 MN$(11)= "DCX  B"
51012 MN$(12)= "INR  C"
51013 MN$(13)= "DCR  C"
51014 MN$(14)= "MVI  C,"
51015 MN$(15)= "RRC"
51016 MN$(16)= "---"
51017 MN$(17)= "LXI  D,"
51018 MN$(18)= "STAX D"
51019 MN$(19)= "INX  D"
51020 MN$(20)= "INR  D"
51021 MN$(21)= "DCR  D"
51022 MN$(22)= "MVI  D,"
51023 MN$(23)= "RAL"
51024 MN$(24)= "---"
51025 MN$(25)= "DAD  D"
51026 MN$(26)= "LDAX D"
51027 MN$(27)= "DCX  D"
51028 MN$(28)= "INR  E"
51029 MN$(29)= "DCR  E"
51030 MN$(30)= "MVI  E,"
51031 MN$(31)= "RAR"
51032 MN$(32)= "RIM"
51033 MN$(33)= "LXI  H,"
51034 MN$(34)= "SHLD"
51035 MN$(35)= "INX  H"
51036 MN$(36)= "INR  H"
51037 MN$(37)= "DCR  H"
51038 MN$(38)= "MVI  H,"
51039 MN$(39)= "DAA"
51040 MN$(40)= "---"
51041 MN$(41)= "DAD  H"
51042 MN$(42)= "LHLD"
51043 MN$(43)= "DCX  H"
51044 MN$(44)= "INR  L"
51045 MN$(45)= "DCR  L"
51046 MN$(46)= "MVI  L,"
51047 MN$(47)= "CMA"
51048 MN$(48)= "SIM"
51049 MN$(49)= "LXI SP,"
51050 MN$(50)= "STA"
51051 MN$(51)= "INX SP"
51052 MN$(52)= "INR  M"
51053 MN$(53)= "DCR  M"
51054 MN$(54)= "MVI  M,"
51055 MN$(55)= "STC"
51056 MN$(56)= "---"
51057 MN$(57)= "DAD SP"
51058 MN$(58)= "LDA"
51059 MN$(59)= "DCX SP"
51060 MN$(60)= "INR  A"
51061 MN$(61)= "DCR  A"
51062 MN$(62)= "MVI  A,"
51063 MN$(63)= "CMC"
51064 MN$(64)= "MOV  B,B"
51065 MN$(65)= "MOV  B,C"
51066 MN$(66)= "MOV  B,D"
51067 MN$(67)= "MOV  B,E"
51068 MN$(68)= "MOV  B,H"
51069 MN$(69)= "MOV  B,L"
51070 MN$(70)= "MOV  B,M"
51071 MN$(71)= "MOV  B,A"
51072 MN$(72)= "MOV  C,B"
51073 MN$(73)= "MOV  C,C"
51074 MN$(74)= "MOV  C,D"
51075 MN$(75)= "MOV  C,E"
51076 MN$(76)= "MOV  C,H"
51077 MN$(77)= "MOV  C,L"
51078 MN$(78)= "MOV  C,M"
51079 MN$(79)= "MOV  C,A"
51080 MN$(80)= "MOV  D,B"
51081 MN$(81)= "MOV  D,C"
51082 MN$(82)= "MOV  D,D"
51083 MN$(83)= "MOV  D,E"
51084 MN$(84)= "MOV  D,H"
51085 MN$(85)= "MOV  D,L"
51086 MN$(86)= "MOV  D,M"
51087 MN$(87)= "MOV  D,A"
51088 MN$(88)= "MOV  E,B"
51089 MN$(89)= "MOV  E,C"
51090 MN$(90)= "MOV  E,D"
51091 MN$(91)= "MOV  E,E"
51092 MN$(92)= "MOV  E,H"
51093 MN$(93)= "MOV  E,L"
51094 MN$(94)= "MOV  E,M"
51095 MN$(95)= "MOV  E,A"
51096 MN$(96)= "MOV  H,B"
51097 MN$(97)= "MOV  H,C"
51098 MN$(98)= "MOV  H,D"
51099 MN$(99)= "MOV  H,E"
51100 MN$(100)= "MOV  H,H"
51101 MN$(101)= "MOV  H,L"
51102 MN$(102)= "MOV  H,M"
51103 MN$(103)= "MOV  H,A"
51104 MN$(104)= "MOV  L,B"
51105 MN$(105)= "MOV  L,C"
51106 MN$(106)= "MOV  L,D"
51107 MN$(107)= "MOV  L,E"
51108 MN$(108)= "MOV  L,H"
51109 MN$(109)= "MOV  L,L"
51110 MN$(110)= "MOV  L,M"
51111 MN$(111)= "MOV  L,A"
51112 MN$(112)= "MOV  M,B"
51113 MN$(113)= "MOV  M,C"
51114 MN$(114)= "MOV  M,D"
51115 MN$(115)= "MOV  M,E"
51116 MN$(116)= "MOV  M,H"
51117 MN$(117)= "MOV  M,L"
51118 MN$(118)= "HLT"
51119 MN$(119)= "MOV  M,A"
51120 MN$(120)= "MOV  A,B"
51121 MN$(121)= "MOV  A,C"
51122 MN$(122)= "MOV  A,D"
51123 MN$(123)= "MOV  A,E"
51124 MN$(124)= "MOV  A,H"
51125 MN$(125)= "MOV  A,L"
51126 MN$(126)= "MOV  A,M"
51127 MN$(127)= "MOV  A,A"
51128 MN$(128)= "ADD  B"
51129 MN$(129)= "ADD  C"
51130 MN$(130)= "ADD  D"
51131 MN$(131)= "ADD  E"
51132 MN$(132)= "ADD  H"
51133 MN$(133)= "ADD  L"
51134 MN$(134)= "ADD  M"
51135 MN$(135)= "ADD  A"
51136 MN$(136)= "ADC  B"
51137 MN$(137)= "ADC  C"
51138 MN$(138)= "ADC  D"
51139 MN$(139)= "ADC  E"
51140 MN$(140)= "ADC  H"
51141 MN$(141)= "ADC  L"
51142 MN$(142)= "ADC  M"
51143 MN$(143)= "ADC  A"
51144 MN$(144)= "SUB  B"
51145 MN$(145)= "SUB  C"
51146 MN$(146)= "SUB  D"
51147 MN$(147)= "SUB  E"
51148 MN$(148)= "SUB  H"
51149 MN$(149)= "SUB  L"
51150 MN$(150)= "SUB  M"
51151 MN$(151)= "SUB  A"
51152 MN$(152)= "SBB  B"
51153 MN$(153)= "SBB  C"
51154 MN$(154)= "SBB  D"
51155 MN$(155)= "SBB  E"
51156 MN$(156)= "SBB  H"
51157 MN$(157)= "SBB  L"
51158 MN$(158)= "SBB  M"
51159 MN$(159)= "SBB  A"
51160 MN$(160)= "ANA  B"
51161 MN$(161)= "ANA  C"
51162 MN$(162)= "ANA  D"
51163 MN$(163)= "ANA  E"
51164 MN$(164)= "ANA  H"
51165 MN$(165)= "ANA  L"
51166 MN$(166)= "ANA  M"
51167 MN$(167)= "ANA  A"
51168 MN$(168)= "XRA  B"
51169 MN$(169)= "XRA  C"
51170 MN$(170)= "XRA  D"
51171 MN$(171)= "XRA  E"
51172 MN$(172)= "XRA  H"
51173 MN$(173)= "XRA  L"
51174 MN$(174)= "XRA  M"
51175 MN$(175)= "XRA  A"
51176 MN$(176)= "ORA  B"
51177 MN$(177)= "ORA  C"
51178 MN$(178)= "ORA  D"
51179 MN$(179)= "ORA  E"
51180 MN$(180)= "ORA  H"
51181 MN$(181)= "ORA  L"
51182 MN$(182)= "ORA  M"
51183 MN$(183)= "ORA  A"
51184 MN$(184)= "CMP  B"
51185 MN$(185)= "CMP  C"
51186 MN$(186)= "CMP  D"
51187 MN$(187)= "CMP  E"
51188 MN$(188)= "CMP  H"
51189 MN$(189)= "CMP  L"
51190 MN$(190)= "CMP  M"
51191 MN$(191)= "CMP  A"
51192 MN$(192)= "RNZ"
51193 MN$(193)= "POP  B"
51194 MN$(194)= "JNZ"
51195 MN$(195)= "JMP"
51196 MN$(196)= "CNZ"
51197 MN$(197)= "PUSH B"
51198 MN$(198)= "ADI"
51199 MN$(199)= "RST  0"
51200 MN$(200)= "RZ"
51201 MN$(201)= "RET"
51202 MN$(202)= "JZ"
51203 MN$(203)= "---"
51204 MN$(204)= "CZ"
51205 MN$(205)= "CALL"
51206 MN$(206)= "ACI"
51207 MN$(207)= "RST  1"
51208 MN$(208)= "RNC"
51209 MN$(209)= "POP  D"
51210 MN$(210)= "JNC"
51211 MN$(211)= "OUT"
51212 MN$(212)= "CNC"
51213 MN$(213)= "PUSH D"
51214 MN$(214)= "SUI"
51215 MN$(215)= "RST  2"
51216 MN$(216)= "RC"
51217 MN$(217)= "---"
51218 MN$(218)= "JC"
51219 MN$(219)= "IN"
51220 MN$(220)= "CC"
51221 MN$(221)= "---"
51222 MN$(222)= "SBI"
51223 MN$(223)= "RST  3"
51224 MN$(224)= "RPO"
51225 MN$(225)= "POP  H"
51226 MN$(226)= "JPO"
51227 MN$(227)= "XTHL"
51228 MN$(228)= "CPO"
51229 MN$(229)= "PUSH H"
51230 MN$(230)= "ANI"
51231 MN$(231)= "RST  4"
51232 MN$(232)= "RPE"
51233 MN$(233)= "PCHL"
51234 MN$(234)= "JPE"
51235 MN$(235)= "XCHG"
51236 MN$(236)= "CPE"
51237 MN$(237)= "---"
51238 MN$(238)= "XRI"
51239 MN$(239)= "RST  5"
51240 MN$(240)= "RP"
51241 MN$(241)= "POP PSW"
51242 MN$(242)= "JP"
51243 MN$(243)= "DI"
51244 MN$(244)= "CP"
51245 MN$(245)= "PUSH PSW"
51246 MN$(246)= "ORI"
51247 MN$(247)= "RST  6"
51248 MN$(248)= "RM"
51249 MN$(249)= "SPHL"
51250 MN$(250)= "JM"
51251 MN$(251)= "EI"
51252 MN$(252)= "CM"
51253 MN$(253)= "---"
51254 MN$(254)= "CPI"
51255 MN$(255)= "RST  7"
51260 DIM BY(255)
51270 FOR QI= 0TO 255
51280 BY(QI)= 1
51290 NEXT QI
51301 BY(1)= 3
51306 BY(6)= 2
51314 BY(14)= 2
51317 BY(17)= 3
51322 BY(22)= 2
51330 BY(30)= 2
51333 BY(33)= 3
51334 BY(34)= 3
51338 BY(38)= 2
51342 BY(42)= 3
51346 BY(46)= 2
51349 BY(49)= 3
51350 BY(50)= 3
51354 BY(54)= 2
51358 BY(58)= 3
51362 BY(62)= 2
51494 BY(194)= 3
51495 BY(195)= 3
51496 BY(196)= 3
51498 BY(198)= 2
51502 BY(202)= 3
51504 BY(204)= 3
51505 BY(205)= 3
51506 BY(206)= 2
51510 BY(210)= 3
51511 BY(211)= 2
51512 BY(212)= 3
51514 BY(214)= 2
51518 BY(218)= 3
51519 BY(219)= 2
51520 BY(220)= 3
51522 BY(222)= 2
51526 BY(226)= 3
51528 BY(228)= 3
51530 BY(230)= 2
51534 BY(234)= 3
51536 BY(236)= 3
51538 BY(238)= 2
51542 BY(242)= 3
51544 BY(244)= 3
51546 BY(246)= 2
51550 BY(250)= 3
51552 BY(252)= 3
51554 BY(254)= 2
51600 RETURN