Debug command details

Debug plays a very important role in the process of learning assembly and is an extremely important debugging tool, so it is necessary to learn it.

command format Function Description
A [address] Enter assembly instructions
C [range] start address Compares the area specified by "Range" with the same size area specified by "Start Address" and displays the different units
D [Scope] Displays the contents of memory cells within the specified range
E Address Byte Value Table Replace the contents of the memory cell starting at "address" with the value in the value table
F Range Byte Value Table fills the memory area with the specified table of byte values
G [=start address][breakpoint address] Execute from the starting point (or current location) and end at the end point
H value 1 value 2 Displays the sum and difference of two hexadecimal values
I port address Input from port
L [address [drive letter sector number of sectors]] read from disk
M range address transfer byte values ​​in "range" to the unit starting at "address"
N file identifier [file identifier...] Specify the filename to prepare for reading/writing the file
O port address byte value output to port
P [=address] [number of instructions] Press the execution process, but do not enter a subroutine call or soft interrupt
Q   Exit DEBUG without saving the file being debugged
R [register name] Display and modify register contents
S Range Byte Value Table Searches the specified table of byte values ​​within the memory area. If found, display the starting address, otherwise, display nothing
T [=address] [number of instructions] Trace execution, execute several instructions from the starting point (or current location)
U [Scope] Disassemble, display the assembly instructions corresponding to the machine code
W [address [drive letter sector number of sectors]] Write content to disk, (BX, CX) is the number of bytes written

A few notes about the parameters:

1. Hex: The data entered or displayed in DEBUG are in hexadecimal form

2. Separation: Commands and parameters, parameters and parameters should be separated by spaces, commas or tabs, etc.

3. Address: The address is represented in the form of "segment value: offset", and segment register can also be used to represent "segment value",
for example: 1000:0, ds:10, es:200, cs:30, etc.

4. 范围:表示地址范围,它有二种表示方式:“地址1 地址2”和“地址1 长度”。
其中:“地址1”表示起始地址,要用“段值:偏移量”来表达;
“地址2”表示终止地址,只用“偏移量”来表示;
“长度”用字母’L’开头的数值来表示。
例如:100:50 100——段值为100,偏移量从50到100的内存区域;
100:50 L100——段值为100,偏移量从50开始的100个字节区域。

5. 端口地址:二位十六进制数值

6. 字节值:二位十六进制数值

7. 字节值表:由若干个字节值组成,也可以是用引号括起来的字符串

8. 驱动器号:0—驱动器A、1—驱动器B、2—驱动器C、3—驱动器D等

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324515547&siteId=291194637
Recommended