home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG055.ARC
/
DISSAMBR.BAS
< prev
next >
Wrap
BASIC Source File
|
1979-12-31
|
4KB
|
82 lines
100 REM 8080 DISASSEMBLER D. NIXON/ B. PARHAM 4-20-77
110 DEFINT A-Z
120 DIM M$(255),N1(255)
130 PA=59:PC=0
140 FOR I = O TO 255:READ M$(I),N1(I):NEXT
150 INPUT "STARTING ADDRESS";S
160 INPUT "ENDING ADDRESS";E
170 PRINT:PRINT:PRINT
180 FOR N=S TO E
190 X=PEEK(N):L$=HEX$(X):GOSUB 440:B$=L$:A$=HEX$(N)
200 A$=STRING$(4-LEN(A$),"0")+A$
210 N2$="":N3$=""
220 IF N1(X)>1 THEN L$=HEX$(PEEK(N+1)):GOSUB 440:N2$=L$
230 IF N1(X)=3 THEN L$=HEX$(PEEK(N+2)):GOSUB 440:N3$=L$
240 PRINT A$;TAB(6);B$;
250 IF N1(X)>1 THEN PRINT " ";N2$;
260 IF N1(X)>2 THEN PRINT " ";N3$;
270 LM=LEN(M$(X))
280 IF LM<2 THEN 340
290 P=INSTR(M$(X)," ")
300 IF P=0 THEN PRINT TAB(20);M$(X);TAB(25);:GOTO320
310 PRINT TAB(20);LEFT$(M$(X),P-1);TAB(26);RIGHT$(M$(X),LM-P);
320 IF N1(X)>1 AND LM >4 THEN C$="," ELSE C$=" "
330 IFN1(X)>1 THEN PRINT C$+"0";N3$;N2$;"H";
340 PRINT TAB(40);:Y=X:GOSUB 450
350 IF N1(X)>1 THEN Y=PEEK(N+1):GOSUB 450
360 IF N1(X)=3 THEN Y=PEEK(N+2):GOSUB 450
370 IF N1(X)>1 THEN PRINT TAB(50);M$(PEEK(N+1));
380 IF N1(X)=3 THEN PRINT TAB(60);M$(PEEK(N+2));
390 PRINT
400 N=N+N1(X)-1
410 PC=PC+1:IF PC>PA THEN PC=0:FOR I=1 TO 8:PRINT:NEXT I
420 NEXT N
430 END
440 L$=STRING$(2-LEN(L$),"0")+L$:RETURN
450 Z$=" ":IF Y> 127 THEN Y=Y-128:Z$="*"
460 IF Y<32 OR Y>126 THEN Y=42:Z$="*"
470 PRINT CHR$(Y);Z$;" ";
480 RETURN
490 DATA NOP,1,LXI B,3,STAX B,3,INX B,1,INR B,1,DCR B,1,MVI B,2,RCL
500 DATA1," ",1,DAD B,1,LDAX B,1,DCX B,1,INR C,1,DCR C,1,MVI C,2,RRC
510 DATA1," ",1,LXI D,3,STAX D,1,INX D,1,INR D,1,DCR D,1,MVI D,2,RAL,1
520 DATA" ",1,DAD D,1,LDAX D,1,DCX D,1,INR E,1,DCR E,1,MVI E,2,RAR,1
530 DATA" ",1,LXI H,3,SHLD,3,INX H,1,INR H,1,DCR H,1,MVI H,2,DAA,1
540 DATA" ",1,DAD H,1,LHLD,3,DCX H,1,INR L,1,DCR L,1,MVI L,2,CMA,1
550 DATA" ",1,LXI SP,3,STA,3,INX SP,1,INR M,1,DCR M,1,MVI M,2,STC,1
560 DATA" ",1,DAD SP,1,LDA,3,DCX SP,1,INR A,1,DCR A,1,MVI A,2,CMC,1
570 DATA "MOV B,B",1,"MOV B,C",1,"MOV B,D",1,"MOV B,E",1
580 DATA"MOV B,H",1,"MOV B,L",1,"MOV B,M",1,"MOV B,A",1
590 DATA"MOV C,B",1,"MOV C,C",1,"MOV C,D",1,"MOV C,E",1
600 DATA"MOV C,H",1,"MOV C,L",1,"MOV C,M",1,"MOV C,A",1
610 DATA"MOV D,B",1,"MOV D,C",1,"MOV D,D",1,"MOV D,E",1
620 DATA"MOV D,H",1,"MOV D,L",1,"MOV D,M",1,"MOV D,A",1
630 DATA"MOV E,B",1,"MOV E,C",1,"MOV E,D",1,"MOV E,E",1
640 DATA"MOV E,H",1,"MOV E,L",1,"MOV E,M",1,"MOV E,A",1
650 DATA"MOV H,B",1,"MOV H,C",1,"MOV H,D",1,"MOV H,E",1
660 DATA"MOV H,H",1,"MOV H,L",1,"MOV H,M",1,"MOV H,A",1
670 DATA"MOV L,B",1,"MOV L,C",1,"MOV L,D",1,"MOV L,E",1
680 DATA"MOV L,H",1,"MOV L,L",1,"MOV L,M",1,"MOV L,A",1
690 DATA"MOV M,B",1,"MOV M,C",1,"MOV M,D",1,"MOV M,E",1
700 DATA"MOV M,H",1,"MOV M,L",1,"HLT",1,"MOV M,A",1
710 DATA"MOV A,B",1,"MOV A,C",1,"MOV A,D",1,"MOV A,E",1
720 DATA"MOV A,H",1,"MOV A,L",1,"MOV A,M",1,"MOV A,A",1
730 DATAADD B,1,ADD C,1,ADD D,1,ADD E,1,ADD H,1,ADD L,1,ADD M,1,ADD A,1
740 DATAADC B,1,ADC C,1,ADC D,1,ADC E,1,ADC H,1,ADC L,1,ADC M,1,ADC A,1
750 DATASUB B,1,SUB C,1,SUB D,1,SUB E,1,SUB H,1,SUB L,1,SUB M,1,SUB A,1
760 DATASBB B,1,SBB C,1,SBB D,1,SBB E,1,SBB H,1,SBB L,1,SBB M,1,SBB A,1
770 DATAANA B,1,ANA C,1,ANA D,1,ANA E,1,ANA H,1,ANA L,1,ANA M,1,ANA A,1
780 DATAXRA B,1,XRA C,1,XRA D,1,XRA E,1,XRA H,1,XRA L,1,XRA M,1,XRA A,1
790 DATAORA B,1,ORA C,1,ORA D,1,ORA E,1,ORA H,1,ORA L,1,ORA M,1,ORA A,1
800 DATACMP B,1,CMP C,1,CMP D,1,CMP E,1,CMP H,1,CMP L,1,CMP M,1,CMP A,1
810 DATA RNZ,1,POP B,1,JNZ,3,JMP,3,CNZ,3,PUSH B,1,ADI,2,RST 0,1
820 DATA RZ,1,RET,1,JZ,3," ",1,CZ,3,CALL,3,ACI,2,RST 1,1
830 DATA RNC,1,POP D,1,JNC,3,OUT,2,CNC,3,PUSH D,1,SUI,2,RST 2,1
840 DATA RC,1," ",1,JC,3,IN,2,CC,3," ",1,SBI,2,RST 3,1
850 DATA"RPO",1,POP H,1,JPO,3,XTHL,1,CPO,3,PUSH H,1,ANI,2,RST 4,1
860 DATA RPE,1,PCHL,1,JPE,3,XCHG,1,CPE,3," ",1,XRI,2,RST 5,1
870 DATA RP,1,POP PSW,1,JP,3,DI,1,CP,3,PUSH PSW,1,ORI,2,PST 6,1
880 DATA RM,1,SPHL,1,JM,3,EI,1,CM,3," ",1,CPI,2,RST 7,1
5,1
870 DATA RP,1,POP PSW,1,JP,3,DI,1,CP,3,PUSH PSW,1,ORI,2,PST 6,1
880 DATA