The following describes some common commands:
A (assemble) Assembly command
1. The input Assembly statement is compiled to a specified segment in the memory. This segment is specified with a address at the beginning.
2. After all statements are entered, press enter to return
3. After the input, you can use the U command to view its mechanical code.
D (dump) display command
1. The content is displayed from the specified address. If no address is specified, the content is displayed from the previous D command.
2. if the address is not specified for the first time, it will be displayed starting from DS: 100.
G (GO) transfer command
1. Execute the program being debugged. When the program is executed to the specified address, it stops and displays the register and the next command to be executed.
2, G [= address]. Used to execute a program that is debugging without a breakpoint.
3. The program is running,DebugShow "porgram terminated normally"
R (Register) Register command
1. display the hexadecimal content of a register and change them as needed.
2. display the status flag with 8 letters and change either or all of them as needed
U (unassemble) disassembly command
1. Execute disassembly on commands. Their addresses are displayed together with hexadecimal statements similar to assembly languages.
2. Use the U command to start disassembly from CS: 100.
3. The default segment address of the U command contains the CS register.
DebugSkill Application
1. UseDebugEncrypt sub-Directories
When managing a file directory, DOS uses 32 bytes to store the information of the root directory and sub-directory. For sub-directories, 0 ~ 10 bytes are sub-directory fields and 11th bytes are attributes. If we change the value of the sub-directory attribute byte from 10 h to 13 H, the sub-directory has the performance to reject commands such as Dir and tree. For example:
Encrypt the subdik subdirectory of disk:
C:/>Debug
-L 100 0 5 7 (read directory A into memory)
-S 100 fff "subdik" (search for subdirectories)
-38eb: 07c0 (subdirectory address found)
-E 07cb (07c) + 0b = 07cb is the attribute byte address)
38eb: 07cb 10.13 (modified)
-W 100 0 5 7 (directory written back to drive)
-Q (Exit)
2. Remove the BIOS password.
C:/>Debug
-O 70 10
-O 71 11
Reboot and the BIOS password has been cracked
3. Cold start implementation
C:/>DebugReset. com
-A 100
Jmp ffff: 0000
INT 20
-RcX
00007
-W
-Q
4. Hot Start implementation
C :/DebugBoot. com
-A 0100
MoV ax, 0040
MoV ds, ax
MoV ax, 1234
Movsi, 0072
MoV [Si], ax
Jmp ffff: 0
INT 20
-RcX
0014
-W
-Q
5. BackupMBR
C:/>Debug
-
1c7e: 0100 mov ax, 201
1c7e: 0103 mov BX, 200
1c7e: 0106 mov CX, 1
1c7e: 0109 mov dx, 80
1c7e: 010c INT 13
1c7e: 010e INT 20
1c7e: 0110
-G
Program terminated normally
-RcX
CX 1, 0000
200
-N a:/backup.MBR
-W200
-Q
In this way, 512 bytesMBRBack up to the backup on the floppy disk.MBRFile.
In the future, use the L command to transfer the backup to the memory, and then use the int13
Write command (mov ax, 301. Note: write operations must be performed in
Pure DoS
Enter the following DEBUG command in DOS to test the display.
-F b800: 00 f9f 20 70 full screen white Grating
-F b800: 00 f9f 20 40 full screen red Grating
-F b800: 00 f9f 20 20 full screen green Grating
-F b800: 00 f9f 20 10 full screen blue Grating
-F b800: 00 f9f C5 07 C4 07 white cross on full screen
-F b800: 00 f9f C5 04 C4 04 full screen Red Cross
-F b800: 00 f9f C5 02 C4 02 full screen Green Cross
-F b800: 00 f9f C5 01 C4 01 full screen Blue Cross
-F b800: 00 f9f C5 05 C4 05 full screen purple cross
-F b800: 00 f9f C4 07 white strip on full screen
-F b800: 00 f9f B3 07 20 07 full screen white vertical bars
-F b800: 00 f9f 20 70 20 70 20 70 70 20 70 20 70 20 70 20 70 20 70 20 70 70 full screen black and white
2. Simulate the rest key function
A
: 100 jmp ffff: 0000
105
G
3. Fast formatting of a floppy disk
L 100 0 0 * 'insert a formatted floppy disk
W 100 0 0 * 'put a floppy disk to be formatted
Note: * respectively: 720 k e | 1.2 m id | 1.44 m 21
4. Hard disk formatting Methods
(1) G = c800: 05
(2) A 100
MoV ax, 0703
MoV CX and 0001
MoV dx, 0080
INT 13
INT 3
G 100
5. Accelerator keyboard
A
MoV ax, 0305
MoV X, 0000
Int 16
INT 20
RcX
10
N fast.com
W
Q
6. Disable the Monitor (press any key when restoring)
A
MoV ax, 1201
MoV BL, 36
Int 10
MoV ah, 0
Int 16
MoV ax, 1200
Int 10
RcX
10
N crt-of.com
W
Q
7. Hard Disk dos Boot Record repair
Add a formatted floppy disk to the drive.
Debug
-L 100 2 0 1
-W 100 0 50 1
Put the floppy disk in the faulty drive.
Debug
-L 100 0 50 1
-W 100 2 0 1
-Q
8. Setup password in coms
Debug
-
MoV X, 0038
MoV CX and 0000
MoV ax, BX
Out 70, Al
INC CX
Cmp cx and 0006
Jnz0106
INT 20
-RcX
: 20
-Nclearpassword.com
-W
-Q
Note: The above is suitable for super and dtk machines. For ast machines, because their passwords are placed at the 4ch-51h address of COMS, you only need to change: mov BX, 0038 to: mov
BX, 004c
9. Cancel the COMs password (clear coms data as initialization)
-O 70, 10
-O 71,10
-G
-Q
11. Call interrupt to restart the computer (files can be generated)
Debug
-
Int 19
INT 20
-RcX
: 2
-Nreset.com
-W
-Q