DEBUG common command set

xiaoxiao2021-03-06  14

Name Interpretation Format A (Assemble) Classified Compilation A [Address] C (Compare) Compare two memory block C Range Address D (DUMP) Memory 16 BNC Display D [Address] or D [Range] E (Enter) modified memory word Section E Address [List] F (FIN) Preset a memory F Range List G (GO) Execute program G [= address] [address ...] h (Hexavithmetic) Arnstruation Operation h value value i (input) from the specified Port Address Enter I PATADDRESS L (LOAD) Read Dish L [Address [Driver Seetor> M (Move) Memory Block Transfer M Range Address N (Name) Distribution Name N FileSpec [FileSpec ...] O (Output) from the specified port Address OutaDress Byte Q (QUIT) End Q R (Register) Display and Modify Register R [Register Name] S (Search) Find byte Stroke S Range List T (Trace) Track Perform T [= address] [Value] U (UNASSEMBLE) Continued U [Address] or Range W (WRITE) Save W [ADDRESS [DRIVER SECNUM>? Online help?

First, the call of Debug program

Under the DOS prompt, you can type command: c: / debug [d:] [PATH] [filename [.ext> [PARM1] [PARM2] where the file name is the name of the debug file. If the user typed file, DEBUG loads the specified file into the memory, and the user can debug it. If the file name is not typed, the user can work with the content of the current memory, or put the required files into the memory with the debug command n and l and then debug. The D specified drive path is path, PARM1 and PARM2, the command parameters required to run the debug file. After the Debug program is transferred, a prompt will appear, and the debug command can be used to debug the program.

Second, the main order of Debug

1) Display the command d (DUMP) of the memory cell, the format is: _d [address] or _d [Range], for example, the method of displaying the content of the storage unit is: -d100 120 18e4: 0100 C7 06 04 02 38 01 C7 06-06 02 00 02 C7 06 08 02 g ... 8.g ..... g ... 18e $: 0110 02 02 BB 04 02 E8 02 00-CD 20 50 51 56 57 8B 37 .. ;. h..m pqvw. 7 18e4: 0120 8b Where 0100 to 0120 is the unit content displayed by Debug, the left side is expressed by hexadecimal, and the right side is used to represent each byte, and it is not possible The displayed character. There is no specified segment address here, and the D command automatically displays the contents of the DS segment. If only the first address is specified, the 80-byte content starting from the first address is displayed. If there is no specified address at all, the content after the last unit displayed on the previous D command is displayed.

2) There are two commands to modify the content of the storage unit. · Enter the command E (Enter), there are two formats as follows: The first format can replace the designated range of storage units with a given content table. The command format is: -e address [list], for example, -e DS: 100 f3'xyz'8d where F3, 'X', 'Y', 'Z' and each byte, this command can use these five Bytes replace the original content of the storage unit DS: 0100 to 0104. The second format is a method of modifying a unit-by-unit unit. The command format is: -e address, for example, -E DS: 100 may be displayed as: 18E4: 0100 89.- If you need to modify the contents of the unit to 78, the user can type 78 directly, then press the "space" button Then, the content of the next unit is displayed, as follows: 18e4: 0100 89.78 1b. - Thus, the user can constantly modify the contents of the successive unit until the command is ended with the Enter key. · Fill in the command f (Fill), its format: -f Range List, for example: -f 4ba: 0100 5 F3'XYZ'8D makes 04ba: 0100 ~ 0104 unit contains the designated five bytes. If the number of bytes in the list exceeds the specified range, the exceeding item is ignored; if the number of bytes of the LIST is less than the specified range, repeatedly fill it until all the specified units are filled. 3) Check and modify the command R (Register) of the register content, which has three formats as follows: • Displays all registers content and flag status in the CPU, the format is: -r, -r AX = 0000 bx = 0000 cx = 010A DX = 0000 SP = fffe bp = 0000 si = 0000 di = 0000 DS = 18E4 ES = 18E4 SS = 18e4 cs = 18e4 IP = 0100 NV Up Di PL NZ NA PO NC 18E4: 0100 C70604023801 MOV Word PTR [0204], 0138 DS: 0204 = 0000 · Display and modify the contents of a register, format: -r register name, for example, type the -R AX system will respond as follows: AX F1F4: The current content of the AX register is F1F4, if not modified Press Enter, otherwise, click on the content you want to modify, such as: -r bx BX 0369: 059F, modify the contents of the BX register to 059F. • Display and modify the flag bit status, the command format is: -rf system will respond, such as: OV DN EI NG ZR AC PE CY- At this time, if you do not modify its content, press Enter, otherwise, click on the content you want to modify ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

4) Run the command G, its format is: -g [= address1] [address2 [address3 ...> where the address 1 specifies the running address of the run, if not specified, starting from the current CS: IP. The following address is a breakpoint address. When the instruction is executed, the content is stopped and displayed the content of all registers and flags, and the next command 5) Tracking Command T (Trace), there are two kinds Format: • By command tracking -t [= address] After executing a command from the specified address, stop, display all registers content and flags. If the address is not specified, execute from the current CS: IP. · Multiple instructions track -t [= address] [value] is stopped from the specified address, and then stop, n is specified by value. 6) Assemble Command A (Assemble), its format is: -A [address] This command allows you to enter the assembly language statement and can assemble them into machine code, which is stored in the storage area starting from the specified address. Must note: Debug looks into a hexadecimal number of numbers, so if you want to type a decimal number, then it should be described, such as 100D.

7) There are two formats in the disassembly command u (UNASSEMBLE). · From the designated address, it is 32 bytes, format: -u [address], for example: -u100 18e4: 0100 C70604023801 MOV Word PTR [0204], 0138 18E4: 0106 C70606020002 MOV Word PTR [0206], 0200 18E4: 010C C70606020202 MOV WORD PTR [0208], 0202 18E4: 0112 BBO4O2 MOV BX, 0204 18E4: 0115 E80200 CALL 011A 18E4: 0118 CD20 INT 20 18E4: 011A 50 Push AX 18E4: 011B 51 PUSH CX 18E4: 011C 56 PUSH Si 18E4: 011D 57 PUSH DI 18E4: 011E 8B37 MOV SI, [BX] If the address is omitted, 32 bytes will be displayed from the next unit of the last U command. · Confluence, format: -u [Range], format: -u100 10c 18e4: 0100 C70604023801 MOV WORD PTR [0204], 0138 18E4: 0106 C70606020002 MOV Word PTR [0206], 0200 18E4 : 010C C70606020202 MOV WORD PTR [0208], 0202 or -U100 112 18E4: 0100 C70604023801 MOV Word PT [0204], 0138 18e4: 0106 C70606020002 MOV Word PT [0206], 0200 18e4: 010c C70606020202 MOV Word PTR [0208], 0202 It can be seen that these two formats are equivalent.

8) Name Command N (Name), its format is: -n filespecs [files "command to format two file identifiers in two file control blocks in CS: 5ch and CS: 6ch, so that La Or w command to load the file into the storage disk. Filespecs can be: [D:] [path] filename [.ext], for example, -n myprog -l - load file MyProg into the memory. 9) Load Command (LOAD), there are two functions. • Mount the contents of the specified sector range on the disk to the area starting from the specified address. The format is: -l [address [drive sector sector] · Load the specified file, its format is: -l [address] This command is loaded in the CS: 5ch formatted the file specified by the file control block. If an address is not specified, it is loaded into the storage area starting with CS: 0100. 10) Write command W (Write), there are two functions. · Write the data to the specified sector of the disk. Its format is: -w address drive sector sector, write data into the specified file. The format is: -w [address] This command writes the data in the specified storage area in the file specified by the file control block at the CS: 5CH. If the address is not specified, the data starts from CS: 0100. The number of bytes to be written should be placed in BX and CX first.

11) Exit the debug command Q (quit), which is: -q it exits Debug and returns DOS. This command does not have a storage function, if the save disk should be used first. Question: Beginners ask a low-level issue, after executing debug-a, if there is a line input error, how to change this line? Answer: Join the following input: D: / PWIN95 / Desktop> Debug -a 2129: 0100Movax, 200 2129: 0103MOVBX, 200 2129: 0106MoVCX, 200 2129: 0109 At this time, I found MOVBX, 200 sentence errors, should be MOVBX, 20, can be kept back "-" status, then enter: -A103 2129: 0103MOVBX, 20 If more or If you don't have to re-enter, you can remove the program space with the M command to remove or add program space.

转载请注明原文地址:https://www.9cbs.com/read-46215.html

New Post(0)