home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-08 | 62.5 KB | 2,520 lines |
- MDB Command Syntax Summary
-
- Command keywords that are longer than 3 letters may be uniquely
- specified by their first three characters or the letters shown in
- upper case.
-
- # - Indicates a variable outside the current scope or a line number.
- ## - Indicates a procedure outside the current scope.
- $ - Prefix to distinguish module names from other symbol names.
- & - Prefix to get the address of a symbolic name.
- // - Specifies a comment line.
- : - Invokes a macro or defines an address label.
- :: - Allows for line continuation when placed at the end of a line.
- ? - Displays a symbol or expression, including assignments.
- @ - Executes commands from a command file. Same as INClude.
- B - Displays, sets, clears, enables or disables breakpoints.
- BINary - Sets the default input radix to binary.
- BREak - Causes an immediate exit from a control loop or block.
- BYTe - Displays or sets byte (8-bit) object memory.
- CALlstack - Displays current chain of procedure calls.
- CASe - Specifies a choice in a SWITCH statement.
- CAUse - Displays reason for breaking execution.
- CHAr - Displays or sets char (ASCII) object memory.
- CLOse - Closes previously opened file.
- COMpare - Compares two regions of memory.
- CONtinue - Causes the next iteration of a control loop to begin.
- COPy - Copies a block of contents from one location to another.
- CW - Displays or sets the value of the 80387 control word.
- DASm - Disassembles machine code.
- DECimal - Sets the default input radix to decimal.
- DEFault - Specifies the default choice in a SWITCH statement.
- DIRectory MACro - Displays directory of macros.
- DIRectory MODule - Displays directory of object modules.
- DIRectory STRucture - Displays directory of structures.
- DISplay MACro - Displays contents of macro body.
- DISplay STRucture - Displays members of data structure.
- DISplay TRAce - Displays contents of the trace buffer.
- DOUble - Displays or sets double (64-bit floating point) object memory.
- DOWn - Walks down the call stack.
- DWOrd - Displays or sets dword (32-bit) object memory.
- E - Enters a symbol examination window. Same as EXAmine.
- EFOr - Terminates a FOR loop.
- EIF - Terminates an IF statement.
- ELSe - Specifies an alternate path in an IF statement.
- EMAcro - Terminates a macro definition.
- ENV - Displays or saves parameters of the configurable environment.
- ESCape - Aborts processing of macro.
- ESWitch - Terminates a SWITCH statement.
- EWHile - Terminates a WHILE loop.
- EXAmine - Enters a symbol examination window. Same as E.
- EXIt - Exits the debugger.
- FINd - Searches for a value or string in memory.
- FLAg - Displays or sets the 80386 flags register.
- FLOat - Displays or sets float (32-bit floating point) object memory.
- FOR - Starts a FOR loop.
- FREe - Displays remaining free memory.
- GLObal - Displays all global symbols.
- Go - Starts program execution.
- GOTo - Transfers macro control to a label.
- HALt - Halts remote execution.
- HELp - Invokes command line help.
- HEX - Sets the default input radix to hexadecimal.
- IF - Starts a conditional statement.
- INClude - Executes commands from a command file. Same as @.
- INPut - Reads contents from the specified input port.
- IStep - Single-steps a program instruction (through calls). Same as IS.
- IStep INto - Single-steps a program instruction (into calls).
- JOUrnal - Creates text file to record command entries.
- LISt - Creates a text file to record console display.
- LOAd - Loads an object file from the host into the target memory.
- LOCal - Displays all active local symbols and their values.
- MACro - Begins a macro definition.
- MEMory - Enters memory window.
- NO JOUrnal - Closes the journal file.
- NO LISt - Closes the session log file.
- OCTal - Sets the default input radix to octal.
- OPEn - Opens a text file.
- ORIf - Specifies alternate decision path in an IF statement.
- OUTput - Assigns a value to the specified output port.
- POInter - Displays or sets pointer (16/32/48-bit) object memory.
- PUT - Writes macro definitions to a specified file.
- QUIt - Exits the debugger leaving the remote monitor running.
- QWOrd - Displays or sets qword (64-bit) object memory.
- R287 - Displays 80287 status.
- R387 - Displays 80387 status.
- REAd - Reads in symbol values from an opened file.
- REGister - Displays or sets 80386 register values.
- REMove MACro - Deletes a macro definition.
- REPeat - Starts a REPEAT loop.
- RESet - Resets the processor registers to CPU reset values.
- RUN - Sets command-line arguments for a program and executes.
- S - Executes one source statement at a time. Same as STEp.
- SCReen - Displays the application output screen.
- SET - Associates a source file with an object module.
- SET BEEp - Controls the error beeper.
- SET CODe - Controls hex code display during disassembly.
- SET CRRepeat - Controls repeating commands with C/R.
- SET HELpdir - Specifies the help file directory.
- SET HOMe - Sets the home window for command input.
- SET MAIn - Controls starting execution at main().
- SET MLIst - Controls display of macro content during macro processing.
- SET NUMber - Controls line number display in the source window.
- SET PAUse - Controls scrolling in the dialog window.
- SET PROlog - Controls the automatic execution of function prolog code.
- SET RADix - Sets input radix.
- SET REEvaluate - Controls expression reevaluation for EXAmine.
- SET SENsitive - Controls case sensitivity for searches.
- SET SOUrcepath - Sets search path for source files.
- SET SYMbol - Controls symbolic disassembly.
- SET TAB - Sets tab expansion size.
- SET TEMpdir - Specifies the directory for temporary files.
- SET VERify - Controls memory segment accesses verification.
- SHOw - Shows the status of any or all SET command parameters.
- SOUrce - Enters source window.
- ST - ST0 to ST7. Displays or sets the 80387 stack elements and tag words.
- STEp - Executes one source statement at a time. Same as S.
- STEp INto - Single-steps into a program statement.
- STRucture - Defines a data structure.
- SW - Displays or sets the value of the 80387 status word.
- SWItch - Starts a SWITCH control statement.
- SYMbol - Displays symbols.
- TIMe - Displays the current time and date.
- TRAce - Enables or disables execution trace.
- TREal - Displays or sets treal (80-bit) object memory.
- TW - Displays or sets the value of the 80387 tag word.
- TYPe - Declares or redefines symbols.
- U - Disassembles machine code. Same as DASm.
- UNTil - Terminates a REPEAT loop.
- UP - Walks up the call stack.
- USE - Selects 16- or 32-bit code disassembly.
- VERsion - Displays debugger and target monitor version number.
- VIEw - Displays or sets mode of source display in source window.
- WAIt - Pauses command processing for input from keyboard.
- WHIle - Starts a WHILE loop.
- WIDth - Selects 16- or 32-bit code disassembly. Same as USE.
- WORd - Displays or sets word object (32-bit) memory.
- WRIte - Writes values to opened file.
- Syntax:
- [$module_name][##procedure_name]#variable_name
- [$module_name]#number
-
- # is a parser operator which can be used to access a variable
- outside of the current scope. It is also used as a prefix for line-
- numbers.
-
- When used as a variable name prefix with no other prefix,
- i.e., "#variable", the variable is searched for using the normal
- scoping rules. This provides a method to circumvent conflicts with
- commands or keywords.
-
- A module name and procedure name may be optionally specified
- in order to access a specific variable outside of the current scope.
- To access a global symbol, use the root module $, e.g., $#foo refers
- to the public instance of variable foo.
-
- Finally, when used as a numeric prefix, # indicates a
- line-number.
-
- Examples:
- ->#USER = 4 // Assigns 4 to a variable called USER.
- ->$#USER = 4 // Assign to the global variable USER.
- ->? $MOD1##PROC1#VAR1 // Display a local variable to a procedure.
- ->$MOD1#STATIC1 = 3 // Assign to a variable local to a module.
- ->G #14 // Go to line 14 in the current module.
- ->B $MOD1#14 // Break at line 14 in another module.
-
- See Also:
- ##, $, &, ?, SYMbol, EXAmine
- Syntax:
- [$module_name]##procedure_name[#variable_name]
-
- ## is a parser operator which allows the specification
- of a procedure name outside of the current scope.
-
- If a module name precedes the ## operator, only procedure
- names within that module are searched. If no leading module name
- is specified, only procedure names in the current module are
- searched.
-
- Typically, ## is needed only if two or more modules have
- local procedures with the same name.
-
- Examples:
- ->B $MODULE1##PROC3 // set a breakpoint at proc3 in module1
- ->GO FROM $##foo // go from global procedure foo
-
- See Also:
- #, $, &, SYMbol, Go, B
- Syntax:
- $module_name
-
- $ is a parser operator which distinguishes module names
- from other symbolic names. If no module_name is specified and $
- is used in conjunction with # or ##, then $ refers to the root
- module containing only global symbols.
-
- Examples:
- ->SET $mod2 = source.c // Associate a source file with a module.
- ->? $MOD1##PROC1#VAR1 // Display a local variable to a procedure.
-
- See Also:
- #, ##, $, &, ?, SYMbol, DIRectory MODule, SET
- Syntax:
- &symbol
-
- & is an address operator which gives the address of a
- symbolic object.
-
- Examples:
- ->GO FROM &START FOREVER
- ->POINTER &POINTER_BUF LENGTH 20
- ->TYPE long *ptr_to_long, long_buf[8] at &buf
-
- See Also:
- #, ##, $, &, ?, SYMbol, Go, B
- Syntax:
- // comment
-
- Indicates that everything that follows // till the end of a
- line is a comment, and should not be interpreted as part of the command.
-
- Examples:
- ->// A comment line
- ->DIR MAC // display directory of macros
- Syntax:
- :macro_name [actual_parameter_list]
-
- Executes the specified macro. "<*" and "*>" can be used
- as parentheses in the actual parameter list.
- The colon character is also used in macro definitions to
- specify a label.
- You can also execute a macro by entering the macro name without
- the colon prefix.
-
- Examples:
- ->:AA 34, <* AX,BX,CL *>, #20 //3 actual parameters
- ->:BB //No parameter
- ->:AA :BB, <* AL,5,3.5*BX *>, :CC
-
- ->MACRO TEST1 //Define a macro.
- MD>a = 8;
- MD>aa:
- MD>if( c >= 999 )
- MD> goto aa
- MD>orif( c <= 0 )
- MD> goto bb
- MD>eif
- MD>bb: //Specify a label called bb.
- MD>EMACRO
- ->
-
- See Also:
- MACro, DIRectory MACro, DISplay MACro, REMove MACro, PUT,
- INClude, EDIT, MLIst
- Syntax:
- command_line ::
- continuation_of_line
-
- Allows the continuation of a command line to the next line.
-
- Examples:
- ->BYT &array[12] = 1941, 42, 1776, 1812, ::
- ::>1492, 2001
- Syntax:
- ? expression
-
- Displays the type, value, and address of an lvalue, any
- expression which can be used on the left-hand side of an assignment
- statement. Rvalues are displayed as numeric values in multiple radices.
- An rvalue is any expression which can apprear on the right-hand side
- of an assignment statement.
-
- Example:
- ->? *(char *)0
- ->? foo
- ->? 'A'
- ->? ++data
- ->? *(byte *)ptr_to_short + *val
- ->? _AX+1
- ->? _AX=1
-
- See Also:
- EXAmine, SYMbol
- Syntax:
- @ filename [LISt]
-
- Executes the commands from the specified file. If LISt is
- specified, the commands in the command file are displayed on the
- console as they are being executed (default is NO LIST). This
- command is identical to the INClude command.
-
- Examples:
- ->@ "INIT.MAC" LIS
- ->@ C:\TMP\GR1.INC
-
- See Also:
- MACro, JOUrnal, LISt
- Syntax:
- B [n] [OFF ]
- [ON ]
- [CLEar]
- B [n] [=] addr [type] [COUnt num] [IF (expr)] [THEN command]
-
- where n = 0 to 31, and type = {REAd,WRIte,ACCess,EXEcute}
-
- Breakpoints are used to specify addresses at which program
- execution is halted. The breakpoints are effective in all execution
- commands except for GO FOREVER.
-
- B by itself will display all breakpoints; specifying n alone
- will display a specific breakpoint. OFF, ON, and CLEar are used to
- disable, enable, or remove a breakpoint, respectively. A disabled
- breakpoint will be inactive until enabled. Normally, a breakpoint
- is enabled when first set, but if an error occurs when setting a
- breakpoint, the breakpoint may be defined but disabled.
-
- If no breakpoint number is specified when setting a breakpoint,
- the first unused breakpoint is allocated. If no breakpoint number
- is specified with the CLEar qualifier, the breakpoint at the current
- execution pointer is cleared. If no breakpoint number is specified
- with the ON or OFF qualifiers, all breakpoints are enabled or disabled.
- The assignment operator (=) is only required when the distinction
- between a breakpoint number and an address is ambiguous.
-
- The REAd and ACCess types are equivalent and cause a break
- if data is read or written at the specified address. The default
- access type is EXEcute.
-
- If COUnt is specified, a break does not occur until an
- event is detected num times.
-
- A conditional breakpoint condition may be specified using the
- IF qualifier. The condition can be any valid C expression. If the
- expression evaluates to non-zero after the rest of the break condition
- is satisfied, then execution will be halted, otherwise execution
- continues.
-
- A command may be specified which is executed after a breakpoint
- is hit using the THEN qualifier. IF and THEN qualifiers are not
- evaluated until after all other conditions are satisfied, including
- the COUnt condition. Complex command sequences may be invoked after
- a breakpoint by invoking a macro in the THEN statement.
-
- Examples:
- ->B // Display all breakpoints.
- ->B 0 // Displays contents of breakpoint 0.
- ->B 0 CLE // Clears contents of and disables breakpoint 0.
- ->B 0 OFF // Disables breakpoint 0 but leaves it defined.
- ->B 0 ON // Re-enables breakpoint 0.
- ->B 0 = 100h // Sets breakpoint 0.
- ->B #12 // Sets an arbitrary breakpoint to line 12.
- ->B &FOO WRI COUNT 2 // Breaks after FOO is written twice.
- ->B subr1 IF (i > 3) // Breaks if i > 3 when entering subr1
- ->B cs:100h THEN ? i // Display i before executing at 100h
- ->B subr3 IF (i > 3) THEN :mac1 a,42
-
- See Also:
- Go, STEp, CAUse
- Syntax:
- BINary
-
- Sets the default input radix to binary.
-
- Example:
- ->BIN
-
- See Also:
- DECimal, HEX, OCTal, SHOw
- Syntax:
- BREak
-
- Causes an immediate exit from the REPEAT-UNTIL, WHILE-EWHILE,
- FOR-EFOR loop or SWITCH-ESWITCH block.
-
- Examples:
- ->MACRO TEST1 //Define a macro.
- MD>switch( c )
- MD> case 30:
- MD> case 20:
- MD> c = a + b * c;
- MD> d = d / c + 8;
- MD> break;
- MD> default:
- MD> c >>= 1;
- MD>eswitch
- MD>EMACRO
-
- ->WHILE 1
- CD> C = A - 1
- CD> IF !C
- CD> BREAK
- CD>EWHILE
-
- See Also:
- CONtinue, GOTo
- Syntax:
- BYTe [address] [= expression [, expression]...]
- [= "string" ]
- [[TO] address [= expression ]]
- [LENgth n [= expression ]]
-
- Displays or alters memory contents in byte scope.
- The base of two addresses that define an address range must be
- the same. For example, BYT 200:40 TO 300:300 is invalid.
-
- Examples:
- ->BYT 40 //Display byte content of address DS:40
- ->BYTE 100:40 TO 100:200
- ->BYTE &BUF LENGTH 20
- ->BYTE DS:SI = 23, 234Q, 4+6, AL, 38T
- ->BYT ARRAY LEN 100 = 0
- ->BYTE &string = "\tThis is a test program\n"
-
- See Also:
- CHAr, WORd, DWOrd, FLOat, DOUble, QWOrd, POInter, TREal
- Syntax:
- CALlstack [expression]
-
- For use with high-level languages. Displays the current
- chain of procedure calls in the program being executed. A CALLSTACK
- is a fully qualified list of references to procedures. The reference
- listed first is the current execution address. The second entry is
- the current address for the procedure that called the current
- procedure, etc. CALLSTACK shows the dynamic, run-time nesting of
- the program as opposed to the static, lexical nesting.
-
- The CALLSTACK display may be incorrect if invoked before
- a valid stack frame is built.
-
- Example:
- ->CAL
-
- See Also:
- Go, TRAce, UP, DOWn
- Syntax:
- SWItch [(] expression [)]
- CASe constant expression:
- [command]
- .
- .
- [CASe constant expression:]
- [command]
- .
- .
- [DEFault:]
- [command]
- .
- .
- ESWitch
-
- The CASe command is used in the SWItch command.
-
- Examples:
- ->MACRO TEST1 //Define a macro
- MD>SWITCH A
- MD> CASE 0:
- MD> B = 10H
- MD> BREAK
- MD> CASE 1:
- MD> B = B * B
- MD> BREAK
- MD> DEFAULT:
- MD> STEP 5 //Execute 5 lines
- MD>ESWITCH
- MD>EMACRO
- ->
-
- See Also:
- SWItch, DEFault
- Syntax:
- CAUse
-
- Reports the cause of the last break in execution.
-
- Example:
- ->CAUse
-
- See Also:
- Go, B
- Syntax:
- CHAr [address] [= expression [, expression]...]
- [= "string" ]
- [[TO] address [= expression ]]
- [LENgth n [= expression ]]
-
- Displays or alters memory contents in byte scope. The base
- of two addresses that define an address range must be the same. For
- example, CHA 200:40 TO 300:300 is invalid.
-
- Examples:
- ->CHA 40 //Display byte content of address DS:40
- ->CHAR 100:40 TO 100:200
- ->CHAR &BUF LENGTH 20
- ->CHAR DS:SI = 23, 234Q, 4+6, AL, 38T
- ->CHA ARRAY LEN 100 = 0
- ->CHAR &string = "\tThis is a test program\n"
-
- See Also:
- BYTe, WORd, DWOrd, FLOat, DOUble, QWOrd, POInter, TREal
- Syntax:
- CLOse [n [, n]...]
-
- where n = 0, 1, 2, 3, 4 or 5
-
- Closes previously opened file. If no file number n is
- specified, all the opened files are closed. Files are opened
- using the OPEN command.
-
- Examples:
- ->CLOSE 1,2 //Closes file 1 and 2.
- ->CLOSE //Closes all opened files.
-
- See Also:
- OPEn, REAd, WRIte
- Syntax:
- COMpare addr1 addr2 [[TO] addr3]
- [LENgth n ]
-
- Compares two regions of memory and reports all differences.
-
- Examples:
- ->COM &byte1 &char1 // Compare char1 to byte1
- ->COM 200:200 30:50 TO 30:300 // Compare memory from between
- -> // 30:50 and 30:300 inclusive to that at 200:200 to 200:450.
- ->COM ARRAY_BUF 40:50 len 50
- ->COM &STRING1 &STRING2 LEN 20
-
- See Also:
- COPy, FINd
- Syntax:
- CONtinue
-
- Causes the next iteration of the REPEAT-UNTIL, WHILE-EWHILE,
- FOR-EFOR loop to begin. In the REPEAT-UNTIL and WHILE-EWHILE loop,
- the test part is executed immediately. In the FOR-EFOR loop, control
- passes to the re-initialization step.
-
- Examples:
- ->MACRO TEST1 //Define a macro.
- MD>while( a )
- MD> b = subr( &c, d );
- MD> if( b == a )
- MD> continue;
- MD> else
- MD> c = c << 3;
- MD> d = d % 3;
- MD> eif
- MD>ewhile
- MD>EMACRO
- ->WHILE I--
- CD> IF A != SUB( I, D )
- CD> CONTINUE
- CD> ORIF
- CD> D = A
- CD> EIF
- CD>EWH
-
- See Also:
- BREak, GOTo
- Syntax:
- COPy dest_addr = src_start_addr [[TO] src_end_addr]
- [LENgth n ]
-
- Copies a block of memory contents from one location to
- another.
-
- Examples:
- ->COPY &byte1 = &char1 //Copy one byte from char1 to byte1
- ->COPY 200:200=30:50 TO 30:300 //Copy from memory between
- -> //30:50 and 30:300 inclusive to destination starting at
- -> //200:200.
- ->COPY ARRAY_BUF = 40:50 len 50
- ->COPY &STRING1=&STRING2 LEN 20
-
- See Also:
- COMpare, FINd
- Syntax:
- CW
-
- Displays or changes the value of the 80387 control word.
- The value of the control word is displayed followed by a slash.
- The contents can be altered by entering a new hexadecimal value.
- A carriage return alone will preserve the contents.
-
- Examples:
- ->CW
- CONTROL WORD = 0000H / 1324H
- ->CW
- CONTROL WORD = 1324H / <CR>
-
- See Also:
- R387, ST, SW, TW
- Syntax:
- DASm [addr1 [TO addr2]] [MIX]
- [LENgth n ]
-
- Displays a block of memory in 80386 assembly mnemonic form.
- The MIX qualifier causes source to be mixed in with the disassembly
- display. This command is identical to the U command.
-
- Examples:
- ->DASM //Default address is CS:EIP
- ->DASM CS:(EIP+5) MIX
- ->DASM &MAIN LEN 20
-
- See Also:
- VIEw, SOUrce, USE
- Syntax:
- DECimal
-
- Sets the default input radix to decimal.
-
- Example:
- ->DEC
-
- See Also:
- BINary, HEX, OCTal, RADix
- Syntax:
- SWItch [(] expression [)]
- CASe constant expression:
- [command]
- .
- .
- [CASe constant expression:]
- [command]
- .
- .
- [DEFault:]
- [command]
- .
- .
- ESWitch
-
- The DEFault command is used in the SWItch command.
-
- Examples:
- ->MACRO TEST1 //Define a macro
- MD>SWITCH A
- MD> CASE 0:
- MD> B = 10H
- MD> BREAK
- MD> CASE 1:
- MD> B = B * B
- MD> BREAK
- MD> DEFAULT:
- MD> STEP 5 //Execute 5 lines
- MD>ESWITCH
- MD>EMACRO
- ->
-
- See Also:
- SWItch, CASe
- Syntax:
- There are three kinds of "DIRECTORY" commands:
-
- DIRectory MACro, DIRectory MODule, DIRectory STRucture.
-
- Please enter the command again.
-
- See Also:
- DISplay
- Syntax:
- DIRectory MACro
-
- Lists the names of all defined macros.
-
- Example:
- ->DIR MAC
-
- See Also:
- :, DISplay MACro, MACro, PUT, INClude, REMove MACro,
- EDIT, MLIst
- Syntax:
- DIRectory MODule
-
- Lists all module names and corresponding source filenames.
-
- Example:
- ->DIR MODULE
-
- See Also:
- $, SET, SOUrce, SYMbol
- Syntax:
- DIRectory STRucture
-
- Lists all structure names which have been defined or loaded.
-
- Example:
- ->DIR STR
-
- See Also:
- STRucture, DISplay STRucture
- Syntax:
- There are three kinds of "DISPLAY" commands:
-
- DISplay MACro, DISplay STRucture, DISplay TRAce.
-
- Please enter the command again.
-
- See Also:
- DIRectory, TRAce
- Syntax:
- DISplay MACro [macro_name [, macro_name]...]
-
- Displays all or some macro definitions.
-
- Examples:
- ->DIS MAC //Displays all macro definitions.
- ->DIS MAC AA, BB, CC //Displays macros AA, BB, CC.
-
- See Also:
- :, MACro, DIRectory MACro, REMove MACro, PUT, INClude,
- EDIT, MLIst
- Syntax:
- DISplay STRucture [structure_name [, structure_name]...]
-
- Lists the contents of the specified structures. If no
- structure name is specified, all structure definitions in the
- structure directory are listed.
-
- Examples:
- ->DISPLAY STRUCTURE //Lists all structure definitions.
- ->DIS STR STR1, STR2
-
- See Also:
- STRucture, DIRectory STRucture
- Syntax:
- DISplay TRAce [LINe ] [ALL]
- [INStruction] [n]
-
- Displays the trace buffer. LINe and INStruction displays
- execution history in high level language statements and assembly
- language mnemonics, respectively. The default is LINe.
-
- ALL displays the entire trace buffer. n displays the last
- n steps. The default is ALL.
-
- Note that tracing is enabled by the TRACE command.
-
- Examples:
- ->DIS TRA ALL //Prints the whole trace buffer in line mode.
- ->DIS TRA INS 6 //Prints last 6 machine instructions.
-
- See Also:
- TRAce
- Syntax:
- DOUble [address] [= expression [, expression]...]
- [[TO] address [= expression ]]
- [LENgth n [= expression ]]
-
- Displays or alters memory contents in double scope. The base
- of two addresses that define an address range must be the same. For
- example, DOUBLE 200:40 TO 300:300 is invalid.
-
- Examples:
- ->DOUBLE 40
- ->DOUBLE 100:40 TO 100:200
- ->DOUBLE &double_buf LENGTH 20
- ->DOUBLE DS:SI = 9.9, 8.8, 1.2+3.5
- ->DOUBLE double_array LEN 100 = 0.0
-
- See Also:
- BYTe, CHAr, WORd, DWOrd, FLOat, QWOrd, POInter, TREal
- Syntax:
- DOWn [n ]
- [HOMe]
-
- Walks down the call stack allowing access to the source and
- local variables of any active procedure. If no argument is specified,
- the stack is walked down one level. If HOMe is specified, the active
- scope returns to what it was before any UP or DOWN command was issued.
-
- If any execution command or command that directly changes
- the CS:EIP or EBP is given by the user while an UP or DOWN command
- is in effect, a DOWN HOME action is automatically performed before
- the command is executed.
-
- Examples:
- ->DOWN // walk down one level
- ->DOWN 3 // walk down three levels
- ->DOWN HOME // return to the initial scope
-
- See Also:
- UP, CALlstack, SOUrce, SYMbol
- Syntax:
- DWOrd [address] [= expression [, expression]...]
- [[TO] address [= expression ]]
- [LENgth n [= expression ]]
-
- Displays or alters memory contents in double word scope.
- The base of two addresses that define an address range must be the
- same. For example, DWORD 200:40 TO 300:300 is invalid.
-
- Examples:
- ->DWORD 40 //Display double word at address DS:40
- ->DWORD 100:40 TO 100:200
- ->DWORD &unsigned_long_buf LENGTH 20
- ->DWORD DS:SI = 23, 234Q, 4+6, AL, 38T
- ->DWORD unsigned_long_array LEN 100 = 0
-
- See Also:
- BYTe, CHAr, WORd, FLOat, DOUble, QWOrd, POInter, TREal
- Syntax:
- E expression
- EXAmine expression
-
- Opens a symbol examination window.
-
- Example:
- ->e *(char *)0
- ->e foo
-
- See Also:
- ?, SYMbol, =
- Syntax:
- FOR [expression1-1,...];[expression2];[expression3-1,...]
- [command]
- :
- EFOr
-
- The EFOr command is used to terminate a FOR loop.
-
- Example:
- ->MACRO TEST2 //Define macro TEST2
- MD>FOR (A=0,B=0; A<=0; A++)
- MD> C=ABC(&B, *PTR)
- MD> C = C >> 4
- MD>EFOR
- MD>EMACRO
-
- See Also:
- FOR, EIF, EWHile, ESWitch
- Syntax:
- IF expression
- [command]
- .
- .
- [ORIf expression]
- [command]
- .
- .
- [ELSe]
- [command]
- .
- .
- EIF
-
- The EIF command is used to terminate an IF statement.
-
- Example:
- ->MACRO TEST1
- MD>IF (A>0)
- MD> IF(B++ != 0)
- MD> C--
- MD> ORIF(B < 3)
- MD> D += 2
- MD> EIF
- MD>ELSE
- MD> A=0
- MD>EIF
- MD>EMACRO
- ->
-
- See Also:
- IF, EFOr, EWHIle, ESWitch
- Syntax:
- IF expression
- [command]
- .
- .
- [ORIf expression]
- [command]
- .
- .
- [ELSe]
- [command]
- .
- .
- EIF
-
- The ELSe command is used in the IF statement.
-
- Example:
- ->MACRO TEST1
- MD>IF (A>0)
- MD> IF(B++ != 0)
- MD> C--
- MD> ORIF(B < 3)
- MD> D += 2
- MD> EIF
- MD>ELSE
- MD> A=0
- MD>EIF
- MD>EMACRO
- ->
-
- See Also:
- IF, ORIF, EIF
- Syntax:
- MACro macro_name
- [command]
- :
- EMAcro
-
- The EMAcro command is used to complete a macro definition.
-
- Example:
- ->MAC AA //Define macro AA
- MD>%0
- MD>STEP %1
- MD>BYT 50:3 to %2
- MD>GO TIL %3
- MD>EMA
- ->
-
- See Also:
- :, MACro, DIRectory MACro, DISplay MACro, REMove MACro, PUT,
- INClude, EDIt, MLIst
- Syntax:
- ENV [filename]
-
- ENV displays parameters of the configurable environment, and
- optionally allows the environment to be saved to a file. Environment
- parameters displayed include:
-
- BAUD = n baud rate for remote debugging
- PORT = n communications port number for remote debugging
- BARLINE = n vertical position of Source/Dialog separator bar
- DIALOG = n maximum depth of the dialog window
- HISTORY = n maximum depth of the history window
- TAB = n tab expansion size
- STARF = file start-up command filename
- COLOR = file color values file for windows
- SOURCEPATH path source file search path (semicolon separated)
- HELPDIR dir helpfile directory
- TEMPDIR dir temporary file directory
- REGWN = win register window size and position
- MEMWN = win memory window size and position
- RTRACEWN = win run-trace window size and position
- CSTACKWN = win call-stack window size and position
- BREAKWN = win break window size and position
- SENSITIVE bool case-sensitive symbol matching setting
- MLIST bool macro list setting
- BEEP bool audible error beep setting
- PROLOG bool automatic prolog execution setting
- CRREPEAT bool command repeat on C/R setting
- REEVALUATE bool re-evaluate watched expressions setting
- SYMBOL bool symbolic disassembly setting
- CODE bool source-window object code display setting
- NUMBER bool source-window line-number setting
- MAIN bool start-debugging-at-function-main setting
- PAUSE bool pause-in-full-dialog-window setting
- HOME name home window, name can be SOURCE or COMMAND
- RADIX base input number base setting (HEX, DEC, OCT, or BIN)
- <key> = string key macro definitions
-
- The start-up environment file's name can be set in the MDBENV MS-DOS
- environment variable. The default name is MDB.ENV.
-
- Examples:
- ->ENV
- ->ENV MDB.ENV
-
- See Also:
- SET, SHOW
- Syntax:
- ESCape
-
- The ESCape command stops macro processing. It is used in
- macro definitions to abort processing.
-
- Example:
- ->IF AX > 0
- CD>ESCAPE //Returns to command mode.
- CD>ELSE
- CD>AX++
- CD>EIF
- ->
-
- See Also:
- BREak, CONtinue, GOTo
- Syntax:
- SWItch expression
- CASe constant expression:
- [command]
- .
- .
- [CASe constant expression:]
- [command]
- .
- .
- [DEFault:]
- [command]
- .
- .
- ESWitch
-
- The ESWitch command is used to terminate a SWItch statement.
-
- Examples:
- ->MACRO TEST1 //Define a macro
- MD>SWITCH A
- MD> CASE 0:
- MD> B = 10H
- MD> BREAK
- MD> CASE 1:
- MD> B = B * B
- MD> BREAK
- MD> DEFAULT:
- MD> STEP 5 //Execute 5 lines
- MD>ESWITCH
- MD>EMACRO
- ->
-
- See Also:
- SWItch, EFOr, EIF, EWHile
- Syntax:
- WHIle expression
- [command]
- .
- .
- EWHile
-
- The EWHile command is used to terminate a WHIle statement.
-
- Example:
- ->MACRO TEST1 //Define a macro
- MD>WHILE A
- MD> STEP
- MD> A
- MD>EWHILE
- MD>EMACRO
- ->
-
- See Also:
- WHIle, EFOr, EIF, ESWitch
- Syntax:
- E expression
-
- Opens a symbol examination window.
-
- Example:
- ->e *(char *)0
- ->e foo
-
- See Also:
- ?, SYMbol, =
- Syntax:
- EXAmine expression
- E expression
-
- Opens a symbol examination window.
-
- Example:
- ->e *(char *)0
- ->e foo
-
- See Also:
- ?, SYMbol, =
- Syntax:
- EXIt
-
- Exits from the debugger. This command closes all opened files
- and deletes all temporary files that are created by the debugger. When
- in remote mode, unlike QUIT, EXIT causes the remote monitor to terminate.
-
- Example:
- ->EXIT
-
- See Also:
- QUIt
- Syntax:
- FINd addr1 {[TO] addr2} {"string" }
- {LENgth n } {expr [,expr]...}
-
- Searches the specified memory range for the specified value
- or string of values.
-
- Examples:
- ->FIN &buf[12] LEN 8192 "Copyright"
- ->FIN DS:100H TO DS:0FFFFH 1941,2001
-
- See Also:
- COMpare, COPy
- Syntax:
- FLAg
-
- status_flag [= value] [, status_flag [= value]]...
-
- where status_flag may be:
- AF, CF, DF, IF, IOPL, NT, OF, PF, RF, SF, TF, VM, or ZF.
-
- Displays or alters the 80386 flags register. When a new
- flag value is specified, any non-zero value is treated as 1. Note
- that IOPL is two bits; the other flags are one bit.
-
- Examples:
- ->FLA //Display all flags
- ->CF, OF, PF //Display CF, OF, PF
- ->CF = 1, IF = 1, AF = 1 //Set flag value
-
- See Also:
- REGister
- Syntax:
- FLOat [address] [= expression [, expression]...]
- [[TO] address [= expression ]]
- [LENgth n [= expression ]]
-
- Displays or alters memory contents in float scope. The base
- of two addresses that define an address range must be the same. For
- example, FLOAT 200:40 TO 300:300 is invalid.
-
- Examples:
- ->FLOAT 40
- ->FLOAT 100:40 TO 100:200
- ->FLOAT &float_buf LENGTH 20
- ->FLOAT DS:SI = 9.9, 8.8, 1.2+3.5
- ->FLOAT float_array LEN 100 = 0.0
-
- See Also:
- BYTe, CHAr, WORd, DWOrd, DOUble, QWOrd, POInter, TREal
- Syntax:
- FOR [expression1];[expression2];[expression3]
- [command]
- :
- EFOr
-
- The FOR-EFOr loop command is equivalent to:
- [expression1]
- :
- WHILE expression2
- [command]
- :
- [expression3]
- :
- EWHILE
-
- Note: If expression2 is not specified, it is taken as TRUE.
-
- Examples:
- ->MACRO TEST1 //Define a macro.
- MD>for( a=0,b=0; a<=0; a++ )
- MD> c=abc( &b, *ptr )
- MD> c = c >> 4
- MD> d |= b
- MD>efor
- MD>EMACRO
- ->MACRO TEST2 //Define a macro.
- MD>for(;;)
- MD> if( !( c = get_data() ) )
- MD> break;
- MD> else
- MD> buf[i++] = c;
- MD> eif
- MD>efor
- MD>EMACRO
- ->FOR I = 0; I < 10; I++
- CD> BUF[I] = 0;
- CD>EFOR
-
- See Also:
- IF, WHIle, REPeat, EFOr, MACro, INClude
- Syntax:
- GLObal
-
- Displays all global symbols.
-
- Example:
- ->GLOBAL
-
- See Also:
- ?, EXAmine, SYMbol, LOCal
- Syntax:
- G [FROm address] [FORever]
- [[TILl] address]
- [[TILl] RETurn [level]]
- [[TILl] CALl]
-
- Starts target program execution. If no argument is specified,
- program execution begins from the current program counter. Program
- execution will be halted if a breakpoint is reached.
-
- The "FROM address" parameter is used to specify the starting
- address for program execution. The address must be a virtual address
- or an offset into the current code segment. It can neither be a
- physical nor a linear address.
-
- If the argument is FORever, all previously specified breakpoints
- (see B) are disabled, and the CPU executes forever (or until the program
- is killed).
-
- If RETurn is specified, execution terminates after the code
- has returned from the specified number of levels of call nesting. The
- default is to return from the current procedure (i.e., 1 level).
-
- If CALl is specified, execution continues until a CALL or INT
- instruction is executed.
-
- Examples:
- ->G FROM &START FOREVER
- ->G TIL #40
- ->G RET
- ->G CALL
-
- See Also:
- B, Step, IStep, CALlstack, LOAd, RUN
- Syntax:
- GO [FROm address] [FORever]
- [[TILl] address]
- [[TILl] RETurn [level]]
- [[TILl] CALl]
-
- Starts target program execution. If no argument is specified,
- program execution begins from the current program counter. Program
- execution will be halted if a breakpoint is reached.
-
- The "FROM address" parameter is used to specify the starting
- address for program execution. The address must be a virtual address
- or an offset into the current code segment. It can neither be a
- physical nor a linear address.
-
- If the argument is FORever, all previously specified breakpoints
- (see B) are disabled, and the CPU executes forever (or until the program
- is killed).
-
- If RETurn is specified, execution terminates after the code
- has returned from the specified number of levels of call nesting. The
- default is to return from the current procedure (i.e., 1 level).
-
- If CALl is specified, execution continues until a CALL or INT
- instruction is executed.
-
- Examples:
- ->GO FROM &START FOREVER
- ->GO TIL #40
- ->GO RET
- ->GO CALL
-
- See Also:
- B, Step, IStep, CALlstack, LOAd, RUN
- Syntax:
- GOTo macro_label
-
- Causes program execution to be transferred to the specified
- macro-label.
- Note that GOTO command cannot be used to jump into
- REPEAT-UNTIL, WHILE-EWHILE, FOR-EFOR loop, or IF-EIF, SWITCH-ESWITCH
- block, but can be used to jump out of these loops or blocks.
-
- Examples:
- ->MACRO TEST1 //Define a macro.
- MD>a = 8;
- MD>aa:
- MD>if( c >= 999 )
- MD> goto aa
- MD>orif( c <= 0 )
- MD> goto bb
- MD>eif
- MD>bb:
- MD>EMACRO
- ->
-
- See Also:
- BREak, CONtinue, ESCape, MACro
- Syntax:
- HALt
-
- In remote execution mode, halts the remote program.
-
- Example:
- ->HALt
-
- See Also:
- Go, CAUse
- Syntax:
- HELp ["command_keyword"]
- [ command_keyword ]
-
- Shows you how to use debugger commands. If no parameter
- is specified, the command summary will be displayed. If a command
- keyword is given, the syntax and example of usage of the command
- will be displayed.
-
- Examples:
- ->HELP
- ->HELP GO
- ->HELP "BYTE"
- Syntax:
- HEX
-
- Sets the default input radix to hexadecimal.
-
- Example:
- ->HEX
-
- See Also:
- BINary, DECimal, OCTal, SHOw
- Syntax:
- IF expression
- [command]
- :
- [ORIf expression]
- [command]
- :
- [ELSe]
- [command]
- :
- EIF
-
- If any expression is TRUE (non-zero), the commands
- associated with it are executed. If all of the expressions are
- FALSE (zero), either no action at all or the commands associated
- with ELSE are executed, This command can be formed by an IF-EIF,
- IF-ELSE-EIF, IF-ORIF-EIF, or IF-ORIF-ELSE-EIF clause.
-
- Examples:
- ->MACRO TESTIF //Define a macro.
- MD>IF A + B >= %0
- MD>STEP
- MD>ORIF A + B < %1
- MD>GO TIL %2
- MD>ELSE
- MD>A
- MD>B
- MD>EIF
- MD>EMACRO
- ->MACRO TTT
- MD>if( a > 0 )
- MD> if( b++ != 0 )
- MD> c--
- MD> d--
- MD> orif( b < -3 )
- MD> c >>= 2;
- MD> eif
- MD>else
- MD> a = 0
- MD>eif
- MD>EMACRO
- ->
-
- See Also:
- SWItch, FOR, WHIle, REPeat, EIF, MACro, INClude
- Syntax:
- INClude filename [LISt]
-
- Execute the commands from the specified file. If LISt is
- specified, the commands in the command file are displayed on the
- console as they are being executed (default is NO LIST). This
- command is identical to the @ command.
-
- Examples:
- ->INC "INIT.MAC" LIS
- ->INC C:\TMP\GR1.INC
-
- See Also:
- MACro, JOUrnal, LISt
- Syntax:
- JOUrnal filename [KEYboard] [APPend]
-
- Creates a text file with the specified filename and records
- the user's entered commands into the specified file. The command file
- created may be used in the INClude command.
-
- If KEYboard is specified, the journal file will store all
- entered keystrokes, including those used in windows, rather than
- only the commands entered on the command line.
-
- If the specified file already exists, and the APPend qualifier
- is specified, then the existing file will be appended rather than
- over-written.
-
- This command may be disabled with the NO JOUrnal command.
-
- Example:
- ->JOURNAL MYDEBUG.LOG
-
- See Also:
- LISt, INClude, NO JOUrnal
- Syntax:
- LISt filename [APPend]
-
- Creates a text file with the specified filename and records
- the console display into the specified file. This command enables
- you to make a copy of a debugging session.
-
- If the APPend qualifier is given and the specified file
- already exists, then the logged data will be appended to the
- specified file.
-
- This command is disabled with the NO LIST command.
-
- Examples:
- ->LIST MYDEBUG.LOG
- ->NO LIS
-
- See Also:
- NO LISt, JOUrnal
- Syntax:
- LOAd filename [NOCode] [NOSource] [EXTension="string"]
-
- Loads an object file from the host into the target memory.
- The file must be a MS-Windows .EXE with extended CodeView debug
- information.
-
- If NOCode is specified, executable code is not loaded into
- memory; only symbol, line number and type information is loaded into
- the the debugger.
-
- If NOSource is specified, the source listing display feature
- is disabled.
-
- The default file extension of source files is ".c";
- EXTension can be used to specify an alternate source file extension.
-
- Examples:
- ->LOAD MYPROG.EXP
- ->LOA MYPROG NOCODE
- ->LOAD TEST NOSOURCE NOCODE
- ->LOAD C:\PROG\TSTPRO EXT = "pas"
-
- See Also:
- RUN, RERun, RELoad, Go
- Syntax:
- LOCal
-
- Displays all active local symbols and their addresses.
-
- Example:
- ->LOC
-
- See Also:
- ?, EXAmine, GLObal, SYMbol
- Syntax:
- MACro macro_name
- [command]
- :
- EMAcro
-
- Defines a macro, %0 ... %9 are the formal parameters.
-
- Note:
- You should not use macro names that conflict with the debugger's
- commands or symbol names in your program. Otherwise, the macro definitions
- will override them.
- You can execute macros by typing the macro names with or without
- the colon prefix.
-
- Example:
- ->MAC AA //Define macro AA
- MD>%0
- MD>REG %1
- MD>BYT 50:3 to %2
- MD>GO TIL %3
- MD>EMA
- ->
-
- See Also:
- :, DIRectory MACro, DISplay MACro, REMove MACro, PUT,
- INClude, EDIt, MLIst
- Syntax:
- MEMory [address]
-
- Enters the memory window. If no address is specified, the
- last specified address will be used.
-
- Examples:
- ->MEM
- ->MEM ds:100h
- ->MEM big_array
-
- See Also:
- BYTe, CHAr, WORd, DWOrd, FLOat, DOUble, QWOrd, POInter, TREal
- Syntax:
- There are two kinds of "NO" commands, they are:
-
- NO JOUrnal, NO LISt.
-
- Please enter the command again.
- Syntax:
- NO JOUrnal
-
- Closes the journal file.
-
- Example:
- ->NO JOURNAL
-
- See Also:
- JOUrnal, LISt
- Syntax:
- NO LISt
-
- Closes the listing file.
-
- Example:
- ->NO LIST
-
- See Also:
- LISt, JOUrnal
- Syntax:
- OCTal
-
- Sets the default input radix to octal.
-
- Example:
- ->OCT
-
- See Also:
- BINary, DECimal, HEX, RADix
- Syntax:
- OPEn n = filename
-
- where n = 0, 1, 2, 3, 4 or 5
-
- Opens a file and associates it with a number n. The opened
- file may later be used in READ or WRITE commands to read/write data
- from/to the file. If the specified file does not exist, it will be
- created.
-
- Examples:
- ->OPEN 1 = INPUT.DAT
- ->OPEN 2 = OUTPUT.DAT
- ->READ A, B FROM 1
- ->WRITE "A = ", A TO 2
-
- See Also:
- CLOse, REAd, WRIte, INClude, MACro
- Syntax:
- IF expression
- [command]
- .
- .
- [ORIf expression]
- [command]
- .
- .
- [ELSe]
- [command]
- .
- .
- EIF
-
- The ORIf command is used in the IF statement.
-
- Example:
- ->MACRO TEST1
- MD>IF (A>0)
- MD> IF(B++ != 0)
- MD> C--
- MD> ORIF(B < 3)
- MD> D += 2
- MD> EIF
- MD>ELSE
- MD> A=0
- MD>EIF
- MD>EMACRO
- ->
-
- See Also:
- IF, EIF, ELSE
- Syntax:
- POInter [address] [= expression [, expression]...]
- [[TO] address [= expression ]]
- [LENgth n [= expression ]]
-
- Displays or alters memory contents in pointer scope. The
- base of two addresses that define an address range must be the same.
- For example, POINTER 200:40 TO 300:300 is invalid.
-
- Depending on the current setting of the USE command, the
- offset of the pointer may be 16-bit or 32-bit.
-
- Examples:
- ->POI 40
- ->POINTER 100:40 TO 100:200
- ->POI &pointer_buf LENGTH 20
- ->POINTER DS:SI = 9:6, CS:IP, SS:BP+SP
- ->POI pointer_array LEN 100 = 0:0
-
- See Also:
- BYTe, CHAr, WORd, DWOrd, FLOat, DOUble, QWOrd, TREal
- Syntax:
- PUT filename MACro [macro_name [, macro_name]...]
-
- Writes some or all macro definitions to a specified file.
-
- Examples:
- ->PUT mac.inc MAC //Write all macro definitions
- //to the file MAC.INC
- ->PUT ABC.INC MAC AA,BB,CC //Write macro
- //definitions AA,BB, CC TO the file ABC.INC
-
- See Also:
- MACro, DIRectory MACro, REMove MACro, DISplay MACro,
- INClude, EDIt, MLIst
- Type PUT for help.
- Syntax:
- QUIt
-
- Exits from the debugger. This command closes all opened files
- and deletes all temporary files that are created by the debugger. When
- in remote mode, unlike EXIT, QUIT leaves the remote monitor running and
- ready to connect to another remote debugger invocation.
-
- Example:
- ->QUIT
-
- See Also:
- EXIt
- Syntax:
- QWOrd [address] [= expression [, expression]...]
- [[TO] address [= expression ]]
- [LENgth n [= expression ]]
-
- Displays or alters memory contents in double quad-word scope.
- The base of two addresses that define an address range must be the
- same. For example, QWORD 200:40 TO 300:300 is invalid.
-
- Examples:
- ->QWORD 40 //Display quad-word content of address DS:40
- ->QWORD 100:40 TO 100:200
- ->QWORD &unsigned_long_buf LENGTH 20
- ->QWORD DS:SI = 23, 234Q, 4+6, AL, 38T
- ->QWORD unsigned_long_array LEN 100 = 0
-
- See Also:
- BYTe, CHAr, WORd, DWOrd, FLOat, DOUble, POInter, TREal
- Syntax:
- R287
-
- Displays 80287 status and registers.
-
- Example:
- ->R287
-
- See Also:
- R387, REGister
- Syntax:
- R387
-
- Displays 80387 status and registers.
-
- Example:
- ->R387
-
- See Also:
- R287, REGister
- Syntax:
- REAd symbol [, symbol]... [FROm n]
-
- Reads in symbol values from specified file n which is opened
- using the OPEN command. Default is from user's terminal.
-
- Examples:
- ->READ a, *ptr_to_byte, array[4][3] FROM 2
- ->READ struct.member, ptr_str->field
-
- See Also:
- WRIte, OPEn, CLOse, INClude
- Syntax:
- REGister
- reg_name[=expression] [, reg_name[=expression]]...
- reg_name:reg_name[=expression:expression]
-
- Displays or changes 80386 register values.
-
- GENERAL PURPOSE REGISTERS
- EAX, EBX, ECX, EDX, ESI, EDI, EBP, ESP,
- AX, BX, CX, DX, SI, DI, BP, SP,
- AH, AL, BH, BL, CH, CL, DH, DL.
- SEGMENT REGISTERS
- DS, ES, FS, GS, SS, CS.
- INSTRUCTION POINTER
- EIP, IP.
- STATUS REGISTERS
- AF, CF, DF, IF, IOPL, NT, OF, PF, RF, SF, TF, VM, ZF,
- EFG.
- SYSTEM TABLE REGISTERS
- GDTBAS, GDTLIM, IDTBAS, IDTLIM, LDTR, TR.
- CONTROL REGISTERS
- CR0, CR2, CR3.
- 80287/387 REGISTERS
- CW, TW, SW, ST0..ST7
-
- Examples:
- ->REG //Displays current register values
- ->AX, BL, CH //Displays register AX, BL, AND CH
- ->AH=56Q, CL=101Y, IP=78t //Changes register values
- ->GDTLIM
- ->cs:ip
- ->AX:BL = (678 + 6) : 4445
- ->CS:IP = &START
-
- See Also:
- DT, GDT, IDT, LDT, PD, TSS
- Type REMove MACro for help.
- Syntax:
- REMove MACro [macro_name [, macro_name]...]
-
- Removes all or some macro definitions.
-
- Examples:
- ->REM MAC //Remove all macro definitions
- ->REM MAC AA, BB, CC //Remove macro AA, BB, and CC
-
- See Also:
- :, MACro, DIRectory MACro, DISplay MACro, INClude,
- EDIt, MLIst
- Syntax:
- REPeat [n]
- [command]
- :
- UNTil expression
-
- Executes the group of commands included between REPEAT and
- UNTIL, then evaluates the expression. If it is FALSE (zero), the
- group of commands are executed again and the expression is
- reevaluated. The loop continues until the termination condition is
- satisfied, i.e. the expression becomes TRUE (non-zero) or has looped n
- times if n is specified.
-
- Examples:
- ->MACRO test1 //Define a macro that
- MD>REPEAT %0 //at most repeats %0 times.
- MD>A1 = A1 / 2.
- MD>B = ROUTINE( A ) //Call routine, return value to B
- MD>UNTIL B == %1 //Break if B equals to %1
- MD>EMACRO
- ->
-
- See Also:
- UNTil, IF, FOR, WHIle, MACro, INClude
- Syntax:
- RESet
-
- Resets the processor registers to initial system values.
-
- Example:
- ->RESET
-
- See Also:
- REGister
- Syntax:
- RUN [command_line]
-
- Specify command-line arguments for a program and execute,
- reloading if necessary.
-
- Examples:
- ->RUN
- ->RUN one two three
- ->RUN "-z /tmp/foo.*"
-
- See Also:
- RERun, LOAd, Go
- Syntax:
- STEp [n]
- S
-
- The abbreviated forms of the STEP command are STE and S.
- STEP causes the program to execute n statements before breaking.
- If n is not specified, the default is 1.
-
- Examples:
- ->STEP 10 // Execute 10 program instructions.
- ->STE // Execute one instruction only.
- ->S // Execute one instruction only.
- ->S 5 // Execute 5 instructions.
-
- See Also:
- ISTEp, STEp INto, Go, RUN, LOAd
- Syntax:
- SCReen
-
- Displays the user's application output screen when using the
- same display for both debugger and application.
-
- Example:
- ->SCR
- Syntax:
- SET $module_name = filename
-
- SET parameter [ON ]
- [OFF ]
- [number]
- [string]
-
- The first form of the command associates the specified file
- to the specified module name. The specified file is treated as the
- source listing file for the specified module.
- SET is also used to set debugger configuration parameters.
- Valid parameters include BEEP, CODE, CRREPEAT, EDITOR, EGA, FLIP,
- HELPDIR, HOME, KEEPHEAP, MAIN, MLIST, MOUSE, NUMBER, PAUSE, PROLOG,
- RADIX, REEVALUATE, SENSITIVE, SOURCEPATH, SYMBOL, TAB, TANDEM, TEMPDIR,
- and VERIFY. Please see HELP for the SET command of interest (e.g.,
- HELP SET BEEP).
-
- Examples:
- ->SET $MAIN = START.C //Default is MAIN.C
- ->SET $MEMORY = STORAGE.C //Default is MEMORY.C
- ->SET BEEP OFF
-
- See Also:
- SOUrce, DIRectory MODule, SHOw
- Syntax:
- SET BEEp [ON]
- [OFF]
-
- Enables or disables the error beeper. The error beeper is
- enabled by default.
-
- Examples:
- ->SET BEEP ON
- ->SET BEEP OFF
-
- See Also:
- ENV, SHOw
- Syntax:
- SET CODe [ON ]
- [OFF]
-
- Enables or disables hex code display during code disassembly
- for both the source window and the command line. Disabling hex code
- display allows other windows to overlap the right side of the source
- window without completely obscuring useful disassembly information.
-
- Examples:
- ->SET COD ON
- ->SET COD OFF
-
- See Also:
- DASm, SOUrce, SET NUMber, VIEw, SHOw, ENV
- Syntax:
- SET CRRepeat [ON ]
- [OFF]
-
- Enables or disables command repeating on C/R. If enabled,
- the Enter key will repeat the last execution, disassembly, or memory
- display command from the point where the last command left off.
- Otherwise, Enter does nothing. CRRepeat is enabled by default.
-
- Example:
- ->SET CRR ON
-
- See Also:
- ENV, SHOw
- Syntax:
- SET HELpdir directory
-
- Specifies the directory containing the help files.
-
- Examples:
- ->SET HELP /usr/local/debug
-
- See Also:
- HELp, ENV, SHOw
- Syntax:
- SET HOMe [COMmand]
- [SOUrce ]
-
- Sets the default window from which commands are issued and
- to which commands return after execution. COMmand specifies the
- command-line, and SOUrce specifies the source window as the home
- base. The command-line is the default home base, but the default may
- be changed in the environment file.
-
- Examples:
- ->SET HOM SOU // issue commands from the source window
- ->SET HOM COM // issue commands from the command-line
-
- See Also:
- SOUrce, ENV, SHOw
- Syntax:
- SET MAIn [ON ]
- [OFF]
-
- Enables or disables starting at the function main() rather than
- in the start-up initialiaztion code. This is enabled by default.
-
- Examples:
- ->SET MAIN OFF
-
- See Also:
- ENV, SHOw
- Syntax:
- SET MLIst [ON ]
- [OFF]
-
- Causes the macro bodies to be displayed on the console as
- the macros are expanded. The SET MLIST OFF command may be used to
- disable this command. On start up the default is MLIST OFF.
-
- Example:
- ->SET MLI ON
-
- See Also:
- ENV, SHOw, MACro, LISt, INClude
- Syntax:
- SET NUMber [ON ]
- [OFF]
-
- Enables or disables the displaying of line numbers in the
- source window. Line numbers are displayed by default.
-
- Examples:
- ->SET NUM ON
- ->SET NUM OFF
-
- See Also:
- ENV, SHOw, #, VIEw, B, Go
- Syntax:
- SET PAUse [ON]
- [OFF]
-
- Enables or disables the scrolling of the display in the
- dialog window. When PAUse ON is in effect, the display will
- stop if the display lines fill up the dialog window. The display
- will continue to scroll after any key is pressed. PAUse OFF
- turns off the effect such that the display will continue scrolling
- without any pause.
-
- The default is PAUse ON. PAUse OFF is needed if the
- debugging session must be run unattended using a command file.
- PAUse without any parameter will display the current setting.
-
- Examples:
- ->SET PAUse //Displays current setting.
- ->SET PAU OFF //No pause during text scrolling.
-
- See Also:
- ENV, SHOw, WAIt, INClude, LISt
- Syntax:
- SET PROlog [ON ]
- [OFF]
-
- Enables or disables automatic prolog execution. If enabled,
- function prolog code will be automatically executed whenever the function
- is entered via Go or Step. PROLOG is enabled by default.
-
- Example:
- ->SET PRO OFF
-
- See Also:
- ENV, SHOw, Go, Step, B
- Syntax:
- SET RADix [HEXadecimal]
- [DECimal ]
- [OCTal ]
- [BINary ]
-
- Sets the default input radix. Initially, the radix is decimal.
-
- Examples:
- ->SET RAD HEX // Sets radix to hexadecimal
-
- See Also:
- BINary, DECimal, HEX, OCTal, ENV, SHOw
- Syntax:
- SET REEvaluate [ON ]
- [OFF]
-
- Enables or disables expression reevaluation for the EXAmine
- command and the Symbol:Examine window.
-
- If enabled, examined expressions are reevaluated every
- time that the value of an expression may have changed. Otherwise,
- the expressions are evaluated only once and the address of the
- resulting lvalues are watched for a change of contents. By default,
- REEvaluate is OFF.
-
- As an example, consider examining the expression foo[i]
- when i = 3. With REEvaluate ON, when i changes, a different
- element of foo will be displayed. With REEvaluate OFF, a change
- in i will have no effect, and foo[3] will still be displayed.
-
- Examples:
- ->SET REEVAL ON // reevaluate watched lvalues
-
- See Also:
- ENV, SHOw, EXAmine
- Syntax:
- SET SENsitive [ON ]
- [OFF]
-
- Enables or disables case sensitivity in matching symbol names.
- If SENsitive is off, symbolic reference will be case insensitive. If
- SENsitive is on, symbolic reference will be case sensitive. The default
- setting is SENsitive OFF.
-
- Examples:
- ->SET SEN ON //Makes symbolic reference case sensitive.
- ->SET SEN OFF //Makes symbolic reference case insensitive.
-
- See Also:
- ?, SYMbol, ENV, SHOw
- Syntax:
- SET SOUrcepath [=] [[drive:]path [; [drive:]path]...]
-
- Sets the search path for source files. Source files are always
- searched for in the current directory first. A semicolon may be used
- to separate the directories.
-
- Examples:
- ->SET SOU c:\proj1\src;d:\proj2\src
-
- See Also:
- SOUrce, DIRectory MODule, SET, ENV, SHOw
- Syntax:
- SET SYMbol [ON ]
- [OFF]
-
- Enables or disables the display of symbolic addresses in
- disassembly listings. The default is SYMbol ON.
-
- Examples:
- ->SET SYM ON
-
- See Also:
- DASm, VIEw, ENV, SHOw
- Syntax:
- SET TAB size
-
- Sets tab-stops for source in the Source window. The default is
- 4.
-
- Examples:
- ->SET TAB 8
-
- See Also:
- SOUrce, ENV, SHOw
- Syntax:
- SET TEMpdir directory
-
- Specifies the directory used for storage of temporary files.
-
- Examples:
- ->SET TEMP c:\tmp
-
- See Also:
- ENV, SHOw
- Syntax:
- SET VERify [ON ]
- [OFF]
-
- Enables or disables the verification of memory segment accesses.
-
- Examples:
- ->SET VER ON
- ->SET VER OFF
-
- See Also:
- BYTe, CHAr, WORd, DWOrd, FLOat, DOUble, QWOrd, POInter, TREal,
- ENV, SHOw
- Syntax:
- SHOw [parameter]
-
- Shows the current status of configuration parameters. If no
- parameter is specified, SHOW will list the values of all configuration
- parameters. Valid parameters include BEEP, CODE, CRREPEAT, EDITOR, EGA,
- FLIP, HELPDIR, HOME, KEEPHEAP, MAIN, MLIST, MOUSE, NUMBER, PAUSE, PROLOG,
- RADIX, REEVALUATE, SENSITIVE, SOURCEPATH, SYMBOL, TAB, TANDEM, TEMPDIR,
- and VERIFY.
-
- Examples:
- ->SHO
- ->SHOW BEEP
-
- See Also:
- SET, ENV
- Syntax:
- SOUrce [procedure_name]
- [$module_name ]
- ["filename" ]
-
- Enters the source window for the specified procedure, module,
- or file.
-
- Examples:
- ->SOU $MAIN
- ->SOU RFREE
- ->SOU "prog.c"
-
- See Also:
- DIRectory MODule, SET, SPAth, VIEw, NUMber, #
- Syntax:
- STn
-
- where n = 0 to 7.
-
- Displays or updates the 80387 stack elements and the
- corresponding tag words. The value of the stack element is first
- displayed as a treal number. It can be altered by entering a new
- value. A carriage return will preserve the contents. If a carriage
- return is entered, the stack element is once again displayed, but
- this time it is displayed as ten hexadecimal values. It can be
- altered by entering a new set of ten hexadecimal values. A carriage
- return will preserve the contents. Next, the tag word that
- corresponds to the stack element is displayed. It can be altered by
- entering a new value. A carriage return will preserve the contents.
-
- Examples:
- ->ST4
- ST(4) = 0./ <CR>
- ST(4) = 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H
- / 0F1H,0FFH,0F7H,98H,00H,56H,43H,69H,8AH,7CH
- TAG(4) = 3 / 0
- ->ST3
- ST(3) = 7.8 / 0.0
- TAG(3) = 0 / 3
-
- See Also:
- CW, R387, SW, TW
- Syntax:
- STEp [INto] [n]
- S
-
- The abbreviated forms of the STEP command are STE and S.
- STEp causes the program to execute n statements before halting for
- debugging purposes. If a statement contains a call to a procedure,
- the entire process of procedure entry and procedure return is treated
- as one statement. STEp INto will step into the called procedure.
- If n is not specified, the default is 1, which allows single-statement
- debugging.
-
- Examples:
- ->S 10 // Execute 10 statements and stop.
- ->S // Execute one statement and stop.
- ->S IN // Step into the called procedure.
-
- See Also:
- IStep, Go, B, RUN, LOAd
- Syntax:
- STEp INto [n]
- S INto
-
- The abbreviated forms of the STEP command are STE and S.
- STEP causes the program to execute n statements before halting
- for debugging purposes. If n is not specified, the default is 1,
- which allows single-statement debugging. Calls are stepped into.
-
- Examples:
- ->STEP INTO 10 // Execute 10 statements and stop.
- ->S IN // Execute one statement and stop.
-
- See Also:
- Go, Step, IStep, B, RUN, LOAd
- Syntax:
- STRucture structure_name \{
- {data_type} field_name [, field_name]...
- {<symbol> }
- :
- :
- \}
-
- Defines a data structure.
-
- Example:
- ->STR STRTYP {
- STR>WORD AA, BB, CC
- STR>CHAR *P_TO_CHAR, CHAR_ARRAY[7][8]
- STR>LONG *LL[6], (*FF)[5]
- STR>STR STRTYP *LINK
- STR><AA> ZZ
- STR>}
- ->
-
- See Also:
- DIRectory STRucture, DISplay STRucture, SYMbol, TYPe
- Syntax:
- SW
-
- Displays or changes the value of the 80387 status word. The
- value of the status word is displayed followed by a slash. The
- contents can be altered by entering a new hexadecimal value. A
- carriage return will preserve the contents.
-
- Examples:
- ->SW
- STATUS WORD = 0000H / 1324H
- ->SW
- STATUS WORD = 1324H / <CR>
-
- See Also:
- CW, R387, ST, TW
- Syntax:
- SWItch expression
- CASe constant_expression :
- [command]
- :
- [CASe constant_expression : ]
- [command]
- :
- [DEFault : ]
- [command]
- :
- ESWitch
-
- A multi-way decision maker that tests whether an expression
- matches one of a number of constant values, and branches accordingly.
- If none is matched, control flow is branched to the DEFAULT case.
- After having executed the group of commands associated with the
- matched case, control flow falls through to the next CASE/DEFAULT
- unless a BREAK command is encountered. The BREAK command causes an
- immediate exit from the SWITCH.
-
- Examples:
- ->MACRO TEST1 //Define a macro.
- MD>SWITCH A
- MD> CASE 0 :
- MD> B = 10
- MD> BREAK
- MD> CASE 1 :
- MD> B = B * B
- MD> BREAK
- MD> DEFAULT:
- MD> STEP 5
- MD>ESWITCH
- MD>EMACRO
- ->
-
- See Also:
- ESWitch, IF, FOR, WHIle, REPeat, MACro, INClude
- Syntax:
- SYMbol [GLObal ]
- [LOCal ]
- [$module_name]
- [symbol_name ]
- [address ]
- ["reg_exp" ]
-
- Displays symbol declarations and controls the display of
- symbols in disassembly. If GLOBAL is specified, only the global
- symbols are displayed. Likewise, if LOCal is specified, only
- the currently active local symbols are displayed.
-
- If a module name is specified, the symbols belonging to
- the specified module are displayed. If a symbol name is specified,
- the declaration for that symbol is displayed.
-
- If an address is specified, the global symbol with the
- closest matching address is displayed. If a string is specified,
- the symbols matching the regular expression in quotes will be
- displayed.
-
- Examples:
- ->SYMBOL
- ->SYM GLO
- ->SYM LOC
- ->SYM $MODULE_AA
- ->SYM main
- ->SYM CS:100H
- ->SYM "i38[67]"
-
- See Also:
- ?, TYPe, STRucture
- Syntax:
- TIMe
-
- Displays the current time and date.
-
- Example:
- ->TIME
- Syntax:
- TRAce [ON ]
- [OFF]
-
- Enables or disables data collection in the trace buffer
- during program execution.
-
- Examples:
- ->TRA
- ->TRA ON
- ->TRA OFF
-
- See Also:
- DISplay TRAce
- Syntax:
- TREal [address] [= expression [, expression]...]
- [[TO] address [= expression ]]
- [LENgth n [= expression ]]
-
- Displays or alters memory contents in treal scope. The
- base of two addresses that define an address range must be the same.
- For example, TREAL 200:40 TO 300:300 is invalid.
-
- Examples:
- ->TRE 40
- ->TREAL 100:40 TO 100:200
- ->TRE &REAL LENGTH 20
- ->TREAL DS:SI = 8.8, 3.5+1, 0.0
- ->TRE pointer_to_treal LEN 100 = 0:0
-
- See Also:
- FLOat, DOUble
- Syntax:
- TYPe {data_type} symbol [, symbol]... [AT address]
- {<symbol> }
-
- Declares or redefines symbols. The data type can be BYTe,
- CHAr, WORd, SHOrt, DWOrd, LONg, INTeger, FLOat, DOUble, TREal,
- or a STRuct. Note that QWOrd is not supported in this command.
-
- The <...> construct can be used to declare the variable to be
- of the same type as the variable enclosed in the <...> pair.
-
- If no AT address is specified, the symbol uses internal debugger memory.
-
- If a POInter is declared, the size of offset, 16-bit or 32-bit, depends
- on the setting of the USE or WIDth command.
-
- Examples:
- ->TYPE long *ptr_to_long, long_buf[8] at &buf
- ->TYPE CHAR CH1, CH2[3][4], (*CH3)[7]
- ->TYPE struct str_aa str1, *str2, str3[7] at &str_buf
- ->TYPE <yy> xx AT 200:10
- ->type char $m##pro#a, ##pp#b, #c at 8:9
-
- See Also:
- SYMbol, STRucture
- Syntax:
- TW
-
- Displays or changes the value of the 80387 tag word. The
- value of the tag word is displayed followed by a slash. The contents
- can be altered by entering a new hexadecimal value. A carriage return
- will preserve the contents.
-
- Examples:
- ->TW
- TAG WORD = 0000H / 0FFFFH
- ->TW
- TAG WORD = FFFFH / <CR>
-
- See Also:
- CW, R387, ST, SW
- Syntax:
- U [addr1 [TO addr2]] [MIX]
- [LENgth n]
-
- Displays a block of memory in 80386 assembly mnemonic form.
- The MIX qualifier causes source to be mixed in with the disassembly
- display. This command is identical to the DASM command.
-
- Examples:
- ->U //Default address is CS:EIP
- ->U CS:(EIP+5) MIX
- ->U &MAIN LEN 20
-
- See Also:
- VIEw, SOUrce, USE
- Syntax:
- REPeat [n]
- [command]
- :
- UNTil expression
-
- The UNTil command is used to terminate a REPeat loop.
-
- Example:
- ->MACRO test1 //Define a macro that
- MD>REPEAT %0 //at most repeats %0 times.
- MD>A1 = A1 / 2.
- MD>B = ROUTINE( A ) //Call routine, return value to B
- MD>UNTIL B == %1 //Break if B equals to %1
- MD>EMACRO
- ->
-
- See Also:
- REPeat, WHIle, FOR, IF
- Syntax:
- UP [n]
-
- Walks up the call stack allowing access to the source and
- local variables of any active procedure. If no argument is specified,
- the stack is walked up one level.
-
- If any execution command or command that directly changes
- the CS:EIP or EBP is given by the user while an UP or DOWN command
- is in effect, a DOWN HOME action is automatically performed before
- the command is executed.
-
- Examples:
- ->UP // walk up one level
- ->UP 3 // walk up three levels
-
- See Also:
- DOWn, CALlstack, SOUrce, SYMbol
- Syntax:
- USE [16]
- [32]
-
- Displays or modifies the default setting for disassembling
- code. This setting causes the debugger to (1) assume 16-bit
- or 32-bit code when disassembling code from linear or physical
- addresses using the DASM command, (2) assume 16-bit or 32-bit offset
- when handling POInter type, (3) assume 16-bit or 32-bit offset when
- a symbol is declared as pointer type using the TYPE command. This
- command is identical to the WIDTH command.
-
- Examples:
- ->USE 16 //Sets to 16-bit code.
- ->USE //Displays the current setting.
-
- See Also:
- DASm, TYPe, STRucture, POInter
- Syntax:
- VERsion
-
- Displays the debugger version number.
-
- Example:
- ->VER
- Syntax:
- VIEw [HL ]
- [ASM]
- [MIX]
-
- Displays or modifies the mode of source line display in
- the source window. HL sets the source window to display high level
- language source statements only. ASM sets the source window to
- display assembly language mnemonics only. MIX sets the source
- window to display high level language source statements interleaved
- with assembly language mnemonics. If no parameter is specified,
- it displays the current display mode of the source window.
-
- Example:
- ->VIEW //Displays current setting.
- ->VIEW MIX //Displays high level source and assembly.
-
- See Also:
- SOUrce, NUMber, #
- Syntax:
- WAIt [message]
-
- Stops command processing and optionally displays a message.
- Pressing any key will resume command processing. The WAIt command
- is useful in command files for demonstrations or interactive automated
- testing.
-
- Examples:
- ->WAIT
- ->WAI "start the target now"
-
- See Also:
- SET PAUse, INClude, WRIte
- Syntax:
- WHIle expression
- [command]
- :
- EWHile
-
- In the WHILE-EWHILE loop command, the expression is
- evaluated first. If it is TRUE (non-zero), the group of commands
- listed between WHILE and EWHILE are executed and the expression
- is evaluated again. This loop is repeated until the expression
- becomes FALSE (zero).
-
- Examples:
- ->MACRO TEST1 //Define a macro.
- MD>WHILE NOT_ZERO
- MD>STEP //Single line.
- MD>NOT_ZERO //Display NOT_ZERO value.
- MD>EWHILE
- MD>EMACRO
- ->
-
- See Also:
- EWHile, REPeat, FOR, IF, SWItch, MACro, INClude
- Syntax:
- WIDth [16]
- [32]
-
- Displays or modifies the default setting for disassembling
- code. The default setting causes the debugger to (1) assume 16-bit
- or 32-bit code when disassembling code from linear or physical
- addresses using the DASM command, (2) assume 16-bit or 32-bit offset
- when handling POInter type, (3) assume 16-bit or 32-bit offset when
- a symbol is declared as pointer type using the TYPE command. This
- command is identical to the USE command.
-
- Examples:
- ->WID 16 //Sets to 16-bit code.
- ->WID //Displays the current setting.
-
- See Also:
- DASm, TYPe, STRucture, POInter
- Syntax:
- WORd [address] [= expression [, expression]...]
- [TO address [= expression ]]
- [LENgth n [= expression ]]
-
- Displays or alters memory contents in word scope. The base
- of two addresses that define an address range must be the same.
- For example, WORD 200:40 TO 300:300 is invalid.
-
- Examples:
- ->WORD 40
- ->WOR 100:40 TO 100:200
- ->WORD pointer_to_word LENGTH 20
- ->WOR DS:SI = 5, 8*6, AX+BX
- ->WORD word_array LEN 100 = 0:0
-
- See Also:
- BYTe, CHAr, DWOrd, FLOat, DOUble, QWOrd, POInter, TREal
- Syntax:
- WRIte { "string" } [, { "string" }]... [TO n]
- {expression} {expression}
-
- Writes strings or values of expressions to the specified
- file n which must have been opened using the OPEN command. Default
- is to the console.
-
- Examples:
- ->WRITE "\tIOPB=", IOPB //"\t" is a tab.
- ->WRITE "\nVALUE OF X IS", X //"\n" is a newline.
- ->WRITE a[6] + *ptr_to_short + struct.a1 to 3
- ->WRITE "a1 = ", a1, "a2 = ", a2, "a3 = ", a3
-
- See Also:
- REAd, OPEn, CLOse, INClude
-