Detailed DEBUG command? Command line parameters: ??? format: debug [[Drum number:] [Path] file name [Debug parameter]] ??? Used: Debug put the specified file into memory, display prompt "- "Waiting for further order. If the file is loaded into .exe file, it is loaded as an executable state according to the registration principle. The .com file is similar. If other types of files are directly laminated, the memory is not allowed by the offset 100h. ??? DEBUG will establish an appropriate PSP (program prefix, Program Segment Prefix) in the buffer to be debugged. The offset 80h in the PSP is the end of the command line. Moreover, the default FCB (File Control Block, File Control Block) is made by an optional parameter containing the parameters.
??? When entering, each register is made: ??? register ?com programs ????????????.exe program ???? AX ???? Specify drive error code??? ? Specify the drive error code ???? bx ???? The high address of the program space ???? The high address of the program space ???? CX ???? The low address of the program space is low.?? Address ???? DX ????????????????????????? Si ???????? ?? 0 ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ???????? 0 ???? bp ?????????????????????????? SP ???? 0ffffh or available ???? ?????????????? ip ???????????????? ?????? The code for the target program ???????????????????????? Initial offset??? ? Cs ?????????? psp ??????????? Target program code snippet address ???? DS ?????????? psp ????? ???????????? psp ???? ES ?????????? psp ???????????????? psp???? ? Ss ?????????? psp ??????????? Target program stack segment bottom? Command: a: write assembly code (askEMBLE) ??? format: a [address] ??? Uses: The program allows compilation in the specified location (if defined by the IP pointer position)
????????? program writing. ??? Details: ??????? * All values are hexadecimal integers, no "h" ??????? * does not support file management catalog table, macro mark, Conditional assembly ??????? * After the jump instruction, write the hexadecimal address without support the label ??????? * If the data type is not the default type, you should specify in PTR????? • String operation To specify the type B or W (such as LODSB and LODSW, etc.) and length ??????? * Use DB and DW to accept data definition, directly press the assembly ??????? * Memory address plus [] with immediate distinguishing? C: Memory content comparison (Compare) format: C address range? Address: Do not address the first memory domain of comparison Or start address and length ???????? address: ??? Make the initial address of the second memory domain ?? Uses: * Compare the contents of the two domains in memory, in bytes . For the discovery, the content of the difference and its address is displayed in the following form: ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? * * If the address range or address does not include segment addresses, the default is the value of DS. ? D: Show memory content (dump) ?? format: D [address range] ???????? Address range: The starting unwanted or start address and length of a given display area. ?
?? Uses: * Memory content display instructions, display the memory content of the specified model ??????? in the form of a hexadecimal and ASCII code. ???????? * If the range is not specified, the first time the target program's CS: IP is displayed. ??????? The next address of the last displayed uninterrupted will be displayed later. ???????? * If the length is not specified, the content of 128byte is displayed. 20 lines. ? E: Input of data ?? format: e address value list ???????? address: ??? Data input internal memory address ???????? Numeric list: continuous start address input Data ?? Uses: * Enter data to the memory area. The data is available in hexadecimal form, or in the form of ASCII code ????????. Cover the original data. ???????? * Hexadecimal should be separated with spaces, commas or tabs. The string must be enclosed in order or double quotation marks and case sensation. ???????? * If you do not have a write sector, the default is the DS median. Each write a data address is automatically increased. ???????? * If a value list is omitted, the corresponding input is requested. Before the point number is the origin of this byte, the start value is requested. If you press the space, skip this byte; press Enter, ???????? End the input; press the minus or even characters, display the previous byte content. * The content may have been changed when an error occurs. Term it later. ???????? * The string can only be entered in the form of a numeric list and cannot be input by address. ? F: Memory Packing (Fill)
?? Format: F address range value list? Address range: Data Enter the internal memory of this address or first address and length ??????? Numeric list: Continuous data use input from the start address: * Taste data in the list Write memory. Enter data in a hexadecimal or ASCII code form. Cover the original information; if an error, the error message is displayed, the original information is retained. * If you do not have a write segment, the DS register value is default. * There are two forms of hexadecimal or strings in the list, and each content is spaced apart with spaces, comma, and tab. Strings must be enclosed in single quotes or double quotes, case sensitive. * If the fill area is greater than the number of data, the list can be reused; in contrast, if the list is larger than the to fill the area, automatically truncate the data. ? G: Program execution (GO) ?? format: g [= address] [breakpoint 0] [... breakpoint] ???????? address: ???????? DEBUG start execution the address of. ???????? breakpoint 0 ... breakpoint 9: The specified 0-10 temporary interrupt points. Used: * Transfer the CPU control by debug to the debugged program. When do not set up breakpoints, the execution of the time or the end of the order or the end is ended. At the end, prompts "Program ??????? Termminated Nomally", that is, the program is ended normally, the control is returned to ??????? DEBUG. ???????? * At this time, due to data, it is necessary to execute again, due to reloading. ???????? * Address, if the address is not specified, the value in the CS register of the target program is used. When ???????? When the address is omitted, the debug is executed using the value of the CS: IP register of the target program. ???????? and to distinguish between the breakpoint, you must add equal sign before address parameters, otherwise it is considered to be a zero bit. ???????? * The breakpoint parameters can specify 10 temporary breakpoints. When the program executes to the specified breakpoint address ???????? is aborted. There is independent of the order in the breakpoint table, and the breakpoint can be input according to any secondary order. ???????? * When it is aborted, the content, flag bit status, and CS: IP pointed out in the register (i.., the next paragraph will be executed), then It is a prompt "-". ???????? * If the executable program or the program content is not known, it is possible to enter the dead state. ???????? * If the stack of the target program does not work or too small, it may cause the system "broken". ? H: Perform a hexadecimal ?? format: h value 1? Value 2 ??????? Value 1, 2 is any hexadecimal number in the range of 0-fffH. ?? Uses: * Used to find two hexadecimal numbers, poor, the results show the value of 1 value 2 and value 1 - ???????? value 2. If the value 2> value 1 is displayed. ???????? * Although it is very small, the fact is still very useful, proficient in master. ? I: port input (INPUT) format: I port address ??????? port address: I / O port address within 0-fffff. ?? Uses: Used to read the specified I / O port address, and display with a 2-bit hexadecimal number. ?? Warning: The I instruction will directly access the computer hardware, not, the error check can be performed, so ???????? Use must be careful. Input operations for allocating ports of a peripheral controller, possibly
?????????? the inside the system. For devices that do not assign specified I / O ports, or this port ??????? is a write-to-use port, etc., the i command cannot be guaranteed. ? L: Load command (LOAD) format: l address ??????? or ???????? L address driver starts the sector number ???????? : ??? Store the memory address of reading the data from the disk. ???????? Drive:? A = 0, b = 1, c = 2, and so on. ???????? Start the sector: indicate the number of logical sector numbers to be loaded with a hexadecimal number. ???????? number of sectors: • The number of consecutive sectors is to be loaded with a hexadecimal number. ?? Uses: * If an incomplete L command is entered, the disk file is loaded: ?????????? 1 The file specified in the debug command line;?? ????????? 2 The file specified by the end of the command end. ???????? * If the address is not specified in the address, the value in the CS is used. If the executable file is loaded with weight ???????? The positioning principle is loaded into an executable state. ???????? * After loading the file length, or the actual length of the .exe file program is placed in the BX ??????? and CX two registers. High sixteen places in BX. ???????? * If all parameters are given in the command line, do not have to use MS-DOS file system to access magnetic ??????? disk. ? M: Data transfer (MOVE)
?? Format: M address range address ???????? address range: The starter address of the replica domain, or the address and length. ???????? address: ??? Data copy the start address of the destination domain. ?? Uses: * Copy data in memory. The destination domain is covered. ???????? * If the address range is not available, use the DS content; if there is no address in the address, use the value in the address range. ?? N: Parameters (name) of the file name or command last: n parameter [parameter ...] ???????? parameter: insert into the simulated PSP to more than one file name or switch item. ?? Uses: * Read and write the disk read and write operation L, w specify the target file. ?? o: Port output ?? format: O port? Byte ??????? port: I / O port address. ???????? byte: Write the value of the 0-FFF range of the I / O port. ?? Uses: Write a byte to the I / O port address. ?? Warning: The error will cause the system to crash. ? P: loop or subroutine processing (Procedure)
?? Format: P [= address] [command number] ???????? address: execution start address. ???????? Instruction number: The number of instructions executed. ?? Uses: * loop or subroutine processing. The loop, string instruction, software interrupt or subroutine is called ??????? is considered a single statement. In execution, display the target program register content, the flag bit state ??????? and the next command to execute. ???????? * If there is no unit in the address parameter, the value in the CS is used. When you completely ignore the address, you start executing from the CS: IP specified location in the program in the program. ? Q: End Debug operation (quit) format: q?? Uses: The program ends return. Lost for unsaved results. ? R: Register Display and Change (Register) ?? Format: R [Register] ???????? Register: AX BX CX DX SP BP Si Di ?????????????? ?? DS ES CS IP PC ???????????????? f ?? Utue: * If R does not with parameters, the content and status flag of all registers are displayed, the next instruction. ???????? * If the new value is specified, after the content is displayed, the venture prompt is given to the new value. The return end. ???????? * On the status word f, enter the new value in space intervals after the character "-", and the order is not. ???????? * If you enter the car directly, skip the modification, the register content is unchanged. ? S: SMCH ?? format: S address range? List ???????? address range: I want to see what it is:?) ???????? list:? ? "For more than one byte value or string to be retrieved. ?? Uses: * Retrieve the value of the list within the specified memory range. Performing each matching address ???????? display. ???????? * If there is no in the address, the value of the DS is default. ???????? * Retrieval range must not be greater than fffh ???????? * list must be separated in a separator (space, comma, tab, etc.); string should be added ?????? ?? Single quotes or double quotes enclose, case sensitive. ? T: Program execution tracking (trace) format: t [= address] [Number of instructions] ???????? Address: The address of the first instruction executed. ???????? Specify number: The number of machine instructions executed. Used: * Perform a single instruction, display the register and the next instruction. ???????? * If there is no in the address parameter, the value of the CS register is default. ???????? * If all omitted, the address indicated by the CS: IP register begins. ???????? * later executed. ???????? * Terminal to the ROM should use the T command. ?? Warning: Contents for Intel 8259 Interrupt Screen (IBM PC and Compatible Machine Port 20H and 21H)