2 ; This file contains three macros used in debugging the system. If the
3 ; variable "itest" (in msbio.asm) is nonzero code is included in the
4 ; modules to print debugging messages. The level of debugging is controlled
5 ; by the value of the variable fTestBits in msbio.asm. Specific bits in
6 ; the variable determine which messages to print. The equ's below tell
7 ; which bits control which funcitons. For example the fifth bit
8 ; cooresponds to disk activity (see fTestDisk equ below).
10 ; The macros in the file are:
12 ; message Prints an ascii string on the screen.
15 ; message fTestDisk, <"Start Disk Write", CR, LF>
16 ; message fTestINIT, <"Begin BDS initialization">
19 ; MNUM Print the value in a register or memory location on
20 ; the screen. Value is displayed in hex.
22 ; MNUM bitpattern, valueLocation
24 ; valueLocation is typically a regester:
29 ; ValueLocation can also be a memory location:
31 ; mnum fTestINIT, Final_Dos_Location
33 ; If no valueLocation is given the macro defaults to
36 ; ZWAIT Stops the program until any key is pressed.
39 ; The three macros preserve all register values. If "test" is zero
40 ; defined during assembly then the marco produce no code.
45 EXTRN MSGOUT:NEAR,MSGNUM:NEAR ;3.30
48 EXTRN NUMBUF:BYTE,DIGITS:BYTE,FTESTBITS:WORD ;3.30
50 IFNDEF DUMPBYTES ;3.30
51 EXTRN DUMPBYTES:NEAR,OUTCHAR:NEAR,HEX_TO_ASCII:NEAR ;3.30
56 fTestALL equ 1111111111111111b ; watch everything
57 fTestHARD equ 0000000000000001b ; watch hard disk initialization
58 fTest96 equ 0000000000000010b ; watch 96 tpi activity
59 FTEST13 EQU 0000000000000100B ; WATCH INT 13 ACTIVITY ;3.30
60 FTESTCOM EQU 0000000000001000B ; WATCH PACKET ACTIVITY ;3.30
61 FTESTINIT EQU 0000000000010000B ; WATCH INITIALIZATION MESSAGES ;3.30
62 FTESTDISK EQU 0000000000100000B ; WATCH DISK DEVICE DRIVER CALLS ;3.30
63 FTESTCON EQU 0000000001000000B ; WATCH SYSTEM WAIT ACTIVITY IN CO;3.30 NSOLE
64 FtestClock equ 0000000010000000b ; wathc clock device 5/2/86 ;3.30
68 ; message macro -- see above for description
71 MESSAGE MACRO Bits,msg
86 ; mnum macro -- see above for description
106 ; zwait macro -- see above for description
110 Message fTestALL,<"? ">
115 pushf ; save the flags
116 push AX ; preserve AX
117 xor AH, AH ; set command to get character ;3.30*
118 int 16h ; call rom keyboard routine ;3.30*
120 popf ; restore the flags
123 ;Dump_byte dumps the memory contents in hex. ;3.30
124 ;DUMPOFFLABEL should be a label or a variable defined in DUMPSEG. ;3.30
125 DUMP_BYTE MACRO DUMPSEG, DUMPOFFLABEL, BYTELENGTH ;3.30
131 MOV CX, DUMPSEG ;3.30
133 MOV SI, OFFSET DUMPOFFLABEL ;3.30
134 MOV CX, BYTELENGTH ;3.30
143 ;Dump_Byte_Reg dumps the memory contents in hex. - 4/9/86 ;3.30
144 ;DUMPOFFREG should be a register contains the offset value in DUMPSEG. ;3.30
145 DUMP_BYTE_REG MACRO DUMPSEG, DUMPOFFREG, BYTELENGTH ;3.30
151 MOV CX, DUMPSEG ;3.30
153 MOV SI, DUMPOFFREG ;3.30
154 MOV CX, BYTELENGTH ;3.30
164 ; if test is not defined then make macro into null statements
174 DUMP_BYTE MACRO ;3.30
176 DUMP_BYTE_REG MACRO ;3.30
180 PATHSTART MACRO INDEX,ABBR ;3.30
182 PUBLIC ABBR&INDEX&S,ABBR&INDEX&E ;3.30
183 ABBR&INDEX&S LABEL BYTE ;3.30
187 PATHEND MACRO INDEX,ABBR ;3.30
189 ABBR&INDEX&E LABEL BYTE ;3.30