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
/
SIMTEL
/
CPMUG
/
CPMUG015.ARK
/
DUMP.ASM
< prev
next >
Wrap
Assembly Source File
|
1984-04-29
|
5KB
|
273 lines
TITLE 'DUMP'
PRP EQU 8006H
MBSP EQU 8010H
NMBP EQU 8029H
ASTAT EQU 8042H
MESS EQU 805BH
EXC EQU 80ABH
NP EQU 80F1H
NMR EQU 800BH
NAM EQU 808DH
ABP EQU 80D3H
DSM EQU 80F6H
STCK EQU 8114H
WRITE EQU 4
ISIS EQU 64
FILE MACRO ACT,ADDR
MVI C,ACT
LXI D,ADDR
CALL ISIS
LDA STAT
ORA A
JNZ ERROR
ENDM
NEWL MACRO
DB 0AH,0DH
ENDM
NEW4L MACRO
NEWL
NEWL
NEWL
NEWL
ENDM
BLK MACRO NUM,AD1,AD2
MVI A,NUM
LXI D,AD1
IF AD2
LXI H,AD2
ENDIF
CALL BLOK
ENDM
NXBLK MACRO
MVI A,8
LXI H,ZZZ
SHLD TEMP
LXI H,7FFEH
SHLD TEMP1
T1: LHLD TEMP1
MOV B,M
INX H
SHLD TEMP1
PUSH PSW
LHLD TEMP
MOV E,M
INX H
MOV D,M
INX H
SHLD TEMP
CALL CONV
POP PSW
DCR A
JNZ T1
BLK 5,A9,PRP
BLK 5,A10,NMR
BLK 25,M0,MBSP
BLK 25,M1,NMBP
BLK 25,M2,ASTAT
BLK 25,M3,MESS
BLK 25,M4,MESS+25
BLK 30,A11,NAM
BLK 40,A12,EXC
BLK 35,A13,ABP
BLK 30,A14,DSM
BLK 30,A15,STCK
BLK 20,A16,STCK+30
LXI H,0
DAD SP
XCHG
LXI H,TMP3
MOV M,D
INX H
MOV M,E
BLK 2,A18,TMP3
LXI H,0
DAD SP
BLK 20,A17,0
ENDM
ORG 7200H
DUMP: SHLD TMP2
POP H
PUSH PSW
MOV A,H
STA 7FFEH
MOV A,L
STA 7FFFH
POP PSW
PUSH H
LHLD TMP2
PUSH B
PUSH D
PUSH H
PUSH PSW
NXBLK
FILE WRITE,WBLK
POP PSW
POP H
POP D
POP B
RET
ORG 7400H
CONV: MVI A,0F0H ; B Register holds byte to be converted
; D&E hold buffer address
ANA B
RRC
RRC
RRC
RRC
LXI H,TABL
MOV C,A
MOV A,B
MVI B,0
DAD B
MOV B,A
XCHG
LDAX D
MOV M,A
INX H
XCHG
MVI A,0FH
ANA B
LXI H,TABL
MOV C,A
MVI B,0
DAD B
XCHG
LDAX D
MOV M,A
INX H
XCHG
RET
BLOK: PUSH PSW
SHLD TEMP
T2: LHLD TEMP
MOV B,M
INX H
SHLD TEMP
CALL CONV
POP PSW
DCR A
JZ T3
PUSH PSW
MVI A,20H
STAX D
INX D
JMP T2
T3: RET
WBLK: DW 0 ; Parameter block for WRITE
WBUF: DW 7500H ; Address of output buffer
WCNT: DW TOT ; Number of bites written
DW STAT
STAT: DS 2
ERROR: HLT
TEMP: DW 0 ; ZZZ
TEMP1: DW 0 ; 8000H
TEMP2: DW 0
TMP2: DW 0
TMP3: DW 0
TABL: DB 30H,31H,32H,33H,34H
DB 35H,36H,37H,38H,39H
DB 41H,42H,43H,44H,45H,46H
ORG 7500H
NEWL
DB 'AT LOCATION '
A1: DB ' '
A2: DB ' :'
NEWL
DB 'CPP='
A3: DB 'FF AP='
A4: DB 'FF FP='
A5: DB 'FF FMBP='
A6: DB 'FF'
NEWL
DB 'AS='
A7: DB ' '
A8: DB ' '
NEWL
DB 'PRP='
A9: DB 'FF FF FF FF FF'
NEWL
DB 'NMR='
A10: DB 'FF FF FF FF FF'
NEWL
DB 'MBSP ='
M0: DS 74
NEWL
DB 'NMBP ='
M1: DS 74
NEWL
DB 'ASTAT='
M2: DS 74
NEWL
DB 'MESS ='
M3: DS 74
NEWL
DB ' '
M4: DS 74
NEWL
NEWL
DB 'NAM / /'
DB ' / /'
NEWL
A11: DS 89
NEWL
DB 'EXC PR '
DB 'MBC WDMK '
DB 'RDMK FMP '
DB 'FQP FAP '
NEWL
A12: DS 119
NEWL
DB 'ABP NSWP '
DB 'SEMP LAP '
DB 'NAP LP '
DB 'NP'
NEWL
A13: DS 104
NEWL
DB 'DSM '
DB 'STAD '
DB 'STKP '
NEWL
A14: DS 89
NEWL
DB 'STACK /'
DB ' /'
NEWL
A15: DS 89
NEWL
A16: DS 59
NEWL
NEWL
DB 'CURRENT STACK LOCATION = '
A18: DS 5
NEWL
A17: DS 59
NEW4L
TOT EQU $ - 7500H
ZZZ: DW A1,A2,A3,A4
DW A5,A6,A7,A8
END DUMP