]>
wirehaze git hosting - MS-DOS.git/blob - v2.0/source/DEBMES.ASM
1 TITLE DEBUGger Messages
5 SYSVER EQU FALSE
;if true, i/o direct to bios
6 ; so DOS can be debugged
7 IBMJAPVER EQU FALSE
; true for their special parity stuff
17 CODE SEGMENT PUBLIC BYTE 'CODE'
20 CONST
SEGMENT PUBLIC BYTE
23 DATA SEGMENT PUBLIC BYTE
27 DG GROUP
CODE,CONST
,DATA
30 CODE SEGMENT PUBLIC BYTE 'CODE'
31 ASSUME
CS:DG
,DS:DG
,ES:DG
,SS:DG
33 EXTRN RPRBUF
:NEAR,RESTART
:NEAR
34 PUBLIC DRVERR
, TrapParity
, ReleaseParity
, NMIInt
, NMIIntEnd
39 PUSH DX ; save location of new offset
40 MOV DX,OFFSET DG
:NMIInt
; DS:DX has new interrupt vector
41 CALL SwapInt
; diddle interrupts
43 MOV WORD PTR [NMIPtr
],BX ; save old offset
44 MOV WORD PTR [NMIPtr
+2],ES ; save old segment
45 POP DX ; get old regs back
46 POP ES ; restore old values
49 MOV BYTE PTR [ParityFlag
],0 ; no interrupts detected yet!
53 MOV AX,(Get_interrupt_vector
SHL 8) + 2
54 INT 21h
; get old nmi vector
55 MOV AX,(Set_Interrupt_Vector
SHL 8) + 2
56 INT 21h
; let OS set new vector
66 LDS DX,DWORD PTR [NMIPtr
] ; get old vector
67 CALL SwapInt
; diddle back to original
72 MOV [ParityFlag
],0 ; no interrupts possible!
79 IN AL,0A0h ; get status register
80 OR AL,1 ; was there parity check?
81 POP AX ; get old AX back
82 JZ NMIChain
; no, go chain interrupt
83 OUT 0A2h,AL ; reset NMI detector
84 MOV CS:[ParityFlag
],1 ; signal detection
87 JMP DWORD PTR CS:[NMIPtr
] ; chain the vectors
88 NMIPtr
DD ?
; where old NMI gets stashed
92 DRVERR: MOV DX,OFFSET DG
:DISK
95 MOV DX,OFFSET DG
:WRTPRO
101 ADD BYTE PTR DRVLET
,FIRSTDRV
102 MOV SI,OFFSET DG
:READM
103 MOV DI,OFFSET DG
:ERRTYP
104 CMP BYTE PTR RDFLG
,WRITE
106 MOV SI,OFFSET DG
:WRITM
111 MOV DX,OFFSET DG
:DSKERR
118 CONST
SEGMENT PUBLIC BYTE
120 PUBLIC BADVER
,ENDMES
,CARRET
,NAMBAD
,NOTFND
,NOROOM
121 PUBLIC NOSPACE
,DRVLET
123 PUBLIC TOOBIG
,SYNERR
,ERRMES
,BACMES
124 PUBLIC EXEBAD
,HEXERR
,EXEWRT
,HEXWRT
,WRTMES1
,WRTMES2
125 PUBLIC EXECEMES
, ParityMes
129 PUBLIC BADDEV
,BADLSTMES
130 BADDEV
DB "Bad device name",13,10,"$"
131 BADLSTMES
DB "Couldn't open list device PRN",13,10
132 DB "Enter name of list device? $"
135 BADVER
DB "Incorrect DOS version",13,10,"$"
136 ENDMES
DB 13,10,"Program terminated normally"
138 NAMBAD
DB "Invalid drive specification",13,10,"$"
139 NOTFND
DB "File not found",13,10,"$"
140 NOROOM
DB "File creation error",13,10,"$"
141 NOSPACE
DB "Insufficient space on disk",13,10,"$"
145 WRTPRO
DB "Write protect$"
147 ERRTYP
DB "reading drive "
148 DRVLET
DB "A",13,10,"$"
153 TOOBIG
DB "Insufficient memory",13,10,"$"
155 ERRMES
DB " Error",13,10+80H
158 HEXERR
DB "Error in EXE or HEX file",13,10,"$"
160 HEXWRT
DB "EXE and HEX files cannot be written",13,10,"$"
161 WRTMES1
DB "Writing $"
162 WRTMES2
DB " bytes",13,10,"$"
163 EXECEMES
DB "EXEC failure",13,10,"$"
164 ACCMES
DB "Access denied",13,10,"$"
165 ParityMes
DB "Parity error or nonexistant memory error detected",13,10,"$"