Source unknown
Debug starts Debug, which is a program that can be used to test and debug MS-DOS executable files. Debug [[DRIVE:] [PATH] FileName [Parameters]] [Drive:] [PATH] FILENAME Specifies the location and name of the executable to be tested. Parameters specifies any command line information you want to test. Description Use the debug command but not specify the file to be tested if you use the debug command without the position and file name, and then type all the debug commands to respond to the debug prompt, even characters (-). Debug Command The following is the debug command list: • Display the list of debug commands. A assembly 8086/8087/8088 memory code. C Compare two parts of memory. D Displays some memory content. E starts from the specified address to enter the data to memory. F fills a period of memory using the specified value. G runs executable in memory. H Execute a hexadecimal operation. I displays a 1-byte value from a particular port. L Add files or disk sector content to memory. M Copy the content / N in the memory block to specify the file or specify the parameters of the file being tested. O Sends 1 byte value to the output port. P Perform a loop, repeated string instruction, software interrupt or subroutine. Q Stop the Debug session. R Display or change one or more registers. S Search the mode of one or more byte values in some memory. T Execute an instruction, then display all the contents of all registers, status of all flags and decoding forms of the instructions to which Debug's next step. U Absorbed bytes and displays the corresponding original sentences. W Write the test file to disk. XA allocates extended memory. XD release extension memory. XM map extension memory page. XS displays the status of the extended memory. Separating Command Parameters All debug commands accept parameters, except for Q commands. You can separate parameters with commas or spaces, but these separators are only needed between two hexadecimal values. Therefore, the following command is equivalent: DCS: 100 110 D CS: 100 110 D, CS: 100, 110 Specifies the Address parameter in the effective address item debug command to specify the memory location. Address is a two-digit name or a four-bit field address containing the alphanist segment plus an offset. You can ignore segment registers or segment addresses. The default segment of A, G, L, T, U and W command is CS. The default segment of all other commands is DS. All values are all hexadecimal formats. The effective address is as follows: CS: 0100 04ba: 0100 There must be a colon between the segment name and the offset. Specifies the range parameter in the DEBUG command in the valid range item specified the range of memory. Two formats can be selected for Range: start addresses and end addresses, or start addresses and length ranges (represented by L). For example, both of the following grammar can be specified from the 16-byte range starting from CS: 100: CS: 100 10F CS: 100 L 10 Debug subcommand Select the debug command to get details.
Debug: a (Compilation) Debug: C (Comparison) Debug: E (Type) Debug: F (Plip) Debug: G (Steering) Debug: h (Hex) Debug: i (Input) Debug: l (loading) debug: m (mobile) debug: n (name) debug: o (output) debug: p (execution) debug: q (exit) debug: r (register) Debug: s Debug: T (Track) Debug: U (reverse assembly) Debug: w (write) debug: XA (Assign Extension memory) Debug: XD (unassigned extended memory) debug: XM (map extension memory page) debug: XS (display extension Memory state) ********************* DEBUG sub-command ********************* ******** DEBUG: A (assembly) Merge 8086/8087/8088 memory code directly to memory. This command creates executable machine code from the assembly language statement. All values are hexadecimal formats, and these values must be entered one to four characters. Specify the prefix memory code before the referenced operation code (opcode). A [address] Parameters Address specifies that the location of the collapse language instruction is typed. Use the hexadecimal value for Address and type each value not ending with the "H" character. If the address is not specified, A will start assembly at its last stop. For information on inputting data into the specified byte, click Debug E in the "Related Topic" list. For information on disassembly bytes, click DEBUG U in the "Related Topic" list. Sample A command supports all forms of indirect registration commands, as shown in the following example: Add bx, 34 [bp 2]. [Si-1] POP [BP DI] Push [Si]) also supports all operator synonyms, as follows Example: LOOPZ 100 LOOPE 100 JA 200 JNBE 200 For 8087 operation code, you must specify a WAIT or FWAIT prefix, as shown in the following example: fwait fadd st, st (3); this line assembly; an fwait prefix Description Using the memory code section The replacement memory code is CS:, DS:, ES: and SS:. The memory code returned remotely is RETF. The memory code handled by the string must explicitly declare the string size. For example, using MOVSW can move 16-bit strings, using MOV *** (text is blocked by system) *** (text is blocked by the system because of the system), the 8-bit string is moved. The assembly jump and call assembler automatically will automatically short, near and far jumps and calls to the target address based on the byte replacement.
By using a NEAR or FAR prefix, you can replace such jump or calls, as shown in the following example: -A0100: 0500 0100: 0500 JMP 502; A 2-Byte Short Jump 0100: 0502 JMP Near 505; A 3-Byte Near Jump 0100 : 0505 JMP FAR 50A; A 5-Byte Far Jump You can abbreviate the NEAR prefix as NE. Differential words and byte memory locations When an operand can reference a word memory location or byte memory location, the data type must be specified with the prefix Word PTR or prefix Byte PTR. Acceptable abbreviations are WO and BY. The following example shows two formats: DEC WO [Si] NEG BYTE PTR [128] Specifying the operand DEBUG Using the habitual usage of an operand included in the middle bracket ([]). This is because on the other hand, DEBUG cannot distinguish the number of operands and memory addresses. The following example shows two formats: MOV AX, 21; Load Ax with 21h MOV AX, [21]; Load Ax with the; Contents of; Memory Location 21h Use the directive to use the A command to provide two commonly used pseudo-instructions: DB operation Code, collect the byte value to the memory, DW operation code, directly compile the word value to memory. The following is an example: DB 1, 2, 3, 4, "this is an example" db 'this is a quotation mark: "' DB" this is a quotation mark: 'DW 1000, 2000, 3000 "Bach" debug: c (comparison) compare two parts of memory. C Range Address parameter RANGE Specifies the start and end addresses of memory first area to compare, or start addresses, and length. About effective Information of the Range value, click "Debug Description" in the "Related Topic" list. Address specifies the start address of the second memory area to be compared. For information on the valid address value, click the "Related Topic" list "Debug Description". case The following command has the same effect: C100, 10F 300 C100L10 300 each command compares the memory data block of 100 h to 10FH with a memory data block of 300h to 30FH. Debug responds to the previous command And display the following information (assuming ds = 197f): 197F: 0100 4D E4 197F: 0300 197F: 0101 67997F: 0301 197F: 0102 A3 27 197F: 0302 197F: 0103 35 F3 197F: 0303 197F: 0104 97 BD 197F: 0304 197F: 0105 04 35 197F: 0305 197F: 0107 7671 197F: 0307 197F: 0108 197F: 0109 19 2C 197F: 0309 197F: 010A 80 0A 197F: 030A 197F: 010B 36 7F 197F: 030B 197F : 010C BE 22 197F: 030C 197F: 010D 83 93 197F: 030D 197F: 010E 49 77 197F: 030E 197F: 010F 4F 8A 197F: 030F Note Missing Address 197F: 0106 and 197F: 0306. This indicates those addresses The value is the same. Description If the Range and Address memory areas are the same, DEBUG will not display any content directly to the Debug prompt.
If there is a difference, Debug will display as follows: address1 byte1 byte2 adds2 debug (dump) Displays the content of a certain range of memory addresses. D [Range] Parameters Range Specifies the start and end addresses of the memory area to display their contents, or start addresses and lengths. For information on valid RANGE values, click "Debug Description" in the "Related Topic" list. If the RANGE is not specified, the Debug program will display 128 bytes of content from the end of the address range specified in the previous D command. For information on displaying register content, click Debug R (Register) in the "Related Topic" list. paradigm assumes the following command: DCS: 100 10f debug is displayed in the following format: 04BA: 0100 54 4F 4D 00 53 41 57 59-45 52 00 00 00 00 00 Tom.SAWYER ..... If you type D command without parameters, DEBUG is arranged in the previous example. Each line shown is at the beginning of the address that is more than 16 bytes than the previous line (if it is a screen displayed on the 40 column, it is 8 bytes). For each non-parameter D command that is backed, Debug will display byte content immediately after the last display command. If you type the following command, Debug will start displaying 20h bytes from CS: 100: DCS: 100 L 20 If you type the following command, Debug will display all bytes from the CS segment 100H to 115H: DCS: 100 115 Description When using a D command, Debug displays memory content in two parts: hex part (the value of each byte is expressed in hexadecimal format) and ASCII code part (each byte) The value is represented by ASCII code characters). Each non-printing character is represented by the session (.) In the displayed ASCII section. Each display line displays a 16-byte content, and there is a hyphen between the 8th byte and the 9th byte. Each display line starts from the 16-byte boundary. Debug: e (Type) Enter the data to the address specified in the memory. You can type data in hexadecimal or ASCII format. Any data stored before the specified location was previously lost. E Address parameter address Specifies the first memory location of the input data. List Specifies the data to enter the continuous byte of the memory. For information on integrated memory code, click Debug A in the "Related Topic" list. For information on displaying some contents of the memory, click Debug D in the "Related Topic" list. example assumes that the following command: ECS: 100 Debug Shows the first byte content: 04ba: 0100 EB. To change this value to 41, type 41 in the Insert point, as shown below: 04ba : 0100 EB.41_ You can type a continuous byte value with an E command. Press the spacebar after typing the new value instead of pressing the Enter. DEBUG displays the next value.
In this example, if the SpaceBar (Spacebar) is pressed three times, Debug will display the following value: 04BA: 0100 EB.41 10.00. BC._ Change the hexadecimal value BC to 42, please insert Type 42 as follows: 04ba: 0100 EB.41 10.00. BC.42_ Assume that the determined value 10 should be 6F. To correct this value, press the HYPHEN button twice to return to address 0101 (value 10). Debug Shows the following: 04ba: 0100 EB.41 10. 00. BC.42- 04BA: 0102 00.- 04BA: 0101 10._ Type 6F Changed value in the Insert Point, as shown below: 04BA: 0101 10.6F_ Press ENTER Stop E commands and return to the debug prompt. The following is an example of a string term: EDS: 100 "this is the text esample" This string will populate 24 bytes from DS: 100. Description Use the address parameter If you specify the value of address without specifying the value of the optional list parameter, Debug will display the address and content, repeat the address in the next row, and wait for your input. At this point, you can do one of the following: • Replace the byte value. To do this, type a new value after the current value. If the value you typed is not a valid hexadecimal value, or the value contains more than two numbers, Debug will not return invalid or extra characters. · Go to the next byte. To do this, press the SpaceBar (Spacebar). To change the value in this byte, type a new value after the current value. If you press the SpaceBar (Spacebar), the movement exceeds 8-bit boundaries, and the debug program will display a new row and display the new address at the head. · Return to the previous byte. To do this, press the HYPHEN button (-). You can repeatedly move more bytes backhand. When pressing Hyphen, Debug starts a new row and displays the current address and byte value. · Stop execution E command. To do this, press ENTER. You can press Enter in any byte position. Using the list parameter If the value of the list parameter is specified, the subsequent E command will replace the existing byte value using the value in the list. If an error occurs, you will not change any byte value. The List value can be a hexadecimal byte or string. Use spaces, commas, or tabs to divide the value. A string must be included in a single or double quotation mark. Debug: f (Fill) Pull the address in the specified memory area using the specified value. You can specify the data represented by the hexadecimal or ASCII format. Any data stored in the specified location will be lost. F Range List Parameters Range Specifies the start and end address to populate the memory area, or the start address and length. For information on effective Range values, click "Debug Description" in the "Related Topic" list. List Specifies the data to be entered. The List can consist of a string including hexadecimal or quotation marks. parameters assume that the following command is typed: F04BA: 100L100 42 45 52 54 41 As a response, DEBUG fills the memory position from 04ba: 100 to 04ba: 1F using the specified value. DEBUG repeats these five values until 100H bytes all filled. Description Use the RANGE parameter If the number of bytes contained in Range is larger than the value in the list, Debug will repeat the value in the list until all bytes in Range are filled.
If any memory is corrupted or absent in Range, Debug will display an error message and stop the F command. Using the list parameter If the value contains more than the number of bytes in the range, DEBUG will ignore additional values in the List. Debug: g (steering) runs the program in the current memory. G [= address] parameter = address Specifies the program address to start executing in memory. If you do not specify address, Windows 2000 will start the program from the current address in the CS: IP register. BreakPoints specifies 1 to 10 temporary breakpoints that can be set to the part of the g command. For information on executing loops, repetition string instructions, software interrupts, or subroutions, click Debug P (execution) in the "Related Topic" list. For information on executing instructions, click Debug T (Track) in the "Related Topic" list. Sample assumes that you type the following command: GCS: 7550 Windows 2000 runs the program in the current memory until the breakpoint address 7550 in the CS segment is executed. Debug will display the status of the contents and flags of the register and end the g command. The following command sets two breakpoints: GCS: 7550, CS: 8000 If you play the g command after DEBUG, you will perform it from the instructions after the breakpoint, not in the usual start address. Description Use the Address parameter to use the equal sign (=) to distinguish the start address and breakpoint address before the Address parameter. Specifies the breakpoint program to stop at the first breakpoint it encounter, regardless of the location of the Breakpoint list. DEBUG replaces the original instruction with interrupt code at each breakpoint. When the program reaches the breakpoint, DEBUG restores all breakpoint addresses to their initial instructions and displays the contents of all registers, states of all tags, and decoding forms of the final execution instruction. The information displayed by DEBUG is the same as the information displayed when using the Debug R command and specifies the breakpoint. If the program is not stopped at the breakpoint, the Debug program will not replace the interrupt code using the original instruction. Setting the breakpoint restrictions can be set on the address of the first byte containing the 8086 operation code (opcode). If more than 10 breakpoints are set, Debug will display the following information: BP ERROR requires a user stack pointer to the user stack pointer must be valid and must have 6 bytes available for g commands. This command jumps to the program being tested using the IRET instruction. Debug Sets the user stack pointer and presses the user flag, the code segment register, and the instruction pointer into the user stack. (If the user stack is invalid or too small, the operating system may fail.) DEBUG sets the interrupt code (0cch) at the specified breakpoint. Restarting the program Do not try to restart the program after Windows 2000; Program Terminated Normal To run the program correctly, you must reload the program by using the debug n (name) and the L (load) command. Debug: h (hexadecimal) performs hexadecimal operations for the designated two parameters. H value1 value2 parameter value1 represents any hexadecimal number from 0 to FFFFH. Value2 represents the second hexadecimal number from 0 to FFFFH. example assumes that type the following command: H19F 10A Debug executes the operation and display the following results.
02A9 0095 Description DEBUG first adds the specified two parameters and subtract the second parameter from the first parameter. The results of these calculations are displayed in one line: first calculate and then calculate the difference. Debug: i (input) reads and displays one byte value from the specified port. I port parameter port Press the address to specify the input port. The address can be a 16-bit value. For information on sending the byte value to the output port, click Debug O (Output) in the "Related Topic" list. paradigm assumes that the following command is typed: i2f8 also assumes the byte value of the port is 42h. DEBUG reads this byte and displays the value as follows: 42 Debug: L (Load) to add a file or a specific disk sector to memory. To load BX from disk file: The number of bytes specified in the CX register, use the following syntax: l [address] To skip the Windows 2000 file system and load a specific sector directly, use the following syntax: L Address Drive Start Number Parameters Address specifies the memory location to load files or sector content. If address is not specified, Debug will use the current address in the CS register. Drive Specifies the drive that contains the disk that reads the specified sector. This value is numeric: 0 = a, 1 = b, 2 = C, etc. START specifies the hexadecimal number of the first sector to load its content. Number Specifies the number of hexadecimal numbers for continuous sectors to load their content. DRIVE, START, and Number parameters can only be used if the contents to load specific sectors rather than load the DEBUG command line or the recent DEBUG N (Name) command. For information on the file specified for the L command, click Debug N in the "Related Topic" list. For information about writing a file that is debugged to disk, click Debug W (Write) in the "Related Topic" list. paradate assumes to start Debug and type the following command: nfile.com can now type the L command to load file.com. Debug will load the file and display the Debug prompt. It is assumed that the contents of the 109 (6DH) sector of the start logic sector to be 15 (0FH) are required to be loaded into the memory of 04ba: 0100. To do this, type the following command: L04BA: 100 2 0F 6D Note When using a non-parametric L command When using the L command without parameters, the file specified on the debug command line will be loaded into the memory, from the address CS: 100 begins. DEBUG simultaneously sets the BX and CX registers to loaded bytes. If the file is not specified in the debug command line, the filed file will be the file that is recently specified by n commands. Use 1 command with Address parameters If you use the L command with the Address parameter, Debug will start loading a file or specifying the sector from the memory location Address. Use the L command with all parameters If you use the l command with all parameters, Debug will load the contents of the specified disk sector instead of loading a file. Each sector within the specified range of a particular sector is loaded from Drive. DEBUG is loaded from Start until the content in the sector number specified in Number is loaded. Load the .exe file debug ignores the address address of the .exe file. If specified .exe file, Debug repositions the file to the load address specified in the .exe file.
Before the .exe file is loaded into memory, the title itself is detached from .exe file, so the .exe file size is different from memory. If you want to check the entire .exe file, use a different extension name to name the file. Open hex file Debug will have a file with the .hex extension to think that the hexadecimal format file. Type an L command without parameters, you can load the hex file starting from the address specified in the hexadecimal file. If the Type L command contains the address parameter, the debug will add the specified address to the address found in the hex file to determine the start address. Debug: M (Move) Copy the contents of a memory block to another memory block. M Range Address Parameters Range Specifies the start and end addresses of the memory area to copy the content, or start addresses and lengths. Address specifies that you want to copy the Range content to the start address of the location. example assumes that type the following command: MCS: 100 110 CS: 500 Debug first copies the contents of the CS: 110 address to the address CS: 510, then copy the contents of the CS: 10f address into CS: 50F, so Operation until copying the contents of the CS: 100 address to the address CS: 500. To view the results, use the debug d command and specify the destination address using the m command. Description Copy Operation The impact of the existing data If the new data is not written to the address in the data block being copied, the source data will remain unchanged. However, if the target block already contains data (just like it is in a copy of the copy), the data will be overwritten. (Overlay copy operation refers to the operation of the contents of the target data block part overrides the content of the original data block part.) Performing an overlay copy operation m command to perform the overlay copy of the target address without losing data. The content of the rewritten address is first copied. Therefore, if the data of the higher level address is copied to a lower bit address, the copy operation starts from the minimum bit address of the original block and to the highest bit address. Conversely, if you want to copy data from the low address to the high address, the replication operation starts from the highest address of the original block, and the lowest address is performed. Debug: n (Name) Specifies the name of the executable of the debug L, or W (write) command, or specifies the parameters of the executable file being debugged. N [Drive:] [PATH] FILENAME To specify parameters of the executable of the test, use the following syntax: n file-parameters parameter If you use it without parameters, the n command clears the current specification. [Drive:] [PATH] FileName Specifies the location and name of the executable to be tested. FILE-Parameters Specifies the parameters and switches for the executable of the test. For information on the contents of the content or specified disk sector, click Debug L in the "Related Topic" list. For information about writing a file that is debugged to disk, click Debug W (Write) in the "Related Topic" list. The paradigm assumes that Debug has been launched and the program pROG.COM that is debugging is loaded. Then you decide to specify two parameters for prog.com and run this program.
The following is a command sequence of this example: Debug prog.com NPARAM1 PARAM2 G In this case, the Debug G (steering) command runs the program, as if you have typed the following command after the Windows 2000 command prompt: prog param1 PARAM2 So, test and debug reflect the usual runtime environment of prog.com. In the following command sequence, the first n command specifies the file1.exe as a file of the subsequent L (load) command, which loads file1.exe to memory. The second n command specifies the parameters that file1.exe will use. Finally, the g command will run the file1.exe file, as if you type File1 file2.dat file2.dat in the Windows 2000 command line. Nfile1.exe L nfile2.dat file3.dat G Note • Do not use the L command after the second form of the n command. Also note that if you now use the W (write) command, Windows 2000 saves the file file1.exe that is debugging using the name file2.dat. To avoid this result, the first form of n command should always be used immediately before the L or W command. Description N commands can use n commands in two ways. First, you can use it to specify the file used by the L (Load) or W (Write) command. If you start Debug without nameting the debugged file, you must use the command NFileName before using the l command to load files. In CS: 5c, the file control block (FCB) is correctly arranged in the format of the file name. Second, you can use the n command to specify the command line parameters and switches of the debug file. The following four memory areas below the memory area are affected by the n command: Memory location CS: 5C file 1 file control data block (FCB) CS: 6C file 2 file control data block (FCB) CS: 80 n Command line Length (character represented) CS: 81 n The beginning of the N command is n command The first file name specified by the N command is placed in the FCB of CS: 5C. If the second file name is specified, this name will be placed in the FCB of CS: 6C. The number of characters typed on the n command line (other than the first character, n) is stored at position CS: 80. The actual character on the N command line (again, except for the letter N) is stored in the position starting with CS: 81. Note that these characters may be any switches and separators that are valid in the commands typed in the Windows 2000 command prompt. Debug: O (Output) Sends the byte value to the output port. O Port byte-value parameter port specifies the output port via the address. The port address can be 16-bit values. Byte-value Specifies the byte value to point to Port. For information on reading bytes from the input port, click Debug I in the "Related Topic" list. The example should send the byte value 4FH to the output port of the address of 2f8h. Type the following command: O2F8 4F Debug: P (execution) Perform a loop, repeat string command, software interrupt or subroutine Or trace any other instructions. P [= address] [Number] parameter = address Specifies the first position to perform the instruction. If the address is not specified, the default address is the current address specified in the CS: IP register.
Number Specifies the number of instructions to be executed before returning the control to Debug. The default is 1. For information on running programs in memory, click Debug G in the "Related Topic" list. For information on executing instructions, click Debug T (Track) in the "Related Topic" list. The example assumes that the program being tested includes a CALL instruction at address CS: 143f. To run the submure of the Call target, then return the control to Debug, type the following command: p = 143f debug Display results in the following format: AX = 0000 bx = 0000 cx = 0000 DX = 0000 sp = ffee bp = 0000 si = 0000 di = 0000 DS = 2246 ES = 2246 SS = 2246 CS = 2246 IP = 1443 NV UP EI PL NZ AC PO NC 2246: 1442 7505 JNZ 144A Description Transfer Control to the program to be tested When the P command will control When DEBUG is transferred to the program to be tested, the program is uninterruptible, until the cycle, repeat string instruction, software interrupt, or complete the subroutine of the specified address, or until the specified number of machine instructions are performed. Control returns to Debug. Restrictions on address parameters If the address parameter does not have a specified segment, Debug will use the CS register of the test program. If address is omitted, the program will start from the address specified by the CS: IP register. The equal sign (=) must be used before the Address parameter to distinguish it with the Number parameter. If the instruction at the specified address is not a loop, repeated string command, software interrupt or subroutine, the P command is the same as the DEBUG T (Track) command. The message displayed using the P command When the P executes a paragraph, DEBUG displays the program's register content, the status of the flag, and the decoding form of the instruction to be executed. Warning • You cannot use the P command to track read-only memory (ROM). Debug: Q (exit) Stop the debug session, does not save the currently test file. When you type q, control returns to the command prompt of Windows 2000. Q parameter This command does not have parameters. For information on saving files, click Debug W (Write) in the Related Topic list. Debug: R (Register) Displays or changes the content of one or more CPU registers. R [register-name] parameter is not used without parameters, then the R command displays the contents of all registers and the flags in the register storage area. Register-name Specifies the register name to display its content. For information on displaying some contents of the memory, click Debug D in the "Related Topic" list. For information on disassembly bytes, click DEBUG U in the "Related Topic" list.
Example To view all registers, all tag status and instruction decoding tables for all tags, type the following command: r If the current location is CS: 11A, the display appearance will be similar to the following: AX = 0e00 bx = 00ff CX = 0007 DX = 01ff sp = 039d bp = 0000 si = 005c di = 0000 ds = 04ba ES = 04ba ss = 04ba cs = O4BA IP = 011a NV UP Di Ng NZ AC PE NC 04BA: 011A CD21 INT 21 To view only The flag of the flag, type the following command: rf debug Display information in the following format: NV Up Di NG NZ AC PE NC - _ _ Now you can type one or more valid flag values in any order, where there is or no spaces As shown below: NV UP DI NG NZ AC PE NC - The plebug ends the R command and displays the Debug prompt. To view your changes, type R or RF commands. Debug will display the following: NV UP EI PL NZ AC PE CY - _ _ Press ENTER to return to the Debug prompt. Description Use the R command If the register name is specified, Windows 2000 will display the 16-bit value of the register indicated by hexadecimal tag and display the colon as a prompt. If you want to change the value contained in the register, unless you type a new value and press Enter; otherwise, press ENTER to return to the debug prompt. Effective Register Name is the valid value of Register-Name: AX, BX, CX, DX, SP, BP, Si, Di, DS, ES, SS, CS, IP, PC, and F. Both IP and PC reference instruction pointers. If the register name is specified instead of specifying from the previous list: Br Error uses the F character instead of the register name If you type the F character instead of the register name, Debug will display the current settings of each tag as two letters. Code, then display the Debug prompt. To change the settings of the logo, type the appropriate two-letter code from the table below: Sign Name Set Clear Overflow OV NV Direction DN (Decrease) Up (Add) Interrupt EI (Enabled) Di (Disabled) Positive Negative Ng (Negative) PL (Positive) Zero ZR NZ Assisted AC NA Parity PE (Even Verification) PO (Qi Qi) Carrying CY NC You can type a new flag value in any order. There is no need to leave space between these values. To stop the R command, press ENTER. Any logo that does not specify a new value remains the same. The message displayed with the R command If multiple values are specified for the tag, the debug will display the following message: DF error If specified that the flag code not listed in the table, DEBUG will display the following message: bf error in these two situations Next, DEBUG will ignore all settings specified after invalid items. When Debug's default settings are set to start Debug, the segment register is set to the low end of idle memory, and the instruction pointer is set to 0100h, clear all the flags, and set the remaining registers to zero, except for the SP set to FFEEH.
Debug: S (Search) Search the mode of one or more byte values in an address range. S Range List Parameters Range Specifies the beginning and end address to search for the range. For information on Range parameter valid values, click Debug in the "Related Topic" list. List Specifies the mode of one or more byte values, or the string to search. Separate each byte value and the next byte value with a space or comma. The string value is included in the quotation mark. The example assumes that you need to find all the addresses containing the value 41 and range from CS: 100 to CS: 110. To do this, type the following command: SCS: 100 110 41 Debug Display Results in the following format: 04ba: 0104 04ba: 010d - The following command searches the string "pH" in the range of CS: 100 to CS: 1A0. SCS: 100 1A0 "PH" Description If the List parameter contains multiple byte values, Debug will only display the first address of the file. If the List contains only one byte value, Debug will display all the addresses that appear in the specified range. DEBUG: T (Track) Perform a command and display all registered content, status of all flags, and decoding form of the executed instruction. T [= address] [Number] parameter = address Specifies the address of the Debug starts tracking instruction. If the Address parameters are omitted, track the address specified from the program's CS: IP register. For information on the active values of the Address parameter, click Debug in the "Related Topic" list. Number Specifies the number of instructions to track. This value must be a hexadecimal number. The default is 1. For information on executing loops, repetitive string instructions, software interrupts or subroutines, click Debug P in the "Related Topic" list. For information on executing the program in the current memory, click Debug G in the "Related Topic" list. Example To perform an instruction (CS: IP pointing instruction), then display the content of the register, the status of the flag, and the decoding form of the instruction, type the following command: t If the instruction in the program is located in 04ba: 011a, Debug may display The following information: AX = 0E00 bx = 00ff CX = 0007 DX = 01FF sp = 039d bp = 0000 Si = 005c di = 0000 DS = 04BA ES = 04BA SS = 04BA CS = O4BA IP = 011A NV UP DI NG NZ AC PE NC 04BA: 011A CD21 INT 21 Describes the instruction T command in tracking read-only memory uses the hardware tracking mode of the 8086 or 8088 microprocessor. Therefore, instructions stored in read-only memory (ROM) can also be tracked. The use of address parameters must use the equal sign (=) before the Address parameter to distinguish it with the Number parameter. Debug: u (reverse assembly) reverse byte and displays the corresponding original sentence, including the address and byte value. The disassembly code looks like a list of assembled files. U [range] parameter is not if used without parameters, then the u command decomposes the 20H byte (default), starting from the first address after the previous U command displays the address. Range Specifies the start address and end address to which you want to disassemble the code, or start addresses and lengths.
For information on Range parameter valid values, click Debug in the "Related Topic" list. For information on integrated memory code, click Debug A in the "Related Topic" list. For information on displaying some contents of the memory, click Debug D in the "Related Topic" list. Example To disassemble 16 (10h) bytes, start from address 04ba: 0100, type the following command: U04BA: 100L10 Debug Display results in the following format: 04ba: 0100 206472 and [Si 72], AH 04BA: 0103 69 DB 69 04BA: 0104 7665 JBE 016B 04BA: 0106 207370 AND [BP DI 70], DH 04BA: 0109 65 DB 65 04BA: 010A 63 DB 63 04BA: 010B 69 DB 69 04BA: 010C 66 DB 66 04BA: 010D 69 DB 69 04BA: 010E 63 DB 63 04BA: 010F 61 DB 61 If only the information from 04bA: 0100 to 04BA: 0108 is displayed, type the following command: U04BA: 0100 0108 Debug Shows the following: 04ba: 0100 206472 and [Si 72], AH 04BA: 0103 69 DB 69 04BA: 0104 7665 JBE 016B 04BA: 0106 207370 AND [BP DI 70], DH Debug: W (Write) Write files or specific partitions Enter the disk. To write a disk file in the BX: CX register specified byout the number of bytes, use the following syntax: WINDOWS 2000 file system and write to a specific sector directly, use the following syntax: W Address Drive Start Number Parameters Address Specifies the start memory address to be written to a file or part of the file. If Address is not specified, the debug program will start from CS: 100. For information on the acts parameter valid value, click Debug in the "Related Topic" list. Drive Specifies the drive that contains the target disk. This value is numeric: 0 = a, 1 = B, 2 = C, and so on. START specifies the number of hexadecimal numbers to write to the first sector. Number Specifies the number of sectors to be written. For information on specifying files for W command, click Debug N (Name) in the "Related Topic" list. For information on memory or file sector content, click Debug L in the "Related Topic" list. The example assumes that the starting address is written to the disk content of the CS: 100 to the disk of the drive B. The data is required to start from the logical sector number 37h of the disk and last 2BH sectors. To do this, type the following command: WCS: 100 1 37 2B When the write operation is complete, the debug is again displaying the Debug prompt. Description The name of the disk file must be specified when Debug is started or in the nearest debug n command. Both methods can correctly arrange the file name of the address CS: 5c file control block.
Reset BX: CX if the debug g (steering), T (tracking), P (execution) or R (register) command must be used, will be used before useless W commands BX: The CX register is reset. Write the modified file to the disk if the file is modified but does not change the file name, length, or the start address, and Debug still writes the file correctly into the source disk location. The restriction of the W command cannot be written to .exe or .hex file with this command. WARNING • Because it is slightly Windows 2000 file handle, it is very dangerous to write a specific partition. If you type an error, the disk file structure is easily damaged. Debug: XA (Assign Extension Memory) Assign the number of specified page numbers to extend memory. To use extended memory, you must install an extended memory device driver that matches 4.0 of the Lotus / Intel / Microsoft Extended Memory Specification (LIM EMS). XA [count] Parameter count Specifies the number of 16KB pages to the extended memory to be assigned. For information on other debug commands that use extended memory, click the XD (release extended memory) in the "Related Topic" list, XM (map extension memory page) or XS (display extended memory status). Example To assign 8 pages of the extended memory, type the following command: XA8 If the command is successful, Debug will display similar to the following message: Handle Created = 0003 Description If the specified page number is available, DEBUG will display the message. This message indicates the hexadecimal number of the handle created; otherwise, Debug will display an error message. Debug: XD (Release Extension Memory) Releases the handle that points to the extended memory. To use extended memory, you must install an extended memory device driver that matches 4.0 of the Lotus / Intel / Microsoft Extended Memory Specification (LIM EMS). XD [Handle] Parameters Handle Specifies the handle to release. For information on other debug commands that use extended memory, click XA (Assign Extension Memory), XM (Map Extension Inclusive) or XS (Display Extension Memory). Example To release the handle 0003, type the following command: XD 0003 If the command is successful, Debug will display the following message: handle 0003 deallocated Debug: XM (Mapping Extension Page) will belong to the specified handle extended memory logic page Map to the physical page of the extended memory. To use extended memory, you must install an extended memory device driver that matches 4.0 of the Lotus / Intel / Microsoft Extended Memory Specification (LIM EMS). XM [LPAGE] [PPAGE] [HANDLE] Parameters LPage Specifies the logical page number to be mapped to the physical page PPAGE. PPAGE Specifies the physical page number that maps LPage. Handle specifies the handle. For information on other debug commands that use extended memory, click XA (Assign Extension Memory), XD (Release Extension), or XS (Display Extension).