home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c496 / 3.img / VID_HELP.WPK / WVIDEO.HLP
Encoding:
Text File  |  1991-08-20  |  285.8 KB  |  7,269 lines

  1. All help topics must be stored in order of the ASCII collating sequence.
  2. Each topic is identified by a header consisting of a string of 4 colons
  3. followed by the topic name.  Any alphabetic characters must be entered in
  4. upper-case.
  5. ::::BREAK
  6. ┌──────────────────────────────────────────────────────────────────────┐
  7. │ Break                                                                │
  8. │     /Activate    "*" | index_expr | "/" addr_expr                    │
  9. │     /Deactivate  "*" | index_expr | "/" addr_expr                    │
  10. │     [/Set]       addr_expr  [ cmd_list ]                             │
  11. │     /Clear       "*" | index_expr | "/" addr_expr                    │
  12. └──────────────────────────────────────────────────────────────────────┘
  13.  
  14. A break point defines a place in an application where we would like
  15. execution to suspend so that we might examine the current environment.
  16. A break point may be defined by using the /Set qualifier or removed by
  17. using the /Clear qualifier, enabled by using the /Activate qualifier or
  18. disabled by using the /Deactivate qualifier.  Up to 7 break points may
  19. be defined by using the /Set qualifier.  /Set is implied when no other
  20. qualifiers are specified.
  21.  
  22. Example:
  23.    DBG>break/set main_
  24.    DBG>break main_
  25.  
  26. In the above example, two equivalent commands are shown.  A break point
  27. is defined and automatically activated for the memory location defined
  28. by the global symbol main_.  Only one break point may be specified for a
  29. particular location in memory.  A "set" break point is indicated in the
  30. Source and Assembly windows by a left-pointing arrow (L).
  31.  
  32. A break point may also be specified in terms of the module name and line
  33. number.
  34.  
  35. Example:
  36.    DBG>break calendar@36
  37.  
  38. After the command is entered, an arrow (L), indicating a break point,
  39. appears at the start of the line.
  40.  
  41. Line numbers are shown in the Source window.  Source line information
  42. must be available in order to show source line numbers.
  43.  
  44.    1. Either compiler options "d1" or "d2" must have been specified when
  45.       the module was compiled.
  46.    2. The "debug lines" or "debug all" linker option must have preceded
  47.       the name of the object file containing the module when the
  48.       application was linked.
  49.  
  50. The module name need not be specified when it is the current module
  51. under examination.
  52.  
  53. Example:
  54.    DBG>break @36
  55.  
  56. A break point may also be set or cleared with the mouse.  To set a break
  57. point, double-click the mouse on the desired source line or assembly
  58. line.  A subsequent double-click on the same line will clear the break.
  59.  
  60. When the thread of execution encounters an active break point,
  61. application execution will suspend and the debugger is entered.  If one
  62. or more debugger commands were specified when the break point was
  63. defined, the debugger commands are executed first.  The command list
  64. that follows the address expression in the Break/Set command is defined
  65. as follows:
  66.  
  67.    cmd_list ::= "{" [cmd] { ";" [cmd] } "}"
  68.  
  69. This is simply a VIDEO command line placed inside of braces.
  70.  
  71. Notes:
  72.  
  73.    1. Execution of the application may be resumed if one of the commands
  74.       was a Go command; otherwise the debugger prompts the user for a
  75.       new command.
  76.  
  77.       Example:
  78.          DBG>do look_count = 0
  79.          DBG>break/set lookup { do look_count++; go/keep }
  80.  
  81.       Each time the "lookup" routine is entered, the debugger will
  82.       increment the user-defined variable look_count and resume
  83.       execution (keeping any user-defined temporary break point).  When
  84.       execution of the application terminates, the current value of
  85.       look_count may be examined with the Print command to determine how
  86.       many times the "lookup" routine was executed.
  87.  
  88.    2. If no arguments are specified to the Break command, the currently
  89.       defined break points will be displayed.  The first one shown is
  90.       break point number 1, the second one shown is break point number
  91.       2, and so on.  These are called the break point indices.  Active
  92.       break points are shown in "active" attributes, inactive ones are
  93.       shown in "plain" attributes.  See the description of the Paint
  94.       command for a discussion of attributes.
  95.  
  96.    3. When activating, deactivating or clearing a break point, either
  97.       the break point index or the address must be specified.  If "*" is
  98.       specified as the break point index then all break points are
  99.       affected.
  100.  
  101.       Example:
  102.          DBG>break/set main_; break/deactivate 1
  103.          DBG>break/set main_; break/deactivate /main_
  104.  
  105.       In both examples, a break point is set and then a break point is
  106.       deactivated.  In the first example, the break point set for
  107.       "main_" is deactivated only if no other break points have been set
  108.       (since it will then be break point number 1).  The second example
  109.       illustrates how the break point for main_ will be deactivated
  110.       under any circumstances.
  111.  
  112.       Example:
  113.          DBG>break/activate 2; break/deactivate 1
  114.  
  115.       Breakpoint number 2 is activated and 1 is deactivated.
  116.  
  117.    4. The specified address need not be the name of a symbol or module
  118.       name and line number.
  119.  
  120.       Example:
  121.          DBG>break es:di
  122.  
  123.       A break point is set for the location specified by the contents of
  124.       the ES:DI register pair.
  125.  
  126.       Example:
  127.          DBG>break/deactivate /bx
  128.  
  129.       The break point whose address is specified by the contents of the
  130.       CS:BX register pair is deactivated.
  131.  
  132.    5. The specified address can be "." which corresponds to the line of
  133.       source code or assembly code most recently examined.
  134.  
  135.       After the command is entered, an arrow (L), indicating a break
  136.       point, appears at the start of the line.
  137.  
  138.    6. All break points may be removed in a single command.
  139.  
  140.       Example:
  141.          DBG>break/clear *
  142.  
  143.       The asterisk refers to all break points.
  144. ::::CALL
  145. ┌──────────────────────────────────────────────────────────────────────┐
  146. │ Call [/Far | /Interrupt | /Near]                                     │
  147. │         start_addr_expr [ "(" [arg_list] ")" [ "/" | print_list ] ]  │
  148. └──────────────────────────────────────────────────────────────────────┘
  149.  
  150. The Call command may be used to call any routine present in the system.
  151. The user specifies a starting address expression for the routine that is
  152. to be called.  The expression must evaluate to the segment and offset of
  153. the routine to be called.  The routine may be one of three types:
  154.  
  155.    /Far start_addr_expr ["(" [arg_list] ")" [ "/" | print_list ]]
  156.  
  157.        A "far" routine is one that eventually returns to its caller by
  158.        using a "far return" instruction (RETF).  In 16-bit mode, a
  159.        32-bit return address (segment and offset) is placed on the stack
  160.        by the debugger so that the routine will return to the debugger.
  161.        In 32-bit mode, a 64-bit return address (segment and offset) is
  162.        placed on the stack by the debugger so that the routine will
  163.        return to the debugger.  The "far" call and return mechanism is
  164.        used in the big code models (medium, large, and huge).
  165.  
  166.    /Interrupt start_addr_expr ["(" [arg_list] ")" [ "/" | print_list ]]
  167.  
  168.        An "interrupt" routine is one that eventually returns to its
  169.        caller by using an interrupt return instruction (IRET, IRETD).
  170.        In 16-bit mode, a 32-bit return address (segment and offset) and
  171.        the current contents of the flags register are placed on the
  172.        stack by the debugger so that the interrupt routine will return
  173.        to the debugger.  In 32-bit mode, a 64-bit return address
  174.        (segment and offset) and the current contents of the flags
  175.        register are placed on the stack by the debugger so that the
  176.        interrupt routine will return to the debugger.  Note that an
  177.        interrupt routine is called by its address, not an interrupt
  178.        number.
  179.  
  180.    /Near start_addr_expr ["(" [arg_list] ")" [ "/" | print_list ]]
  181.        A "near" routine is one that eventually returns to its caller by
  182.        using a "near return" instruction (RET).  In 16-bit mode, a
  183.        16-bit return address (offset) is placed on the stack by the
  184.        debugger so that the routine will return to the debugger.  In
  185.        32-bit mode, a 32-bit return address (offset) is placed on the
  186.        stack by the debugger so that the routine will return to the
  187.        debugger.  The "near" call and return mechanism is used in the
  188.        small code models (small, compact, flat).
  189.  
  190.  
  191. Call Argument List
  192. ──────────────────
  193. An argument list may be specified for the routine to be invoked.  If one
  194. is specified, it takes the following form:
  195.  
  196.    arg_list ::= [ arg_expr { "," arg_expr } ]
  197.  
  198.    arg_expr ::= [ "/"reg_name | "/"reg_aggregate | "//" ] expr
  199.  
  200. Example:
  201.    DBG>call rtn0( )
  202.    DBG>call rtn1( arg1 )
  203.    DBG>call rtn5( arg1, arg2, arg3, arg4, arg5 )
  204.  
  205. The above examples illustrate how arguments may be specified.  By
  206. default, arguments are passed to the routine using the standard argument
  207. passing convention.  In 16-bit mode, the standard argument passing
  208. convention for 16-bit quantities is:
  209.  
  210. argument 1 passed in register AX
  211.  
  212. argument 2 passed in register DX
  213.  
  214. argument 3 passed in register BX
  215.  
  216. argument 4 passed in register CX
  217.  
  218. argument N passed on the stack (N >= 5).
  219.  
  220. In 32-bit mode, the standard argument passing convention for 32-bit
  221. quantities is:
  222.  
  223. argument 1 passed in register EAX
  224.  
  225. argument 2 passed in register EDX
  226.  
  227. argument 3 passed in register EBX
  228.  
  229. argument 4 passed in register ECX
  230.  
  231. argument N passed on the stack (N >= 5).
  232.  
  233. These defaults may be changed by using the Set Call command.
  234. Alternatively, if you wish to specify a different argument passing
  235. convention then the "/reg_name" (register), "/reg_aggregate" (group of
  236. registers) or "//" (stack) modifiers may be used.
  237.  
  238. Example:
  239.    DBG>call stdrtn(/ax p1,/dx p2,/bx p3,/cx p4,// p5)
  240.            or
  241.    DBG>call stdrtn(/eax p1,/edx p2,/ebx p3,/ecx p4,// p5)
  242.  
  243. The above examples, in effect, illustrate the placement of arguments in
  244. registers and on the stack according to the standard argument passing
  245. conventions for 16-bit and 32-bit modes.
  246.  
  247. Example:
  248.    DBG>call longtostr( /[dx ax] long_arg )
  249.  
  250. The above 16-bit example illustrates that a 32-bit argument can be
  251. passed in a register aggregate.  Register aggregates are described in
  252. the chapter entitled "VIDEO Expression Handling".
  253.  
  254. Example:
  255.    DBG>call printf( //arg1, //arg2, //arg3 )
  256.  
  257. The above example illustrates how to pass all arguments on the stack.
  258. The arguments are pushed onto the stack in a right to left order so that
  259. (preceding the actual call) "arg1" will be on the top of the stack,
  260. "arg2" will be next, and so on.
  261.  
  262. The arguments can be expressions and all expressions are evaluated
  263. before the arguments are assigned to registers or placed on the stack.
  264.  
  265. Example:
  266.    DBG>call rtn( /ax dx+1, /bx ax-cx, /cx 123)
  267.  
  268. The expressions "dx+1", "ax-cx" and "123" are evaluated.  The results of
  269. these expressions are then assigned to the AX, BX and CX registers
  270. respectively.  Note that the results would have been quite different if
  271. 123 had been assigned to the CX register before the expression "ax-cx"
  272. was evaluated.
  273.  
  274. All register contents are preserved by the debugger.  Therefore, neither
  275. the choice of argument passing convention nor the called routine can
  276. permanently change the register contents.  The called routine could,
  277. however, have side effects such as modifying memory locations,
  278. performing input/output, etc.
  279.  
  280.  
  281. Disposition of the Return Value
  282. ───────────────────────────────
  283. One of three possible actions can occur after the called routine returns
  284. to the debugger.
  285.  
  286.    1. By default, the contents of the AX register (16-bit mode) or EAX
  287.       register (32-bit mode), which is returned by the routine, are
  288.       printed in the Dialogue window.  This default may be changed by
  289.       using the Set Call command.
  290.    2. A "/" may be used to indicate that the routine does not return any
  291.       value in which case nothing is printed.
  292.    3. A formatting string and list of expressions may be specified.  The
  293.       syntax of print_list is similar to that of the Print command.  The
  294.       expressions are evaluated and the results printed in the Dialogue
  295.       window.
  296.  
  297. Example:
  298.    DBG>call test1() /
  299.    DBG>call test2( s, t ) ax, bx, cx
  300.    DBG>call test3( a,b,c ){Results were %i,%i,%u}dx,ax,tag
  301.  
  302. In the first line of the above example, the routine does not return any
  303. useful information in the AX register so we suppress the printing of
  304. this register.  In the second line, the contents of the AX, BX and CX
  305. registers are displayed with default formatting.  In the third line, the
  306. contents of the DX and AX registers and the variable "tag" are displayed
  307. using the specified formatting string.  See the description of the Print
  308. command for more information on formatting strings.
  309.  
  310. Suppose that we want to update some of the registers in our current
  311. register set with values returned by the routine that we call.
  312.  
  313. Example:
  314.    DBG>call/far test() _ax=ax, _bx=bx;/ax=_ax;/bx=_bx
  315.  
  316. In the above example, we call the routine "test" using a "far" call.
  317. Since register contents are unaffected by the call, we assign the values
  318. returned in the AX and BX registers to the variables _ax and _bx.
  319. Subsequent debugger commands assign these saved values to the AX and BX
  320. registers in our current register set.  VIDEO allows us to define new
  321. variables simply by specifying a unique name and then assigning a value
  322. to it.
  323.  
  324. In the next example, we illustrate how to call a BIOS routine in 16-bit
  325. "real" mode.
  326.  
  327. Example:
  328.    DBG>c/int %0:(4*0x10) (/ah 3, /bh 0) {ct=%x,rc=%x}cx,dx
  329.  
  330. In the above example, we call the IBM BIOS "Video I/O" interrupt routine
  331. (INT 0x10) to obtain the current cursor type and position (AH=3) for
  332. video page 0 (BH=0).  The % operator yields the segment:offset pair
  333. stored at locations 0:40 through 0:43.  The cursor type is returned in
  334. the "CX" register and the cursor row and column are returned in the "DX"
  335. register; hence we ask the debugger to display the contents of both
  336. registers in hexadecimal format.
  337. ::::COMMAND_FILES
  338. The following sections describe the command files that are provided with
  339. VIDEO.
  340.  
  341. Under DOS or OS/2 systems, you should ensure that the "BINB" directory
  342. of the WATCOM compiler package is included in the PATH environment
  343. variable.  This directory contains the command files provided with
  344. VIDEO.  VIDEO uses the PATH environment variable to locate command
  345. files.
  346.  
  347. Under QNX, the command files provided with VIDEO are usually located in
  348. the "/etc/wvideo" directory.  The search order for command files is as
  349. follows:
  350.  
  351.    1. the current directory,
  352.    2. the paths listed in the WVIDEO_PATH environment variable,
  353.    3. the path listed in the HOME environment variable, and, finally,
  354.    4. the "/etc/wvideo" directory.
  355.  
  356. The INvoke or < command is used to execute the commands within a command
  357. file.  The Set Implicit command can be used to turn automatic command
  358. file invocation "on" or "off".  When it is "on", VIDEO will attempt to
  359. invoke a command file when the command that is entered does not match
  360. one of those in its command set.  For more information on command file
  361. processing, see the description of the INvoke command under the topic
  362. "INVOKE".
  363.  
  364. ───────────────────────────────────────────────────────
  365. Setup for an AutoCAD ADS (or ADI) Application (ads.dbg)
  366. ───────────────────────────────────────────────────────
  367. Syntax: ads <symbol_file_name>
  368.  
  369. Synopsis: This command file sets up a debugging session for an AutoCAD
  370.        ADS (or ADI) application.  The symbolic information is stored in
  371.        "symbol_file_name".  You must make sure that the environment
  372.        variable EXPDEBUG has been set to ADS (or ADI) before starting
  373.        AutoCAD.
  374.  
  375.        Example:
  376.           C>set expdebug=ads
  377.  
  378.        You may have to change two lines in the command file if AutoCAD
  379.        loads the application at some location other than where this
  380.        command file expects (CS=0xA4, DS=0x9C).  Change the following
  381.        statement to the code segment address reported by AutoCAD when it
  382.        loads the ADS (or ADI) application.
  383.  
  384.        Example:
  385.           /_dbg@ads_code = 0xa4
  386.  
  387.        Change the following statement to the data segment address
  388.        reported by AutoCAD when it loads the ADS (or ADI) application.
  389.  
  390.        Example:
  391.           /_dbg@ads_data = 0x9c
  392.  
  393.        Consult the AutoCAD Development System - Programmer's Reference
  394.        for more information on creating ADS applications.
  395.  
  396.  
  397. ──────────────────────────────────────
  398. Create Large Assembly Window (asm.dbg)
  399. ──────────────────────────────────────
  400. Syntax: asm
  401.  
  402. Synopsis: This command file creates an Assembly window that uses most of
  403.        the screen.  The Register window is placed on the right side of
  404.        the screen.  A Stack window is defined but not placed on the
  405.        screen.  Small Source and Dialogue windows are also created.  The
  406.        debugging level is set to "assembly".
  407.  
  408. ─────────────────────────
  409. Break on Count (bcnt.dbg)
  410. ─────────────────────────
  411. Syntax: bcnt <count> <address>
  412.  
  413. Synopsis: This command file is used to break execution after "count"
  414.        iterations at the specified "address".  The break point is
  415.        cleared afterwards.
  416.  
  417. Example: bcnt 1000 StageD
  418.  
  419.        Execution is halted after the routine "StageD" has been called
  420.        1000 times.
  421.  
  422.  
  423. ──────────────────
  424. Break If (bif.dbg)
  425. ──────────────────
  426. Syntax: bif <expr> <address>
  427.  
  428. Synopsis: This command file is used to break execution at the specified
  429.        "address" when "expr" is true (non-zero result).
  430.  
  431. Example: bif {ax == 0} malloc
  432.  
  433.        bif {eax == 0} malloc
  434.  
  435.        Execution is halted whenever the "malloc" routine is called with
  436.        a request for 0 bytes of storage.  Note that the argument is
  437.        passed in register AX in 16-bit mode or EAX in 32-bit mode.
  438.  
  439.  
  440. ──────────────────────────
  441. Count Breaks (cntbrks.dbg)
  442. ──────────────────────────
  443. Syntax: cntbrks <address>
  444.  
  445. Synopsis: Count the number of times <address> is executed.
  446.  
  447. Example: cntbrks StageD
  448.  
  449.        The name of the variable that is created to tabulate the number
  450.        of iterations is displayed on the screen.  This variable can be
  451.        queried at any time with the VIDEO Print command.  When program
  452.        execution is started with the Go command, each break results in
  453.        the message "cnt$xxxx = n" being printed on the program screen.
  454.  
  455. ──────────────────────────────────
  456. Setup Window Colours (colours.dbg)
  457. ──────────────────────────────────
  458. Syntax: colours
  459.  
  460. Synopsis: This command file sets the colours for the various debugger
  461.        windows.  The selection can be tailored to your own needs.  The
  462.        command file is invoked by the start-up "profile.dbg" command
  463.        file whenever the debugger is run on a colour monitor.
  464.  
  465.  
  466. ──────────────────────
  467. Fill Memory (fill.dbg)
  468. ──────────────────────
  469. Syntax: fill <address> <value> <length>
  470.  
  471. Synopsis: This command file may be used to fill a region of memory with
  472.        a specific value.  The starting address to fill is specified by
  473.        <address>.  The byte value to fill with is specified by <value>.
  474.        The number of bytes to fill is specified by <length>.
  475.  
  476. Example: fill es:0 ff 100
  477.  
  478.        Fill 256 bytes of memory starting at ES:0 with the value 0xFF.  A
  479.        radix of 16 is assumed in this example.
  480.  
  481.  
  482. ─────────────────────────────────────────────
  483. Setup for a FoxPro External Routine (fox.dbg)
  484. ─────────────────────────────────────────────
  485. Syntax: fox <symbol_file_name>
  486.  
  487. Synopsis: This command file sets up a debugging session for a FoxPro
  488.        External Routine.  The symbolic information is stored in
  489.        "symbol_file_name".
  490.  
  491.        Make sure that you have coded a call to BreakPoint() in your
  492.        external routine.  This call should be in the first segment.
  493.        When starting VIDEO, specify the "RESERVESYM=nn" option unless
  494.        you are debugging remotely.
  495.  
  496.        Example:
  497.           C>wvideo /reserve=5 foxpro
  498.  
  499. Example: Start the external routine (e.g.,?  hello()).  The call to
  500.        BreakPoint() causes entry into debugger.  To start symbolic
  501.        debugging, enter a command similar to the following:
  502.  
  503.        Example:
  504.           DBG>fox hello.plb
  505.  
  506.        Consult the FoxPro External Routine API document for more
  507.        information on creating FoxPro External Routines.
  508.  
  509.  
  510. ────────────────────────────────────────────
  511. Create Assembly and Source Windows (mix.dbg)
  512. ────────────────────────────────────────────
  513. Syntax: mix
  514.  
  515. Synopsis: This command file creates two evenly-sized Source and Assembly
  516.        windows that use up most of the screen.  The Register window is
  517.        placed on the right side of the screen.  A Stack window is
  518.        defined but not placed on the screen.  A small Dialogue window is
  519.        also created.  The debugging level is set to "mix".
  520.  
  521.  
  522. ───────────────────────────────────────
  523. VIDEO Initialization File (profile.dbg)
  524. ───────────────────────────────────────
  525. Syntax: profile
  526.  
  527. Synopsis: This is the VIDEO initialization file.  It can be customized
  528.        for your own needs.  As distributed, it performs the following
  529.        initialization.
  530.  
  531.           1. The menu bar is turned on.
  532.  
  533.           2. The debugging level is set to "mix" which is source level
  534.              debugging whenever possible and assembly level debugging
  535.              when no source line information is available.
  536.  
  537.           3. The symbol name matching patterns are set to "*", "*_" and
  538.              "_*".
  539.  
  540.           4. Automatic command file invocation is enabled.  Any time an
  541.              unrecognized command is entered, the debugger will try to
  542.              execute a command file with the same name and extension
  543.              "DBG".
  544.  
  545.           5. Radix specifiers for decimal (0n), hexadecimal (0x) and
  546.              octal (0) numbers are defined.
  547.  
  548.           6. Default colours for various windows are set up.
  549.  
  550.           7. Command, Register, Stack, Fpu, Dialogue, Memory and Thread
  551.              window sizes are defined.  Window sizes are based upon the
  552.              number of screen lines that are available on the screen.
  553.  
  554.              The "SRC" command file is invoked to place Source and
  555.              Dialogue windows on the screen.
  556.  
  557.           8. "View", "src", "mix", "asm", and "flip" commands are added
  558.              to the user-definable "User" pop-down menu.  Note that
  559.              "src", "mix" and "asm" are the names of VIDEO command
  560.              files.  For FORTRAN applications, "new;go fmain" is also
  561.              added to the menus.  For C applications, "new;go main" is
  562.              also added to the menus.
  563.  
  564.           9. Function key "F1" is defined such that a press will cause
  565.              the "help" system to be invoked.
  566.  
  567.              Function key "F4" is defined to add and remove the FPU
  568.              window to and from the screen with alternate presses.
  569.  
  570.              Function key "F5" is set to issue a "register -1" command
  571.              when pressed.
  572.  
  573.              Function key "F6" is set to issue a "register +1" command
  574.              when pressed.
  575.  
  576.              Function key "F7" is defined such that a press will cause
  577.              an invocation of the "WIND" command file.  This key cycles
  578.              through different sizes for the Source and Assembly windows
  579.              by using the "SRC", "MIX" and "ASM" command files.
  580.  
  581.              Function key "F8" is defined such that alternate presses
  582.              turn the menu bar on and off.
  583.  
  584.              Function key "F10" is defined to activate menu selection in
  585.              the same way that pressing and releasing the Alt key would.
  586.  
  587.              Function key "Alt/F9" is defined such that a press will
  588.              move the cursor to the Source window.
  589.  
  590.              Function key "Alt/F10" is defined such that a press will
  591.              move the cursor to the Assembly window.
  592.  
  593.           10. Macro hot keys are defined for the Assembly window.  The
  594.              following keys are defined:
  595.  
  596.                 'G' {g}            Resume execution
  597.                 'g' {g dbg$code}   Continue execution to the
  598.                                     currently highlighted line
  599.                 'i' {t/a/i}        Single-shot trace "into"
  600.                 'n' {t/a/n}        Single-shot trace "next"
  601.                 ' ' {t/a/o}        Single-shot trace "over"
  602.                 'b' {b dbg$code}   Set a break point at the
  603.                                     currently highlighted line
  604.                 'c' {b/c/dbg$code} Remove a break point at the
  605.                                     currently highlighted line
  606.  
  607.           11. Macro hot keys are defined for the Source window.  The
  608.              following keys are defined:
  609.  
  610.                 'v' {view}         View the source code for the
  611.                                     current module
  612.                 'G' {g}            Resume execution
  613.                 'g' {g dbg$code}   Continue execution to the
  614.                                     currently highlighted line
  615.                 'i' {t/s/i}        Single-shot trace "into"
  616.                 'n' {t/s/n}        Single-shot trace "next"
  617.                 ' ' {t/s/o}        Single-shot trace "over"
  618.                 'b' {b dbg$code}   Set a break point at the
  619.                                     currently highlighted line
  620.                 'c' {b/c/dbg$code} Remove a break point at the
  621.                                     currently highlighted line
  622.  
  623.           12. Macro hot keys are defined for the FPU window.  The
  624.              following keys are defined:
  625.  
  626.                 'b' {set fpu binary} Set the display mode to
  627.                                     hexadecimal
  628.                 'd' {set fpu decimal} Set the display mode to
  629.                                     decimal
  630.  
  631.           13. For FORTRAN applications, VIDEO will issue a "go fmain"
  632.              command.  Otherwise, if the "main" entry point is defined
  633.              then VIDEO will issue a "go main" command.
  634.  
  635. ─────────────────────────────────────────
  636. Set DOS Memory Control Block (resize.dbg)
  637. ─────────────────────────────────────────
  638. Syntax: resize <new_size>
  639.  
  640. Synopsis: (DOS only) This command file sets the DOS memory control block
  641.        containing the PSP to a new size.  The PSP value is recorded in
  642.        the debugger variable _dbg@dbg$psp.  Before an application
  643.        starts, DOS gives it all of the remaining memory.  Normally, the
  644.        application should return to DOS that portion of memory which it
  645.        does not use.  This command file can be used in the event that
  646.        the application does not return unused memory to DOS and you wish
  647.        to start up a subprocess by using the VIDEO SYSTEM command.  In
  648.        this case, memory must be returned to DOS before a subprocess can
  649.        be started.
  650.  
  651. Example: resize 0x1000
  652.  
  653.        Reset the memory control block containing the current PSP to 64K
  654.        bytes.
  655.  
  656. ┌──────────────────────────────────────────────────────────────────────┐
  657. │ WARNING!  If an incorrect or inappropriate size is specified, the    │
  658. │ computer system could hang.  Too small values will cause erratic     │
  659. │ operation.                                                           │
  660. └──────────────────────────────────────────────────────────────────────┘
  661.  
  662.  
  663. ────────────────────────────────────────
  664. Return from Current Routine (return.dbg)
  665. ────────────────────────────────────────
  666. Syntax: return
  667.  
  668. Synopsis: This command file may be used to return from the current
  669.        routine.  Execution of the application is advanced until a RETURN
  670.        instruction is encountered.  Execution is then advanced by an
  671.        additional instruction in order to return to the calling routine.
  672.  
  673.  
  674. ─────────────────────────────────────
  675. Slow Motion Code Animation (slow.dbg)
  676. ─────────────────────────────────────
  677. Syntax: slow <delay>
  678.  
  679. Synopsis: This command file can be used to perform slow motion execution
  680.        of a program.  The <delay> value must be specified.  The larger
  681.        the value for <delay>, the slower the program will execute.
  682.  
  683. ─────────────────────────────
  684. Save Current Setup (save.dbg)
  685. ─────────────────────────────
  686. Syntax: save
  687.  
  688. Synopsis: Creates a file called setup.dbg which contains the debugger
  689.        commands required to recreate the current debugger configuration.
  690.  
  691.  
  692. ────────────────────────────────────
  693. Create Large Source Window (src.dbg)
  694. ────────────────────────────────────
  695. Syntax: src
  696.  
  697. Synopsis: This command file creates a Source window that uses most of
  698.        the screen.  A small Dialogue window is also created.  Any
  699.        Register or Stack windows are removed from the screen.  The
  700.        Assembly window is hidden under the Dialogue window.  The
  701.        debugging level is set to "source".  The command file is invoked
  702.        by the start-up "profile.dbg" command file.
  703.  
  704.  
  705. ───────────────────────────────────────
  706. Define Function Key Toggle (toggle.dbg)
  707. ───────────────────────────────────────
  708. Syntax: toggle <pfkey_number> <command_string_1> <command_string_2>
  709.  
  710. Synopsis: This command file sets up a PF key to alternate between two
  711.        commands.
  712.  
  713. Example: toggle 10 {set menu on} {set menu off}
  714.  
  715.        Function key "F10" is defined to toggle the menu bar on and off.
  716.  
  717.  
  718. ──────────────────────────────────────
  719. View Output from CALL Command (vc.dbg)
  720. ──────────────────────────────────────
  721. Syntax: vc <call_address_and_arguments>
  722.  
  723. Synopsis: This command file uses the View command to examine the
  724.        standard output from a routine called by the Call command.  The
  725.        file "stdout.tmp" is created.
  726.  
  727. Example: vc DumpTree( HeadNode )
  728.  
  729. ─────────────────────────────────────
  730. View Source Code for Routine (vr.dbg)
  731. ─────────────────────────────────────
  732. Syntax: vr <routine_name>
  733.  
  734. Synopsis: This command file examines the source code for a given routine
  735.        by using the View command.
  736.  
  737. Example: vr main
  738.  
  739.  
  740. ─────────────────────────────────────────────
  741. Window Management Utility Function (wind.dbg)
  742. ─────────────────────────────────────────────
  743. Syntax: wind
  744.  
  745. Synopsis: This command file invokes one of the "SRC", "ASM", or "MIX"
  746.        command files depending on the state of the _dbg@dbg$wind_split
  747.        variable.  It is primarily a utility command file that is invoked
  748.        by other command files or function keys.
  749. ::::C_OPERATORS
  750. VIDEO supports most C operators and includes an additional set of
  751. operators for convenience.  The WATCOM C Language Reference manual
  752. describes many of these operators.
  753.  
  754. The syntax for VIDEO expressions is similar to that of the C programming
  755. language.  Operators are presented in order of precedence, from lowest
  756. to highest.  Operators on the same line have the same priority.
  757.  
  758.                                            Lowest Priority
  759.    Assignment Operators
  760.        =  +=  -=  *=  /=  %=  &=  |=  ^=  <<=  >>=
  761.    Logical Operators
  762.        ||
  763.        &&
  764.    Bit Operators
  765.        |
  766.        ^
  767.        &
  768.    Relational Operators
  769.        ==  !=
  770.        <   <=   <   >=
  771.    Shift Operators
  772.        <<  >>
  773.    Arithmetic Operators
  774.        +  -
  775.        *  /  %
  776.    Unary Operators
  777.        +  -  ~  !  ++  --  &  *  %
  778.        sizeof unary_expr
  779.        sizeof(type_name)
  780.        (type_name) unary_expr
  781.        [type_name] unary_expr
  782.        ?
  783.    Binary Address Operator
  784.        :
  785.                                            Highest Priority
  786.  
  787. Parentheses can be used to order the evaluation of an expression.
  788.  
  789. In addition to the operators listed above, a number of primary
  790. expression operators are supported.  These operators are used in
  791. identifying the object to be operated upon.
  792.  
  793. []     subscripting, substringing
  794.  
  795. ()     function call
  796.  
  797. .      field selection
  798.  
  799. ->     field selection using a pointer
  800.  
  801. The following sections describe the operators presented above.
  802.  
  803. Assignment Operators for the C Grammar
  804. ──────────────────────────────────────
  805.  
  806. =      Assignment:  The value on the right is assigned to the object on
  807.        the left.
  808.  
  809. +=     Additive assignment:  The value of the object on the left is
  810.        augmented by the value on the right.
  811.  
  812. -=     Subtractive assignment:  The value of the object on the left is
  813.        reduced by the value on the right.
  814.  
  815. *=     Multiplicative assignment:  The value of the object on the left
  816.        is multiplied by the value on the right.
  817.  
  818. /=     Division assignment:  The value of the object on the left is
  819.        divided by the value on the right.
  820.  
  821. %=     Modulus assignment:  The object on the left is updated with
  822.        MOD(left,right).  The result is the remainder when the value of
  823.        the object on the left is divided by the value on the right.
  824.  
  825. &=     Bit-wise AND:  The bits in the object on the left are ANDed with
  826.        the bits of the value on the right.
  827.  
  828. |=     Bit-wise inclusive OR:  The bits in the object on the left are
  829.        ORed with the bits of the value on the right.
  830.  
  831. ^=     Bit-wise exclusive OR:  The bits in the object on the left are
  832.        exclusively ORed with the bits of the value on the right.
  833.  
  834. <<=    Left shift:  The bits in the object on the left are shifted to
  835.        the left by the amount of the value on the right.
  836.  
  837. >>=    Right shift:  The bits in the object on the left are shifted to
  838.        the right by the amount of the value on the right.  If the object
  839.        on the left is described as unsigned, the vacated high-order bits
  840.        are zeroed.  If the object on the left is described as signed,
  841.        the sign bit is propagated through the vacated high-order bits.
  842.        VIDEO treats registers as unsigned items.
  843.  
  844. Logical Operators for the C Grammar
  845. ───────────────────────────────────
  846.  
  847. &&     Logical conjunction:  The logical AND of the value on the left
  848.        and the value on the right is produced.  If either of the values
  849.        on the left or right is equal to 0 then the result is 0;
  850.        otherwise the result is 1.
  851.  
  852. ||     Logical inclusive disjunction:  The logical OR of the value on
  853.        the left and the value on the right is produced.  If either of
  854.        the values on the left or right is not equal to 0 then the result
  855.        is 1; otherwise the result is 0.  If the value on the left is not
  856.        equal to 0 then the expression on the right is not evaluated
  857.        (this is known as short-circuit expression evaluation).
  858.  
  859.  
  860. Bit Operators for the C Grammar
  861. ───────────────────────────────
  862.  
  863. &      Bit-wise AND:  The bits of the value on the left and the value on
  864.        the right are ANDed.
  865.  
  866. |      Bit-wise OR:  The bits of the value on the left and the value on
  867.        the right are ORed.
  868.  
  869. ^      Bit-wise exclusive OR:  The bits of the value on the left and the
  870.        value on the right are exclusively ORed.
  871.  
  872.  
  873. Relational Operators for the C Grammar
  874. ──────────────────────────────────────
  875.  
  876. ==     Equal:  If the value on the left is equal to the value on the
  877.        right then the result is 1; otherwise the result is 0.
  878.  
  879. !=     Not equal:  If the value on the left is not equal to the value on
  880.        the right then the result is 1; otherwise the result is 0.
  881.  
  882. <      Less than:  If the value on the left is less than the value on
  883.        the right then the result is 1; otherwise the result is 0.
  884.  
  885. <=     Less than or equal:  If the value on the left is less than or
  886.        equal to the value on the right then the result is 1; otherwise
  887.        the result is 0.
  888.  
  889. >      Greater than:  If the value on the left is greater than the value
  890.        on the right then the result is 1; otherwise the result is 0.
  891.  
  892. >=     Greater than or equal:  If the value on the left is greater than
  893.        or equal to the value on the right then the result is 1;
  894.        otherwise the result is 0.
  895.  
  896. Arithmetic/Logical Shift Operators for the C Grammar
  897. ────────────────────────────────────────────────────
  898.  
  899. <<     Left shift:  The bits of the value on the left are shifted to the
  900.        left by the amount described by the value on the right.
  901.  
  902. >>     Right shift:  The bits of the value on the left are shifted to
  903.        the right by the amount described by the value on the right.  If
  904.        the object on the left is described as unsigned, the vacated
  905.        high-order bits are zeroed.  If the object on the left is
  906.        described as signed, the sign bit is propagated through the
  907.        vacated high-order bits.  VIDEO treats registers as unsigned
  908.        items.
  909.  
  910.  
  911. Binary Arithmetic Operators for the C Grammar
  912. ─────────────────────────────────────────────
  913.  
  914. +      Addition:  The value on the right is added to the value on the
  915.        left.
  916.  
  917. _      Subtraction:  The value on the right is subtracted from the value
  918.        on the left.
  919.  
  920. *      Multiplication:  The value on the left is multiplied by the value
  921.        on the right.
  922.  
  923. /      Division:  The value on the left is divided by the value on the
  924.        right.
  925.  
  926. %      Modulus:  The modulus of the value on the left with respect to
  927.        the value on the right is produced.  The result is the remainder
  928.        when the value on the left is divided by the value on the right.
  929.  
  930.  
  931. Unary Arithmetic Operators for the C Grammar
  932. ────────────────────────────────────────────
  933.  
  934. +      Plus:  The result is the value on the right.
  935.  
  936. _      Minus:  The result is the negation of the value on the right.
  937.  
  938. ~      Bit-wise complement:  The result is the bit-wise complement of
  939.        the value on the right.
  940.  
  941. !      Logical complement:  If the value on the right is equal to 0 then
  942.        the result is 1; otherwise it is 0.
  943.  
  944. ++     Increment:  Both prefix and postfix operators are supported.  If
  945.        the object is on the right, it is pre-incremented by 1 (e.g.,
  946.        ++x).  If the object is on the left, it is post-incremented by 1
  947.        (e.g., x++).
  948.  
  949. _ _    Decrement:  Both prefix and postfix operators are supported.  If
  950.        the object is on the right, it is pre-decremented by 1 (e.g.,
  951.        --x).  If the object is on the left, it is post-decremented by 1
  952.        (e.g., x--).
  953.  
  954. &      Address of:  The result is the address (segment:offset) of the
  955.        object on the right (e.g., &main).
  956.  
  957. *      Points:  The result is the value stored at the location addressed
  958.        by the value on the right (e.g., *(ds:100), *string.loc).  In the
  959.        absence of typing information, the value on the right is treated
  960.        as a pointer into the stack segment and a near pointer is
  961.        produced.
  962.  
  963.                 (SS:00FE) = FFFF
  964.           var:  (SS:0100) = 0152
  965.                 (SS:0102) = 1240
  966.                 (SS:0104) = EEEE
  967.  
  968.        In the following example, memory locations are displayed starting
  969.        at DS:152 for 16-bit mode and at DS:12400152 for 32-bit mode.
  970.  
  971.        Example:
  972.           DBG>examine/byte *100
  973.  
  974. %      Value at address:  The result is the value stored at the location
  975.        addressed by the value on the right (e.g., %(ds:100),
  976.        %string.loc).  In the absence of typing information, the value on
  977.        the right is treated as a pointer into the stack segment and a
  978.        far pointer is produced.
  979.  
  980.                 (SS:00FE) = FFFF
  981.           var:  (SS:0100) = 0152
  982.                 (SS:0102) = 1240
  983.                 (SS:0104) = EEEE
  984.  
  985.        In the following example, memory locations are displayed starting
  986.        at 1240:1052 for 16-bit mode and at EEEE:12400152 for 32-bit
  987.        mode.
  988.  
  989.        Example:
  990.           DBG>examine/byte %100
  991.  
  992.        Note that this operator is not found in the C programming
  993.        language.
  994.  
  995.  
  996. Special Unary Operators for the C Grammar
  997. ─────────────────────────────────────────
  998.  
  999. sizeof unary_expression
  1000.  
  1001.        Example:
  1002.           DBG>print sizeof tyme
  1003.           2 (or 4 in 32-bit mode)
  1004.           DBG>print sizeof *tyme
  1005.           18
  1006.  
  1007. sizeof(type_name)
  1008.  
  1009.        Example:
  1010.           DBG>print sizeof( struct tm )
  1011.           18
  1012.  
  1013. (type_name) unary_expression The type conversion operator (type_name) is
  1014.        used to convert an item from one type to another.  The following
  1015.        describes the syntax of "type_name".
  1016.  
  1017.           type_name ::= type_spec { [ "near" | "far" | "huge" ] "*" }
  1018.           type_spec ::= typedef_name
  1019.                           |   "struct" structure_tag
  1020.                           |   "union"  union_tag
  1021.                           |   "enum"   enum_tag
  1022.                           |   scalar_type { scalar_type }
  1023.           scalar_type ::= "char" | "int" | "float" | "double"
  1024.                           |   "short" | "long" | "signed" | "unsigned"
  1025.  
  1026.        Example:
  1027.           DBG>print (float) 4
  1028.           4.
  1029.           DBG>print (int) 3.1415926
  1030.           3
  1031.  
  1032. [type_name] unary_expression You can force the debugger to treat a
  1033.        memory reference as a particular type of value by using a type
  1034.        coercion operator.  A type specification is placed inside
  1035.        brackets as shown above.  The basic types are char (character, 8
  1036.        bits), short (short integer, 16 bits), long (long integer, 32
  1037.        bits), float (single-precision floating-point, 32 bits), and
  1038.        double (double-precision floating-point, 64 bits).  Unless
  1039.        qualified by the short or long keyword, the int type will be 16
  1040.        bits in 16-bit applications and 32 bits in 32-bit applications
  1041.        (386 and 486 systems).  The character, short integer and long
  1042.        integer types may be treated as signed or unsigned items.  The
  1043.        default for the character type is unsigned.  The default for the
  1044.        integer types is signed.
  1045.  
  1046.        Example:
  1047.           [char]                  (default unsigned)
  1048.           [signed char]
  1049.           [unsigned char]
  1050.           [int]                   (default is signed)
  1051.           [short]                 (default is signed)
  1052.           [short int]             (default is signed)
  1053.           [signed short int]
  1054.           [long]                  (default is signed)
  1055.           [long int]              (default is signed)
  1056.           [signed long]
  1057.           [unsigned long int]
  1058.           [float]
  1059.           [double]
  1060.  
  1061.        Note that it is unnecessary to specify the int keyword when short
  1062.        or long are specified.
  1063.  
  1064. ?      Existence test:  The "?" unary operator may be used to test for
  1065.        the existence of a symbol.
  1066.  
  1067.        Example:
  1068.           DBG>print ?id
  1069.  
  1070.        The result of this expression is 1 if "id" is a symbol known to
  1071.        VIDEO and 0 otherwise.  If the symbol does not exist in the
  1072.        current scope then it must be qualified with its module name.
  1073.        Automatic symbols exist only in the current function.
  1074.  
  1075.  
  1076. Binary Address Operator for the C Grammar
  1077. ─────────────────────────────────────────
  1078.  
  1079. :      Memory locations can be referenced by using the binary ":"
  1080.        operator and a combination of constants, register names, and
  1081.        symbol names.  In the Intel 80x86 architecture, a memory
  1082.        reference requires a segment and offset specification.  A memory
  1083.        reference using the ":" operator takes the following form:
  1084.  
  1085.           segment:offset
  1086.  
  1087.        The elements segment and offset can be expressions.
  1088.  
  1089.        Example:
  1090.           (ES):(DI+100)
  1091.           (SS):(SP-20)
  1092.  
  1093.  
  1094. Primary Expression Operators for the C Grammar
  1095. ──────────────────────────────────────────────
  1096.  
  1097. []     Elements of an array can be identified using subscript
  1098.        expressions.  Consider the following 3-dimensional array defined
  1099.        in the "C" language.
  1100.  
  1101.        Example:
  1102.           char *ProcessorType[2][4][2] =
  1103.               { { { "Intel 8086",   "Intel 8088"  },
  1104.                   { "Intel 80186",  "Intel 80188" },
  1105.                   { "Intel 80286",  "unknown" },
  1106.                   { "Intel 80386",  "unknown" } },
  1107.  
  1108.                 { { "NEC V30",      "NEC V20" },
  1109.                   { "unknown",      "unknown" },
  1110.                   { "unknown",      "unknown" },
  1111.                   { "unknown",      "unknown" } } };
  1112.  
  1113.        This array can be viewed as two layers of rectangular matrices of
  1114.        4 rows by 2 columns.  The array elements are all pointers to
  1115.        string values.
  1116.  
  1117.        By using a subscript expression, specific slices of an array can
  1118.        be displayed.  To see only the values of the first layer, the
  1119.        following command can be issued.
  1120.  
  1121.        Example:
  1122.           DBG>print processortype[0]
  1123.           {[0]={[0]=0x0024, [1]=0x002F},
  1124.            [1]={[0]=0x003A, [1]=0x0046},
  1125.            [2]={[0]=0x0052, [1]=0x005E},
  1126.            [3]={[0]=0x0066, [1]=0x005E}}
  1127.  
  1128.        The values shown are the addresses of the string values.
  1129.  
  1130.        To see only the first row of the first layer, the following
  1131.        command can be issued.
  1132.  
  1133.        Example:
  1134.           DBG>print processortype[0][0]
  1135.           {[0]=0x0024, [1]=0x002F}
  1136.  
  1137.        To see the second row of the first layer, the following command
  1138.        can be issued.
  1139.  
  1140.        Example:
  1141.           DBG>print processortype[0][1]
  1142.           {[0]=0x003A, [1]=0x0046}
  1143.  
  1144.        To see the value of a specific entry in a matrix, all the indices
  1145.        can be specified.
  1146.  
  1147.        Example:
  1148.           DBG>print {%s} processortype[0][0][0]
  1149.           Intel 8086
  1150.           DBG>print {%s} processortype[0][0][1]
  1151.           Intel 8088
  1152.           DBG>print {%s} processortype[0][1][0]
  1153.           Intel 80186
  1154.  
  1155.        In the above examples, we use the "%s" format specifier to
  1156.        display the string values.
  1157.  
  1158. ()     The function call operators appear to the right of a symbol name
  1159.        and identify a function call in an expression.  The parentheses
  1160.        can contain arguments.
  1161.  
  1162.        Example:
  1163.           DBG>print ClearScreen()
  1164.           DBG>print PosCursor( 10, 20 )
  1165.           DBG>print Line( 15, 1, 30, '-', '+', '-' )
  1166.  
  1167. .      The "." operator indicates field selection in a structure.  In
  1168.        the following example, tyme2 is a structure and tm_year is a
  1169.        field in the structure.
  1170.  
  1171.        Example:
  1172.           DBG>print tyme2.tm_year
  1173.  
  1174. ->     The "->" operator indicates field selection when using a pointer
  1175.        to a structure.  In the following example, tyme is the pointer
  1176.        and tm_year is a field in the structure to which it points.
  1177.  
  1178.        Example:
  1179.           DBG>print tyme->tm_year
  1180. ::::DISPLAY
  1181.  
  1182. ┌──────────────────────────────────────────────────────────────────────┐
  1183. │ Display                                                              │
  1184. │     Assembly [status] [title] [window_coord]                         │
  1185. │     Command  [status] [title] [window_coord] [cmd_list]              │
  1186. │     Dialogue [status] [title] [window_coord]                         │
  1187. │     Fpu      [status] [title] [window_coord]                         │
  1188. │     Memory   [status] [title] [window_coord] [mem_loc]               │
  1189. │     Prompt   [status] [title] [line_number]                          │
  1190. │     Register [status] [title] [window_coord]                         │
  1191. │     SOurce   [status] [title] [window_coord]                         │
  1192. │     STack    [status] [title] [window_coord]                         │
  1193. │     Thread   [status] [title] [window_coord]                         │
  1194. └──────────────────────────────────────────────────────────────────────┘
  1195.  
  1196. The Display command is used to create or remove output windows for
  1197. various displays that the debugger can provide.  For each window, you
  1198. may specify a window status, a title, the starting line number of the
  1199. window and, for those windows which may vary in size, the ending line
  1200. number.  VIDEO windows are described under the topic "WINDOWS".
  1201.  
  1202. When no window name is specified then all windows are updated.  This
  1203. command may be used to recreate window displays if the user's
  1204. application has overwritten them.  It may also be used in command lists
  1205. to update the display.
  1206.  
  1207. Window Titles
  1208. ─────────────
  1209. Each window that is created with the Display command may have a title.
  1210. The title is specified by placing a string of characters inside curly
  1211. braces and is formally described as follows:
  1212.  
  1213.    title ::= "{" text "}"
  1214.  
  1215. An asterisk (*) may be specified as part of the string and represents a
  1216. place holder for the current module name.
  1217.  
  1218. Example:
  1219.    DBG>display assembly {Assembly: *}
  1220.  
  1221. In the above example, the Assembly window is given the title "Assembly:
  1222. *".  If the current module name was "hello" then the title would appear
  1223. at the top of the Assembly window as follows:
  1224.  
  1225.    ==| Assembly: hello |======================
  1226.  
  1227. To remove the title from a window, simply specify a pair of empty
  1228. braces.
  1229.  
  1230. Example:
  1231.    DBG>display assembly {}
  1232.  
  1233.  
  1234. Window Placement
  1235. ────────────────
  1236. Starting at the top of the screen, output lines are numbered
  1237. consecutively starting with 1.  Columns are numbered from left to right
  1238. starting with 1.  It is possible to define windows that overlap other
  1239. windows thereby partially obscuring the contents of the overlapped
  1240. window.
  1241.  
  1242. Window coordinates are specified in terms of a top row, a bottom row, a
  1243. left column, and a right column.
  1244.  
  1245.    window_coord ::= [top][","[bottom][","[left][","right]]]
  1246.  
  1247. The top, bottom, left and right items are expressions which are always
  1248. evaluated with a radix of 10, regardless of the current default radix
  1249. for numbers.
  1250.  
  1251. Example:
  1252.    DBG>display assembly 3,20,1,80
  1253.  
  1254. In the above example, the Assembly window is defined to occupy lines 3
  1255. through 20 and columns 1 through 80.
  1256.  
  1257. Example:
  1258.    DBG>display assembly {Assembly: *} 3,20,1,80
  1259.  
  1260. This example is similar to the previous one but a window title is also
  1261. specified.
  1262.  
  1263. Example:
  1264.    DBG>display assembly ,,8,60
  1265.  
  1266. In this example, we redefine the starting and ending columns for the
  1267. Assembly window to be 8 and 60.
  1268.  
  1269.  
  1270. Window Disposition
  1271. ──────────────────
  1272. The disposition of each window that is created with the Display command
  1273. may be specified using one of the following status qualifiers.
  1274.  
  1275. /Open  The window is created and placed on the screen.
  1276.  
  1277.        Example:
  1278.           DBG>dis assembly /open {Asm: *} 13,19,1,71
  1279.  
  1280.        This is the default action when creating a window hence it is not
  1281.        necessary to specify this qualifier.
  1282.  
  1283. /Close A window that is currently on the screen can be removed by
  1284.        specifying the /Close qualifier.  The debugger will not let you
  1285.        remove the Dialogue and Prompt windows but they can be moved to
  1286.        different positions on the screen.
  1287.  
  1288.        Example:
  1289.           DBG>display assembly /close
  1290.  
  1291.        In the above example, the Assembly window is removed from the
  1292.        screen.
  1293.  
  1294.        A window can be created but not placed on the screen.
  1295.  
  1296.        Example:
  1297.           DBG>display fpu /close {FPU} 3,13,1,64
  1298.  
  1299.        It may be placed on the screen at a later time using the Display
  1300.        command and it will not be necessary to respecify the window
  1301.        title or coordinates.
  1302.  
  1303. /Zoom  The window is created and immediately displayed on the screen
  1304.        using the full dimensions of the screen.
  1305.  
  1306.        Example:
  1307.           DBG>display source /zoom
  1308.  
  1309.        If the window is already on the screen then its size will
  1310.        alternate between its defined size and the full dimensions of the
  1311.        screen.
  1312.  
  1313.  
  1314. Window Attributes
  1315. ─────────────────
  1316. Various items in the window are displayed with special attributes.  See
  1317. the description of the Paint command for a discussion of "plain",
  1318. "active", "standout", "title" and "gadget" attributes.
  1319.  
  1320.  
  1321. The Assembly Window
  1322. ───────────────────
  1323. ┌──────────────────────────────────────────────────────────────────────┐
  1324. │ Display Assembly [status] [title] [window_coord]                     │
  1325. └──────────────────────────────────────────────────────────────────────┘
  1326.  
  1327. The debugger displays assembly instructions for the current code
  1328. location in this window.  If the Code Segment and Instruction Pointer
  1329. registers (CS:IP or CS:EIP) point to an instruction visible in the
  1330. Assembly window then the line containing that instruction is displayed
  1331. in "active" attributes.  When examining assembly instructions, one line
  1332. is designated as the current line and is displayed in "standout"
  1333. attributes.  The Source window, if present, is kept synchronized with
  1334. the Assembly window provided that source information is available.
  1335.  
  1336.  
  1337. The Command Window
  1338. ──────────────────
  1339. ┌──────────────────────────────────────────────────────────────────────┐
  1340. │ Display Command [status] [title] [window_coord] [cmd_list]           │
  1341. └──────────────────────────────────────────────────────────────────────┘
  1342.  
  1343. The Command window can be used to display the results of one or more
  1344. commands which you wish to have evaluated each time control returns to
  1345. the debugger.
  1346.  
  1347. The command list that follows the command is defined as follows:
  1348.  
  1349.    cmd_list ::= "{" [cmd] { ";" [cmd] } "}"
  1350.  
  1351. Example:
  1352.    DBG>display command 3, 8 {e es:bx,.+10,10,4; reg}
  1353.  
  1354. The output from commands such as:
  1355.  
  1356. Example:
  1357.    DBG>e es:bx,.+10,10,4
  1358.    DBG>reg
  1359.  
  1360. are normally displayed in other windows.  The list of commands that are
  1361. specified when the Command window is created is executed and the results
  1362. are displayed in the command window.  The commands are re-executed and
  1363. the results are displayed in the Command window whenever:
  1364.  
  1365.    1. the debugger is entered,
  1366.    2. one of the commands Display or Display Command is issued, or
  1367.    3. the Command window is selected (by using the mouse or tab keys).
  1368.  
  1369. This facility provides a mechanism for watching the values of one or
  1370. more variables change (see also the Print /Window command).
  1371.  
  1372.  
  1373. The Dialogue Window
  1374. ───────────────────
  1375. ┌──────────────────────────────────────────────────────────────────────┐
  1376. │ Display Dialogue [status] [title] [window_coord]                     │
  1377. └──────────────────────────────────────────────────────────────────────┘
  1378.  
  1379. By default, the debugger displays responses to commands in this window.
  1380. When one of the other windows is not present on the screen, the output
  1381. normally destined for that window is displayed in the Dialogue window.
  1382.  
  1383.  
  1384. The FPU Window
  1385. ──────────────
  1386. ┌──────────────────────────────────────────────────────────────────────┐
  1387. │ Display Fpu [status] [title] [window_coord]                          │
  1388. └──────────────────────────────────────────────────────────────────────┘
  1389.  
  1390. The contents of the 80x87 numeric data processor (math coprocessor)
  1391. registers and status flags are displayed in this window.  When the
  1392. contents of a register have changed from the last time that the debugger
  1393. was entered, it is displayed in "standout" attributes.
  1394.  
  1395.  
  1396. The Memory Window
  1397. ─────────────────
  1398. ┌──────────────────────────────────────────────────────────────────────┐
  1399. │ Display Memory [status] [title] [window_coord] [mem_loc]             │
  1400. └──────────────────────────────────────────────────────────────────────┘
  1401.  
  1402. A portion of memory is displayed in this window.  When the Memory window
  1403. is active, the currently selected memory location is displayed in
  1404. "active" attributes.  Memory window "hot spots" (e.g., BYTE ) are
  1405. displayed in "standout" attributes.  All other items are displayed in
  1406. "plain" attributes.
  1407.  
  1408. Example:
  1409.    DBG>display memory /open {Low Mem} 3,9,,,ds:36
  1410.  
  1411. In the above example, memory starting at location DS:36 is displayed in
  1412. a Memory window that runs from lines 3 through 9 and columns 1 through
  1413. 80.
  1414.  
  1415. Example:
  1416.    DBG>display memory /close
  1417.  
  1418. In the above example, the Memory window is removed from the screen.
  1419.  
  1420.  
  1421. The Prompt Window
  1422. ─────────────────
  1423. ┌──────────────────────────────────────────────────────────────────────┐
  1424. │ Display Prompt [status] [title] [line_number]                        │
  1425. └──────────────────────────────────────────────────────────────────────┘
  1426.  
  1427. The debugger command input prompt "DBG>" is displayed in a window that
  1428. is one line high.  The prompt window is used to enter command lines.
  1429.  
  1430. In multiple execution thread applications, the "DBG>" prompt is replaced
  1431. by a prompt that indicates the current thread.  The form of the prompt
  1432. is "ddd>" where "ddd" is the thread identification number.
  1433.  
  1434. Example:
  1435.    002>
  1436.  
  1437.  
  1438. The Register Window
  1439. ───────────────────
  1440. ┌──────────────────────────────────────────────────────────────────────┐
  1441. │ Display Register [status] [title] [window_coord]                     │
  1442. └──────────────────────────────────────────────────────────────────────┘
  1443.  
  1444. The current contents of the 80x86 registers are displayed in a window.
  1445. When the contents of a register have changed from the last time that the
  1446. debugger was entered, it is displayed in "standout" attributes.  An
  1447. exception to this rule is the Instruction Pointer (IP, EIP) register
  1448. which is only displayed in "standout" attributes when its value changes
  1449. because some type of branch or call instruction was executed.
  1450.  
  1451. If a register set other than register set 0 is displayed, then the
  1452. register set number is displayed in brackets (e.g., [1]) with "active"
  1453. attributes (see the description of the Register command).
  1454.  
  1455.  
  1456. The Source Window
  1457. ─────────────────
  1458. ┌──────────────────────────────────────────────────────────────────────┐
  1459. │ Display SOurce [status] [title] [window_coord]                       │
  1460. └──────────────────────────────────────────────────────────────────────┘
  1461.  
  1462. If program source code information is available for the current code
  1463. location then it will be displayed in this window.  If the Code Segment
  1464. and Instruction Pointer registers (CS:IP or CS:EIP) point to a source
  1465. line visible in the Source window then the line is displayed in "active"
  1466. attributes.  When examining source code, one line is designated as the
  1467. current line and is displayed in "standout" attributes.  The Assembly
  1468. window, if present, is kept synchronized with the Source window.
  1469.  
  1470.  
  1471. The Stack Window
  1472. ────────────────
  1473. ┌──────────────────────────────────────────────────────────────────────┐
  1474. │ Display STack [status] [title] [window_coord]                        │
  1475. └──────────────────────────────────────────────────────────────────────┘
  1476.  
  1477. A portion of the execution stack is displayed in this window.  If the
  1478. Base Pointer (BP or EBP) register points to a visible byte, word, or
  1479. doubleword on the stack, the byte, word, or doubleword is displayed in
  1480. "standout" attributes.  All other words are displayed in "plain"
  1481. attributes.
  1482.  
  1483.  
  1484. The Thread Window
  1485. ─────────────────
  1486. ┌──────────────────────────────────────────────────────────────────────┐
  1487. │ Display Thread [status] [title] [window_coord]                       │
  1488. └──────────────────────────────────────────────────────────────────────┘
  1489.  
  1490. The Thread window is used to display the identification number, state
  1491. and name of all program execution threads.  Whenever the debugger is
  1492. entered, the currently executing thread is displayed in "active"
  1493. attributes.  The currently selected thread is displayed in "standout"
  1494. attributes.  All other items are displayed in "plain" attributes.
  1495.  
  1496. There are 3 entries in the Thread window.  The first entry is the thread
  1497. identification number or thread ID.  The second entry is the thread
  1498. state which may be one of "runnable" or "frozen".  The third entry is
  1499. the thread name which is applicable to NetWare 386 server tasks only.
  1500.  
  1501. Under DOS or QNX, there is only one execution thread so there is only
  1502. one entry in the Thread window.  Under OS/2 or NetWare 386, there may be
  1503. several execution threads so there may be be several entries in the
  1504. Thread window.
  1505.  
  1506. Example:
  1507.    DBG>display thread /open {Threads} 14,19,20,50
  1508.  
  1509. In the above example, execution thread information is displayed in a
  1510. Thread window that runs from lines 14 through 19 and columns 20 through
  1511. 50.
  1512.  
  1513. Example:
  1514.    DBG>display thread /close
  1515.  
  1516. In the above example, the Thread window is removed from the screen.
  1517. ::::DO
  1518. ┌──────────────────────────────────────────────────────────────────────┐
  1519. │ DO      expr                                                         │
  1520. │ /                                                                    │
  1521. └──────────────────────────────────────────────────────────────────────┘
  1522.  
  1523. The DO or / command evaluates an expression and discards the result.  It
  1524. is useful for assigning new values to registers and variables.  The
  1525. expression expr can involve registers, application variables and
  1526. user-defined variables.  The operations possible are patterned after
  1527. those available in the C and FORTRAN 77 programming languages.
  1528. Expressions are fully discussed in the chapter entitled "VIDEO
  1529. Expression Handling".
  1530.  
  1531. Example:
  1532.    DBG>do ax=1
  1533.    DBG>/ax=1
  1534.  
  1535. The above example illustrates two identical ways to set the contents of
  1536. the AX register to 1.
  1537.  
  1538. Example:
  1539.    DBG>/myvar=di-bx+1
  1540.  
  1541. The variable myvar is defined with the value resulting from subtracting
  1542. the contents of the BX register from the contents of the DI register and
  1543. then adding 1.
  1544.  
  1545. Example:
  1546.    DBG>/oldsi=si++
  1547.  
  1548. The variable oldsi is defined with the current contents of the SI
  1549. register.  The current contents of the SI register are then incremented
  1550. by 1 (the C-like "++" operator increments the value of the variable).
  1551. Variables such as oldsi need not be defined within the application.
  1552. VIDEO permits the dynamic creation of new variables which will only
  1553. exist for the duration of the debug session.  These user-defined
  1554. variables can be used to retain information as we have shown in the
  1555. above example.
  1556. ::::DOS_EXTENDER
  1557. Debugging 32-bit DOS Extender Applications
  1558. ──────────────────────────────────────────
  1559.  
  1560. Introduction
  1561. ────────────
  1562.  
  1563. VIDEO supports debugging of 32-bit applications developed with WATCOM
  1564. C/386, WATCOM FORTRAN 77/386, and assembly language.  A DOS Extender
  1565. must be used to run the application.  The following DOS Extenders are
  1566. supported.
  1567.  
  1568. DOS/4GW
  1569.        a DOS extender from Rational Systems, Inc.  DOS/4GW is a subset
  1570.        of Rational Systems' DOS/4G product.  DOS/4GW is customized for
  1571.        use with WATCOM C/386 and WATCOM FORTRAN 77/386 and is included
  1572.        in these packages.
  1573.  
  1574. OS/386
  1575.        (version 2.1 or later) a DOS Extender from ERGO Computing, Inc.
  1576.  
  1577. 386|DOS-Extender
  1578.        (version 2.2d or later) a DOS Extender from Phar Lap Software,
  1579.        Inc.
  1580.  
  1581.  
  1582. VIDEO Command Line Format for DOS Extenders
  1583. ───────────────────────────────────────────
  1584.  
  1585. The interface between VIDEO and the operating system/DOS Extender is
  1586. contained in a special "trap" file.  The trap file is specified to VIDEO
  1587. using the "TRAP" option.
  1588.  
  1589. ┌──────────────────────────────────────────────────────────────────────┐
  1590. │ WVIDEO /TRap=trap_file[;trap_parm] [:sym_file] file_spec [cmd_line]  │
  1591. └──────────────────────────────────────────────────────────────────────┘
  1592.  
  1593. The TRap option must be specified when debugging applications that
  1594. require a 32-bit DOS Extender.  For convenience, this option can be
  1595. specified through use of the WVIDEO environment variable.
  1596.  
  1597. ┌──────────────────────────────────────────────────────────────────────┐
  1598. │ set WVIDEO=/TRap#trap_file[;trap_parm]                               │
  1599. └──────────────────────────────────────────────────────────────────────┘
  1600.  
  1601. When trap_parm is specified and it contains blank characters, the entire
  1602. parameter must be placed within braces (e.g., /trap=pls;{-minr 128}).
  1603.  
  1604. You must specify the name of one of the DOS Extender "trap" files
  1605. provided with VIDEO.  The file extension defaults to ".TRP".
  1606.  
  1607. RSI.TRP This interface module supports debugging on the local computer
  1608.        system running the Rational Systems, Inc.  "DOS/4GW" DOS extender
  1609.        (which is included in the WATCOM C/386 and WATCOM FORTRAN 77/386
  1610.        packages).  The optional "trap_parm" is ignored.
  1611.  
  1612. ECS.TRP This interface module supports debugging on the local computer
  1613.        system running the ERGO Computing, Inc.  "OS/386" DOS Extender.
  1614.        The optional "trap_parm" is ignored.
  1615.  
  1616. PLS.TRP This interface module supports debugging on the local computer
  1617.        system running the Phar Lap Software, Inc.  386|DOS-Extender.
  1618.        The optional "trap_parm" is passed on to the DOS Extender
  1619.        "RUN386" as command line switches.
  1620.  
  1621. ┌──────────────────────────────────────────────────────────────────────┐
  1622. │ Note:  If you do not specify a trap file, the default trap file      │
  1623. │ "STD.TRP" will be loaded.  This interface module supports debugging  │
  1624. │ on the local computer system running DOS.  No 32-bit DOS Extender    │
  1625. │ debugging is possible.                                               │
  1626. └──────────────────────────────────────────────────────────────────────┘
  1627.  
  1628. The following diagram illustrates how memory might be organized when
  1629. debugging a 32-bit DOS Extender application.
  1630.  
  1631.            |                |
  1632.            |                |
  1633.            +----------------+
  1634.            |                |
  1635.            |      32-bit    |
  1636.            |   Application  |
  1637.    109C4   +----------------+
  1638.            |                |
  1639.            |                |
  1640.            |                |
  1641.     7E6E   +----------------+
  1642.            |  trap handler  |
  1643.            |    ECS.TRP<----|--+
  1644.     7B27   +-------|--------+  |
  1645.            |       |        |  |
  1646.            |     WVIDEO     |  |
  1647.            |                |  |
  1648.     47A4   +----------------+  |
  1649.            |                |  |
  1650.            |     OS/386     |  |
  1651.            |  DOS Extender<-|--+
  1652.            |                |
  1653.     262C   +----------------+
  1654.            |                |
  1655.            |                |
  1656.            |                |
  1657.            |                |
  1658.     0000   +----------------+
  1659.  
  1660.  
  1661. Using the Rational 32-bit DOS Extender
  1662. ──────────────────────────────────────
  1663.  
  1664. When using the Rational Systems, Inc.  DOS extender, the "DOS4GW.EXE"
  1665. file must be located in one of the directories listed in the DOS PATH
  1666. environment variable.  The "DOS4GW.EXE" file will usually be stored in
  1667. the "BIN" directory of the WATCOM compiler package.
  1668.  
  1669. ┌──────────────────────────────────────────────────────────────────────┐
  1670. │ C>WVIDEO/TRap=RSI [:sym_file] file_spec [cmd_line]                   │
  1671. └──────────────────────────────────────────────────────────────────────┘
  1672.  
  1673. The /TRap=RSI option must be specified when debugging applications that
  1674. are to be run under the "DOS/4GW" DOS extender.  The "RSI.TRP" file will
  1675. usually be stored in the "BIN" directory of the WATCOM compiler package.
  1676. You should ensure that this "BIN" directory is included in the DOS PATH
  1677. environment variable.  Otherwise, you must specify the full path name
  1678. for the trap file.
  1679.  
  1680. Example:
  1681.    C>wvideo /trap=rsi hello
  1682.      or
  1683.    C>set wvideo=/trap#rsi
  1684.    C>wvideo hello
  1685.  
  1686.  
  1687. Using the ERGO 32-bit DOS Extender
  1688. ──────────────────────────────────
  1689.  
  1690. When using the ERGO Computing, Inc.  DOS Extender, the "OS386" program
  1691. must be run first.
  1692.  
  1693. ┌──────────────────────────────────────────────────────────────────────┐
  1694. │ C>OS386                                                              │
  1695. │ C>WVIDEO/TRap=ECS [:sym_file] file_spec [cmd_line]                   │
  1696. └──────────────────────────────────────────────────────────────────────┘
  1697.  
  1698. The /TRap=ECS option must be specified when debugging applications that
  1699. are to be run under the "OS386" DOS Extender.  The "ECS.TRP" file will
  1700. usually be stored in the "BIN" directory of the WATCOM compiler package.
  1701. You should ensure that this "BIN" directory is included in the DOS PATH
  1702. environment variable.  Otherwise, you must specify the full path name
  1703. for the trap file.
  1704.  
  1705. Example:
  1706.    C>wvideo /trap=ecs hello
  1707.      or
  1708.    C>set wvideo=/trap#ecs
  1709.    C>wvideo hello
  1710.  
  1711.  
  1712. Using the Phar Lap 32-bit DOS Extender
  1713. ──────────────────────────────────────
  1714.  
  1715. When using the Phar Lap Software, Inc.  DOS Extender, the "RUN386.EXE"
  1716. and "PLSHELP.EXP" files must be located in one of the directories listed
  1717. in the DOS PATH environment variable.
  1718.  
  1719. ┌──────────────────────────────────────────────────────────────────────┐
  1720. │ C>WVIDEO/TRap=PLS[;trap_parm] [:sym_file] file_spec [cmd_line]       │
  1721. └──────────────────────────────────────────────────────────────────────┘
  1722.  
  1723. The /TRap=PLS option must be specified when debugging applications that
  1724. are to be run under the Phar Lap DOS Extender.  The "PLS.TRP" and
  1725. "PLSHELP.EXP" files will usually be stored in the "BIN" directory of the
  1726. WATCOM compiler package.  You should ensure that this "BIN" directory is
  1727. included in the DOS PATH environment variable.  Otherwise, you must
  1728. specify the full path name for the trap file.
  1729.  
  1730. The optional "trap_parm" is passed on to the DOS Extender "RUN386" as
  1731. command line switches.  When trap_parm is specified and it contains
  1732. blank characters, the entire parameter must be placed within braces
  1733. (e.g., /trap=pls;{-minr 128}).
  1734.  
  1735. Example:
  1736.    C>wvideo /trap=pls;{-maxreal 512} hello
  1737.      or
  1738.    C>set wvideo=/trap#pls;{-maxreal 512}
  1739.    C>wvideo hello
  1740. ::::DOS_STARTUP
  1741. ┌──────────────────────────────────────────────────────────────────────┐
  1742. │ WVIDEO [options] [:sym_file] file_spec [cmd_line]                    │
  1743. └──────────────────────────────────────────────────────────────────────┘
  1744.  
  1745. The square brackets [ ] denote items which are optional.
  1746.  
  1747. WVIDEO is the program name for VIDEO.
  1748.  
  1749. options is a list of valid VIDEO options, each preceded by a dash ("-")
  1750.        or a slash ("/").  Options may be specified in any order.
  1751.  
  1752. sym_file is an optional symbolic debugging information file
  1753.        specification.  The specification must be preceded by a colon
  1754.        (":").  For DOS, the syntax of sym_file is:
  1755.  
  1756.        [d:][path]filename[.ext]
  1757.  
  1758.        The default file extension of the symbol file is ".SYM".
  1759.  
  1760.        The symbolic information file can be produced by the WATCOM
  1761.        Linker WLINK or by the WATCOM Strip Utility WSTRIP.
  1762.  
  1763. file_spec is the file name of the file to be loaded into memory.  For
  1764.        DOS, the syntax of file_spec is:
  1765.  
  1766.        [d:][path]filename[.ext]
  1767.  
  1768.        d:     is an optional drive specification such as "A:", "B:",
  1769.               etc.  If not specified, the default drive is assumed.
  1770.  
  1771.        path   is an optional path specification such as "\UTILS\BIN\".
  1772.  
  1773.        filename is the file name of the file to be loaded into memory.
  1774.  
  1775.        ext    is the file extension of the file to be loaded into
  1776.               memory.  A null file extension may be specified by typing
  1777.               the period "." but not the extension.  If no file
  1778.               extension is specified (i.e., both the period and
  1779.               extension are omitted) then VIDEO will attempt to load an
  1780.               executable image file using, in succession, the following
  1781.               extensions.
  1782.  
  1783.               For DOS, the search order is:  .COM, .EXE
  1784.  
  1785.               For the Ergo DOS Extender, the search order is:  .EXP,
  1786.               .PLX, .EXE
  1787.  
  1788.               For the Phar Lap DOS Extender, the search order is:  .EXP,
  1789.               .EXE
  1790.  
  1791.               For NetWare 386, the search order is:  .NLM, .DSK, .LAN
  1792.  
  1793. cmd_line is an optional command line which will be passed on to the
  1794.        application.
  1795.  
  1796. If both drive and path are omitted, VIDEO will first attempt to locate
  1797. the file in the current directory of the default drive.  If this fails,
  1798. VIDEO will search for the file in each path listed in the PATH
  1799. environment string.
  1800.  
  1801. Command Line Options
  1802. ────────────────────
  1803.  
  1804. ┌──────────────────────────────────────────────────────────────────────┐
  1805. │                                                                      │
  1806. │     [/Monochrome | /Color | /Colour | /Ega43 | /Vga50]               │
  1807. │     /Overwrite | /Page | /Swap | /Two                                │
  1808. │     /Checksize=space                                                 │
  1809. │     /Dynamic=space                                                   │
  1810. │     /NOFpu                                                           │
  1811. │     /Invoke=file_spec                                                │
  1812. │     /NOInvoke                                                        │
  1813. │     /NOMouse                                                         │
  1814. │     /Registers=number                                                │
  1815. │     /REMotefiles                                                     │
  1816. │     /REServesym=space                                                │
  1817. │     /NOSNow                                                          │
  1818. │     /NOSymbols                                                       │
  1819. │     /TRap=trap_file[;trap_parm]                                      │
  1820. └──────────────────────────────────────────────────────────────────────┘
  1821.  
  1822. Options may be specified in any order.  Short forms may be specified for
  1823. options and are shown above in capital letters.  If "space" is suffixed
  1824. with the letter "K" then "space" refers to multiples of 1K bytes (1024
  1825. bytes).  If "space" is suffixed with the letter "B" then "space" refers
  1826. to the number of bytes.  If no suffix is specified and "space" is a
  1827. number less than 1000 then "space" is assumed to refer to multiples of
  1828. 1K bytes (1024 bytes); otherwise it refers to the number of bytes.
  1829.  
  1830. Display Selection
  1831.  
  1832. /Monochrome When two display devices are present in the system, this
  1833.        option indicates that the Monochrome display is to be used as the
  1834.        debugger's output device.  This option is used in conjunction
  1835.        with the Two option described below.
  1836.  
  1837. /Color, /Colour When two display devices are present in the system, this
  1838.        option indicates that the Colour display is to be used as the
  1839.        debugger's output device.  This option is used in conjunction
  1840.        with the Two option described below.
  1841.  
  1842. /Ega43 When an Enhanced Graphics Adapter (EGA) is present, 43 lines of
  1843.        output are displayed.
  1844.  
  1845. /Vga50 When an Video Graphics Array (VGA) is present, 50 lines of output
  1846.        are displayed.
  1847.  
  1848. Display Operation Modes
  1849.  
  1850. /Overwrite specifies that the debugger's output can overwrite program
  1851.        output.  In this mode, the application and the debugger are
  1852.        forced to share the same display area.
  1853.  
  1854.        This option may be used to conserve the amount of memory required
  1855.        to run VIDEO.  This option should not be used if you wish to
  1856.        debug a screen-oriented application (e.g., a graphics
  1857.        application) on the same machine.  See the section entitled
  1858.        "Debugging Graphics Applications".
  1859.  
  1860. /Page  specifies that page 0 of screen memory is to be used for the
  1861.        application's screen and that page 1 of screen memory should be
  1862.        used for the debugger's screen.  This option may be selected when
  1863.        using a graphics adapter such as the CGA, EGA or VGA.  Use of the
  1864.        Page option results in faster switching between the application
  1865.        and debugger screens and makes use of the extra screen memory
  1866.        available with the adapter.
  1867.  
  1868.        This option should not be used if you wish to debug a graphics
  1869.        application on the same machine.  See the section entitled
  1870.        "Debugging Graphics Applications".
  1871.  
  1872. /Swap  specifies that the application's screen memory and the debugger's
  1873.        screen memory are to be swapped back and forth using a single
  1874.        page.  The debugger allocates an area in its own data space for
  1875.        the inactive screen.  This reduces the amount of memory available
  1876.        to the application.  It also takes more time to switch between
  1877.        the application and debugger screens.
  1878.  
  1879.        This option MUST be used when debugging a graphics application on
  1880.        the same machine and a second monitor is not available.  See the
  1881.        section entitled "Debugging Graphics Applications".
  1882.  
  1883. /Two   specifies that a second monitor is connected to the system.  If
  1884.        the monitor type (Monochrome, Color, Colour, Ega43, Vga50) is not
  1885.        specified then the monitor that is not currently being used is
  1886.        selected for the debugger's screen.  If the monitor type is
  1887.        specified then the monitor corresponding to that type is used for
  1888.        the debugger's screen.
  1889.  
  1890.        This option should be used when debugging a graphics application
  1891.        on the same machine and a second monitor is available.  See the
  1892.        section entitled "Debugging Graphics Applications".
  1893.  
  1894. The default display operation is as follows:
  1895.  
  1896.    1. If you have a two display system, VIDEO uses both displays with
  1897.       the program output appearing on the active monitor and the
  1898.       debugger output appearing on the alternate monitor.  In other
  1899.       words, the Two option is selected by default.
  1900.    2. If you have one of the CGA, EGA or VGA graphics adapters installed
  1901.       in your system then VIDEO will select the Page option by default.
  1902.    3. Under all other circumstances, VIDEO will select the Swap option
  1903.       by default.
  1904.  
  1905. /Checksize=space specifies the minimum amount of storage, in kilobytes,
  1906.        that VIDEO is to provide to DOS for the purpose of running a
  1907.        program via the debugger's SYstem command (this command is
  1908.        described under the topic "SYSTEM").  This option is useful when
  1909.        the application that is being debugged uses up most or all of
  1910.        available storage, leaving insufficient memory to spawn secondary
  1911.        programs.  In order to provide the requested amount of free memory
  1912.        to DOS, the debugger will checkpoint as much of the application
  1913.        as is required.
  1914.  
  1915.        Checkpointing involves temporarily storing a portion of the
  1916.        memory-resident application on disk and then reusing the part of
  1917.        memory that it occupied for the spawned program.  When the
  1918.        spawned program terminates, the checkpointed part of the
  1919.        application is restored to memory.
  1920.  
  1921.        The default amount is 0K bytes.  In this case, the spawned
  1922.        program may or may not be run depending on how much free storage
  1923.        is available to DOS to run the program.
  1924.  
  1925. ┌──────────────────────────────────────────────────────────────────────┐
  1926. │ WARNING!  If the application being debugged installs one or more     │
  1927. │ interrupt handlers, the use of this option could hang your system.   │
  1928. │ Your system could lock up if the debugger checkpoints a portion of   │
  1929. │ the application's code that contains an interrupt handler.           │
  1930. └──────────────────────────────────────────────────────────────────────┘
  1931.  
  1932. /Dynamic=space specifies the amount of dynamic storage that VIDEO is to
  1933.        reserve for items such as windows, user-defined symbols, etc.
  1934.        The default amount that is set aside is 20480 bytes (20
  1935.        Kilobytes).
  1936.  
  1937. /NOFpu requests that the debugger ignore the presence of a math
  1938.        coprocessor.  No memory will be allocated by the debugger for
  1939.        saving the context of the 80x87 numeric data processor.  Use this
  1940.        option if your application will not use the math coprocessor and
  1941.        you wish to reduce the amount of memory required by the debugger.
  1942.  
  1943. /Invoke=file_spec may be used to specify an alternate name for the
  1944.        debugger command file which is to be automatically invoked at
  1945.        start-up time.  The default file name is "PROFILE.DBG".  VIDEO
  1946.        command files are found in the current directory or one of the
  1947.        directories listed in the DOS PATH environment string.
  1948.  
  1949. /NOInvoke specifies that the default debugger command file is not to be
  1950.        invoked.
  1951.  
  1952. /NOMouse requests that the debugger ignore any attached mouse.  This may
  1953.        be necessary if the program being debugged also uses the mouse
  1954.        and the mouse driver installed on the system does not support two
  1955.        applications sharing the mouse at the same time.  The program
  1956.        "CHKMOUSE.COM" will inform you if the mouse driver supports this
  1957.        function.  To determine the capabilities of your mouse driver,
  1958.        run the CHKMOUSE program at the DOS command prompt.
  1959.  
  1960.        Example:
  1961.           C>chkmouse
  1962.  
  1963.        The program displays a single line telling you that either your
  1964.        mouse driver supports applications sharing the mouse, that it
  1965.        does not support applications sharing the mouse, or that there is
  1966.        no mouse driver installed.  This program is provided with VIDEO.
  1967.  
  1968.        In order to use a mouse, you must install the IBM Mouse Driver
  1969.        program that is supplied with the IBM Mouse.  Alternatively, you
  1970.        may use a mouse and mouse driver that are compatible with the IBM
  1971.        Mouse and IBM Mouse Driver.  The IBM Mouse Driver is installed by
  1972.        running the "MOUSE.COM" program.
  1973.  
  1974.        Example:
  1975.           C>\dos\mouse
  1976.  
  1977. /Registers=number may be used to specify how many register sets to set
  1978.        aside for the recording of register contents.  The default number
  1979.        of register sets is 2.  See the description of the Register
  1980.        command for more information (this command is described under the
  1981.        "REGISTER" topic).
  1982.  
  1983. /REMotefiles may be used in conjunction with the remote debugging
  1984.        capabilities of the debugger.  Remote debugging involves using
  1985.        two personal computers.  One, called the "task machine", is used
  1986.        to run the application; the other, called the "debugger machine",
  1987.        is used to run the debugger.  When REMotefiles is specified, all
  1988.        debugger files (except "trap" files) and application source files
  1989.        are opened on the task machine rather than the debugger machine
  1990.        (if you are doing local debugging, these two machines are
  1991.        actually the same).  The "trap" file must be located on the
  1992.        debugger machine because it contains the code to open files on
  1993.        the task machine.
  1994.  
  1995.        Note that the PATH environment variable on the task machine is
  1996.        always used in locating executable image files.  When REMotefiles
  1997.        is specified, the debugger also uses the task machine's PATH
  1998.        environment variable to locate debugger command files.
  1999.  
  2000. /REServesym=space specifies the amount of space that VIDEO is to reserve
  2001.        for symbolic information obtained through the NEW /SYmbol
  2002.        command.  The default amount that is set aside is 0 bytes.
  2003.  
  2004. /NOSNow requests that VIDEO omit the vertical retrace delay on CGA
  2005.        adapters when writing to video memory directly.  The omission of
  2006.        this delay will speed up display output.
  2007.  
  2008. /NOSymbols requests that VIDEO omit all debugging information when
  2009.        loading an executable image.  Information regarding global and
  2010.        local symbol names, data types, and line numbers is not
  2011.        processed.
  2012.  
  2013. /TRap=trap_file[;trap_parm] may be specified when debugging an
  2014.        application on a remote machine or debugging an application
  2015.        running under a 32-bit DOS extender.  It may also be used to disable
  2016.        the use of 386/486 Debug Registers.  You must specify the name of
  2017.        one of the "trap" files provided with VIDEO.  Under DOS, the file
  2018.        extension defaults to ".TRP".  The "BIN" directory contains the
  2019.        trap files provided with VIDEO.
  2020.  
  2021.        Under DOS, if you do not specify a trap file, the default trap
  2022.        file "STD.TRP" will be loaded.  This interface module supports
  2023.        debugging on the local computer system running DOS.  No remote
  2024.        debugging is possible.
  2025. ::::ERROR
  2026. ┌──────────────────────────────────────────────────────────────────────┐
  2027. │ ERror  text_string | "{" text_string "}"                             │
  2028. └──────────────────────────────────────────────────────────────────────┘
  2029.  
  2030. The Error command may be used to display an error message on the screen
  2031. which requires an acknowledgement.  This command can be used most
  2032. effectively in VIDEO command files.  Currently executing command files
  2033. are terminated when the ERror command is issued.
  2034.  
  2035. Example:
  2036.    DBG>if ~ dbg$fpu {error No 80x87 processor/emulator!}
  2037.  
  2038. The message text is displayed in an Error window.
  2039. ::::EXAMINE
  2040. ┌──────────────────────────────────────────────────────────────────────┐
  2041. │ Examine                                                              │
  2042. │     [/Byte]         exam_data                                        │
  2043. │     /Word           exam_data                                        │
  2044. │     /Dword          exam_data                                        │
  2045. │     /Pointer        exam_data                                        │
  2046. │     /Assembly       addr_data                                        │
  2047. │     /Source         addr_data                                        │
  2048. │     /IOByte         port_data                                        │
  2049. │     /IOWord         port_data                                        │
  2050. │     /IODword        port_data                                        │
  2051. └──────────────────────────────────────────────────────────────────────┘
  2052.  
  2053. The Examine command is used to display the contents of memory and I/O
  2054. ports in one of several different ways.
  2055.  
  2056.  
  2057. Examining Memory as Data
  2058. ────────────────────────
  2059. /Byte exam_data When this qualifier is used, the output from the Examine
  2060.        command is written to the Dialogue window.  The output is
  2061.        formatted into 8-bit values (bytes) using hexadecimal (base 16)
  2062.        notation.  The default qualifier is /Byte.
  2063.  
  2064. /Word exam_data When this qualifier is used, the output from the Examine
  2065.        command is written to the Dialogue window.  The output is
  2066.        formatted into 16-bit values (words) using hexadecimal (base 16)
  2067.        notation.  The most significant byte of each word is shown first.
  2068.  
  2069. /Dword exam_data When this qualifier is used, the output from the
  2070.        Examine command is written to the Dialogue window.  The output is
  2071.        formatted into 32-bit values (doublewords) using hexadecimal
  2072.        (base 16) notation.  The most significant byte of each doubleword
  2073.        is shown first.
  2074.  
  2075. /Pointer exam_data When this qualifier is used, the output from the
  2076.        Examine command is written to the Dialogue window.  The output is
  2077.        formatted into segment/offset pairs (segment:offset) using
  2078.        hexadecimal (base 16) notation.
  2079.  
  2080.    exam_data ::= [start_addr_expr]
  2081.                        [ "," [next_addr_expr]
  2082.                        [ "," [len_expr]
  2083.                        [ "," rpt_expr ] ] ]
  2084.  
  2085. The starting address start_addr_expr is any expression that defines a
  2086. segment and offset of memory to be displayed.  The next address
  2087. next_addr_expr is any expression that defines the next segment and
  2088. offset of memory to be displayed.  The length value len_expr is any
  2089. expression that defines the amount of memory to be displayed.  The
  2090. repetition count rpt_expr may be any expression that defines the number
  2091. of times the command is to be repeated.
  2092.  
  2093. Example:
  2094.    DBG>examine ds:0x0000
  2095.    DBG>examine ds:0x0000,.+0x10,0x10
  2096.  
  2097. The above two examples are equivalent.  Memory is displayed as a
  2098. sequence of bytes starting at the segment defined by the contents of the
  2099. DS register and an offset of 0.
  2100.  
  2101. The default next_addr_expr is defined as the current starting address
  2102. (".") plus 16 (decimal).  The default len_expr is 16 (decimal).
  2103.  
  2104. One of the features of the Examine command is its ability to follow
  2105. linked lists.  This can be illustrated with an example from the C
  2106. programming language.  Imagine that the following structure was defined.
  2107.  
  2108.    typedef struct list_entry
  2109.      {
  2110.        int               entry_number;
  2111.        struct list_entry *next;
  2112.        int               flags;
  2113.        char              *buff_addr;
  2114.      } LIST;
  2115.  
  2116.    extern LIST *listhead;  /* start of linked list */
  2117.  
  2118. The structure definition indicates that the second item in each entry
  2119. points to the next entry in the linked list.  To examine the entries in
  2120. the linked list (in 16-bit mode), the following command could be issued.
  2121.  
  2122. Example:
  2123.    DBG>ex/word *listhead,*(.+2),list_entry
  2124.    2134:0100 0001 013C 0774 8B55
  2125.    2134:013C 0002 011E 0770 8B97
  2126.    2134:011E 0003 0142 0074 8B34
  2127.    2134:0142 0004 0000 0070 8B55
  2128.  
  2129. We use the pointer operator * to indicate memory indirection.  After the
  2130. first line is displayed, the current memory location "." is defined to
  2131. be "2134:0100".  Hence, ".+2" is "2134:0102" and "*(2134:0102)" is
  2132. "013C".  Therefore, the next memory location to be displayed is
  2133. 2134:013C.  Each time the space bar is pressed, the next memory location
  2134. is displayed and the value for "." is updated.
  2135.  
  2136.    1. In the above example, we are using type information when we refer
  2137.       to list_entry.  In order to specify a type name such as this, the
  2138.       "d2" compiler option must have been specified when the module was
  2139.       compiled.
  2140.    2. In addition, the "debug types" or "debug all" linker option must
  2141.       have preceded the name of the object file containing the module
  2142.       when the application was linked.
  2143.  
  2144.  
  2145. Examining Memory as Instructions
  2146. ────────────────────────────────
  2147. /Assembly addr_data When this qualifier is used, the output from the
  2148.        Examine command is written to the Assembly window if one is
  2149.        present on the screen; otherwise output is written to the
  2150.        Dialogue window.  The output is formatted into Intel machine
  2151.        language instructions.  Numeric values are displayed in
  2152.        hexadecimal (base 16) notation.  For any locations that are
  2153.        displayed as "<symbol_name>+offset", the value for "offset" is
  2154.        displayed in the current numeric radix.
  2155.  
  2156. /Source addr_data When this qualifier is used, the output from the
  2157.        Examine command is written to the Source window if one is present
  2158.        on the screen; otherwise output is written to the Dialogue
  2159.        window.  If both line number information and the source file are
  2160.        available then the source lines are displayed.  If only line
  2161.        number information is available then only line numbers are
  2162.        displayed.  If no information is available then no lines will be
  2163.        displayed in the Source window.
  2164.  
  2165.        If present, line number information is extracted from the
  2166.        executable image file.  Source lines are extracted from a source
  2167.        file provided that the file can be located.  For more
  2168.        information, see the description of the Set Source command.
  2169.  
  2170.    addr_data ::= [start_addr_expr] [ "," rpt_expr ]
  2171.  
  2172. The starting address start_addr_expr is any expression that defines a
  2173. segment and offset of memory to be displayed in the form of assembly
  2174. instructions and source lines.  The repetition count rpt_expr may be any
  2175. expression that defines the number of times the command is to be
  2176. repeated.  A positive repetition count is equivalent to that many
  2177. presses of the space bar (next).  A negative repetition count is
  2178. equivalent to that many presses of the "P" key (previous).
  2179.  
  2180. Example:
  2181.    DBG>examine/source main_
  2182.    DBG>e/s main_
  2183.  
  2184. In the above example, two equivalent commands are shown.  The latter is
  2185. simply the short form for the former command.  Source lines
  2186. corresponding to the application entry point main_ are displayed.
  2187.  
  2188. A starting address may also be specified in terms of the module name and
  2189. line number.
  2190.  
  2191. Example:
  2192.    DBG>ex/source calendar@36
  2193.  
  2194. The module name need not be specified when it is the current module
  2195. under examination.
  2196.  
  2197. Example:
  2198.    DBG>ex/source @159
  2199.  
  2200. Line numbers are shown in the Source window.  Source line information
  2201. must be available in order to show source line numbers.
  2202.  
  2203.    1. Either compiler options "d1" or "d2" must have been specified when
  2204.       the module was compiled.
  2205.    2. The "debug lines" or "debug all" linker option must have preceded
  2206.       the name of the object file containing the module when the
  2207.       application was linked.
  2208.  
  2209.  
  2210. Examining Input/Output Ports
  2211. ────────────────────────────
  2212. /IOByte port_data When this qualifier is used, the specified port is
  2213.        read and output from the Examine command is written to the
  2214.        Dialogue window.  The output is formatted into an 8-bit value
  2215.        (byte) using hexadecimal (base 16) notation.
  2216.  
  2217. /IOWord port_data When this qualifier is used, the specified port is
  2218.        read and output from the Examine command is written to the
  2219.        Dialogue window.  The output is formatted into 16-bit values
  2220.        (words) using hexadecimal (base 16) notation.  The most
  2221.        significant byte of each word is shown first.
  2222.  
  2223. /IODword port_data The IODword qualifier is supported on 386 systems or
  2224.        higher.  When this qualifier is used, the specified port is read
  2225.        and output from the Examine command is written to the Dialogue
  2226.        window.  The output is formatted into 32-bit values (doublewords)
  2227.        using hexadecimal (base 16) notation.  The most significant byte
  2228.        of each doubleword is shown first.
  2229.  
  2230.    port_data ::= [start_addr_expr] [ "," rpt_expr ]
  2231.  
  2232. The starting address start_addr_expr is any expression that defines an
  2233. input/output port at which to begin reading data.  The repetition count
  2234. rpt_expr may be any expression that defines the number of times the
  2235. command is to be repeated.  A positive repetition count is equivalent to
  2236. that many presses of the space bar (next).
  2237. ::::F77_OPERATORS
  2238. VIDEO supports most FORTRAN 77 operators and includes an additional set
  2239. of operators for convenience.  The additional operators are patterned
  2240. after those available in the C programming language.
  2241.  
  2242. The grammar that VIDEO supports is close to that of the FORTRAN 77
  2243. language but there are a few instances where space characters must be
  2244. used to clear up any ambiguities.  For example, the expression
  2245.  
  2246.    1.eq.x
  2247.  
  2248. will result in an error since VIDEO will form a floating-point constant
  2249. from the "1." leaving the string "eq.x".  If we introduce a space
  2250. character after the "1" then we clear up the ambiguity.
  2251.  
  2252.    1 .eq.x
  2253.  
  2254. Unlike FORTRAN, the parser in VIDEO treats spaces as significant
  2255. characters.  Thus spaces must not be introduced in the middle of symbol
  2256. names, constants, multi-character operators like .EQ.  or //, etc.
  2257.  
  2258. Operators are presented in order of precedence, from lowest to highest.
  2259. Operators on the same line have the same priority.
  2260.  
  2261.                                            Lowest Priority
  2262.    Assignment Operators
  2263.        =  +=  -=  *=  /=  %=  &=  |=  ^=  <<=  >>=
  2264.    Logical Operators
  2265.        .EQV.  .NEQV.
  2266.        .OR.
  2267.        .AND.
  2268.        .NOT.
  2269.    Bit Operators
  2270.        |
  2271.        ^
  2272.        &
  2273.    Relational Operators
  2274.        .EQ.  .NE.  .LT.  .LE.  .GT.  .GE.
  2275.    Shift and Concatenation Operators
  2276.        <<  >>  //
  2277.    Arithmetic Operators
  2278.        +  -
  2279.        *  /  %
  2280.        ** (unsupported)
  2281.    Unary Operators
  2282.        +  -
  2283.        ~  ++  --  &   *   %
  2284.        [type_name] unary_expr
  2285.        ?
  2286.    Binary Address Operator
  2287.        :
  2288.                                            Highest Priority
  2289.  
  2290. Parentheses can be used to order the evaluation of an expression.
  2291.  
  2292. In addition to the operators listed above, a number of primary
  2293. expression operators are supported.  These operators are used in
  2294. identifying the object to be operated upon.
  2295.  
  2296. ()     subscripting, substringing, or function call
  2297.  
  2298. .      field selection
  2299.  
  2300. ->     field selection using a pointer
  2301.  
  2302. The following built-in functions may be used to convert the specified
  2303. argument to a particular type.
  2304.  
  2305.    INT( )      conversion to integer
  2306.    REAL( )     conversion to real
  2307.    DBLE( )     conversion to double-precision
  2308.    CMPLX( )    conversion to complex
  2309.    DCMPLX( )   conversion to double-precision complex
  2310.  
  2311. The following sections describe the operators presented above.
  2312.  
  2313.  
  2314. Assignment Operators for the FORTRAN Grammar
  2315. ────────────────────────────────────────────
  2316.  
  2317. =      Assignment:  The value on the right is assigned to the object on
  2318.        the left.
  2319.  
  2320. +=     Additive assignment:  The object on the left is augmented by the
  2321.        value on the right.
  2322.  
  2323. -=     Subtractive assignment:  The object on the left is reduced by the
  2324.        value on the right.
  2325.  
  2326. *=     Multiplicative assignment:  The object on the left is multiplied
  2327.        by the value on the right.
  2328.  
  2329. /=     Division assignment:  The object on the left is divided by the
  2330.        value on the right.
  2331.  
  2332. %=     Modulus assignment:  The object on the left is updated with
  2333.        MOD(left,right).  The result is the remainder when the value of
  2334.        the object on the left is divided by the value on the right.
  2335.  
  2336. &=     Bit-wise AND:  The bits in the object on the left are ANDed with
  2337.        the bits of the value on the right.
  2338.  
  2339. |=     Bit-wise inclusive OR:  The bits in the object on the left are
  2340.        ORed with the bits of the value on the right.
  2341.  
  2342. ^=     Bit-wise exclusive OR:  The bits in the object on the left are
  2343.        exclusively ORed with the bits of the value on the right.
  2344.  
  2345. <<=    Left shift:  The bits in the object on the left are shifted to
  2346.        the left by the amount of the value on the right.
  2347.  
  2348. >>=    Right shift:  The bits in the object on the left are shifted to
  2349.        the right by the amount of the value on the right.  If the object
  2350.        on the left is described as unsigned, the vacated high-order bits
  2351.        are zeroed.  If the object on the left is described as signed,
  2352.        the sign bit is propagated through the vacated high-order bits.
  2353.        VIDEO treats registers as unsigned items.
  2354.  
  2355.  
  2356. Logical Operators for the FORTRAN Grammar
  2357. ─────────────────────────────────────────
  2358.  
  2359. .EQV.  Logical equivalence:  The logical equivalence of the value on the
  2360.        left and the value on the right is produced.
  2361.  
  2362. .NEQV. Logical non-equivalence:  The logical non-equivalence of the
  2363.        value on the left and the value on the right is produced.
  2364.  
  2365. .OR.   Logical inclusive disjunction:  The logical OR of the value on
  2366.        the left and the value on the right is produced.
  2367.  
  2368. .AND.  Logical conjunction:  The logical AND of the value on the left
  2369.        and the value on the right is produced.
  2370.  
  2371. .NOT.  Logical negation:  The logical complement of the value on the
  2372.        right is produced.
  2373.  
  2374.  
  2375. Bit Operators for the FORTRAN Grammar
  2376. ─────────────────────────────────────
  2377.  
  2378. |      Bit-wise OR:  The bits of the value on the left and the value on
  2379.        the right are ORed.
  2380.  
  2381. ^      Bit-wise exclusive OR:  The bits of the value on the left and the
  2382.        value on the right are exclusively ORed.
  2383.  
  2384. &      Bit-wise AND:  The bits of the value on the left and the value on
  2385.        the right are ANDed.
  2386.  
  2387.  
  2388. Relational Operators for the FORTRAN Grammar
  2389. ────────────────────────────────────────────
  2390.  
  2391. .EQ.   Equal:  If the value on the left is equal to the value on the
  2392.        right then the result is 1; otherwise the result is 0.
  2393.  
  2394. .NE.   Not equal:  If the value on the left is not equal to the value on
  2395.        the right then the result is 1; otherwise the result is 0.
  2396.  
  2397. .LT.   Less than:  If the value on the left is less than the value on
  2398.        the right then the result is 1; otherwise the result is 0.
  2399.  
  2400. .LE.   Less than or equal:  If the value on the left is less than or
  2401.        equal to the value on the right then the result is 1; otherwise
  2402.        the result is 0.
  2403.  
  2404. .GT.   Greater than:  If the value on the left is greater than the value
  2405.        on the right then the result is 1; otherwise the result is 0.
  2406.  
  2407. .GE.   Greater than or equal:  If the value on the left is greater than
  2408.        or equal to the value on the right then the result is 1;
  2409.        otherwise the result is 0.
  2410.  
  2411.  
  2412. Arithmetic/Logical Shift Operators for the FORTRAN Grammar
  2413. ──────────────────────────────────────────────────────────
  2414.  
  2415. <<     Left shift:  The bits of the value on the left are shifted to the
  2416.        left by the amount described by the value on the right.
  2417.  
  2418. >>     Right shift:  The bits of the value on the left are shifted to
  2419.        the right by the amount described by the value on the right.  If
  2420.        the object on the left is described as unsigned, the vacated
  2421.        high-order bits are zeroed.  If the object on the left is
  2422.        described as signed, the sign bit is propagated through the
  2423.        vacated high-order bits.  VIDEO treats registers as unsigned
  2424.        items.
  2425.  
  2426.  
  2427. Concatenation Operator for the FORTRAN Grammar
  2428. ──────────────────────────────────────────────
  2429.  
  2430. //     String concatenation:  The concatenation of the character string
  2431.        value on the left and right is formed.
  2432.  
  2433.  
  2434. Binary Arithmetic Operators for the FORTRAN Grammar
  2435. ───────────────────────────────────────────────────
  2436.  
  2437. +      Addition:  The value on the right is added to the value on the
  2438.        left.
  2439.  
  2440. _      Subtraction:  The value on the right is subtracted from the value
  2441.        on the left.
  2442.  
  2443. *      Multiplication:  The value on the left is multiplied by the value
  2444.        on the right.
  2445.  
  2446. /      Division:  The value on the left is divided by the value on the
  2447.        right.
  2448.  
  2449. %      Modulus:  The modulus of the value on the left with respect to
  2450.        the value on the right is produced.  The result is the remainder
  2451.        when the value on the left is divided by the value on the right.
  2452.  
  2453. **     Exponentiation:  This operation is not supported by VIDEO.
  2454.  
  2455. Unary Arithmetic Operators for the FORTRAN Grammar
  2456. ──────────────────────────────────────────────────
  2457.  
  2458. +      Plus:  The result is the value on the right.
  2459.  
  2460. _      Minus:  The result is the negation of the value on the right.
  2461.  
  2462. ~      Bit-wise complement:  The result is the bit-wise complement of
  2463.        the value on the right.
  2464.  
  2465. ++     Increment:  Both prefix and postfix operators are supported.  If
  2466.        the object is on the right, it is pre-incremented by 1 (e.g.,
  2467.        ++x).  If the object is on the left, it is post-incremented by 1
  2468.        (e.g., x++).
  2469.  
  2470. _ _    Decrement:  Both prefix and postfix operators are supported.  If
  2471.        the object is on the right, it is pre-decremented by 1 (e.g.,
  2472.        --x).  If the object is on the left, it is post-decremented by 1
  2473.        (e.g., x--).
  2474.  
  2475. &      Address of:  The result is the address (segment:offset) of the
  2476.        object on the right (e.g., &main).
  2477.  
  2478. *      Points:  The result is the value stored at the location addressed
  2479.        by the value on the right (e.g., *(ds:100), *string.loc).  In the
  2480.        absence of typing information, the value on the right is treated
  2481.        as a pointer into the stack segment and a near pointer is
  2482.        produced.
  2483.  
  2484.                 (SS:00FE) = FFFF
  2485.           var:  (SS:0100) = 0152
  2486.                 (SS:0102) = 1240
  2487.                 (SS:0104) = EEEE
  2488.  
  2489.        In the following example, memory locations are displayed starting
  2490.        at DS:152 for 16-bit mode and at DS:12400152 for 32-bit mode.
  2491.  
  2492.        Example:
  2493.           DBG>examine/byte *100
  2494.  
  2495. %      Value at address:  The result is the value stored at the location
  2496.        addressed by the value on the right (e.g., %(ds:100),
  2497.        %string.loc).  In the absence of typing information, the value on
  2498.        the right is treated as a pointer into the stack segment and a
  2499.        far pointer is produced.
  2500.  
  2501.                 (SS:00FE) = FFFF
  2502.           var:  (SS:0100) = 0152
  2503.                 (SS:0102) = 1240
  2504.                 (SS:0104) = EEEE
  2505.  
  2506.        In the following example, memory locations are displayed starting
  2507.        at 1240:0152 for 16-bit mode and at EEEE:12400152 for 32-bit
  2508.        mode.
  2509.  
  2510.        Example:
  2511.           DBG>examine/byte %100
  2512.  
  2513.        Note that this operator is not found in the FORTRAN 77
  2514.        programming language.
  2515.  
  2516.  
  2517. Special Unary Operators for the FORTRAN Grammar
  2518. ───────────────────────────────────────────────
  2519.  
  2520. ?      Existence test:  The "?" unary operator may be used to test for
  2521.        the existence of a symbol.
  2522.  
  2523.        Example:
  2524.           DBG>print ?id
  2525.  
  2526.        The result of this expression is 1 if "id" is a symbol known to
  2527.        VIDEO and 0 otherwise.  If the symbol does not exist in the
  2528.        current scope then it must be qualified with its module name.
  2529.        Automatic symbols exist only in the current subprogram.
  2530.  
  2531.  
  2532. Binary Address Operator for the FORTRAN Grammar
  2533. ───────────────────────────────────────────────
  2534.  
  2535. :      Memory locations can be referenced by using the binary ":"
  2536.        operator and a combination of constants, register names, and
  2537.        symbol names.  In the Intel 80x86 architecture, a memory
  2538.        reference requires a segment and offset specification.  A memory
  2539.        reference using the ":" operator takes the following form:
  2540.  
  2541.           segment:offset
  2542.  
  2543.        The elements segment and offset can be expressions.
  2544.  
  2545.        Example:
  2546.           (ES):(DI+100)
  2547.           (SS):(SP-20)
  2548.  
  2549.  
  2550. Primary Expression Operators for the FORTRAN Grammar
  2551. ────────────────────────────────────────────────────
  2552.  
  2553. ()     Elements of an array can be identified using subscript
  2554.        expressions.
  2555.  
  2556. .      The "." operator indicates field selection in a structure.  This
  2557.        operator is useful in mixed language applications where part of
  2558.        the application is written in the C programming language.  In the
  2559.        following example, tyme2 is a structure and tm_year is a field in
  2560.        the structure.
  2561.  
  2562.        Example:
  2563.           DBG>print tyme2.tm_year
  2564.  
  2565. ->     The "->" operator indicates field selection when using a pointer
  2566.        to a structure.  This operator is useful in mixed language
  2567.        applications where part of the application is written in the C
  2568.        programming language.  In the following example, tyme is the
  2569.        pointer and tm_year is a field in the structure to which it
  2570.        points.
  2571.  
  2572.        Example:
  2573.           DBG>print tyme->tm_year
  2574. ::::FLIP
  2575. ┌──────────────────────────────────────────────────────────────────────┐
  2576. │ Flip  [ ON | OFf ]                                                   │
  2577. └──────────────────────────────────────────────────────────────────────┘
  2578.  
  2579. The Flip command is used to display the application's screen.  Under
  2580. DOS, the "Page" or "Swap" options must have been specified when the
  2581. debugger was invoked.  To return to the VIDEO display screen, any key
  2582. may be pressed or the left mouse button may be clicked.  If neither of
  2583. these options were specified then this form of the command will have no
  2584. effect.
  2585.  
  2586. The "on" and "off" options are used to turn screen switching "on" or
  2587. "off".  By default, VIDEO will switch between the application's screen
  2588. and the debugger's screen (flip on) unless the remote debugging feature
  2589. is used.  To prevent VIDEO from switching between screens, flipping may
  2590. be turned "off".
  2591. ::::GO
  2592. ┌──────────────────────────────────────────────────────────────────────┐
  2593. │ Go         [ start_addr_expr "," ] [ tmp_brk_addr_expr ]             │
  2594. │ Go [/Keep] [ start_addr_expr "," ]                                   │
  2595. └──────────────────────────────────────────────────────────────────────┘
  2596.  
  2597. The Go command is used to start or continue program execution.
  2598. Execution resumes at the specified starting address start_addr_expr or,
  2599. in the absence of one, the location defined by the current contents of
  2600. the CS:IP or CS:EIP register pair.
  2601.  
  2602. If a starting address is specified, it must be followed by a comma.  In
  2603. the following example, VIDEO is instructed to resume execution at the
  2604. start of "rtn1".
  2605.  
  2606. Example:
  2607.    DBG>go rtn1,
  2608.  
  2609. The following example instructs VIDEO to resume execution at the start
  2610. of "rtn1" and also sets a temporary break point at "rtn1+73" so that
  2611. execution is suspended before executing the instruction at "rtn1+73".
  2612.  
  2613. Example:
  2614.    DBG>go rtn1,rtn1+73
  2615.  
  2616. A temporary break point may be specified without a starting address.  A
  2617. temporary break point is similar to a normal break point except that
  2618. only one of them is permitted.  Every time you issue a new Go command,
  2619. the previous temporary break point (if it exists) is discarded unless
  2620. the /Keep sub-command is specified.  If you wish to retain the previous
  2621. temporary break point then you may not specify a new one (since you can
  2622. have only one).
  2623.  
  2624. Example:
  2625.    DBG>go rtn1
  2626.    DBG>go rtn2
  2627.  
  2628. In the above example, the temporary break point at "rtn1" is replaced by
  2629. the temporary break point at "rtn2" when the second Go command is
  2630. issued.
  2631.  
  2632. Example:
  2633.    DBG>go rtn1
  2634.    DBG>go
  2635.  
  2636. In the above example, the temporary break point at "rtn1" is removed
  2637. when the second Go command is issued.
  2638.  
  2639. Example:
  2640.    DBG>go rtn1
  2641.    DBG>go/keep
  2642.  
  2643. In the above example, the temporary break point at "rtn1" is kept when
  2644. the second Go command is issued.
  2645.  
  2646. See the description of the Break command for more information on break
  2647. points.
  2648. ::::HELP
  2649. ┌──────────────────────────────────────────────────────────────────────┐
  2650. │ Help   [topic]                                                       │
  2651. └──────────────────────────────────────────────────────────────────────┘
  2652.  
  2653. The Help command may be used to obtain help on a particular topic.  If
  2654. no topic is specified then a default topic is displayed.  The default
  2655. topic includes a list of topics for which help is available.
  2656.  
  2657. Unique short forms may be specified for the desired topic.
  2658.  
  2659. Example:
  2660.    DBG>help go
  2661.  
  2662. The above example requests help on the VIDEO Go command.
  2663.  
  2664. Help information is displayed in the View window.  Manipulation of this
  2665. window with keys and mouse is described under the topics "KEYS" and
  2666. "MOUSE".
  2667. ::::IF
  2668. ┌──────────────────────────────────────────────────────────────────────┐
  2669. │ IF  expr  if_cmd_list  [ else_cmd_list ]                             │
  2670. └──────────────────────────────────────────────────────────────────────┘
  2671.  
  2672. The specified expression expr is evaluated and if it results in a
  2673. non-zero value then the list of debugger commands contained in
  2674. if_cmd_list is executed; otherwise the list of commands contained in
  2675. else_cmd_list is executed.  The two command lists are separated from one
  2676. another by the use of curly braces ({}).
  2677.  
  2678. Example:
  2679.    DBG>break/set gorun { if x>100 {print{done}}{go/keep} }
  2680.  
  2681. In the above example, a break point will occur each time the "gorun"
  2682. routine is entered.  The IF command is evaluated by the debugger and if
  2683. the result is "true" (i.e., not zero) then the message "done" will be
  2684. printed in the Dialogue window and the debugger will prompt for another
  2685. command; otherwise execution is resumed (keeping any temporary break
  2686. point that we may have specified).
  2687.  
  2688. A command of the sort presented next is very useful in locating a
  2689. problem in an application.  Let us assume that we are trying to discover
  2690. which routine calls our "gorun" routine such that the variable "x" has a
  2691. zero value after the "gorun" routine has executed.  The example assumes
  2692. a 16-bit application.
  2693.  
  2694. Example:
  2695.    DBG>br gorun {br %sp {if x==0 {} {br/cl /.;go/k}}; go/k}
  2696.  
  2697. In the above example, the commands
  2698.  
  2699.    br %sp {if x==0 {} {br/cl /.;go/k}}
  2700.    go/k
  2701.  
  2702. are executed each time the "gorun" routine is entered.  This first
  2703. command defines a break point at the return address of the calling
  2704. routine.  We are assuming that "gorun" was invoked by a "far" call;
  2705. hence the stack top contains a 32-bit segment:offset return address in
  2706. our 16-bit example.  The second command resumes execution of the
  2707. application.  The command
  2708.  
  2709.    if x==0 {} {br/cl /.;go/k}
  2710.  
  2711. is executed each time a return is made to the calling routine.  If the
  2712. value of "x" is zero then no commands are executed and the debugger is
  2713. entered (this may be the error case for which we are searching).
  2714. Otherwise the break point for this location is cleared and execution is
  2715. resumed (keeping any temporary break point that we may have specified).
  2716. ::::INVOKE
  2717. ┌──────────────────────────────────────────────────────────────────────┐
  2718. │ INvoke  cmd_file { parm | "{" parm "}" }                             │
  2719. │ <                                                                    │
  2720. └──────────────────────────────────────────────────────────────────────┘
  2721.  
  2722. The INvoke or < command is used to invoke a file containing a number of
  2723. VIDEO commands.  The file specification cmd_file has an operating system
  2724. dependent form.  For DOS and OS/2, the format is:
  2725.  
  2726.    [d:][path]filename[.ext]
  2727.  
  2728. For QNX, the format is:
  2729.  
  2730.    [//node][path]filename[.ext]
  2731.  
  2732. If no file suffix or extension is specified (i.e., both the period and
  2733. extension are omitted) then the default is ".dbg".
  2734.  
  2735. Under DOS or OS/2, the search order for command files is as follows:
  2736.  
  2737.    1. If only filename or filename.ext are specified, VIDEO will first
  2738.       attempt to locate the file in the current working directory.
  2739.    2. It will then search the paths listed in the PATH environment
  2740.       variable.  You should ensure that the "BINB" directory of the
  2741.       WATCOM compiler package is included in the PATH environment
  2742.       variable.  This directory contains the command files provided with
  2743.       VIDEO.
  2744.  
  2745. Under QNX, the search order for command files is as follows:
  2746.  
  2747.    1. If only filename or filename.ext are specified, VIDEO will first
  2748.       attempt to locate the file in the current working directory.
  2749.    2. the paths listed in the WVIDEO_PATH environment variable,
  2750.    3. the path listed in the HOME environment variable, and, finally,
  2751.    4. the "/etc/wvideo" directory.  The command files provided with
  2752.       VIDEO are usually located in the "/etc/wvideo" directory.
  2753.  
  2754. Parameters may be passed to the command file.  If any of the parameters
  2755. require the use of a semicolon (";") or a space then you should use "{"
  2756. and "}" since the semicolon is interpreted as a command separator and
  2757. the space is interpreted as a parameter separator by VIDEO.
  2758.  
  2759. The parameters are matched up with sequences of <#> in the command file,
  2760. where # is a number from 1 to 9.  The first parameter is substituted for
  2761. every occurrence of <1>, the second for every occurrence of <2>, and so
  2762. on.  Any occurrences of <0> are replaced by a unique integer value which
  2763. is supplied by the debugger each time the file is invoked.  This feature
  2764. permits the creation of unique variables with each invocation of the
  2765. command file.
  2766.  
  2767. A number of command files are provided with VIDEO that provide excellent
  2768. examples of the power and flexibility of command files.
  2769.  
  2770. In the following example, assume that the file "count.dbg" contains the
  2771. following two lines:
  2772.  
  2773.    /cnt_<1>=0
  2774.    break/set <1> {/cnt_<1>++; go/keep}
  2775.  
  2776. If you enter one of the commands:
  2777.  
  2778.    invoke count printf
  2779.    <count printf
  2780.  
  2781. then each appearance of "<1>" is replaced by "printf" and the resultant
  2782. commands are executed.
  2783.  
  2784. Example:
  2785.    DBG>/cnt_printf=0
  2786.    DBG>break/set printf {/cnt_printf++; go/keep}
  2787.  
  2788. Each time the "printf" routine is entered, the debugger will increment
  2789. the user-defined variable cnt_printf and resume execution (keeping any
  2790. temporary break point that we may have specified).  When execution of
  2791. the application terminates, the current value of cnt_printf may be
  2792. examined by using the Print command to determine how many times the
  2793. "printf" routine was executed.
  2794.  
  2795. Example:
  2796.    set pf <1> {
  2797.        if !?_dbg@pf_<1> {/_dbg@pf_<1>=0};
  2798.        if (++_dbg@pf_<1>)&1 {<2>} {<3>}
  2799.    }
  2800.  
  2801. In the above example, taken from "toggle.dbg", three parameters are
  2802. specified to the command file.
  2803.  
  2804. As shown in the previous example, one VIDEO command line may be split
  2805. across several lines of a command file.  A line can be split at an
  2806. opening brace ("{").  To construct the command line, VIDEO will continue
  2807. to read in input lines until the matching closing brace is found ("}").
  2808.  
  2809. For additional information on command files, see also the description of
  2810. the Set Implicit command.
  2811. ::::KEYS
  2812. Window Manipulation with Keys
  2813. ─────────────────────────────
  2814.  
  2815. The window which contains the text cursor is called the "active" window.
  2816. The active window is the window that will respond to keystrokes.  In
  2817. general, keys such as the Cursor Up and Down keys perform similar
  2818. functions in all windows.  The following keys perform identical
  2819. functions in all windows.
  2820.  
  2821. Ctrl/Enter may be used to engage a text selection process which will be
  2822.        concluded by the appearance of the Action window.  When text
  2823.        selection is engaged, a block cursor will appear on the screen.
  2824.        The cursor keys may be used to stretch the block cursor to the
  2825.        left, right, up and down, thereby highlighting a portion of the
  2826.        text visible on the screen.  The Ctrl/Cursor Left and Ctrl/Cursor
  2827.        Right keys extend the block cursor to the left or right by a
  2828.        token at a time.  A second press of the Ctrl/Enter key causes the
  2829.        Action window to pop up on the screen.
  2830.  
  2831. When the "Show source" entry is selected, the source/assembly code
  2832. corresponding to the selected text is displayed in the Source and
  2833. Assembly windows (if present on the screen).
  2834.  
  2835. A line appears in the Dialogue window that indicates the address of the
  2836. previous source/assembly code and the new source/assembly code under
  2837. examination.
  2838.  
  2839. Example:
  2840.    0x65CB:0x0012 => ClearScreen
  2841.  
  2842. You can use this entry to return to the previous location by moving the
  2843. text cursor to the Dialogue window using the Tab keys and highlighting
  2844. the address that is displayed on the left of the "=>" using the
  2845. Ctrl/Enter and cursor keys.  In the above example, this would be the
  2846. entry "0x65CB:0x0012" (the segment and offset of the previous location
  2847. under examination).
  2848.  
  2849. The following keys perform identical functions in all windows except the
  2850. View and Error windows.
  2851.  
  2852. Tab    may be used to move the text cursor to the next window on the
  2853.        screen.
  2854.  
  2855. Shift/Tab (Backtab) may be used to move the text cursor to the previous
  2856.        window on the screen.
  2857.  
  2858. Escape may be used to move directly to the Prompt window.
  2859.  
  2860. Ctrl/D may be used to shift the entire active window down on the screen.
  2861.  
  2862. Ctrl/U combination may be used to shift the entire active window up on
  2863.        the screen.
  2864.  
  2865. Ctrl/P may be used to invoke the Paint menu for the active window.
  2866.  
  2867. The following keys perform identical functions in all windows except the
  2868. Prompt, View and Error windows.
  2869.  
  2870. Ctrl/L may be used to move the active window to the left.
  2871.  
  2872. Ctrl/R may be used to move the active window to the right.
  2873.  
  2874. Ctrl/G may be used to grow the size of the active window.
  2875.  
  2876. Ctrl/S may be used to shrink the size of the active window.
  2877.  
  2878. Ctrl/N may be used to narrow the size of the active window.
  2879.  
  2880. Ctrl/W may be used to widen the size of the active window.
  2881.  
  2882. Ctrl/E may be used to erase the active window from the display.
  2883.  
  2884. Ctrl/Z may be used to zoom the active window between its normal size and
  2885.        the size of the entire screen.
  2886.  
  2887. The following sections describe in detail the responses to various keys
  2888. when a particular window is active.
  2889.  
  2890.  
  2891. Manipulating the Assembly Window with Keys
  2892. ──────────────────────────────────────────
  2893.  
  2894. When the text cursor is positioned in the Assembly window, the Cursor
  2895. Left/Right, Cursor Up/Down, Page Up/Down, Home, End, and Enter keys may
  2896. be used to move about.
  2897.  
  2898. Cursor Left/Right
  2899.        may be used to scroll the text in the window left or right when
  2900.        the cursor moves to the left or right edge of the window.
  2901.  
  2902. Ctrl/Cursor Left/Right
  2903.        may be used to scroll the text in the window left or right
  2904.        without moving the cursor.
  2905.  
  2906. Cursor Up/Down
  2907.        may be used to scroll up and down through assembly instructions.
  2908.  
  2909. Page Up/Down
  2910.        may be used to scroll up and down through assembly instructions
  2911.        in increments of the number of lines in the window minus two.
  2912.  
  2913. Home   may be used to move to the beginning of the current compilation
  2914.        unit.
  2915.  
  2916. End    may be used to move to the end of the current module (compilation
  2917.        unit).
  2918.  
  2919. Enter  may be used to move directly to the assembly instruction
  2920.        referenced by the CS:IP (16-bit mode) or CS:EIP (32-bit mode)
  2921.        register pair.
  2922.  
  2923.  
  2924. Manipulating the Command Window with Keys
  2925. ─────────────────────────────────────────
  2926.  
  2927. When the text cursor is positioned in the Command window, the Enter key
  2928. may be used to refresh the window.
  2929.  
  2930.  
  2931. Manipulating the Dialogue Window with Keys
  2932. ──────────────────────────────────────────
  2933.  
  2934. When the text cursor is positioned in the Dialogue window, the Cursor
  2935. Up/Down, Page Up/Down, Home, End, and Enter keys may be used to move
  2936. about.
  2937.  
  2938. Cursor Left/Right
  2939.        may be used to scroll the text in the window left or right when
  2940.        the cursor moves to the left or right edge of the window.
  2941.  
  2942. Ctrl/Cursor Left/Right
  2943.        may be used to scroll the text in the window left or right
  2944.        without moving the cursor.
  2945.  
  2946. Cursor Up/Down
  2947.        may be used to scroll up and down through Dialogue window output,
  2948.        one line at a time.
  2949.  
  2950. Page Up/Down
  2951.        may be used to scroll up and down through Dialogue window output
  2952.        in increments of the number of lines in the window minus two.
  2953.  
  2954. Home   may be used to move to the beginning of Dialogue window output.
  2955.  
  2956. End    may be used to move to the end of Dialogue window output.
  2957.  
  2958. Enter  may be used to move to the end of Dialogue window output.
  2959.  
  2960. When the text cursor is positioned in the Prompt window, the Page Up,
  2961. Page Down, Ctrl/Page Up and Ctrl/Page Down keys may be used to scroll
  2962. the Dialogue window.
  2963.  
  2964. Page Up/Down
  2965.        may be used to scroll up and down through Dialogue window output,
  2966.        one line at a time.
  2967.  
  2968. Ctrl/Page Up and Ctrl/Page Down
  2969.        may be used to scroll up and down through Dialogue window output
  2970.        in increments of the number of lines in the window minus two.
  2971.  
  2972.  
  2973. Manipulating the FPU Window with Keys
  2974. ─────────────────────────────────────
  2975.  
  2976. When the text cursor is positioned in the FPU window, the cursor and
  2977. Enter keys may be used to position to register (ST(0), ST(1), etc.) or
  2978. flag displays and modify register or flag contents.  The Home, End, Page
  2979. Up, and Page Down keys may be used to display register sets.  See the
  2980. description of the Register command for more information on register
  2981. sets.
  2982.  
  2983. Cursor Up, Down, Left and Right
  2984.        keys may be used to move the text cursor to register/flag content
  2985.        displays.
  2986.  
  2987. Enter  may used to modify register contents.  If the text cursor is
  2988.        positioned on a register when the Enter key is pressed, a
  2989.        register modification window is displayed on the screen and a new
  2990.        value may be entered.  The register may be left unmodified by
  2991.        just pressing the Enter key in response to the prompt for a new
  2992.        value.
  2993.  
  2994.        If the text cursor is positioned on a flag when the Enter key is
  2995.        pressed then its value is complemented.
  2996.  
  2997. Home   may be used to move to the oldest register set.
  2998.  
  2999. End    may be used to move to the most recent register set.
  3000.  
  3001. Page Up
  3002.        may be used to move backwards through register sets to the oldest
  3003.        register set.
  3004.  
  3005. Page Down
  3006.        may be used to move forwards through register sets to the most
  3007.        recent register set.
  3008.  
  3009. Insert
  3010.        may be used to switch between binary and decimal display formats.
  3011.  
  3012.  
  3013. Manipulating the Memory Window with Keys
  3014. ────────────────────────────────────────
  3015.  
  3016. When the text cursor is positioned in the Memory window, the cursor,
  3017. Home, Page Up, Page Down and Enter keys may be used to position to
  3018. memory entries and modify their contents.
  3019.  
  3020. Cursor Up, Down, Left and Right
  3021.        may be used to move the text cursor to individual memory
  3022.        locations.
  3023.  
  3024. Insert
  3025.        may be used to modify the way in which memory locations are
  3026.        displayed.  Each subsequent press of the Insert key cycles the
  3027.        display through 8-bit bytes, 16-bit words, and 32-bit
  3028.        doublewords.  When 8-bit bytes are displayed, their ASCII
  3029.        equivalents are also displayed on the right-hand side of the
  3030.        window.
  3031.  
  3032. Delete
  3033.        may be used to select a new memory location to be displayed.  A
  3034.        prompt window appears for the new memory location.
  3035.  
  3036. Home   may be used to move directly to the original location of memory
  3037.        that was requested to be displayed.
  3038.  
  3039. Page Up/Down
  3040.        may be used to scroll up and down through the memory window in
  3041.        increments of the number of lines in the window minus two.
  3042.  
  3043. Enter  may used to modify the contents of the memory location upon which
  3044.        the text cursor is positioned.  When pressed, a memory
  3045.        modification window is displayed on the screen and a new value
  3046.        may be entered.  The entry may be left unmodified by just
  3047.        pressing the Enter key in response to the prompt for a new value.
  3048.        Bytes, words or doublewords may be entered, depending on the way
  3049.        in which memory is being displayed.
  3050.  
  3051.  
  3052. Manipulating the Prompt Window with Keys
  3053. ────────────────────────────────────────
  3054.  
  3055. VIDEO commands are entered at the "DBG>" input prompt.
  3056.  
  3057.    DBG>
  3058.  
  3059. In multiple execution thread applications, the "DBG>" prompt is replaced
  3060. by a prompt that indicates the current thread.  The form of the prompt
  3061. is "ddd>" where "ddd" is the thread identification number.
  3062.  
  3063. Example:
  3064.    002>
  3065.  
  3066. When the text cursor is positioned in the Prompt window, the cursor,
  3067. Home, End, Ins, Del, Backspace and Enter keys may be used to recall,
  3068. edit and submit commands.
  3069.  
  3070. Cursor Up/Down
  3071.        may be used to scroll through previously entered commands.
  3072.  
  3073. Cursor Left/Right
  3074.        may be used to move the cursor left or right through a command
  3075.        line to make changes.
  3076.  
  3077. Ctrl/Cursor Left and Right
  3078.        keys may be used to move the cursor left or right one word at a
  3079.        time.
  3080.  
  3081. Home   may be used to move to the beginning of the command line.
  3082.  
  3083. End    may be used to move to the end of the command line.
  3084.  
  3085. Insert
  3086.        key may be used to flip between character insertion and
  3087.        overtyping modes.
  3088.  
  3089. Delete
  3090.        may be used to remove the character under the cursor.
  3091.  
  3092. Backspace
  3093.        (or Rubout) may be used to erase the character to the left of the
  3094.        cursor.
  3095.  
  3096. Enter  may be used to submit the command.
  3097.  
  3098. Command lines that exceed the screen width may be entered.  The command
  3099. line will scroll left or right depending on the cursor placement and
  3100. direction.
  3101.  
  3102. When the text cursor is positioned in the Prompt window, the Page Up,
  3103. Page Down, Ctrl/Page Up and Ctrl/Page Down keys may be used to scroll
  3104. the Dialogue window (see the earlier section describing Dialogue window
  3105. manipulation).
  3106.  
  3107.  
  3108. Manipulating the Register Window with Keys
  3109. ──────────────────────────────────────────
  3110.  
  3111. When the text cursor is positioned in the Register window, the cursor
  3112. and Enter keys may be used to position to register displays and modify
  3113. register contents.  The Home, End, Page Up, and Page Down keys may be
  3114. used to display register sets.  See the description of the Register
  3115. command for more information on register sets.
  3116.  
  3117. Cursor Up, Down, Left and Right
  3118.        may be used to move the text cursor to register/flag content
  3119.        displays.
  3120.  
  3121. Enter  may used to modify register contents.  If the text cursor is
  3122.        positioned on a register when the Enter key is pressed, a
  3123.        register modification window is displayed on the screen and a new
  3124.        value may be entered.  The register may be left unmodified by
  3125.        just pressing the Enter key in response to the prompt for a new
  3126.        value.
  3127.  
  3128.        If the text cursor is positioned on a flag when the Enter key is
  3129.        pressed then its value is complemented.
  3130.  
  3131. Home   may be used to move to the oldest register set.
  3132.  
  3133. End    may be used to move to the most recent register set.
  3134.  
  3135. Page Up
  3136.        may be used to move backwards through register sets to the oldest
  3137.        register set.
  3138.  
  3139. Page Down
  3140.        may be used to move forwards through register sets to the most
  3141.        recent register set.
  3142.  
  3143.  
  3144. Manipulating the Source Window with Keys
  3145. ────────────────────────────────────────
  3146.  
  3147. When the text cursor is positioned in the Source window, the Cursor
  3148. Up/Down, Page Up/Down, Home, End, and Enter keys may be used to move
  3149. about.
  3150.  
  3151. Cursor Left/Right
  3152.        may be used to scroll the text in the window left or right when
  3153.        the cursor moves to the left or right edge of the window.
  3154.  
  3155. Ctrl/Cursor Left/Right
  3156.        may be used to scroll the text in the window left or right
  3157.        without moving the cursor.
  3158.  
  3159. Cursor Up/Down
  3160.        may be used to scroll up and down through source lines.
  3161.  
  3162. Page Up/Down
  3163.        may be used to scroll up and down through source lines in
  3164.        increments of the number of lines in the window minus two.
  3165.  
  3166. Home   may be used to move to the beginning of the current module
  3167.        (compilation unit).
  3168.  
  3169. End    may be used to move to the end of the current module (compilation
  3170.        unit).
  3171.  
  3172. Enter  may be used to move directly to the source line referenced by the
  3173.        CS:IP (16-bit mode) or CS:EIP (32-bit mode) register pair.
  3174.  
  3175. Manipulating the Stack Window with Keys
  3176. ───────────────────────────────────────
  3177.  
  3178. When the text cursor is positioned in the Stack window, the cursor,
  3179. Home, End, Page Up, Page Down and Enter keys may be used to position to
  3180. stack entries and modify their contents.
  3181.  
  3182. Cursor Up, Down, Left and Right
  3183.        may be used to move the text cursor to individual stack entries.
  3184.  
  3185. Insert
  3186.        may be used to modify the way in which stack entries are
  3187.        displayed.  Each subsequent press of the Insert key cycles the
  3188.        display through 8-bit bytes, 16-bit words, and 32-bit
  3189.        doublewords.  When 8-bit bytes are displayed, their ASCII
  3190.        equivalents are also displayed on the right-hand side of the
  3191.        window.
  3192.  
  3193. Home   may be used to move directly to the stack entry referenced by
  3194.        SS:SP (16-bit mode) or SS:ESP (32-bit mode).
  3195.  
  3196. End    may be used to move directly to the stack entry referenced by
  3197.        SS:BP (16-bit mode) or SS:EBP (32-bit mode).
  3198.  
  3199. Page Up/Down
  3200.        may be used to scroll up and down through the stack in increments
  3201.        of the number of lines in the window minus two.
  3202.  
  3203. Enter  may used to modify the contents of the stack entry upon which the
  3204.        text cursor is positioned.  When pressed, a stack modification
  3205.        window is displayed on the screen and a new value may be entered.
  3206.        The entry may be left unmodified by just pressing the Enter key
  3207.        in response to the prompt for a new value.
  3208.  
  3209.  
  3210. Manipulating the Thread Window with Keys
  3211. ────────────────────────────────────────
  3212.  
  3213. When the text cursor is positioned in the Thread window, the cursor,
  3214. Page Up, Page Down and Enter keys may be used to position to thread
  3215. entries and modify their contents.
  3216.  
  3217. Cursor Up, Down, Left and Right
  3218.        may be used to move the text cursor to thread fields.
  3219.  
  3220. Page Up/Down
  3221.        may be used to scroll up and down through the thread window in
  3222.        increments of the number of lines in the window minus two.
  3223.  
  3224. Enter  may be used to modify the contents of the thread field upon which
  3225.        the text cursor is positioned.  When pressed on an "id" field,
  3226.        the selected thread becomes the current thread.  The other
  3227.        windows on the screen will change to reflect the selection of
  3228.        another execution thread.
  3229.  
  3230.        When pressed on a "state" field, the selected thread's state is
  3231.        changed to either "frozen" or "runnable".
  3232.  
  3233.  
  3234. Manipulating the Variable Window with Keys
  3235. ──────────────────────────────────────────
  3236.  
  3237. When the text cursor is positioned in the Variable window, the Cursor
  3238. Up/Down, Enter, Backspace and "S" keys may be used.
  3239.  
  3240. Cursor Up/Down
  3241.        may be used to move up and down through the fields of a
  3242.        structure.  Entries that represent structures are displayed by
  3243.        using "{...}".  Entries that represent arrays are displayed by
  3244.        using "(...)".
  3245.  
  3246. Page Up/Down
  3247.        may be used to scroll up and down through the Variable window in
  3248.        increments of the number of lines in the window.
  3249.  
  3250. Enter  can be used to display the contents of a field.
  3251.  
  3252. Backspace
  3253.        can be used to return to the previous level.
  3254.  
  3255. "S"    can be used to display an entry as a string.  The Backspace key
  3256.        can be used to return to the original display format.
  3257.  
  3258.  
  3259. Manipulating the View Window with Keys
  3260. ──────────────────────────────────────
  3261.  
  3262. When the text cursor is positioned in the View window, the cursor, Page
  3263. Up/Down, Home, End, and Enter keys may be used to move about.  The /, ?,
  3264. ', and " keys may be used to search for text.
  3265.  
  3266. Cursor Up/Down
  3267.        may be used to move up and down through text lines.  Text lines
  3268.        will scroll when the text cursor is moved into the top or bottom
  3269.        areas of the window.
  3270.  
  3271. Cursor Left/Right
  3272.        move the cursor one character left or right.  When the cursor
  3273.        moves to the left or right edge of the window, text will be
  3274.        scrolled to the right or left.
  3275.  
  3276. Ctrl/Cursor Left/Right
  3277.        may be used to scroll the text in the window left or right
  3278.        without moving the cursor.
  3279.  
  3280. Page Up/Down
  3281.        may be used to scroll up and down through source lines in
  3282.        increments of the number of lines in the window minus two.
  3283.  
  3284. Home   may be used to move to the first line of the text being viewed.
  3285.  
  3286. End    may be used to move to the last line of the text being viewed.
  3287.  
  3288. Enter  may be used to move the text cursor to the start of the next line
  3289.        of text.
  3290.  
  3291. "/"    may be used to search forwards for a string of text.  A prompt is
  3292.        displayed for the string to search.  The Cursor Up key may be
  3293.        used to fill in the previous search string.
  3294.  
  3295. "?"    may be used to search backwards for a string of text.  A prompt
  3296.        is displayed for the string to search.  The Cursor Up key may be
  3297.        used to fill in the previous search string.
  3298.  
  3299. "'"    (apostrophe) may be used to search forwards for the previously
  3300.        specified search string.
  3301.  
  3302. "      (quote) may be used to search backwards for the previously
  3303.        specified search string.
  3304.  
  3305. "."    (period) may be used to repeat the last action.
  3306.  
  3307. Escape
  3308.        may be used to terminate the viewing function.
  3309.  
  3310. "0" through "9"
  3311.        may be used to enter a number.  This number is used to repeat the
  3312.        next action the specified number of times.  For example, entering
  3313.        the number 20 followed by Cursor Down moves the cursor down 20
  3314.        lines rather than one.  For the Home and End keys, the number
  3315.        moves to "number" lines from the beginning of file and end of
  3316.        file, respectively.  To cancel a number without executing a
  3317.        command, press the Delete key.
  3318.  
  3319. Pressing one of the search keys causes a prompt for a search string to
  3320. appear.  If a previous string had been entered, this string may be
  3321. recalled using the Cursor Up key.  The recalled string will appear in
  3322. the prompt area.  Pressing the Escape key at this point will cancel the
  3323. search command.  The Cursor Left and Right keys and the Home, End,
  3324. Delete and Backspace keys may be used to edit the search string.  After
  3325. the search string has been entered, pressing the Enter key will begin
  3326. the search.  The search is done case insensitively, with the file
  3327. considered as a ring of text (e.g., if searching forwards and the end of
  3328. the file is reached without finding the text, the search continues from
  3329. the beginning of the file).  If the string is found, the cursor is
  3330. placed under the first matched character and the matched string is
  3331. highlighted.
  3332. ::::LOG
  3333. ┌──────────────────────────────────────────────────────────────────────┐
  3334. │ Log     [/Start | /Append | >] file_name                             │
  3335. │ >                                                                    │
  3336. └──────────────────────────────────────────────────────────────────────┘
  3337.  
  3338. The Log or > command may be used to log Dialogue window output to a
  3339. specified file.
  3340.  
  3341. /Start file_name This qualifier is used to start logging to the
  3342.        specified file.
  3343.  
  3344.        Example:
  3345.           DBG>log/start dbg.log
  3346.           DBG>>/start dbg.log
  3347.  
  3348.        The previous contents of the file are lost (overwritten).  When
  3349.        file_name is specified and no qualifier is specified then /Start
  3350.        is implied.
  3351.  
  3352.        Example:
  3353.           DBG>log dbg.log
  3354.  
  3355.        When neither the qualifier nor filename is specified then any
  3356.        currently opened log file is closed.
  3357.  
  3358.        Example:
  3359.           DBG>log
  3360.  
  3361. /Append file_name This qualifier is used to start logging and append
  3362.        logging records to the end of the specified file.
  3363.  
  3364.        Example:
  3365.           DBG>log/append dbg.log
  3366.           DBG>>/app dbg.log
  3367.  
  3368. > file_name This operator is a synonym for "/append".  Thus it behaves
  3369.        identically to the /Append qualifier
  3370.  
  3371.        Example:
  3372.           DBG>log > dbg.log
  3373.           DBG>>> dbg.log
  3374.  
  3375. If a log file is currently open, it must be closed before logging can be
  3376. done to a different file.  The current log file is closed if a Log
  3377. command is entered with no qualifier and filename.  The log file is
  3378. automatically closed when the debugger exits (see the description of the
  3379. Quit command).
  3380.  
  3381. Example:
  3382.    DBG>log/start debug.log
  3383.  
  3384. Output to the Dialogue window is also written to the file "debug.log".
  3385.  
  3386. Example:
  3387.    DBG>log/append debug.log
  3388.    DBG>log> debug.log
  3389.    DBG>>>debug.log
  3390.    DBG>>/append debug.log
  3391.  
  3392. The above examples are all equivalent forms of the Log/Append command.
  3393.  
  3394. Under QNX, a path specification that begins with a "/" could be
  3395. interpreted as a qualifier.
  3396.  
  3397. Example:
  3398.    DBG>log /users/fred/debug.log
  3399.  
  3400. In the above example, the "/users" qualifier is not supported and an
  3401. error will result.  To resolve this conflict, the /Start or /Append
  3402. qualifiers can be used.
  3403.  
  3404. Example:
  3405.    DBG>log /start /users/fred/debug.log
  3406. ::::MENUS
  3407. VIDEO Menus
  3408. ───────────
  3409.  
  3410. The Set menu on command may be used to cause a menu bar to appear at the
  3411. top of the screen.  Menus are provided as an alternative to some of the
  3412. more common VIDEO commands.  In the following sections, we explain how
  3413. to use menus and provide a brief synopsis of each menu.
  3414.  
  3415. Menu Selection
  3416. ──────────────
  3417.  
  3418. Menu selection may be activated by pressing and releasing the Alt key.
  3419. The first menu item name or title is highlighted.
  3420.  
  3421. The cursor left and right keys may be used to highlight a particular
  3422. menu item.  The Enter key may be used to select the highlighted menu
  3423. item.  In some cases, the menu item opens up and a list of choices is
  3424. usually displayed.  In others, the menu item invokes an immediate
  3425. action.  The action menu items are identified by the "!" which is
  3426. appended to the menu title (e.g., Go!).  When a list of menu entries is
  3427. displayed, the list may be closed up by pressing the Escape key.  A
  3428. second press of the Escape key will return you to the Prompt window.
  3429.  
  3430. Alternately, direct selection of a menu item is possible by pressing
  3431. both the Alt key and the first letter shown in the menu name or title.
  3432. For example, the "Control" menu may be activated by pressing both the
  3433. "Alt" and "C" keys ("Alt" must already be depressed when you press the
  3434. "C" key).  If you have a mouse, you can do the same thing by moving the
  3435. mouse cursor to one of the menu items in the menu bar and depressing the
  3436. left mouse button.  If you then release the button, the currently
  3437. selected item will be performed.
  3438.  
  3439. Menus to the left or right of the current menu may be selected by using
  3440. the cursor left and right keys.  As you move left or right, only one
  3441. menu is activated.  With a mouse, you can do the same thing by dragging
  3442. the mouse through the various menu items in the menu bar.
  3443.  
  3444. If a menu opens up, one of the choices is highlighted.  This indicates
  3445. the current choice for that menu.  The cursor up and down keys may be
  3446. used to select a different choice.  With a mouse, different choices may
  3447. be selected by dragging the mouse to the desired item.  When an item has
  3448. been picked, the "Enter" key may be used to select it.  When using a
  3449. mouse, the left mouse button may be released.
  3450.  
  3451. The "Esc" key may be used to quit from a menu.  To quit from a menu with
  3452. a mouse, you can either:
  3453.  
  3454.    1. release the left button in an area outside of the menu, or
  3455.    2. click in an area outside of the menu.
  3456.  
  3457. The choice depends on the type of menu presented.
  3458.  
  3459. Some selections result in yet other menus being displayed.  The process
  3460. for making selections is the same.  Use the cursor left and right keys
  3461. to move left and right to other menus that may be shown.  Use the cursor
  3462. up and down keys to make a selection in each menu.  To signal that you
  3463. have made your selection, press the "Enter" key.  With a mouse you can
  3464. use the actions of dragging and clicking to make your selections.
  3465.  
  3466.  
  3467. The Control Menu
  3468. ────────────────
  3469.  
  3470. Help   This entry is used to invoke VIDEO's "Help" system.
  3471.  
  3472. System This entry is used to start the system's command interpreter or
  3473.        "shell".  If you are using DOS, for example, then the
  3474.        "COMMAND.COM" program is run.  Certain conditions must be met
  3475.        before the shell can be run and these are listed in the
  3476.        description of the System command.
  3477.  
  3478. Restart This entry is used to restart the current application.  The
  3479.        application is reloaded into memory and execution is suspended at
  3480.        the program's entry point.  At this point, a VIDEO command such
  3481.        as "go main" may be entered.  See the description of the New
  3482.        /restart command for more information.
  3483.  
  3484. View   This entry is used to select a file for viewing.  See the
  3485.        description of the View command for more information.
  3486.  
  3487. Log    This entry is used to commence logging of VIDEO commands and
  3488.        responses to a file.  See the description of the Log command for
  3489.        more information.
  3490.  
  3491. Quit   This entry is used to quit from the debugger thereby terminating
  3492.        the current application.  See the description of the Quit command
  3493.        for more information.
  3494.  
  3495.  
  3496. The User Menu
  3497. ─────────────
  3498.  
  3499. This is a user-definable list of menu items.  Each entry is created with
  3500. the Set menu add command.  An entry is a list of one or more VIDEO
  3501. commands.  Each new entry is labelled with a letter from the alphabet.
  3502. Thus a particular entry may be selected quickly by pressing the Alt key
  3503. and the letter corresponding to the desired entry.  The mouse can also
  3504. be used to select an entry.
  3505.  
  3506. Up to 20 items can be added to the "User" menu.
  3507.  
  3508.  
  3509. The Display Menu
  3510. ────────────────
  3511.  
  3512. The text cursor can be moved directly to a particular window by using
  3513. this menu.  Select the window to which you wish to move the text cursor.
  3514. See the description of the Display command for more information.
  3515.  
  3516. The Paint Menu
  3517. ──────────────
  3518.  
  3519. The colours for all windows or a particular window may be selected by
  3520. using menus.
  3521.  
  3522. When using a mouse, clicking on the "Sample" window is equivalent to
  3523. pressing the Enter key.
  3524.  
  3525. See the description of the Paint command for more information.
  3526.  
  3527.  
  3528. The Break! Menu
  3529. ───────────────
  3530.  
  3531. Break points may be "set", "cleared", "activated" or "deactivated" when
  3532. "Break!" is chosen.  Two windows are displayed, one containing a set of
  3533. instructions and one containing a list of the break points currently
  3534. set.
  3535.  
  3536. You may press one of the keys "S", "C", "A" or "D" to select the desired
  3537. action.  The cursor up and down keys may be used to highlight individual
  3538. break points.
  3539.  
  3540. A mouse can be used on the list with the usual actions, clicking or
  3541. dragging to select a break point.  Clicking on the instruction box areas
  3542. acts as if the appropriate key has been pressed.  For example, clicking
  3543. on the quadrant that contains "s = set" acts as if the "S" key had been
  3544. pressed.  See the description of the Break command for more information.
  3545.  
  3546.  
  3547. The Watch! Menu
  3548. ───────────────
  3549.  
  3550. Watch points may be "set", "cleared", "activated" or "deactivated" when
  3551. "Watch!" is chosen.  Two windows are displayed, one containing a set of
  3552. instructions and one containing a list of the watch points currently
  3553. set.  You may press one of the keys "S", "C", "A" or "D" to select the
  3554. desired action.  The cursor up and down keys may be used to highlight
  3555. individual watch points.
  3556.  
  3557. A mouse can be used on the list by the ordinary actions, clicking or
  3558. dragging to select a watch point.  Clicking on the instruction box areas
  3559. acts as if the appropriate key has been pressed.  For example, clicking
  3560. on the quadrant that contains "s = set" acts as if the "S" key had been
  3561. pressed.  See the description of the Watch command for more information.
  3562.  
  3563. The Trace! Menu
  3564. ───────────────
  3565.  
  3566. Selecting the "Trace!" menu causes a Trace command (with default
  3567. arguments) to be executed.  Trace prompts appear in the prompt window.
  3568.  
  3569. If you have a mouse, you can click on the "hot-spots" in this window
  3570. instead of pressing a key.  For example, clicking on the "<i>" hot-spot
  3571. is equivalent to pressing the "I" key when selecting the "into" option
  3572. of trace.  See the description of the Trace command for more
  3573. information.
  3574.  
  3575. The Go! Menu
  3576. ────────────
  3577.  
  3578. Selecting the "Go!" menu causes a Go command to be executed.  Program
  3579. execution is resumed at the current CS:IP (16-bit mode) or CS:EIP
  3580. (32-bit mode) location.  See the description of the Go command for more
  3581. information.
  3582. ::::MODIFY
  3583. ┌──────────────────────────────────────────────────────────────────────┐
  3584. │ Modify                                                               │
  3585. │     [/Byte]    [addr_expr] [ "," expr_list ]                         │
  3586. │     /Word      [addr_expr] [ "," expr_list ]                         │
  3587. │     /Dword     [addr_expr] [ "," expr_list ]                         │
  3588. │     /Pointer   [addr_expr] [ "," expr_list ]                         │
  3589. │     /IOByte    [port_expr] [ "," expr_list ]                         │
  3590. │     /IOWord    [port_expr] [ "," expr_list ]                         │
  3591. │     /IODword   [port_expr] [ "," expr_list ]                         │
  3592. └──────────────────────────────────────────────────────────────────────┘
  3593.  
  3594. The Modify command is used to modify the contents of memory in one of
  3595. several different ways.
  3596.  
  3597. /Byte [addr_expr] [ "," expr_list ] The starting address addr_expr
  3598.        identifies the beginning of a sequence of 8-bit values (bytes).
  3599.        Each value that you specify is stored modulo 256 (0x100).
  3600.  
  3601. /Word [addr_expr] [ "," expr_list ] The starting address addr_expr
  3602.        identifies the beginning of a sequence of 16-bit values (words).
  3603.        Each value that you specify is stored modulo 65,536 (0x10000).
  3604.  
  3605. /Dword [addr_expr] [ "," expr_list ] The starting address addr_expr
  3606.        identifies the beginning of a sequence of 32-bit values
  3607.        (doublewords).  Each value that you specify is stored modulo
  3608.        4,294,967,296 (0x100000000).
  3609.  
  3610. /Pointer [addr_expr] [ "," expr_list ] The starting address addr_expr
  3611.        identifies the beginning of a sequence of segment/offset pairs
  3612.        (segment:offset).  In 16-bit mode, each value in the pair that
  3613.        you specify is stored modulo 65536 (0x10000).  In 32-bit mode,
  3614.        each value in the pair that you specify is stored modulo
  3615.        4,294,967,296 (0x100000000).  If you do not specify the segment
  3616.        value, the current contents of the DS register is used.
  3617.  
  3618. /IOByte [port_expr] [ "," expr_list ] The starting port address
  3619.        port_expr identifies the beginning of a sequence of 8-bit ports
  3620.        (bytes).  Each value that you specify is written to the port
  3621.        modulo 256 (0x100).
  3622.  
  3623. /IOWord [port_expr] [ "," expr_list ] The starting port address
  3624.        addr_expr identifies the beginning of a sequence of 16-bit ports
  3625.        (words).  Each value that you specify is written to the port
  3626.        modulo 65,536 (0x10000).
  3627.  
  3628. /IODword [port_expr] [ "," expr_list ] The IODword qualifier is
  3629.        supported on 386 systems or higher.  The starting port address
  3630.        addr_expr identifies the beginning of a sequence of 32-bit ports
  3631.        (doublewords).  Each value that you specify is written to the
  3632.        port modulo 4,294,967,296 (0x100000000).
  3633.  
  3634. If you do not specify a qualifier, the default is /Byte.  If you do not
  3635. specify a list of values, VIDEO will prompt for values until an empty
  3636. line is entered.  If you do not want to modify a location but want VIDEO
  3637. to continue prompting, you can enter a slash ("/") to indicate that the
  3638. current value is to be retained.  When specifying a list of values, a
  3639. location can be skipped by omitting the value (i.e., a consecutive pair
  3640. of commas is entered).
  3641.  
  3642. Example:
  3643.    DBG>modify 0x200,1,2,3
  3644.    DBG>modify/byte 0x200,1,2,3
  3645.  
  3646. In the above equivalent examples, memory locations DS:200, DS:201 and
  3647. DS:202 are modified with the values 1, 2 and 3.
  3648.  
  3649. Example:
  3650.    DBG>modify 0x200,1,,3
  3651.  
  3652. In the above example, memory locations DS:200 and DS:202 are modified
  3653. with the values 1 and 3.
  3654.  
  3655. Example:
  3656.    DBG>modify/word 304
  3657.    2335:0304= 0001 :- 0x100
  3658.    2335:0306= 1323 :- 0x101
  3659.    2335:0308= 8730 :- 0x102
  3660.    2335:030A= 0020 :-
  3661.  
  3662. In the above example, VIDEO prompts for new word values to replace
  3663. memory locations DS:304, DS:306, DS:308 and DS:30A.  Memory location
  3664. DS:30A is left unmodified by simply pressing the Enter key in response
  3665. to the prompt.
  3666.  
  3667. Example:
  3668.    DBG>modify/word 0x304
  3669.    2335:0304= 0001 :- 0x100
  3670.    2335:0306= 1323 :- /
  3671.    2335:0308= 8730 :- 0x102
  3672.    2335:030A= 0020 :-
  3673.  
  3674. In the above example, VIDEO prompts for new word values to replace
  3675. memory locations DS:304, DS:306, DS:308 and DS:30A.  Memory location
  3676. DS:306 is left unmodified by simply entering a "/" in response to the
  3677. prompt.
  3678.  
  3679. Example:
  3680.    DBG>modify/pointer _jmptable
  3681.    _jmptable= 2223:0602 :- &test1
  3682.    _jmptable+04 = 2223:06BE :- &test2
  3683.    _jmptable+08 = 2223:0743 :- &test3
  3684.    _jmptable+0A = 2223:07B7 :- &test4
  3685.    _CMAIN_ = 5756:5153 :-
  3686.  
  3687. In the above 16-bit example, VIDEO prompts for new segment:offset values
  3688. to replace consecutive memory locations identified by the label
  3689. _jmptable.  The values supplied are the addresses of four different
  3690. routines (the & operator yields the segment/offset values for the
  3691. specified location).  The memory location identified as _CMAIN_ is left
  3692. unmodified by simply pressing the Enter key in response to the prompt.
  3693.  
  3694. Example:
  3695.    DBG>modify/iobyte 0x3F9,0x0D,0x01,0x03,0x0B
  3696.  
  3697. In the above example, ports 3F9, 3FA, 3FB and 3FC are modified with the
  3698. hexadecimal values 0D, 01, 03 and 0B.
  3699.  
  3700. Example:
  3701.    DBG>modify/ioword 0x2f8
  3702.    02F8= 000D :- 0x000E
  3703.    02FA= 0301 :- 0x0302
  3704.    02FC= 630B :- 0x630A
  3705.    02FE= 0000 :-
  3706.  
  3707. In the above example, VIDEO prompts for new word values to store in
  3708. ports 2F8, 2FA, 2FC, and 2FE.  Port 2FE is left unmodified by simply
  3709. pressing the Enter key in response to the prompt.
  3710. ::::MOUSE
  3711. Window Manipulation with a Mouse
  3712. ────────────────────────────────
  3713.  
  3714. Installing a Mouse Driver Under DOS
  3715. ───────────────────────────────────
  3716.  
  3717. In order to use a mouse with VIDEO, you must install the IBM Mouse
  3718. Driver program that is supplied with the IBM Mouse.  Alternatively, you
  3719. may use a mouse and mouse driver that are compatible with the IBM Mouse
  3720. and IBM Mouse Driver.  The IBM Mouse Driver is installed by running the
  3721. "MOUSE.COM" program.
  3722.  
  3723. Example:
  3724.    C>\dos\mouse
  3725.  
  3726.  
  3727. Installing a Mouse Driver Under QNX
  3728. ───────────────────────────────────
  3729.  
  3730. In order to use a mouse with VIDEO, you must install a mouse driver
  3731. program.  See your QNX manuals for further information on mouse
  3732. installation.
  3733.  
  3734.  
  3735. Using a Mouse with VIDEO
  3736. ────────────────────────
  3737.  
  3738. VIDEO supports the use of a mouse in many ways.  Most actions are
  3739. selected by "clicking" the mouse at the desired location.  This is done
  3740. by moving the mouse cursor, the solid rectangle on the screen, to a
  3741. place on the screen and then pressing the left button on the mouse.
  3742.  
  3743. The mouse cursor can be positioned to any window.  In some windows, such
  3744. as the "Source" and "Assembly" windows, text may be scrolled up or down,
  3745. left or right, by "dragging" the mouse.  This is done by moving the
  3746. mouse cursor to a line in the window and, while pressing down the left
  3747. button on the mouse, repositioning the mouse cursor to another place in
  3748. the window.
  3749.  
  3750. To scroll text up or down by dragging the mouse, vertical scrolling must
  3751. be enabled.  This is done by clicking the mouse on the scroll bar at the
  3752. right side of the window where the word "Locked" appears.  If the word
  3753. "Locked" does not appear then vertical scrolling is already enabled.
  3754. Vertical scrolling can be enabled/disabled by clicking on the scroll bar
  3755. again.
  3756.  
  3757. To scroll text left or right by dragging the mouse, horizontal scrolling
  3758. must be enabled.  This is done by clicking the mouse on the scroll bar
  3759. at the bottom of the window where the word "Locked" appears.  If the
  3760. word "Locked" does not appear then horizontal scrolling is already
  3761. enabled.  Horizontal scrolling can be enabled/disabled by clicking on
  3762. the scroll bar again.
  3763.  
  3764. The entire window can be repositioned on the screen by dragging the
  3765. window's title line to a new place on the screen.
  3766.  
  3767. Some actions are accomplished by "double-clicking" the left mouse
  3768. button.  Double-clicking is done by rapidly pressing the left mouse
  3769. button twice at the same location without moving the mouse cursor.
  3770. These actions are described in subsequent sections.
  3771.  
  3772. Text selection may be engaged by pressing the right-hand mouse button.
  3773. Without releasing the button, the mouse cursor may be moved about the
  3774. screen to highlight a sequence of text (characters, words, expressions,
  3775. etc.).  When the right-hand mouse button is released, the Action window
  3776. appears on the screen.  If the right-hand mouse button is pressed and
  3777. released without moving the mouse, the "item" under the mouse cursor is
  3778. selected in its entirety and the Action window appears on the screen.
  3779.  
  3780. When the "Show source" entry is selected, the source/assembly code
  3781. corresponding to the selected text is displayed in the Source and
  3782. Assembly windows (if present on the screen).
  3783.  
  3784. A line appears in the Dialogue window that indicates the address of the
  3785. previous source/assembly code and the new source/assembly code under
  3786. examination.
  3787.  
  3788. Example:
  3789.    0x65CB:0x0012 => ClearScreen
  3790.  
  3791. You can use this entry to return to the previous location by
  3792. highlighting the address that is displayed on the left of the "=>" using
  3793. the right-hand mouse button.  In the above example, this would be the
  3794. entry "0x65CB:0x0012" (the segment and offset of the previous location
  3795. under examination).
  3796.  
  3797. When using a mouse, many windows have "gadgets".
  3798.  
  3799.    1. The "scroll up" and "scroll down" gadgets may be used to
  3800.       scroll text vertically.
  3801.  
  3802.    2. The "scroll left" and "scroll right" gadgets may be used
  3803.       to scroll text horizontally.
  3804.  
  3805.    3. The "page up" and "page down" gadgets (small triangle shapes at
  3806.       the right of the window) perform different actions depending on
  3807.       the window.
  3808.  
  3809.    4. The "page left" and "page right" gadgets (small triangle shapes at
  3810.       the bottom of the window) perform different actions depending on
  3811.       the window.
  3812.  
  3813.    5. The "window zoom" gadget (the sunburst symbol, in the top, right
  3814.       corner of the window) may be used to zoom the active window
  3815.       between its normal size and the size of entire screen.
  3816.  
  3817.       If you place the mouse cursor on the "zoom" gadget and press the
  3818.       right-hand mouse button, the window will temporarily zoom to full
  3819.       size.  When you release the button, the window will return to its
  3820.       normal size.
  3821.  
  3822.    6. The "window resize" gadget (double arrow, in the bottom, right
  3823.       corner) may be used to enlarge or shrink a window.
  3824.  
  3825.    7. The "window close" gadget (triple bar, in the top, left corner)
  3826.       may be used to remove a window from the screen.
  3827.  
  3828. If you click on a "scroll" or "page" gadget, the associated action is
  3829. performed once.  If you hold the left mouse button down while positioned
  3830. on one of these gadgets, the associated action is performed repeatedly.
  3831. If you drag the "window resize" gadget, the window to which it belongs
  3832. is grown or shrunk.
  3833.  
  3834.  
  3835. Manipulating the Assembly Window with a Mouse
  3836. ─────────────────────────────────────────────
  3837.  
  3838.    1. Clicking in the Assembly window causes the text cursor to move to
  3839.       this window.  It becomes the "active" window.
  3840.  
  3841.    2. Assembly instructions may be scrolled up or down by dragging the
  3842.       mouse.  To do this, the right-side scrolling bar must be unlocked.
  3843.  
  3844.    3. Assembly instructions may be scrolled left or right by dragging
  3845.       the mouse.  To do this, the bottom scrolling bar must be unlocked.
  3846.  
  3847.    4. Gadgets are provided for scrolling, resizing, zooming and closing
  3848.       the Assembly window.
  3849.  
  3850.    5. The "scroll up" and "scroll down" gadgets may be used to move up
  3851.       and down through text lines.  When the text cursor moves to the
  3852.       top or bottom of the window, text will be scrolled down or up.
  3853.  
  3854.    6. The "scroll left" and "scroll right" gadgets move the cursor one
  3855.       character left or right.  When the text cursor moves to the left
  3856.       or right edge of the window, text will be scrolled to the right or
  3857.       left.
  3858.  
  3859.    7. The "page up" and "page down" gadgets may be used to scroll up and
  3860.       down through assembly instructions in increments of the number of
  3861.       lines in the window minus two.
  3862.  
  3863.    8. Clicking on an assembly instruction in the Assembly window makes
  3864.       it the current assembly instruction.  This line is displayed in
  3865.       "standout" attributes.  The value of the VIDEO variable dbg$code
  3866.       changes to reflect the change in the current assembly instruction.
  3867.       This variable reflects the segment:offset of the most recent code
  3868.       location to be examined.  In addition, the "." address is changed
  3869.       to point to the assembly instruction.  The "." address is used in
  3870.       many VIDEO commands.
  3871.  
  3872.       Example:
  3873.          do [CS IP] = .
  3874.              or
  3875.          do [CS EIP] = .
  3876.  
  3877.       In the above example, the contents of the CS:IP or CS:EIP register
  3878.       pair are modified to point to the current assembly instruction.
  3879.  
  3880.    9. Double-clicking on a line will set or clear a breakpoint at the
  3881.       assembly instruction.
  3882.  
  3883.  
  3884. Manipulating the Command Window with a Mouse
  3885. ────────────────────────────────────────────
  3886.  
  3887. Clicking in the Command window causes the text cursor to move to the
  3888. window and the window to be refreshed.  It becomes the "active" window.
  3889.  
  3890. Manipulating the Dialogue Window with a Mouse
  3891. ─────────────────────────────────────────────
  3892.  
  3893.    1. Clicking in the Dialogue window causes the text cursor to move to
  3894.       this window.  It becomes the "active" window.
  3895.  
  3896.    2. Text may be scrolled up or down by dragging the mouse.  To do
  3897.       this, the right-side scrolling bar must be unlocked.
  3898.  
  3899.    3. Text may be scrolled left or right by dragging the mouse.  To do
  3900.       this, the bottom scrolling bar must be unlocked.
  3901.  
  3902.    4. Gadgets are provided for scrolling, resizing, and zooming the
  3903.       Dialogue window.
  3904.  
  3905.    5. The "scroll up" and "scroll down" gadgets may be used to move up
  3906.       and down through text lines.  When the text cursor moves to the
  3907.       top or bottom of the window, text will be scrolled down or up.
  3908.  
  3909.    6. The "scroll left" and "scroll right" gadgets move the cursor one
  3910.       character left or right.  When the text cursor moves to the left
  3911.       or right edge of the window, text will be scrolled to the right or
  3912.       left.
  3913.  
  3914.    7. The "page up" and "page down" gadgets may be used to scroll up and
  3915.       down through Dialogue window output in increments of the number of
  3916.       lines in the window minus two.
  3917.  
  3918. Manipulating the FPU Window with a Mouse
  3919. ────────────────────────────────────────
  3920.  
  3921.    1. Clicking in the FPU window causes the text cursor to move to this
  3922.       window.  It becomes the "active" window.  The text cursor may be
  3923.       positioned to any register contents or flag bits display.
  3924.  
  3925.    2. Double-clicking on a register display (ST(0), ST(1), etc.) will
  3926.       cause a register modification window to be displayed on the
  3927.       screen.  A new value may be entered or the register may be left
  3928.       unmodified by just pressing the Enter key in response to the
  3929.       prompt.
  3930.  
  3931.       Double clicking on a flag causes its value to be complemented.
  3932.  
  3933.    3. The "scroll up" gadget may be used to move backwards through
  3934.       register sets to the oldest register set.
  3935.  
  3936.    4. The "scroll down" gadget may be used to move forwards through
  3937.       register sets to the most recent register set.
  3938.  
  3939.    5. The "page up" gadget may be used to move backwards through
  3940.       register sets to the oldest register set.
  3941.  
  3942.    6. The "page down" gadget may be used to move forwards through
  3943.       register sets to the most recent register set.
  3944.  
  3945.  
  3946. Manipulating the Memory Window with a Mouse
  3947. ───────────────────────────────────────────
  3948.  
  3949.    1. Clicking in the Memory window causes the text cursor to move to
  3950.       this window.  It becomes the "active" window.  The text cursor may
  3951.       be positioned to any memory entry shown in the window.
  3952.  
  3953.    2. Memory entries may be scrolled up or down by dragging the mouse.
  3954.       To do this, the right-side scrolling bar must be unlocked.
  3955.  
  3956.    3. The "scroll up" and "scroll down" gadgets may be used to scroll up
  3957.       and down through memory.
  3958.  
  3959.    4. The "page up" and "page down" gadgets may be used to scroll up and
  3960.       down through memory in increments of the number of lines in the
  3961.       window minus two.
  3962.  
  3963.    5. Clicking on the "(Ins)" entry will cause the display to change
  3964.       between 8-bit bytes, 16-bit words, and 32-bit doublewords.  When
  3965.       8-bit bytes are displayed, their ASCII equivalents are also
  3966.       displayed on the right-hand side of the window.
  3967.  
  3968.    6. Clicking on the "(Del)" entry may be used to select a new memory
  3969.       location to be displayed.  A prompt window appears for the new
  3970.       memory location.  A new value may be entered or the memory address
  3971.       may be left unmodified by just pressing the Enter key in response
  3972.       to the prompt.
  3973.  
  3974.    7. Clicking on the "HOME" entry may be used to move directly to the
  3975.       original location of memory that was requested to be displayed.
  3976.  
  3977.    8. Double-clicking on a memory location will cause a memory
  3978.       modification window to be displayed on the screen.  A new value
  3979.       may be entered or the memory location may be left unmodified by
  3980.       just pressing the Enter key in response to the prompt.
  3981.  
  3982.  
  3983. Manipulating the Prompt Window with a Mouse
  3984. ───────────────────────────────────────────
  3985.  
  3986. Clicking in the Prompt window causes the text cursor to move to this
  3987. window.  It becomes the "active" window and VIDEO commands may be
  3988. entered.
  3989.  
  3990. Manipulating the Register Window with a Mouse
  3991. ─────────────────────────────────────────────
  3992.  
  3993.    1. Clicking in the Register window causes the text cursor to move to
  3994.       this window.  It becomes the "active" window.  The text cursor may
  3995.       be positioned to any register contents or flag bits display.
  3996.  
  3997.    2. Double-clicking on a register display will cause a register
  3998.       modification window to be displayed on the screen.  A new value
  3999.       may be entered or the register may be left unmodified by just
  4000.       pressing the Enter key in response to the prompt.
  4001.  
  4002.       Double clicking on a flag causes its value to be complemented.
  4003.  
  4004.    3. The "scroll up" gadget may be used to move backwards through
  4005.       register sets to the oldest register set.
  4006.  
  4007.    4. The "scroll down" gadget may be used to move forwards through
  4008.       register sets to the most recent register set.
  4009.  
  4010.    5. The "page up" gadget may be used to move backwards through
  4011.       register sets to the oldest register set (same as "scroll up").
  4012.  
  4013.    6. The "page down" gadget may be used to move forwards through
  4014.       register sets to the most recent register set (same as "scroll
  4015.       down").
  4016.  
  4017. Manipulating the Source Window with a Mouse
  4018. ───────────────────────────────────────────
  4019.  
  4020.    1. Clicking in the Source window causes the text cursor to move to
  4021.       this window.  It becomes the "active" window.
  4022.  
  4023.    2. Source lines may be scrolled up or down by dragging the mouse.  To
  4024.       do this, the right-side scrolling bar must be unlocked.
  4025.  
  4026.    3. Source lines may be scrolled left or right by dragging the mouse.
  4027.       To do this, the bottom scrolling bar must be unlocked.
  4028.  
  4029.    4. Gadgets are provided for scrolling, resizing, zooming and closing
  4030.       the Source window.
  4031.  
  4032.    5. The "scroll up" and "scroll down" gadgets may be used to move up
  4033.       and down through text lines.  When the text cursor moves to the
  4034.       top or bottom of the window, text will be scrolled down or up.
  4035.  
  4036.    6. The "scroll left" and "scroll right" gadgets move the scroll one
  4037.       character left or right.  When the text cursor moves to the left
  4038.       or right edge of the window, text will be scrolled to the right or
  4039.       left.
  4040.  
  4041.    7. The "page up" and "page down" gadgets may be used to scroll up and
  4042.       down through source lines in increments of the number of lines in
  4043.       the window minus two.
  4044.  
  4045.    8. Clicking on a source line in the Source window makes it the
  4046.       current line.  This line is displayed in "standout" attributes.
  4047.  
  4048.       The value of the VIDEO variable dbg$code changes to reflect the
  4049.       change in the current line.  This variable reflects the
  4050.       segment:offset of the most recent code location to be examined.
  4051.       In addition, the "." address is changed to point to the first
  4052.       assembly instruction for the source line.  If there are no
  4053.       assembly instructions for the source line (as in lines or
  4054.       declarative lines) then the "." address is positioned to an
  4055.       earlier line (or the first line) in the module which has assembly
  4056.       instructions.  The "." address is used in many VIDEO commands.
  4057.  
  4058.       Example:
  4059.          do [CS IP] = .
  4060.              or
  4061.          do [CS EIP] = .
  4062.  
  4063.       In the above example, the contents of the CS:IP or CS:EIP register
  4064.       pair are modified to point to the current source line.
  4065.  
  4066.    9. Double-clicking on a line will set or clear a breakpoint at the
  4067.       first assembly instruction for the source line.
  4068.  
  4069.  
  4070. Manipulating the Stack Window with a Mouse
  4071. ──────────────────────────────────────────
  4072.  
  4073.    1. Clicking in the Stack window causes the text cursor to move to
  4074.       this window.  It becomes the "active" window.  The text cursor may
  4075.       be positioned to any stack entry.
  4076.  
  4077.    2. Stack entries may be scrolled up or down by dragging the mouse.
  4078.       To do this, the right-side scrolling bar must be unlocked.
  4079.  
  4080.    3. The "scroll up" and "scroll down" gadgets may be used to scroll up
  4081.       and down through the stack.
  4082.  
  4083.    4. The "page up" and "page down" gadgets may be used to scroll up and
  4084.       down through the stack in increments of the number of lines in the
  4085.       window minus two.
  4086.  
  4087.    5. Clicking on the "(Ins)" entry will cause the display to change
  4088.       between 8-bit bytes, 16-bit words, and 32-bit doublewords.  When
  4089.       8-bit bytes are displayed, their ASCII equivalents are also
  4090.       displayed on the right-hand side of the window.
  4091.  
  4092.    6. Clicking on the "HOME" entry may be used to move directly to the
  4093.       stack entry referenced by SS:SP (16-bit mode) or SS:ESP (32-bit
  4094.       mode).
  4095.  
  4096.    7. Double-clicking on a stack entry will cause a stack modification
  4097.       window to be displayed on the screen.  A new value may be entered
  4098.       or the stack entry may be left unmodified by just pressing the
  4099.       Enter key in response to the prompt.
  4100.  
  4101.  
  4102. Manipulating the Thread Window with a Mouse
  4103. ───────────────────────────────────────────
  4104.  
  4105.    1. Clicking in the Thread window causes the text cursor to move to
  4106.       this window.  It becomes the "active" window.  The text cursor may
  4107.       be positioned to any thread entry.
  4108.  
  4109.    2. The "scroll up" and "scroll down" gadgets may be used to scroll up
  4110.       and down through thread entries.
  4111.  
  4112.    3. The "page up" and "page down" gadgets may be used to scroll up and
  4113.       down through thread entries in increments of the number of lines
  4114.       in the window minus two.
  4115.  
  4116.    4. Double-clicking on a thread "id" field will cause that thread to
  4117.       become the current thread.  The other windows on the screen will
  4118.       change to reflect the selection of another execution thread.
  4119.  
  4120.       Double-clicking on a "state" field will cause that thread's state
  4121.       to become either "frozen" or "runnable".
  4122.  
  4123.  
  4124. Manipulating the Variable Window with a Mouse
  4125. ─────────────────────────────────────────────
  4126.  
  4127.    1. Clicking in the Variable window causes the text cursor to move to
  4128.       this window.  It becomes the "active" window.
  4129.  
  4130.    2. Fields can be selected and viewed by clicking on them.
  4131.  
  4132.    3. If you click on the line of dashes in the window, you will ascend
  4133.       to previous levels.
  4134.  
  4135.    4. Gadgets are provided for scrolling, resizing, zooming and closing
  4136.       the Variable window.
  4137.  
  4138.    5. The "scroll up" and "scroll down" gadgets may be used to move up
  4139.       and down through the fields of a structure.  Entries that
  4140.       represent structures are displayed by using "{...}".  Entries that
  4141.       represent arrays are displayed by using "(...)".
  4142.  
  4143.    6. The "page up" and "page down" gadgets may be used to scroll up and
  4144.       down through the Variable window in increments of the number of
  4145.       lines in the window.
  4146.  
  4147.  
  4148. Manipulating the View Window with a Mouse
  4149. ─────────────────────────────────────────
  4150.  
  4151.    1. Clicking in the View window causes the text cursor to move to the
  4152.       mouse cursor.
  4153.  
  4154.    2. Text lines may be scrolled up or down by dragging the mouse.  To
  4155.       do this, the right-side scrolling bar must be unlocked.
  4156.  
  4157.    3. Text lines may be scrolled left or right by dragging the mouse.
  4158.       To do this, the bottom scrolling bar must be unlocked.
  4159.  
  4160.    4. Gadgets are provided for scrolling and closing the View window.
  4161.  
  4162.    5. The "scroll up" and "scroll down" gadgets may be used to move up
  4163.       and down through text lines.  When the text cursor moves to the
  4164.       top or bottom of the window, text will be scrolled down or up.
  4165.  
  4166.    6. The "scroll left" and "scroll right" gadgets move the scroll one
  4167.       character left or right.  When the text cursor moves to the left
  4168.       or right edge of the window, text will be scrolled to the right or
  4169.       left.
  4170.  
  4171.    7. The "page up" and "page down" gadgets may be used to scroll up and
  4172.       down through source lines in increments of the number of lines in
  4173.       the window minus two.
  4174. ::::NEW
  4175. ┌──────────────────────────────────────────────────────────────────────┐
  4176. │ NEW                                                                  │
  4177. │     [/Restart]     [prog_parms]                                      │
  4178. │     /Program       [:sym_file] program_name [prog_parms]             │
  4179. │     /STDIn         [file_name]                                       │
  4180. │     /STDOut        [file_name]                                       │
  4181. │     /SYmbol        sym_file [expr_list]                              │
  4182. └──────────────────────────────────────────────────────────────────────┘
  4183.  
  4184. The NEW command is used to initialize various items.
  4185.  
  4186. /Restart [prog_parms] This qualifier is used to reload the current
  4187.        application and place it into an initial state where execution
  4188.        may be started over again.  The application may have undergone
  4189.        partial or complete execution.  If desired, a new command line
  4190.        may be specified for the application.
  4191.  
  4192.           prog_parms ::= prog_cmd_line | "{"prog_cmd_line"}"
  4193.  
  4194.        You must use "{" and "}" when you have a ";" in the command line
  4195.        since VIDEO uses the semicolon as a command separator.
  4196.  
  4197.        Example:
  4198.           DBG>new {Today is Tuesday}
  4199.  
  4200.        The /Restart qualifier is implied when no other qualifier is
  4201.        specified.
  4202.  
  4203.        Under QNX, a path specification that begins with a "/" could be
  4204.        interpreted as a qualifier.
  4205.  
  4206.        Example:
  4207.           DBG>new /users/fred/test.dat
  4208.  
  4209.        In the above example, the "/users" qualifier is not supported and
  4210.        an error will result.  To resolve this conflict, the /Restart
  4211.        qualifier must be used.
  4212.  
  4213.        Example:
  4214.           DBG>new/restart /users/fred/test.dat
  4215.  
  4216. /Program [:sym_file] program_name [prog_parms] This qualifier is used to
  4217.        load a new application and place it into an initial state where
  4218.        execution may be started.
  4219.  
  4220.        If the symbolic debugging information for the program has been
  4221.        placed in a separate file, this file can be specified.  The
  4222.        specification must be preceded by a colon (":").  The default
  4223.        file extension or suffix of the symbol file is ".sym".  The
  4224.        symbolic information file can be produced by the WATCOM Linker or
  4225.        by the WATCOM Strip Utility.
  4226.  
  4227.        If desired, a command line may be specified for the new
  4228.        application.
  4229.  
  4230.           prog_parms ::= prog_cmd_line | "{"prog_cmd_line"}"
  4231.  
  4232.        You must use "{" and "}" when you have a ";" in the command line
  4233.        since VIDEO uses the ";" as a command separator.
  4234.  
  4235.        Example:
  4236.           DBG>new/prog echo {Today is Tuesday}
  4237.  
  4238.        Any break or watch points which may have been active are
  4239.        deactivated.
  4240.  
  4241.        The specification program_name has the same format as the VIDEO
  4242.        command line.  For DOS, OS/2 and NetWare 386 systems, the format
  4243.        is:
  4244.  
  4245.           [d:][path]filename[.ext]
  4246.  
  4247.        For QNX, the format is:
  4248.  
  4249.           [//nid] [//node][path]filename
  4250.  
  4251.        The semantics for locating and loading a program are identical to
  4252.        that described in the chapters dealing with the use of VIDEO
  4253.        under a particular operating system.
  4254.  
  4255. /STDIn [file_spec] This qualifier can be used to associate the standard
  4256.        input file handle with a particular file or device.  This is
  4257.        similar to specifying <file_spec on the command line.  When
  4258.        file_spec is omitted, the standard input file handle is restored
  4259.        to its original state.
  4260.  
  4261.        Note that the following command does not produce the effect that
  4262.        might be anticipated.
  4263.  
  4264.        Example:
  4265.           DBG>new/prog testit <input.fil
  4266.  
  4267.        Instead, the string "<input.fil" will be passed as a parameter to
  4268.        the program.  To accomplish the desired effect, the following two
  4269.        commands must be issued.
  4270.  
  4271.        Example:
  4272.           DBG>new/prog testit
  4273.           DBG>new/stdin input.fil
  4274.  
  4275. /STDOut [file_spec] This qualifier can be used to associate the standard
  4276.        output file handle with a particular file or device.  This is
  4277.        similar to specifying >file_spec on the command line.  When
  4278.        file_spec is omitted, the standard output file handle is restored
  4279.        to its original state.
  4280.  
  4281.        Note that the following command does not produce the effect that
  4282.        might be anticipated.
  4283.  
  4284.        Example:
  4285.           DBG>new/prog hello >output.log
  4286.  
  4287.        Instead, the string ">output.log" will be passed as a parameter
  4288.        to the program.  To accomplish the desired effect, the following
  4289.        two commands must be issued.
  4290.  
  4291.        Example:
  4292.           DBG>new/prog hello
  4293.           DBG>new/stdout output.log
  4294.  
  4295. /SYmbol sym_file [expr_list] This qualifier is used to load additional
  4296.        symbolic debugging information and specify the mapping between
  4297.        the linker addresses and the actual execution addresses.  This
  4298.        feature is useful when debugging Terminate-and-Stay-Resident
  4299.        (TSR) programs under DOS, when debugging FoxPro External
  4300.        Routines, when debugging AutoCAD ADS programs, or other similar
  4301.        situations.
  4302.  
  4303.        The default file extension or suffix of the symbol file is
  4304.        ".sym".  The symbolic information file can be produced by the
  4305.        WATCOM Linker or by the WATCOM Strip Utility.
  4306.  
  4307.        The specification sym_file is system dependent.  For DOS, OS/2
  4308.        and NetWare 386 systems, the format is:
  4309.  
  4310.           [d:][path]filename[.ext]
  4311.  
  4312.        For QNX, the format is:
  4313.  
  4314.           [//node][path]filename
  4315.  
  4316.        The optional expression list expr_list varies according to the
  4317.        type of application that you are debugging.  For 16-bit,
  4318.        real-mode applications (e.g., DOS):
  4319.  
  4320.           new/symbol sym_file seg1
  4321.  
  4322.        seg1 is the base address (segment:offset) of the program.
  4323.  
  4324.        For 32-bit, protect-mode "flat model" applications (e.g., DOS
  4325.        Extenders, 32-bit Windows, 32-bit OS/2):
  4326.  
  4327.           new/symbol sym_file seg1, seg2
  4328.         seg1 is the loaded code segment:offset of the program.  seg2 is
  4329.        the data/extra/stack segment alias for the loaded code segment
  4330.        (in the "flat" model, segments CS, DS, ES, SS all map to the same
  4331.        linear address but will have different selector values).
  4332.  
  4333.        For 16- or 32-bit, protect-mode segmented applications (e.g.,
  4334.        16-bit Windows, 16-bit OS/2, QNX):
  4335.  
  4336.           new/symbol sym_file seg1, seg2, seg3, ...
  4337.         segN is the loaded segment:offset value for the N'th segment of
  4338.        the program.
  4339.  
  4340.        If segN is a simple integer (e.g., 5), it is assumed to represent
  4341.        a segment value and the offset portion is assumed to be 0.  If
  4342.        seg:off is specified (e.g., 5:100) then "seg" is the loaded
  4343.        segment value and "off" is added to all symbol address offsets.
  4344.  
  4345.        If you do not specify all the required loaded segment values then
  4346.        the debugger will begin prompting for the missing values.
  4347.  
  4348.        For examples of the NEW /SYmbol command, see the VIDEO command
  4349.        file ADS.DBG or FOX.DBG.
  4350.  
  4351.        When debugging DOS applications locally, it may be necessary to
  4352.        specify the VIDEO "REServesym" option when starting up the
  4353.        debugger.  For example, you may get the message "no memory for
  4354.        symbolic information".  This indicates that the option must be
  4355.        specified.
  4356. ::::NOTATION
  4357. The following notation is used to describe the syntax of VIDEO commands.
  4358.  
  4359. Abc    The short form for the item abc is a.  For example, if the item
  4360.        is "COMPute", the valid forms are "comp", "compu", "comput" and
  4361.        "compute".
  4362.  
  4363. [abc]  The item abc is optional.
  4364.  
  4365. {abc}  The item abc may be repeated zero or more times.
  4366.  
  4367. "abc"  The characters abc are required.
  4368.  
  4369. a|b|c  One of a, b or c may be specified.
  4370.  
  4371. a ::= b The item a is defined in terms of b.
  4372.  
  4373. To test your understanding of the above notation, consider the following
  4374. example.
  4375.  
  4376.    dec_digit ::= "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"
  4377.  
  4378. In the above example, a decimal digit (dec_digit) is defined as one of
  4379. the characters "0" through "9" (a "0" or a "1" or a "2", etc.).  We
  4380. could then define a decimal number to be
  4381.  
  4382.    decimal_number ::= dec_digit {dec_digit}
  4383.  
  4384. This is read as "a decimal number is defined to be a decimal digit
  4385. followed by zero or more decimal digits".  Clearly, "12345" conforms to
  4386. our rule whereas "12ABC" and "Hello" do not.
  4387.  
  4388. We also use several abbreviated terms in the description of VIDEO
  4389. commands.
  4390.  
  4391. Short Form Explanation
  4392.  
  4393. addr   "address"
  4394. arg    "argument"
  4395. brk    "break", "break point"
  4396. char   "character"
  4397. cmd    "command"
  4398. expr   "expression"
  4399. num    "number"
  4400. parm   "parameter"
  4401. prog   "program"
  4402. reg    "register"
  4403. spec   "specifier"
  4404. tmp    "temporary"
  4405.  
  4406. We also concatenate these abbreviations by using the underscore to
  4407. define new abbreviations.
  4408.  
  4409. Examples:
  4410.  
  4411. addr_expr "address expression"
  4412.  
  4413. cmd_spec "command specifier"
  4414.  
  4415. Several commands may be entered on one line by separating them with
  4416. semicolons.
  4417.  
  4418. Example:
  4419.    DBG>do myvar=var*2;print myvar
  4420.  
  4421. In the above example, the first command sets the variable myvar to twice
  4422. the value of var and the second command prints this new value.
  4423.  
  4424. Using our notation, we define a command line as follows:
  4425.  
  4426.    cmd_line ::= [cmd] { ";" [cmd] }
  4427.  
  4428. While such definitions may be quite precise, they often tend to be
  4429. somewhat more obscure.  If we analyze the definition carefully, we will
  4430. discover that an empty line qualifies as a command.  In the following
  4431. sections, we will first present the concise command syntax.  This is
  4432. followed by an explanation of both the syntax and semantics of the
  4433. command.  A number of examples are also presented so that you may get a
  4434. "feel" for the command's syntax.
  4435. ::::OS2_STARTUP
  4436. ┌──────────────────────────────────────────────────────────────────────┐
  4437. │ WVIDEO [options] [:sym_file] file_spec [cmd_line]                    │
  4438. └──────────────────────────────────────────────────────────────────────┘
  4439.  
  4440. The square brackets [ ] denote items which are optional.
  4441.  
  4442. WVIDEO is the program name for VIDEO.
  4443.  
  4444. options is a list of valid VIDEO options, each preceded by a dash ("-")
  4445.        or a slash ("/").  Options may be specified in any order.
  4446.  
  4447. sym_file is an optional symbolic debugging information file
  4448.        specification.  The specification must be preceded by a colon
  4449.        (":").  For OS/2, the syntax of sym_file is:
  4450.  
  4451.        [d:][path]filename[.ext]
  4452.  
  4453.        The default file extension of the symbol file is ".SYM".
  4454.  
  4455.        The symbolic information file can be produced by the WATCOM
  4456.        Linker WLINK or by the WATCOM Strip Utility WSTRIP.
  4457.  
  4458. file_spec is the file name of the file to be loaded into memory.  For
  4459.        OS/2, the syntax of file_spec is:
  4460.  
  4461.        [d:][path]filename[.ext]
  4462.  
  4463.        d:     is an optional drive specification such as "A:", "B:",
  4464.               etc.  If not specified, the default drive is assumed.
  4465.  
  4466.        path   is an optional path specification such as "\UTILS\BIN\".
  4467.  
  4468.        filename is the file name of the file to be loaded into memory.
  4469.  
  4470.        ext    is the file extension of the file to be loaded into
  4471.               memory.  A null file extension may be specified by typing
  4472.               the period "." but not the extension.  If no file
  4473.               extension is specified (i.e., both the period and
  4474.               extension are omitted), the default is ".EXE".
  4475.  
  4476. cmd_line is an optional command line which will be passed on to the
  4477.        application.
  4478.  
  4479. If both drive and path are omitted, VIDEO will first attempt to locate
  4480. the file in the current directory of the default drive.  If this fails,
  4481. VIDEO will search for the file in each path listed in the PATH
  4482. environment string.
  4483.  
  4484.  
  4485. Command Line Options
  4486. ────────────────────
  4487.  
  4488. ┌──────────────────────────────────────────────────────────────────────┐
  4489. │     /Dynamic=space                                                   │
  4490. │     /NOFpu                                                           │
  4491. │     /Invoke=file_spec                                                │
  4492. │     /Lines=number                                                    │
  4493. │     /NOInvoke                                                        │
  4494. │     /NOMouse                                                         │
  4495. │     /Registers=number                                                │
  4496. │     /REMotefiles                                                     │
  4497. │     /NOSymbols                                                       │
  4498. │     /TRap=trap_file[;trap_parm]                                      │
  4499. └──────────────────────────────────────────────────────────────────────┘
  4500.  
  4501. Options may be specified in any order.  Short forms may be specified for
  4502. options and are shown above in capital letters.  If "space" is suffixed
  4503. with the letter "K" then "space" refers to multiples of 1K bytes (1024
  4504. bytes).  If "space" is suffixed with the letter "B" then "space" refers
  4505. to the number of bytes.  If no suffix is specified and "space" is a
  4506. number less than 1000 then "space" is assumed to refer to multiples of
  4507. 1K bytes (1024 bytes); otherwise it refers to the number of bytes.
  4508.  
  4509. /Dynamic=number specifies the initial amount of dynamic storage that
  4510.        VIDEO is to reserve for items such as windows, user-defined
  4511.        symbols, etc.  The default amount that is set aside is 20480
  4512.        bytes (20 Kilobytes).  As additional storage is required, VIDEO
  4513.        will allocate it.
  4514.  
  4515. /NOFpu requests that the debugger ignore the presence of a math
  4516.        coprocessor.  No memory will be allocated by the debugger for
  4517.        saving the context of the 80x87 numeric data processor.  Use this
  4518.        option if your application will not use the math coprocessor and
  4519.        you wish to reduce the amount of memory required by the debugger.
  4520.  
  4521. /Invoke=file_spec may be used to specify an alternate name for the
  4522.        debugger command file which is to be automatically invoked at
  4523.        start-up time.  The default file name is "PROFILE.DBG".  VIDEO
  4524.        command files are found in the current directory or one of the
  4525.        directories listed in the OS/2 PATH environment string.
  4526.  
  4527. /Lines=number may be used to specify the number of display lines that
  4528.        VIDEO is to use.  If this option is not specified, the default
  4529.        number of output lines is selected.  When an Enhanced Graphics
  4530.        Adapter (EGA) is present, 43 lines of output may be requested.
  4531.        When an Video Graphics Array (VGA) is present, 28 or 50 lines of
  4532.        output may be requested.
  4533.  
  4534. /NOInvoke specifies that the default debugger command file is not to be
  4535.        invoked.
  4536.  
  4537. /NOMouse requests that the debugger ignore any attached mouse.
  4538.  
  4539. /Registers=number may be used to specify how many register sets to set
  4540.        aside for the recording of register contents.  The default number
  4541.        of register sets is 2.  See the description of the Register
  4542.        command for more information (this command is described under the
  4543.        "REGISTER" topic).
  4544.  
  4545. /REMotefiles may be used in conjunction with the remote debugging
  4546.        capabilities of the debugger.  Remote debugging involves using
  4547.        two personal computers.  One, called the "task machine", is used
  4548.        to run the application; the other, called the "debugger machine",
  4549.        is used to run the debugger.  When REMotefiles is specified, all
  4550.        debugger files (except "trap" files) and application source files
  4551.        are opened on the task machine rather than the debugger machine
  4552.        (if you are doing local debugging, these two machines are
  4553.        actually the same).  The "trap" file must be located on the
  4554.        debugger machine because it contains the code to open files on
  4555.        the task machine.
  4556.  
  4557.        Note that the PATH environment variable on the task machine is
  4558.        always used in locating executable image files.  When REMotefiles
  4559.        is specified, the debugger also uses the task machine's PATH
  4560.        environment variable to locate debugger command files.
  4561.  
  4562. /NOSymbols requests that VIDEO omit all debugging information when
  4563.        loading an executable image.  Information regarding global and
  4564.        local symbol names, data types, and line numbers is not
  4565.        processed.
  4566.  
  4567. /TRap=trap_file[;trap_parm] may be specified when debugging an
  4568.        application on a remote machine.  You must specify the name of
  4569.        one of the "trap" files provided with VIDEO.  Under OS/2, the
  4570.        file extension defaults to ".DLL".  The "BINP\DLL" directory
  4571.        contains the dynamic link libraries (DLL) provided with VIDEO.
  4572.        The OS/2 LIBPATH directive in the "CONFIG.SYS" file must be used
  4573.        to identify the location of the "DLL" trap files.
  4574.  
  4575.        Under OS/2, if you do not specify a trap file, the default trap
  4576.        file "STD.DLL" will be loaded.  This interface module supports
  4577.        debugging on the local computer system running OS/2.  No remote
  4578.        debugging is possible.
  4579. ::::PAINT
  4580. ┌──────────────────────────────────────────────────────────────────────┐
  4581. │ PAint (window_name | ["*"]) attr_name [ fg_col ["," bg_col] ]        │
  4582. └──────────────────────────────────────────────────────────────────────┘
  4583.  
  4584. The PAint command is used to define the colour composition of windows.
  4585. The valid window names are:
  4586.  
  4587.    Assembly
  4588.    Command
  4589.    Dialogue
  4590.    Fpu
  4591.    Memory
  4592.    Prompt
  4593.    Register
  4594.    SOurce
  4595.    STack
  4596.    Thread
  4597.  
  4598. An asterisk ("*") may be used to denote all of them.  If a window name
  4599. is omitted then "*" is assumed.
  4600.  
  4601. Five different attributes of a window may be individually coloured.  The
  4602. attribute attr_name may be one of:
  4603.  
  4604.    Plain
  4605.    Active
  4606.    Standout
  4607.    Title
  4608.    Gadget
  4609.  
  4610. Foreground (fg_col) and background (bg_col) colours may be selected from
  4611. the following:
  4612.  
  4613.    BLAck
  4614.    BLUe
  4615.    GREEn
  4616.    Cyan
  4617.    Red
  4618.    Magenta
  4619.    BROwn
  4620.    White
  4621.  
  4622. In addition, the following foreground colour variations may be selected:
  4623.  
  4624.    BRIght BLAck
  4625.    BRIght BLUe
  4626.    BRIght GREEn
  4627.    BRIght Cyan
  4628.    BRIght Red
  4629.    BRIght Magenta
  4630.    BRIght BROwn
  4631.    BRIght White
  4632.    GRAy
  4633.    GREY
  4634.    Yellow
  4635.  
  4636. "GRAy" and "GREY" are synonyms for "BRIght BLAck".  "Yellow" is a
  4637. synonym for "BRIght BROwn".  The "BLINking" keyword may be also precede
  4638. a foreground colour to specify that the item should also blink when it
  4639. is displayed.  Please note that colour attributes on the IBM Monochrome
  4640. Display and Printer Adapter will behave as described in the following
  4641. table.
  4642.  
  4643. Colour Monochrome
  4644.  
  4645. black  (invisible)
  4646. blue   underlined white
  4647. green  white
  4648. cyan   white
  4649. red    white
  4650. magenta white
  4651. brown  white
  4652. white  white
  4653. bright black (invisible)
  4654. bright blue bright white
  4655. bright green white
  4656. bright cyan white
  4657. bright red white
  4658. bright magenta white
  4659. bright brown white
  4660. bright white white
  4661.  
  4662. When specifying colour attributes for a window item, the foreground
  4663. colour is specified first and the background colour last.  If one of the
  4664. foreground or background colours is omitted, it will remain unchanged.
  4665. Note that the background colour specification is always preceded by a
  4666. comma.
  4667.  
  4668. Attributes: Description:
  4669.  
  4670. Plain  Each window displays "plain" text.  This text usually forms the
  4671.        greater part of a window.
  4672.  
  4673.        Example:
  4674.           DBG>paint * plain white,blue
  4675.  
  4676.        In the above example, the plain text of all windows is set to
  4677.        white characters on a blue background.
  4678.  
  4679.        Example:
  4680.           DBG>paint assembly plain bright green,red
  4681.  
  4682.        In the above example, the plain text of the Assembly window only
  4683.        is set to bright green characters on a red background.
  4684.  
  4685. Active Some items in a window may be highlighted in the "active" colour
  4686.        combination.  For example, the source line or assembler
  4687.        instruction that is about to be executed is displayed in the
  4688.        "active" colour attributes.
  4689.  
  4690.        Example:
  4691.           DBG>paint * active bright white,blue
  4692.  
  4693.        In the above example, the "active" text of all windows is set to
  4694.        bright white characters on a blue background.
  4695.  
  4696.        Example:
  4697.           DBG>paint source active cyan,brown
  4698.  
  4699.        In the above example, the "active" text of the Source window only
  4700.        is set to cyan characters on a brown background.
  4701.  
  4702. Standout Some items in a window may be highlighted with the "standout"
  4703.        colour combination.  For example, the source line or assembler
  4704.        instruction that is displayed by using the Examine /Source
  4705.        command is displayed in the "standout" colour attributes.
  4706.  
  4707.        Example:
  4708.           DBG>paint * standout red,white
  4709.  
  4710.        In the above example, the "standout" text for all windows is set
  4711.        to red characters on a white background.
  4712.  
  4713.        Example:
  4714.           DBG>paint source standout brown,cyan
  4715.  
  4716.        In the above example, the "standout" text of the Source window
  4717.        only is set to brown characters on a cyan background.
  4718.  
  4719. Title  Each window may be titled and the colours for the title line may
  4720.        be selected.
  4721.  
  4722.        Example:
  4723.           DBG>paint * title yellow,magenta
  4724.  
  4725.        In the above example, the title lines for all windows bearing
  4726.        titles are displayed with yellow characters on a magenta
  4727.        background.
  4728.  
  4729.        Example:
  4730.           DBG>paint assembly title magenta,green
  4731.  
  4732.        In the above example, if there is a title line for the Assembly
  4733.        window then it will be displayed with magenta characters on a
  4734.        green background.
  4735.  
  4736. Gadget Mouse window gadgets are displayed in the "gadget" colour
  4737.        combination.
  4738.  
  4739.        Example:
  4740.           DBG>paint * gadget black, cyan
  4741.  
  4742.        In the above example, the "gadget" colours for all windows is set
  4743.        to black characters on a cyan background.
  4744. ::::PRINT
  4745. ┌──────────────────────────────────────────────────────────────────────┐
  4746. │ Print [/Program] { "{"format_spec"}" expr_list }                     │
  4747. │ ?                                                                    │
  4748. └──────────────────────────────────────────────────────────────────────┘
  4749.  
  4750. The Print or ?  command evaluates one or more expressions and prints the
  4751. results in the Dialogue window, or the application's standard error area
  4752. (usually the screen of the task machine) if the /Program qualifier is
  4753. specified.  The Print command is useful for examining the values of
  4754. variables and expressions.  The expressions can involve registers,
  4755. application variables and user-defined debugger variables.  The
  4756. operations possible are patterned after those available in the WATCOM C
  4757. and WATCOM FORTRAN 77 compilers.  Expressions are fully discussed in the
  4758. chapter entitled "VIDEO Expression Handling".
  4759.  
  4760. By default, integer values are printed in the current default numeric
  4761. radix, pointer values are printed in hexadecimal notation, and
  4762. floating-point values are printed in floating-point notation.  In
  4763. addition, if the expression is an enumerated type, the name of the
  4764. enumeration constant corresponding to the numeric value of the
  4765. expression is printed.  If the numeric value does not have a
  4766. corresponding enumeration constant, the value is printed in the current
  4767. default numeric radix.
  4768.  
  4769. To print out the value in some other representation, a format string may
  4770. also be specified.  Formally, the format specification is defined as
  4771. follows:
  4772.  
  4773.    format_spec ::= { char | "%"specifier }
  4774.    specifier   ::= "i" | "d" | "u" | "x" | "X"
  4775.                        | "o" | "p" | "c" | "s" | "%"
  4776.                        | "f" | "g" | "G" | "e" | "E"
  4777.                        | "r" | "a" | "l"
  4778.  
  4779. Text may be included to annotate the output.
  4780.  
  4781. Specifiers: Description:
  4782.  
  4783. "i"    The corresponding argument is printed out as a signed decimal
  4784.        integer value.
  4785.  
  4786. "d"    The corresponding argument is printed out as a signed decimal
  4787.        integer value.
  4788.  
  4789. "u"    The corresponding argument is printed out as an unsigned decimal
  4790.        integer value.
  4791.  
  4792. "x"    The corresponding argument is printed out as an unsigned
  4793.        hexadecimal integer value.  Letter digits are printed in lower
  4794.        case (a-f).
  4795.  
  4796. "X"    The corresponding argument is printed out as an unsigned
  4797.        hexadecimal integer value.  Letter digits are printed in upper
  4798.        case (A-F).
  4799.  
  4800. "o"    The corresponding argument is printed out as an unsigned octal
  4801.        integer value.
  4802.  
  4803. "p"    The corresponding argument is printed out as a pointer
  4804.        (segment:offset) value in hexadecimal notation.
  4805.  
  4806. "c"    The corresponding argument is printed out as a single character
  4807.        value.
  4808.  
  4809. "s"    The corresponding argument is printed out as a C string value.
  4810.        The argument must point to a string of characters terminated by a
  4811.        byte whose value is zero.
  4812.  
  4813. "%"    To print out a percentage symbol, the "%" must be doubled up
  4814.        (i.e.  %%).
  4815.  
  4816. "f"    The corresponding argument is printed out in floating-point
  4817.        representation.  If the floating-point value has a very large or
  4818.        small magnitude, you should use one of "g", "G", "e" or "E"
  4819.        formatting.
  4820.  
  4821. "g"    The corresponding argument is printed out in floating-point
  4822.        representation.  Numbers of very large or small magnitude are
  4823.        printed out in scientific "E" notation (e.g., 1.54352e+16).  The
  4824.        exponent letter is printed in lower case.
  4825.  
  4826. "G"    The corresponding argument is printed out in floating-point
  4827.        representation.  Numbers of very large or small magnitude are
  4828.        printed out in scientific "E" notation (e.g., 1.54352E+16).  The
  4829.        exponent letter is printed in upper case.
  4830.  
  4831. "e"    The corresponding argument is printed out in scientific "E"
  4832.        notation (e.g., 1.23456e+02).  The exponent letter is printed in
  4833.        lower case.
  4834.  
  4835. "E"    The corresponding argument is printed out in scientific "E"
  4836.        notation (e.g., 1.23456E+02).  The exponent letter is printed in
  4837.        upper case.
  4838.  
  4839. "r"    The corresponding argument is printed out in the current default
  4840.        numeric radix.
  4841.  
  4842. "a"    The corresponding argument is printed out as a symbol reference
  4843.        (symbol_name+offset) when possible; otherwise it is printed out
  4844.        as a pointer (segment:offset) value in hexadecimal notation.
  4845.  
  4846. "l"    The corresponding argument is printed out as a line number
  4847.        reference (module_name@line_number+offset) when possible;
  4848.        otherwise it is printed out as a pointer (segment:offset) value
  4849.        in hexadecimal notation.
  4850.  
  4851. Example:
  4852.    DBG>print ax
  4853.    DBG>? ax
  4854.  
  4855. The value of the AX register is displayed in hexadecimal format
  4856. (assuming a default numeric radix of 16) in the Dialogue window.
  4857.  
  4858. Example:
  4859.    DBG>? [dx ax]
  4860.  
  4861. The contents of the DX and AX registers are treated as a single 32-bit
  4862. long integer and displayed in hexadecimal format (assuming a default
  4863. numeric radix of 16).  This grouping of registers is called an
  4864. aggregate.
  4865.  
  4866. Example:
  4867.    DBG>? {%i} [cx bx]
  4868.  
  4869. The aggregate formed by concatenating the CX and BX registers is treated
  4870. as a 32-bit long integer and displayed in decimal integer format.
  4871.  
  4872. Example:
  4873.    DBG>? (float) [ax bx]
  4874.  
  4875. By employing type casting, the long integer value in this register
  4876. aggregate is converted to a floating-point value and displayed in
  4877. floating-point format.
  4878.  
  4879. Example:
  4880.    DBG>? [float] [ax bx]
  4881.  
  4882. By employing the type "pun" operator, the 32-bit value in this register
  4883. aggregate is treated as a floating-point value and displayed in
  4884. floating-point format.  By default, the 32-bit quantity would have been
  4885. treated as a long integer.
  4886.  
  4887. Example:
  4888.    DBG>? [ax bx cx dx]
  4889.  
  4890. The aggregate formed from the AX, BX, CX and DX registers is treated as
  4891. a 64-bit floating-point entity and displayed in floating-point format.
  4892. By default, 64-bit register aggregates are treated as double precision
  4893. floating-point values.
  4894.  
  4895. Example:
  4896.    DBG>print {The answer is %d (0x%x)} ans=foo/2, ans
  4897.  
  4898. The result of dividing the value of foo by 2 is displayed in the
  4899. Dialogue window in both decimal and hexadecimal format.
  4900.  
  4901. Example:
  4902.    DBG>? &main_
  4903.  
  4904. The address of main_ (segment:offset) is displayed in the Dialogue
  4905. window.
  4906.  
  4907. Example:
  4908.    DBG>? {The address of "main" is %p} &main_
  4909.  
  4910. The address of main_ (segment:offset) is displayed as part of a string
  4911. of text in the Dialogue window.
  4912.  
  4913. Example:
  4914.    DBG>? ax=dx
  4915.  
  4916. The contents of the DX register are assigned to the AX register and the
  4917. result is displayed in the Dialogue window.
  4918.  
  4919. Example:
  4920.    DBG>print {%c-%c-%c-%c}3,4,5,6
  4921.  
  4922. The "heart", "diamond", "club" and "spade" characters are displayed in
  4923. the Dialogue window separated by hyphens.
  4924.  
  4925. Example:
  4926.    DBG>print {%f} flt_val1
  4927.  
  4928. The variable flt_val1 is displayed in floating-point notation.
  4929.  
  4930. Example:
  4931.    DBG>? {%i} (int) 3.1415926
  4932.  
  4933. The argument is displayed as the decimal integer value 3.
  4934.  
  4935. Example:
  4936.    DBG>? (char *) 256
  4937.  
  4938. The argument (a pointer) is displayed as a pointer value in hexadecimal
  4939. notation (e.g., "0100").  This is the default formatting for pointers.
  4940.  
  4941. Example:
  4942.    DBG>? {%r} (char *) 256
  4943.  
  4944. The argument (a pointer) is displayed in the current default radix
  4945. ("0256" if the current default radix is decimal).
  4946.  
  4947. Consider the following 16-bit example.
  4948.  
  4949. Example:
  4950.    DBG>? {%x,%x} 65536, (int) 65536
  4951.  
  4952. The first argument, the long integer 65536, is displayed as "10000".
  4953. The second argument is converted to a short integer and is displayed as
  4954. "0" since 65536 exceeds the range of 16-bit unsigned values by 1.
  4955.  
  4956.  
  4957. Printing Array Slices
  4958. ─────────────────────
  4959. When the appropriate type information is available, VIDEO can print out
  4960. the contents of an array.  By default, the debugger will print out the
  4961. contents of the entire array.  Consider the following 3-dimensional
  4962. array defined in the C programming language.
  4963.  
  4964. Example:
  4965.    char *ProcessorType[2][4][2] =
  4966.        { { { "Intel 8086",   "Intel 8088"  },
  4967.            { "Intel 80186",  "Intel 80188" },
  4968.            { "Intel 80286",  "unknown" },
  4969.            { "Intel 80386",  "unknown" } },
  4970.  
  4971.          { { "NEC V30",      "NEC V20" },
  4972.            { "unknown",      "unknown" },
  4973.            { "unknown",      "unknown" },
  4974.            { "unknown",      "unknown" } } };
  4975.  
  4976. This array can be viewed as two layers of rectangular matrices of 4 rows
  4977. by 2 columns.  The array elements are all pointers to string values.
  4978.  
  4979. To examine the contents of the array, the following command can be
  4980. issued.  The response to the command is also shown.
  4981.  
  4982. Example:
  4983.    DBG>?processortype
  4984.    {[0]={[0]={[0]=0x0024, [1]=0x002F},
  4985.          [1]={[0]=0x003A, [1]=0x0046},
  4986.          [2]={[0]=0x0052, [1]=0x005E},
  4987.          [3]={[0]=0x0066, [1]=0x005E}},
  4988.     [1]={[0]={[0]=0x0072, [1]= 0x007A},
  4989.          [1]={[0]=0x005E, [1]=0x005E},
  4990.          [2]={[0]=0x005E, [1]=0x005E},
  4991.          [3]={[0]=0x005E, [1]=0x005E}}}
  4992.  
  4993. The values shown are the addresses of the string values.
  4994.  
  4995. By using dimension specifiers, specific slices of an array can be
  4996. displayed.  To see only the values of the first layer, the following
  4997. command can be issued.
  4998.  
  4999. Example:
  5000.    DBG>?processortype[0]
  5001.    {[0]={[0]=0x0024, [1]=0x002F},
  5002.     [1]={[0]=0x003A, [1]=0x0046},
  5003.     [2]={[0]=0x0052, [1]=0x005E},
  5004.     [3]={[0]=0x0066, [1]=0x005E}}
  5005.  
  5006. Note that this corresponds to the first half of the addresses displayed
  5007. in the previous example.
  5008.  
  5009. To see only the first row of the first layer, the following command can
  5010. be issued.
  5011.  
  5012. Example:
  5013.    DBG>?processortype[0][0]
  5014.    {[0]=0x0024, [1]=0x002F}
  5015.  
  5016. To see the second row of the first layer, the following command can be
  5017. issued.
  5018.  
  5019. Example:
  5020.    DBG>?processortype[0][1]
  5021.    {[0]=0x003A, [1]=0x0046}
  5022.  
  5023. To see the value of a specific entry in a matrix, all the indices can be
  5024. specified.
  5025.  
  5026. Example:
  5027.    DBG>?{%s} processortype[0][0][0]
  5028.    Intel 8086
  5029.    DBG>?{%s} processortype[0][0][1]
  5030.    Intel 8088
  5031.    DBG>?{%s} processortype[0][1][0]
  5032.    Intel 80186
  5033.  
  5034. In the above examples, we use the "%s" format specifier to display the
  5035. string values.
  5036. ::::PRINT_WINDOW
  5037. ┌──────────────────────────────────────────────────────────────────────┐
  5038. │ Print /Window expr                                                   │
  5039. │ ?                                                                    │
  5040. └──────────────────────────────────────────────────────────────────────┘
  5041.  
  5042. The Print /Window command may be used to display the results of a Print
  5043. command in a Variable Display window that is created dynamically.
  5044.  
  5045. A Variable Display window is placed on the screen showing the variable
  5046. including fields if it is a structure.  The window is updated each time
  5047. the debugger is entered.  The window may be manipulated in the same
  5048. manner as other windows.  When the Variable Display window is created,
  5049. it inherits the colour attributes of the Dialogue window.  The Ctrl/P
  5050. (paint) key may be used to redefine the window's colour attributes.  It
  5051. may be resized using the Ctrl/N (narrow), Ctrl/W (widen), Ctrl/S
  5052. (shrink), and Ctrl/G (grow) keys or by manipulating the "resizer" gadget
  5053. with a mouse.  It may be moved using the Ctrl/U (up), Ctrl/D (down),
  5054. Ctrl/L (left) and Ctrl/R (right) keys or by dragging the title line with
  5055. a mouse.  The window may be removed using the Ctrl/E (erase) key or by
  5056. clicking on the "close" gadget.
  5057.  
  5058. If a structure is displayed, the cursor up and down keys may be used to
  5059. move up and down through fields.  To display the contents of a field,
  5060. the Enter key can be pressed.  To return to the previous level, the
  5061. Backspace key can be pressed.  Entries that represent structures are
  5062. displayed by using "{...}" and entries that represent arrays are
  5063. displayed by using "(...)" Essentially, the Enter key permits you to
  5064. "descend" to nested structures and the Backspace key permits you to
  5065. "ascend" to a previous level.
  5066.  
  5067. If an entry represents a string, the "S" key can be used to display the
  5068. entry as a string.  The Backspace key can be used to return to the
  5069. original display format.
  5070.  
  5071. The top entry in the window displays the current structure nesting
  5072. level.  You can move the cursor to this entry and edit it.  If the entry
  5073. represents a field in a structure, you can ascend to the previous level
  5074. by removing the trailing field.  By adding new fields, you can descend
  5075. to nested levels.
  5076.  
  5077. A mouse can be used to select and view fields by clicking on them.  If
  5078. you click on the line of dashes in the window, you will ascend to
  5079. previous levels.
  5080.  
  5081. The Escape key or the mouse can be used to move to the Prompt window.
  5082. ::::QNX_STARTUP
  5083. ┌──────────────────────────────────────────────────────────────────────┐
  5084. │ wvideo [options] [:sym_file] [//nid] pid                             │
  5085. │    or                                                                │
  5086. │ wvideo [options] [:sym_file] [//nid] file_spec [cmd_line]            │
  5087. └──────────────────────────────────────────────────────────────────────┘
  5088.  
  5089. The square brackets [ ] denote items which are optional.
  5090.  
  5091. wvideo is the program name for VIDEO.
  5092.  
  5093. options is a list of valid VIDEO options, each preceded by a dash ("-").
  5094.        Options may be specified in any order.
  5095.  
  5096. sym_file is an optional symbolic debugging information file
  5097.        specification.  The specification must be preceded by a colon
  5098.        (":").  When specifying a symbol file name, a path such as
  5099.        "//5/etc/" may be included.  For QNX, the default file suffix of
  5100.        the symbol file is ".sym".
  5101.  
  5102.        The symbolic information file can be produced by the WATCOM
  5103.        Linker wlink or by the WATCOM Strip Utility wstrip.
  5104.  
  5105. nid    is an optional network node identification (nid) on which to
  5106.        locate or run the process.  If omitted, the process will be
  5107.        located or run on the current node.
  5108.  
  5109. pid    is a process identification number of a currently executing
  5110.        process.  If a process id is given then VIDEO will attempt to
  5111.        attach the specified process.  If a "nid" was also given then
  5112.        VIDEO will attempt to attach the specified process on the
  5113.        specified node.
  5114.  
  5115. file_spec is the file name of the file to be loaded into memory.  When
  5116.        specifying a file name, a path such as "//5/etc/" may be
  5117.        included.  If a path is omitted, VIDEO will first attempt to
  5118.        locate the file in the current directory.  If this fails, VIDEO
  5119.        will search for the file in each path listed in the PATH
  5120.        environment string.
  5121.  
  5122. cmd_line is an optional command line which will be passed on to the
  5123.        application.
  5124.  
  5125. Example 1:
  5126.    % wvideo -reg=4 myapp
  5127.  
  5128. VIDEO is invoked with 4 register sets and loads the application called
  5129. "myapp".
  5130.  
  5131. Example 2:
  5132.    % wvideo -reg=4 //5 //7/usr/fred/myapp -x test.dat
  5133.  
  5134. VIDEO is invoked with 4 register sets and loads the application called
  5135. "myapp", located on node 7 of the network, onto node 5 of the network.
  5136. The command line "-x test.dat" is passed to "myapp".
  5137.  
  5138. Example 3:
  5139.    % wvideo //5 0342
  5140.  
  5141. VIDEO is invoked to attach a process identified by pid "0342" running on
  5142. node 5.
  5143.  
  5144. Command Line Options
  5145. ────────────────────
  5146.  
  5147. ┌──────────────────────────────────────────────────────────────────────┐
  5148. │     -Console=number                                                  │
  5149. │     -Dynamic=space                                                   │
  5150. │     -NOFpu                                                           │
  5151. │     -Invoke=file_spec                                                │
  5152. │     -Lines=number                                                    │
  5153. │     -NOInvoke                                                        │
  5154. │     -NOMouse                                                         │
  5155. │     -Registers=number                                                │
  5156. │     -REMotefiles                                                     │
  5157. │     -NOSymbols                                                       │
  5158. │     -TRap=trap_file[;trap_parm]                                      │
  5159. └──────────────────────────────────────────────────────────────────────┘
  5160.  
  5161. Options may be specified in any order.  Short forms may be specified for
  5162. options and are shown above in capital letters.  If "space" is suffixed
  5163. with the letter "K" then "space" refers to multiples of 1K bytes (1024
  5164. bytes).  If "space" is suffixed with the letter "B" then "space" refers
  5165. to the number of bytes.  If no suffix is specified and "space" is a
  5166. number less than 1000 then "space" is assumed to refer to multiples of
  5167. 1K bytes (1024 bytes); otherwise it refers to the number of bytes.
  5168.  
  5169. -Console=number specifies the virtual console number to use for debugger
  5170.        windows.  By default, VIDEO will use the first "free" virtual
  5171.        console.
  5172.  
  5173. -Dynamic=number specifies the initial amount of dynamic storage that
  5174.        VIDEO is to reserve for items such as windows, user-defined
  5175.        symbols, etc.  The default amount that is set aside is 20480
  5176.        bytes (20 Kilobytes).  As additional storage is required, VIDEO
  5177.        will allocate it.
  5178.  
  5179. -NOFpu requests that the debugger ignore the presence of a math
  5180.        coprocessor or emulator.  No memory will be allocated by the
  5181.        debugger for saving the context of the 80x87 numeric data
  5182.        processor.  Use this option if your application will not use the
  5183.        math coprocessor and you wish to reduce the amount of memory
  5184.        required by the debugger.
  5185.  
  5186. -Invoke=file_spec may be used to specify an alternate name for the
  5187.        debugger command file which is to be automatically invoked at
  5188.        start-up time.  The default file name is "profile.dbg".  See the
  5189.        section entitled "Search Order for VIDEO Support Files" for
  5190.        information on how command files are located.
  5191.  
  5192. -Lines=number may be used to specify the number of display lines that
  5193.        VIDEO is to use.  If this option is not specified, the default
  5194.        number of output lines is selected.  When an Enhanced Graphics
  5195.        Adapter (EGA) is present, 43 lines of output may be requested.
  5196.        When an Video Graphics Array (VGA) is present, 50 lines of output
  5197.        may be requested.
  5198.  
  5199. -NOInvoke specifies that the default debugger command file is not to be
  5200.        invoked.
  5201.  
  5202. -NOMouse requests that the debugger ignore any attached mouse.
  5203.  
  5204. -Registers=number may be used to specify how many register sets to set
  5205.        aside for the recording of register contents.  The default number
  5206.        of register sets is 2.  See the description of the Register
  5207.        command for more information (this command is described under the
  5208.        "REGISTER" topic).
  5209.  
  5210. -REMotefiles may be used in conjunction with the remote debugging
  5211.        capabilities of the debugger.  Remote debugging involves using
  5212.        two personal computers that are connected by means other than the
  5213.        network.  One, called the "task machine", is used to run the
  5214.        application; the other, called the "debugger machine", is used to
  5215.        run the debugger.  When REMotefiles is specified, all debugger
  5216.        files (except "trap" files) and application source files are
  5217.        opened on the task machine rather than the debugger machine (if
  5218.        you are doing local debugging, these two machines are actually
  5219.        the same).  The "trap" file must be located on the debugger
  5220.        machine because it contains the code to open files on the task
  5221.        machine.
  5222.  
  5223.        Note that the PATH environment variable on the task machine is
  5224.        always used in locating executable image files.  When REMotefiles
  5225.        is specified, the debugger also attempts to locate VIDEO's
  5226.        support files (command files, trap files, etc.) on the task
  5227.        machine.
  5228.  
  5229. -NOSymbols requests that VIDEO omit all debugging information when
  5230.        loading an executable image.  Information regarding global and
  5231.        local symbol names, data types, and line numbers is not
  5232.        processed.
  5233.  
  5234. -TRap=trap_file[;trap_parm] may be specified when debugging an
  5235.        application on a remote machine.  You must specify the name of
  5236.        one of the "trap" files provided with VIDEO.  For QNX, the
  5237.        default file suffix of the trap file is ".trp".  Trap files are
  5238.        usually located in the "/etc/wvideo" directory.  See the section
  5239.        entitled "Search Order for VIDEO Support Files" for information
  5240.        on how trap files are located.
  5241.  
  5242.        If trap_parm is specified, it may be necessary to escape the ";"
  5243.        depending on the command shell in use.
  5244. ::::QUIT
  5245. ┌──────────────────────────────────────────────────────────────────────┐
  5246. │ QUIT                                                                 │
  5247. └──────────────────────────────────────────────────────────────────────┘
  5248.  
  5249. The QUIT command is used to terminate VIDEO and return to the operating
  5250. system.  Any application which may have partially executed is also
  5251. terminated.
  5252. ::::REGISTER
  5253. ┌──────────────────────────────────────────────────────────────────────┐
  5254. │ Register [expr]                                                      │
  5255. └──────────────────────────────────────────────────────────────────────┘
  5256.  
  5257. The Register command is used to select a VIDEO register set.
  5258.  
  5259. Whenever VIDEO is entered, it saves the current register values in a
  5260. ring of register sets.  The size of this ring is determined at start-up
  5261. time with the Registers option (the default is 2, the maximum is 100).
  5262. When the expression result is negative, a previous register set is
  5263. selected.  When the expression result is positive, a more recent
  5264. register set is selected.  When the expression is omitted, the current
  5265. register set is selected.
  5266.  
  5267. If the Register window is not present on the screen, the register
  5268. display is written to the Dialogue window.  A Register window is created
  5269. by using the Display Register command.  The top right hand corner of the
  5270. Register window will contain a number in square brackets if you are not
  5271. at the most recent register set.  This number represents the number of
  5272. register sets that are more recent than the one that is currently being
  5273. displayed.  When you issue a Go or Trace command, the currently
  5274. displayed register set becomes the "current" register values.  This
  5275. feature provides the user with a "checkpoint/restart" capability.
  5276.  
  5277. Example:
  5278.    DBG>register -1
  5279.  
  5280. In the above example, we back up to the previous register set.
  5281. ::::REMARK
  5282. ┌──────────────────────────────────────────────────────────────────────┐
  5283. │ REMark   comment_line                                                │
  5284. │ *                                                                    │
  5285. └──────────────────────────────────────────────────────────────────────┘
  5286.  
  5287. The REMark or * command provides a means for documenting VIDEO command
  5288. files.
  5289.  
  5290. Example:
  5291.    * Count the number of times a routine is executed
  5292.      /cnt_<1>=0
  5293.    * Remove the break point definition
  5294.    * just in case one already exists
  5295.      break/clear /<1>
  5296.    * Set the new break point
  5297.      break/set <1> {/cnt_<1>++; go/keep}
  5298. ::::SET
  5299. ┌──────────────────────────────────────────────────────────────────────┐
  5300. │ Set                                                                  │
  5301. │   Assembly { Lower | Upper | Inside | Outside }                      │
  5302. │   Bell     ON | OFf                                                  │
  5303. │   Call     [dflt_call] [dflt_parms] [dflt_return]                    │
  5304. │   Dclick   expr                                                      │
  5305. │   Fpu      Binary | Decimal                                          │
  5306. │   Implicit ON | OFf                                                  │
  5307. │   INput    window_name                                               │
  5308. │   LAnguage lang_name                                                 │
  5309. │   Level    Assembly | Mix | Source                                   │
  5310. │   MAcro    window_name key_expr [cmd_list]                           │
  5311. │   Menu     ON | OFf | Add cmd_list | ACtivate                        │
  5312. │   Pfkey    expr (string | "{" string "}")                            │
  5313. │   Radix    expr | ("/"radix_spec [expr])                             │
  5314. │   SOurce   [/Add] { "{" {char} "*" {char} "}" }                      │
  5315. │   SYmbol   [/Add] { [/(Respect|Ignore)] "{" {char} "*" {char} "}" }  │
  5316. │   Tab      expr                                                      │
  5317. │   Visible  Assembly | Source [top][,[bot][,bias]]                    │
  5318. └──────────────────────────────────────────────────────────────────────┘
  5319.  
  5320. The Set command is used to establish operational defaults for other
  5321. VIDEO commands.
  5322.  
  5323.  
  5324. Disassembly Options
  5325. ───────────────────
  5326. ┌──────────────────────────────────────────────────────────────────────┐
  5327. │ Set Assembly { Lower | Upper | Inside | Outside }                    │
  5328. └──────────────────────────────────────────────────────────────────────┘
  5329.  
  5330. These options control how assembly instructions and operands are
  5331. displayed.  The "lower" option causes opcodes and registers to be
  5332. displayed in lowercase.  The "upper" option causes opcodes and registers
  5333. to be displayed in uppercase.  The "inside" option causes register
  5334. indexing displacements to be shown inside brackets (e.g., [BP-2],
  5335. [EBP-2]).  The "outside" option causes register indexing displacements
  5336. to be shown outside brackets (e.g., -2[BP], -2[EBP]).
  5337.  
  5338.  
  5339. Warning Bell
  5340. ────────────
  5341. ┌──────────────────────────────────────────────────────────────────────┐
  5342. │ Set Bell ON | OFf                                                    │
  5343. └──────────────────────────────────────────────────────────────────────┘
  5344.  
  5345. The warning beep issued by VIDEO may be turned "on" or "off".  A beep is
  5346. issued whenever an error message is printed by the debugger.
  5347.  
  5348.  
  5349. Default Call
  5350. ────────────
  5351. ┌──────────────────────────────────────────────────────────────────────┐
  5352. │ Set Call [dflt_call] [dflt_parms] [dflt_return]                      │
  5353. └──────────────────────────────────────────────────────────────────────┘
  5354.  
  5355. The default call type (Far, Interrupt or Near) and the default argument
  5356. passing mechanism to be used by the VIDEO Call command may be set.
  5357.  
  5358.    dflt_call ::= /(Far | Interrupt | Near)
  5359.    dflt_parms ::= "(" [ dflt_loc { "," dflt_loc } ] ")"
  5360.    dflt_return ::= "/" | print_list
  5361.    dflt_loc ::= reg_name | reg_aggregate
  5362.  
  5363. In the following example, we define WATCOM's default calling conventions
  5364. for the Call command.
  5365.  
  5366. Example:
  5367.    DBG>set call /far (ax, dx, bx, cx) ax
  5368.  
  5369. To change the default calling convention to one in which "near" calls
  5370. are used and all parameters are passed on the stack, we could issue the
  5371. following command.
  5372.  
  5373. Example:
  5374.    DBG>set call /near () ax
  5375.  
  5376. See the description of the Call command for more information on argument
  5377. passing.
  5378.  
  5379.  
  5380. Setting Double-click Rate
  5381. ─────────────────────────
  5382. ┌──────────────────────────────────────────────────────────────────────┐
  5383. │ Set Dclick expr                                                      │
  5384. └──────────────────────────────────────────────────────────────────────┘
  5385.  
  5386. This command sets the maximum amount of time, in milliseconds, that is
  5387. allowed between two presses of the mouse button, for the two clicks to
  5388. be recognized as a double-click and not two single clicks.  The default
  5389. value is 250 milliseconds (1/4 of a second).
  5390.  
  5391. Example:
  5392.    DBG>set dclick 750
  5393.  
  5394. The above example will cause two mouse presses separated by more than
  5395. 750 milliseconds (3/4 of a second) to be regarded as two separate clicks
  5396. rather than a double-click.
  5397.  
  5398. The command show set dclick will show the current value.
  5399.  
  5400.  
  5401. Format of Numeric Data Processor Display
  5402. ────────────────────────────────────────
  5403. ┌──────────────────────────────────────────────────────────────────────┐
  5404. │ Set Fpu Binary | Decimal                                             │
  5405. └──────────────────────────────────────────────────────────────────────┘
  5406.  
  5407. The contents of the 80x87 Numeric Data Processor (NDP, math coprocessor)
  5408. registers ST(0), ST(1), etc.  can be displayed in hexadecimal (binary)
  5409. format or scientific notation (decimal).  The registers and flags of the
  5410. math coprocessor are displayed in the FPU window.
  5411.  
  5412. The command show set fpu will show the current setting.
  5413.  
  5414. Automatic Command File Invocation
  5415. ─────────────────────────────────
  5416. ┌──────────────────────────────────────────────────────────────────────┐
  5417. │ Set Implicit  ON | OFf                                               │
  5418. └──────────────────────────────────────────────────────────────────────┘
  5419.  
  5420. When "implicit" is "on", VIDEO will treat an unknown command as the name
  5421. of a command file and automatically attempt to invoke it.  When
  5422. "implicit" is "off", the INvoke command must be used.
  5423.  
  5424. Example:
  5425.    DBG>set implicit on
  5426.    DBG>* invoke "mix" command file
  5427.    DBG>mix
  5428.  
  5429. Under QNX, it is possible for a conflict to arise when "implicit" is on.
  5430. If a path is specified for a command file name, it will be confused with
  5431. the short form of the DO command which is "/".
  5432.  
  5433. Example:
  5434.    DBG>/etc=1
  5435.    DBG>/etc/wvideo/mix
  5436.  
  5437. The first example assigns the value 1 to the variable etc.  The second
  5438. example attempts to run the "mix" command file from the "/etc/wvideo"
  5439. directory but a syntactical error results.  To resolve this conflict,
  5440. you can use either the INvoke command or the local file specifier prefix
  5441. "@l".
  5442.  
  5443. Example:
  5444.    DBG>invoke /etc/wvideo/mix
  5445.    DBG>@l/etc/wvideo/mix
  5446.  
  5447. A similar problem arises under DOS or OS/2 when a drive specifier forms
  5448. part of the file name.
  5449.  
  5450. Example:
  5451.    DBG>d:\\watcom\binb\mix
  5452.    DBG>invoke d:\\watcom\binb\mix
  5453.    DBG>@ld:\\watcom\binb\mix
  5454.  
  5455. The first example results in a syntactical error ("d" is interpreted as
  5456. the short form of the Display command).  The second and third examples
  5457. resolve the problem.
  5458.  
  5459. Local and remote file specifier prefixes are described in the chapter
  5460. entitled "Remote Debugging".
  5461.  
  5462. Current Window
  5463. ──────────────
  5464. ┌──────────────────────────────────────────────────────────────────────┐
  5465. │ Set INput window_name                                                │
  5466. └──────────────────────────────────────────────────────────────────────┘
  5467.  
  5468. The Set INput command is used to move the text cursor directly to the
  5469. specified window.  The valid window names are:
  5470.  
  5471.    Assembly
  5472.    Command
  5473.    Dialogue
  5474.    Fpu
  5475.    Memory
  5476.    Prompt
  5477.    Register
  5478.    SOurce
  5479.    STack
  5480.    Thread
  5481.  
  5482. The Tab and Shift Tab keys can also be used to move the text cursor to
  5483. the following or previous window.  The selected window becomes the
  5484. active window.  Keys and the mouse react in the manner described in the
  5485. help topics "KEYS" and "MOUSE".
  5486.  
  5487.  
  5488. Expression Syntax
  5489. ─────────────────
  5490. ┌──────────────────────────────────────────────────────────────────────┐
  5491. │ Set LAnguage lang_name                                               │
  5492. └──────────────────────────────────────────────────────────────────────┘
  5493.  
  5494. The debugger expression processor can be set to understand the syntax of
  5495. certain programming languages.  The operand lang_name represents the
  5496. name of an expression syntax or "parse" file.
  5497.  
  5498. C      The file "c.prs" describes the ANSI C programming language
  5499.        expression syntax supported by VIDEO.
  5500.  
  5501. FORTRAN The file "fortran.prs" describes the ANSI FORTRAN 77 programming
  5502.        language expression syntax supported by VIDEO.
  5503.  
  5504. Under DOS and OS/2, the "prs" files are usually located in the "BINB"
  5505. sub-directory of the directory that VIDEO is installed in.  You should
  5506.  
  5507. ensure that the "BINB" directory is included in the PATH environment
  5508. variable.
  5509.  
  5510. Under QNX, the "prs" files are usually located in the "/etc/wvideo"
  5511. directory.  The search order for language parsing files is as follows:
  5512.  
  5513.    1. the current directory,
  5514.    2. the paths listed in the WVIDEO_PATH environment variable,
  5515.    3. the path listed in the HOME environment variable, and, finally,
  5516.    4. the "/etc/wvideo" directory.
  5517.  
  5518. Example:
  5519.    DBG>set language fortran
  5520.  
  5521. The debugger will load the expression syntax for FORTRAN 77 from the
  5522. file "fortran.prs".
  5523.  
  5524. The command show set language will show the current setting.
  5525.  
  5526.  
  5527. Debugging Level
  5528. ───────────────
  5529. ┌──────────────────────────────────────────────────────────────────────┐
  5530. │ Set Level Assembly | Mix | Source                                    │
  5531. └──────────────────────────────────────────────────────────────────────┘
  5532.  
  5533. The Set Level command is used to set the default debugging level.
  5534.  
  5535. Assembly VIDEO will display debugging information at the assembly
  5536.        language level.
  5537.  
  5538.        Example:
  5539.           DBG>set level assembly
  5540.  
  5541. Mix    VIDEO will display debugging information at the source language
  5542.        level whenever possible, or at the assembly language level when
  5543.        no source line information is available.
  5544.  
  5545.        Example:
  5546.           DBG>set level mix
  5547.  
  5548.        This is the default mode of VIDEO.
  5549.  
  5550. Source The source language level is similar to the mix language level
  5551.        except that modules for which no source line information is
  5552.        available are not traced unless explicitly requested.
  5553.  
  5554.        Example:
  5555.           DBG>set level source
  5556.  
  5557.  
  5558. Macro Hot Keys
  5559. ──────────────
  5560. ┌──────────────────────────────────────────────────────────────────────┐
  5561. │ Set MAcro window_name key_expr [cmd_list]                            │
  5562. └──────────────────────────────────────────────────────────────────────┘
  5563.  
  5564. The Set MAcro command may be used to define "hot" keys for various
  5565. windows.  The valid window names are:
  5566.  
  5567.    Assembly
  5568.    Command
  5569.    Dialogue
  5570.    Fpu
  5571.    Memory
  5572.    Register
  5573.    SOurce
  5574.    STack
  5575.    Thread
  5576.  
  5577. The value for key_expr must fall within the range 32 (space) to 126
  5578. (tilde).  These are the ASCII printable characters.  One or more
  5579. debugger commands can be specified for cmd_list.
  5580.  
  5581. Example:
  5582.    DBG>set macro source 'v' {view}
  5583.  
  5584. In the above example, the command view will be invoked if a lowercase
  5585. "v" is pressed when the Source window is active (i.e., when the text
  5586. cursor is in the Source window).
  5587.  
  5588. Example:
  5589.    DBG>set macro assembly 'b' {break dbg$code}
  5590.  
  5591. In the above example, the command break dbg$code will be invoked if a
  5592. lowercase "b" is pressed when the Assembly window is active (i.e., when
  5593. the text cursor is in the Assembly window).  A break point will be set
  5594. at the currently highlighted line.
  5595.  
  5596. Example:
  5597.    DBG>set macro source ' ' {trace/source/over}
  5598.  
  5599. In the above example, the command trace/source/over will be invoked if
  5600. the space bar is pressed when the Source window is active (i.e., when
  5601. the text cursor is in the Source window).  A single-shot trace command
  5602. will be executed.
  5603.  
  5604. ┌──────────────────────────────────────────────────────────────────────┐
  5605. │ Note:  The Prompt window is the only window where hot keys cannot be │
  5606. │ defined since text must be entered in this window.                   │
  5607. └──────────────────────────────────────────────────────────────────────┘
  5608.  
  5609.  
  5610. Menu Bar
  5611. ────────
  5612. ┌──────────────────────────────────────────────────────────────────────┐
  5613. │ Set Menu ON | OFf | Add cmd_list | ACtivate                          │
  5614. └──────────────────────────────────────────────────────────────────────┘
  5615.  
  5616. The Set Menu ON and Set menu OFf commands turn the menu bar display "on"
  5617. or "off".
  5618.  
  5619. The Set Menu Add command permits the creation of command entries in the
  5620. "User" pop-down menu.  An entry is a list of one or more VIDEO commands.
  5621. Each new entry is labelled with a letter from the alphabet.  An entry
  5622. may be selected by pressing Alt/U to engage the "User" pop-down menu and
  5623. then Alt/<letter> where <letter> corresponds to the letter beside the
  5624. desired entry.  The mouse can also be used to select an entry.  When an
  5625. entry is selected, the commands listed in that entry are executed.  Up
  5626. to 20 items can be added to the "User" menu.
  5627.  
  5628. The Set Menu ACtivate command emulates the action of pressing and
  5629. releasing the Alt key.
  5630.  
  5631. Example:
  5632.    DBG>set pfkey 10 {set menu activate}
  5633.  
  5634. In the above example, we bind the Set Menu ACtivate command to
  5635. programmable function key 10.
  5636.  
  5637. For a description of VIDEO menus, see the "MENUS" topic.
  5638.  
  5639. Programmable Function Keys
  5640. ──────────────────────────
  5641. ┌──────────────────────────────────────────────────────────────────────┐
  5642. │ Set Pfkey expr (string | "{" string "}")                             │
  5643. └──────────────────────────────────────────────────────────────────────┘
  5644.  
  5645. One or more VIDEO commands can be assigned to a programmable function
  5646. (PF) key.  Each time that key is pressed, the commands are executed.
  5647. You must use "{" and "}" when you have a ";" in the string since VIDEO
  5648. uses the semicolon as a command separator.  If the string is omitted
  5649. then the current assignment for the specified PF key is removed.  PF
  5650. keys are numbered from 1 to 40.
  5651.  
  5652. F1-F10 PF keys 1 through 10 are obtained by pressing one of the keys F1
  5653.        through F10 (on some keyboards, these may be labeled PF1 through
  5654.        PF10).
  5655.  
  5656. F11-F20 PF keys 11 through 20 are obtained by pressing both the Shift
  5657.        key and one of keys F1 through F10.
  5658.  
  5659. F21-F30 PF keys 21 through 30 are obtained by pressing both the Ctrl key
  5660.        and one of keys F1 through F10.
  5661.  
  5662. F31-F40 PF keys 31 through 40 are obtained by pressing both the Alt key
  5663.        and one of keys F1 through F10.
  5664.  
  5665. The expression expr is always evaluated with a radix of 10, regardless
  5666. of the current default radix for numbers.
  5667.  
  5668. Example:
  5669.    DBG>set pfkey 1 go/keep
  5670.  
  5671. In the above example, function key F1 is defined with a go/keep command.
  5672. Each time the F1 key is pressed, VIDEO will execute this command.  This
  5673. form of the "go" command keeps any temporary break point that may have
  5674. been specified in a previous "go" command.
  5675.  
  5676. Example:
  5677.    DBG>set pf 1 {go/keep;?ax}
  5678.  
  5679. The above example is similar to the previous except that a second
  5680. command has been added.  Now, whenever F1 is pressed, two commands will
  5681. be executed.  When a break point occurs, the contents of the AX register
  5682. are displayed in the Dialogue window.  This example demonstrates the
  5683. importance of the braces.
  5684.  
  5685. Example:
  5686.    DBG>set pf 1 go/keep;?ax
  5687.  
  5688. If omitted as shown above, VIDEO will first execute a Set command and
  5689. then it will execute a Print (?) command.  This is equivalent to issuing
  5690. the two commands on two separate command lines.
  5691.  
  5692. Example:
  5693.    DBG>set pf 1 go/keep
  5694.    DBG>?ax
  5695.  
  5696. Example:
  5697.    DBG>/k1=-1
  5698.    DBG>set pf 1 if ++k1%3==0{<src}{if k1%3==1{<asm}{<mix}}
  5699.  
  5700. The user-defined symbol k1 is set to -1 and programmable function key 1
  5701. is assigned a command which may be used to cycle through each one of the
  5702. "src.dbg", "asm.dbg" and "mix.dbg" command files.
  5703.  
  5704. Example:
  5705.    DBG>set pf 1
  5706.  
  5707. The current assignment to programmable function key 1 is removed.
  5708.  
  5709.  
  5710. Default Numeric Radix and Specifiers
  5711. ────────────────────────────────────
  5712. ┌──────────────────────────────────────────────────────────────────────┐
  5713. │ Set Radix expr | ("/"radix_spec [expr])                              │
  5714. └──────────────────────────────────────────────────────────────────────┘
  5715.  
  5716. This command may be used to define both the default radix of numbers
  5717. entered by the user and what character strings are to be interpreted as
  5718. radix specifiers.  The expression expr is always evaluated with a radix
  5719. of 10, regardless of the current default radix for numbers.
  5720.  
  5721.  
  5722. Setting Default Radix
  5723. ─────────────────────
  5724. ┌──────────────────────────────────────────────────────────────────────┐
  5725. │ Set Radix expr                                                       │
  5726. └──────────────────────────────────────────────────────────────────────┘
  5727.  
  5728. Example:
  5729.    DBG>set radix 10
  5730.    DBG>set radix 16
  5731.    DBG>set radix 8
  5732.  
  5733. The above examples illustrate the setting of a default radix for numeric
  5734. values input by the user.  In the first example, we set the default
  5735. radix to decimal (i.e., base 10); in the second example, to hexadecimal
  5736. (i.e., base 16); and in the third example, to octal (i.e., base 8).  The
  5737. minimum radix that you may specify is 2 and the maximum is 36.  The
  5738. digits that may be used to form numeric values are taken from the set of
  5739. digits (0-9) and the letters of the alphabet (A-Z or a-z).
  5740.  
  5741. Suppose that the default radix was set to 36.  In terms of decimal
  5742. values, 'A' represents the value 10, 'B' represents the value 11, and so
  5743. on up to 'Z' which represents the value 35.
  5744.  
  5745. In the absence of a radix specifier, only characters which are valid for
  5746. the default radix may appear in a numeric value.  For example, if the
  5747. default radix is 16 then you cannot use the letters 'G' through 'Z'.
  5748.  
  5749. When a numeric constant could legitimately be interpreted as a symbol
  5750. name, VIDEO will first try to find a symbol by that name and, if the
  5751. search was unsuccessful, it will treat the string as a constant.
  5752.  
  5753. Example:
  5754.    DBG>/abc=1
  5755.    DBG>?abc
  5756.  
  5757. In the above example, the user defines a variable called "abc" and
  5758. assigns it the value 1.  In the second statement, the debugger is asked
  5759. to print the value of "abc".  If the default radix was 16, this could
  5760. represent a numeric value (10*16**2 + 11*16 + 12).  However, VIDEO will
  5761. first attempt to locate the symbol "abc".  Since this will succeed, the
  5762. value displayed in the Dialogue window is 1.  Note that we could quite
  5763. easily form a numeric constant by preceding the letters by a '0' digit.
  5764.  
  5765. Example:
  5766.    DBG>?0abc
  5767.  
  5768. Any time a constant begins with one of the digits '0' through '9', VIDEO
  5769. will interpret the item as a numeric value.  Thus a symbol name must not
  5770. begin with one of the numeric digits (0-9).
  5771.  
  5772. Setting A Radix Specifier
  5773. ─────────────────────────
  5774. ┌──────────────────────────────────────────────────────────────────────┐
  5775. │ Set Radix "/"radix_spec [expr]                                       │
  5776. └──────────────────────────────────────────────────────────────────────┘
  5777.  
  5778. The second feature of the Set Radix command is the ability to define one
  5779. or more radix specifiers.
  5780.  
  5781. Example:
  5782.    DBG>set radix /0x 16
  5783.  
  5784. In the above example, the string "0x" is defined to introduce
  5785. hexadecimal (base 16) numbers.  Thus 0x12 represents a hexadecimal
  5786. constant.
  5787.  
  5788. If the expression is omitted then the string is removed from the set of
  5789. current defined radix specifiers.
  5790.  
  5791. Example:
  5792.    DBG>set radix /0x
  5793.  
  5794. In the above example, the string "0x" is removed from the set of radix
  5795. specifiers.  Now 0x12 is an illegal construct.
  5796.  
  5797. Example:
  5798.    DBG>set radix /# 10
  5799.  
  5800. In the above example, the string "#" is defined to introduce decimal
  5801. (base 10) numbers.  Thus #12 represents a decimal constant.
  5802.  
  5803. By defining a selection of radix specifiers, we can enter numeric values
  5804. in any radix of our choosing and remain independent of the current
  5805. default radix.
  5806.  
  5807.  
  5808. Source File Search Patterns
  5809. ───────────────────────────
  5810. ┌──────────────────────────────────────────────────────────────────────┐
  5811. │ Set SOurce [/Add] { {char} "*" {char} }                              │
  5812. └──────────────────────────────────────────────────────────────────────┘
  5813.  
  5814. This command is used to define patterns to be applied to module names
  5815. when VIDEO searches for a corresponding source file.  VIDEO will first
  5816. attempt to open the source file by using the file specification used to
  5817.  
  5818. compile the file.  We require a mechanism for specifying other
  5819. candidates for the source file in the following cases.
  5820.  
  5821.    1. A relative path specification was given at compile time and the
  5822.       directory from which you are running the program is different from
  5823.       the directory from which the file was compiled.
  5824.    2. The source file has been moved to a different directory since it
  5825.       was compiled.
  5826.  
  5827. The following examples use file name specifications from DOS or OS/2.
  5828. To construct equivalent QNX examples, the path separator "\" should be
  5829. replaced by "/" and all file specifications should be in lowercase
  5830. letters.
  5831.  
  5832. Suppose the current directory is "\TEST\O" and the source file
  5833. ("HELLO.C") is contained in the directory "\TEST\C".  Suppose we use the
  5834. following command to compile "HELLO.C".
  5835.  
  5836. Example:
  5837.    C>wcc ..\c\hello -d2
  5838.  
  5839. The compiler will place the string "..\C\HELLO.C" in the object file.
  5840. Suppose that we move up a level in the directory and link our program.
  5841. We then use VIDEO to load and run the program while in the "\TEST"
  5842. directory.  The debugger will not be able to locate the source file
  5843. since it will use the file specification "..\C\HELLO.C".
  5844.  
  5845. Example:
  5846.    DBG>set source *.c
  5847.  
  5848. In the above example, we specify that VIDEO should also try to locate a
  5849. source file by appending ".c" to the module name.  The asterisk is used
  5850. as a place holder for the module name.  The module name in the previous
  5851. example is "HELLO".  Thus, after unsuccessfully trying to locate
  5852. "..\C\HELLO.C", an attempt will be made to locate the file "HELLO.C".
  5853. This attempt will also fail.
  5854.  
  5855. Example:
  5856.    DBG>set source \test\c\*.c
  5857.  
  5858. In the above example, we revise the pattern to include the path
  5859. specification for the source file.  Now an attempt will be made to
  5860. locate the file "\TEST\C\HELLO.C" and this attempt will succeed.
  5861.  
  5862. Example:
  5863.    DBG>set source *.c \test\c\*.c
  5864.  
  5865. In the above example, we add a second pattern to the list of possible
  5866. names for the source file.  If VIDEO is unsuccessful at locating the
  5867. source file in the current directory as "HELLO.C", it will also try
  5868. "\TEST\C\HELLO.C" as a possibility.
  5869.  
  5870. To indicate that we wish to add more patterns to the currently defined
  5871. pattern set, we can specify the /Add qualifier.  Without this qualifier,
  5872. VIDEO will replace the current pattern set with the one that we specify.
  5873. The following example is equivalent to the previous one.
  5874.  
  5875. Example:
  5876.    DBG>set source *.c
  5877.    DBG>set source /add \progs\src\*.c
  5878.  
  5879. Under QNX, a path specification that begins with a "/" could be
  5880. interpreted as a qualifier.
  5881.  
  5882. Example:
  5883.    DBG>set source /users/fred/*.c
  5884.  
  5885. In the above example, the "/users" qualifier is not supported and an
  5886. error will result.  To resolve this conflict, the local file specifier
  5887. prefix "@l" can be used.
  5888.  
  5889. Example:
  5890.    DBG>set source @l/users/fred/*.c
  5891.  
  5892. Local and remote file specifier prefixes are described in the chapter
  5893. entitled "Remote Debugging".
  5894.  
  5895.  
  5896. Symbol Name Pattern Matching
  5897. ────────────────────────────
  5898. ┌──────────────────────────────────────────────────────────────────────┐
  5899. │ Set SYmbol [/Add] {[/(Respect | Ignore)] {char} "*" {char}}          │
  5900. └──────────────────────────────────────────────────────────────────────┘
  5901.  
  5902. This command is used to control the manner in which VIDEO will look up a
  5903. symbol.  By default, symbol names match if they agree in case (both
  5904. upper and lower case characters) and in spelling.  This command can be
  5905. used to loosen those restrictions.
  5906.  
  5907. Language compilers often prefix or suffix a user-defined global symbol
  5908. with one or more special characters such as underscores "_" or currency
  5909.  
  5910. symbols "$".  Sometimes all the characters in the name are converted
  5911. entirely to upper case or lower case.  To simplify the specification of
  5912. symbol names, you can define a series of patterns which VIDEO will use
  5913. when looking up a symbol.
  5914.  
  5915. Example:
  5916.    DBG>set symbol *_
  5917.  
  5918. The above pattern indicates that an underscore could be suffixed to the
  5919. name you specify.  For example, main might actually be spelled main_.
  5920. The asterisk is used as a place holder for the user-specified name.
  5921.  
  5922. We can specify several patterns.
  5923.  
  5924. Example:
  5925.    DBG>set symbol *_ _*
  5926.  
  5927. In this example, we are stating that possible alternatives for the
  5928. spelling of main are main_ and _main.  VIDEO will search for a symbol by
  5929. using the specified patterns.  Patterns are processed in the order they
  5930. were given.  If no patterns exist, VIDEO will look for an exact match.
  5931.  
  5932. Curly braces may be used to delimit a pattern.
  5933.  
  5934. Example:
  5935.    DBG>set symbol {*_} {_*}
  5936.  
  5937. Within braces, space characters are significant.  Therefore, you would
  5938. normally not include them except in the rare case where symbol names
  5939. could contain space characters.
  5940.  
  5941. To indicate that we wish to add more patterns to the currently defined
  5942. pattern set, we can specify the /Add qualifier.  Without this qualifier,
  5943. VIDEO will replace the current pattern set with the one that we specify.
  5944.  
  5945. To indicate whether the case of the name is important in the process of
  5946. looking up the name, we can specify one of /Respect or /Ignore in front
  5947. of the list of patterns.
  5948.  
  5949. Example:
  5950.    DBG>set symbol /ignore *_ _*
  5951.  
  5952. In the above example, we indicate for each pattern substitution that the
  5953. case of the name is not important.  In this case, the user-specified
  5954. name main could match many possible spellings such as main_, Main_,
  5955. MAIN_, _MaiN, and so on.
  5956.  
  5957. In the previous example, we did not include MAIN as a possible match for
  5958. the user-specified main.  To include this case, we could issue the
  5959. following command:
  5960.  
  5961. Example:
  5962.    DBG>set symbol /add /ignore *
  5963.  
  5964. VIDEO will now also look for an exact spelling with no regard to case.
  5965.  
  5966. We could invent more complicated rules for pattern matching based on
  5967. case.
  5968.  
  5969. Example:
  5970.    DBG>set symbol /ignore * *_ _* /respect _*_
  5971.  
  5972. In the above example, we indicate for the first three patterns that the
  5973. case of the name is not important but that the case must match for the
  5974. last pattern.  If the user-specified name is cmain and the actual
  5975. spelling is _CMAIN_ then the debugger will not produce a match.
  5976. However, if the user specified CMAIN then the debugger would match it
  5977. with _CMAIN_.
  5978.  
  5979.  
  5980. Setting the Tab Interval
  5981. ────────────────────────
  5982. ┌──────────────────────────────────────────────────────────────────────┐
  5983. │ Set Tab expr                                                         │
  5984. └──────────────────────────────────────────────────────────────────────┘
  5985.  
  5986. This command controls how the debugger will display text files with
  5987. embedded TAB characters.  A TAB character causes the text following it
  5988. to start at the next tab stop.  By default, tab stops are set for every
  5989. 8 columns.  You can alter this default using the Set Tab command.
  5990.  
  5991. Example:
  5992.    DBG>set tab 4
  5993.  
  5994. The above example will set tab stops for every 4 columns.
  5995.  
  5996. The command show set tab will show the current value.
  5997.  
  5998. Source and Assembly Window Line Context
  5999. ───────────────────────────────────────
  6000. ┌──────────────────────────────────────────────────────────────────────┐
  6001. │ Set Visible Source | Assembly [top][,[bot],[bias]]                   │
  6002. └──────────────────────────────────────────────────────────────────────┘
  6003.  
  6004. This command controls how the debugger will display source text in the
  6005. Source window or assembly code in the Assembly window.  In these two
  6006. windows, the debugger can be instructed to leave so many lines above
  6007. (top) and below (bot) the current line when scrolling text or assembly
  6008. lines.  The debugger can also be instructed to display lines beginning
  6009. at some column other than 1 (bias).
  6010.  
  6011. Example:
  6012.    DBG>set visible source 1,2,9
  6013.  
  6014. In the above example, the debugger is instructed to display at least one
  6015. line above the current line, to display at least 2 lines below the
  6016. current line, and to not display the first 8 columns of source text.  If
  6017. the window is too small for the debugger to adhere to these constraints,
  6018. it will do the best it can.
  6019.  
  6020. The command show set visible will show the current settings for the
  6021. Source and Assembly windows.
  6022. ::::SHOW
  6023. ┌──────────────────────────────────────────────────────────────────────┐
  6024. │ SHow                                                                 │
  6025. │     Calls   [expr]                                                   │
  6026. │     Display {window_name}                                            │
  6027. │     Flip                                                             │
  6028. │     Modules [name]                                                   │
  6029. │     Paint   {window_name}                                            │
  6030. │     Set     {Assembly | Bell | Call | Dclick | Fpu | Implicit |      │
  6031. │             INput | LAnguage | Level | MAcro | Menu | Pfkey |        │
  6032. │             Radix | SOurce | SYmbol | Tab | Visible}                 │
  6033. └──────────────────────────────────────────────────────────────────────┘
  6034.  
  6035. The SHow command may be used to display information about the currently
  6036. executing application and various VIDEO settings.
  6037.  
  6038. Show Calling Sequence
  6039. ─────────────────────
  6040. ┌──────────────────────────────────────────────────────────────────────┐
  6041. │ SHow Calls [expr]                                                    │
  6042. └──────────────────────────────────────────────────────────────────────┘
  6043.  
  6044. This command is used to display an execution trace-back of the calling
  6045. sequence.  In order to display the execution trace-back, local symbol
  6046. information is required for all functions in the trace-back.  VIDEO will
  6047. list all functions up to the first for which no local symbol information
  6048. is available.  For information on generating local symbol information,
  6049. see the book entitled "WATCOM Linker User's Guide" ("The DEBUG
  6050. Directive").
  6051.  
  6052. If an expression is specified, it is evaluated and only that many levels
  6053. of the calling sequence are displayed.
  6054.  
  6055. In the following example, we show a calling sequence in the C "Calendar"
  6056. program.
  6057.  
  6058. Example:
  6059.    DBG>show calls
  6060.    at          PosCursor+32(calendar@160)
  6061.    called from Line+68(calendar@147)
  6062.    called from Box+39(calendar@121)
  6063.    called from Calendar+43(calendar@79)
  6064.    called from main+70(calendar@40)
  6065.  
  6066. In the following example, we show a calling sequence in the FORTRAN 77
  6067. "Calendar" program.
  6068.  
  6069. Example:
  6070.    DBG>show calls
  6071.    at          POSCURSOR+22(calendar@149)
  6072.    called from LINE+234(calendar@124)
  6073.    called from BOX+65(calendar@101)
  6074.    called from CALENDAR+107(calendar@63)
  6075.    called from FMAIN+120(calendar@22)
  6076.    DBG>log
  6077.  
  6078.  
  6079. Show Window Settings
  6080. ────────────────────
  6081. ┌──────────────────────────────────────────────────────────────────────┐
  6082. │ SHow Display {window_name}                                           │
  6083. └──────────────────────────────────────────────────────────────────────┘
  6084.  
  6085. This command is used to display the settings for all or some windows.
  6086. The valid window names are:
  6087.  
  6088.    Assembly
  6089.    Command
  6090.    Dialogue
  6091.    Fpu
  6092.    Memory
  6093.    Prompt
  6094.    Register
  6095.    SOurce
  6096.    STack
  6097.    Thread
  6098.  
  6099. Example:
  6100.    DBG>show display assembly register
  6101.    display assembly /open {Assembly: *} 20,24,1,80
  6102.    display register /close {CPU} 3,22,72,80
  6103.  
  6104. If no window name is specified then the settings for all windows are
  6105. displayed.
  6106.  
  6107.  
  6108. Show Flip Setting
  6109. ─────────────────
  6110. ┌──────────────────────────────────────────────────────────────────────┐
  6111. │ SHow Flip                                                            │
  6112. └──────────────────────────────────────────────────────────────────────┘
  6113.  
  6114. This command is used to show the current setting for screen flipping.
  6115. See the description of the Flip command for more information.
  6116.  
  6117.  
  6118. Show Module Names
  6119. ─────────────────
  6120. ┌──────────────────────────────────────────────────────────────────────┐
  6121. │ SHow Modules [name]                                                  │
  6122. └──────────────────────────────────────────────────────────────────────┘
  6123.  
  6124. This command is used to display the names of modules in the current
  6125. application.  If name is specified, only those module names that begin
  6126. with "name" are displayed.
  6127.  
  6128. Example:
  6129.    DBG>show module fp
  6130.    FPRTF FPUTC
  6131.  
  6132. In the above example, any module names that begin with the letters "fp"
  6133. are displayed in the Dialogue window.
  6134.  
  6135.  
  6136. Show Window Attributes
  6137. ──────────────────────
  6138. ┌──────────────────────────────────────────────────────────────────────┐
  6139. │ SHow Paint {window_names}                                            │
  6140. └──────────────────────────────────────────────────────────────────────┘
  6141.  
  6142. This command is used to display the settings of attributes for all or
  6143. some windows.  The valid window names are:
  6144.  
  6145.    Assembly
  6146.    Command
  6147.    Dialogue
  6148.    Fpu
  6149.    Memory
  6150.    Prompt
  6151.    Register
  6152.    SOurce
  6153.    STack
  6154.    Thread
  6155.  
  6156. If no window name is specified then the settings of attributes for all
  6157. windows are displayed.  To display a subset, specify only those window
  6158. names in which you are interested.
  6159.  
  6160. Example:
  6161.    DBG>show paint source dialogue
  6162.    paint source  plain cyan,black
  6163.    paint source  active black,cyan
  6164.    paint source  standout brown,black
  6165.    paint source  title bright brown,black
  6166.    paint source  gadget black,white
  6167.    paint dialogue  plain white,black
  6168.    paint dialogue  active bright brown,black
  6169.    paint dialogue  standout bright magenta,black
  6170.    paint dialogue  title bright brown,black
  6171.    paint dialogue  gadget black,white
  6172.  
  6173. Show Debugger Settings
  6174. ──────────────────────
  6175. ┌──────────────────────────────────────────────────────────────────────┐
  6176. │ SHow Set {item_names}                                                │
  6177. └──────────────────────────────────────────────────────────────────────┘
  6178.  
  6179. This command is used to display the current settings of various VIDEO
  6180. parameters.  Valid item names are:
  6181.  
  6182.    Assembly
  6183.    Bell
  6184.    Call
  6185.    Dclick
  6186.    Fpu
  6187.    Implicit
  6188.    INput
  6189.    LAnguage
  6190.    Level
  6191.    MAcro
  6192.    Menu
  6193.    Pfkey
  6194.    Radix
  6195.    SOurce
  6196.    SYmbol
  6197.    Tab
  6198.    Visible
  6199.  
  6200. If no argument is specified then all settings are displayed.  To display
  6201. a subset, specify only those items in which you are interested.
  6202.  
  6203. Example:
  6204.    DBG>show set pfkey radix
  6205.    set pfkey 1 {help}
  6206.    set pfkey 4 {if !?_dbg@pf_4 {/_dbg@pf_4=0};
  6207.        if (++_dbg@pf_4)&1 {disp fpu /o} {disp fpu /c}}
  6208.    set pfkey 5 {reg -1}
  6209.    set pfkey 6 {reg +1}
  6210.    set pfkey 7 {/++_dbg@dbg$wind_split;<wind}
  6211.    set pfkey 8 {if !?_dbg@pf_8 {/_dbg@pf_8=0};
  6212.        if (++_dbg@pf_8)&1 {set menu off;<wind}
  6213.        {set menu on;<wind}}
  6214.    set pfkey 9 {set input source}
  6215.    set pfkey 10 {set input assembly}
  6216.    set radix /0n 10
  6217.    set radix /0x 16
  6218.    set radix /0 8
  6219.    set radix 10
  6220.  
  6221. In the above example, the current settings of the programmable function
  6222. keys and the default radix and radix specifiers are displayed.
  6223. ::::SUMMARY
  6224. BREAK     - set a break point
  6225. CALL      - call a routine
  6226. DISPLAY   - create and remove VIDEO windows
  6227. DO        - assign values to variables, registers, etc.
  6228. ERROR     - report an error to the screen
  6229. EXAMINE   - examine memory contents
  6230. FLIP      - flip to the application's output screen
  6231. GO        - resume execution
  6232. HELP      - request the interactive help facility
  6233. IF        - conditionally execute one or more VIDEO commands
  6234. INVOKE    - execute a VIDEO command file
  6235. LOG       - log VIDEO output to a file
  6236. MODIFY    - modify memory locations
  6237. NEW       - reload a task, respecify the command line, or redirect the
  6238.             standard input and output files
  6239. PAINT     - establish colour attributes for VIDEO windows
  6240. PRINT     - display variable contents
  6241. QUIT      - quit debugging the application and leave VIDEO
  6242. REGISTER  - restore a specific register set
  6243. REMARK    - document a VIDEO command file
  6244. SET       - establish various VIDEO operating parameters (disassembly
  6245.             format, warning bell, "Call" command conventions, mouse double
  6246.             click rate, math coprocessor display, command file invocation,
  6247.             current window, expression grammar, language level, macro hot
  6248.             keys, menu display, programmable function keys, numerical radix,
  6249.             source file location and naming patterns, symbol name case
  6250.             sensitivity and naming conventions, source file tab expansion
  6251.             factor, source and assembly window text display boundaries)
  6252. ::::SYMBOLS
  6253. VIDEO defines a number of symbols which have special meaning.  Each of
  6254. the registers is designated by a special name.
  6255.  
  6256. eax    32-bit EAX register (32-bit mode only)
  6257. ax     16-bit AX register
  6258. al     8-bit AL register
  6259. ah     8-bit AH register
  6260. ebx    32-bit EBX register (32-bit mode only)
  6261. bx     16-bit BX register
  6262. bl     8-bit BL register
  6263. bh     8-bit BH register
  6264. ecx    32-bit ECX register (32-bit mode only)
  6265. cx     16-bit CX register
  6266. cl     8-bit CL register
  6267. ch     8-bit CH register
  6268. edx    32-bit EDX register (32-bit mode only)
  6269. dx     16-bit DX register
  6270. dl     8-bit DL register
  6271. dh     8-bit DH register
  6272. eip    Instruction pointer register (32-bit mode only)
  6273. ip     Instruction pointer register
  6274. esi    Source index register (32-bit mode only)
  6275. si     Source index register
  6276. edi    Destination index register (32-bit mode only)
  6277. di     Destination index register
  6278. esp    Stack pointer register (32-bit mode only)
  6279. sp     Stack pointer register
  6280. ebp    Base pointer register (32-bit mode only)
  6281. bp     Base pointer register
  6282. cs     Code segment register
  6283. ds     Data segment register
  6284. es     Extra segment register
  6285. fs     Segment register (32-bit mode only)
  6286. gs     Segment register (32-bit mode only)
  6287. ss     Stack segment register
  6288. fl     Flags register
  6289. efl    Flags register (32-bit mode only)
  6290. fl.flg_bit_name Individual bits in Flags register
  6291.  
  6292.           flg_bit_name ::= "c" | "p" | "a" | "z" | "s" | "i" | "d" | "o"
  6293.  
  6294. efl.flg_bit_name Individual bits in Flags register
  6295.  
  6296.           flg_bit_name ::= "c" | "p" | "a" | "z" | "s" | "i" | "d" | "o"
  6297.  
  6298.        The following table lists the full name for each of the flags
  6299.        register bits:
  6300.  
  6301.        fl.o, efl.o overflow flag
  6302.        fl.d, efl.d direction flag
  6303.        fl.i, efl.i interrupt flag
  6304.        fl.s, efl.s sign flag
  6305.        fl.z, efl.z zero flag
  6306.        fl.a, efl.a auxiliary carry flag
  6307.        fl.p, efl.p parity flag
  6308.        fl.c, efl.c carry flag
  6309.  
  6310. st0 - st7 Numeric Data Processor registers (math coprocessor registers)
  6311. cw     NDP control word (math coprocessor control word)
  6312. cw.cw_bit_name Individual bits in the control word
  6313.  
  6314.           cw_bit_name ::= "ic" | "rc" | "pc" | "iem" | "pm" |
  6315.                                   "um" | "om" | "zm" | "dm" | "im"
  6316.  
  6317.        The following table lists the full name for each of the control
  6318.        word bits:
  6319.  
  6320.        cw.ic  infinity control
  6321.  
  6322.                  0 = projective
  6323.                  1 = affine
  6324.  
  6325.        cw.rc  rounding control (2 bits)
  6326.  
  6327.                  00 = round to nearest or even
  6328.                  01 = round down (towards negative infinity)
  6329.                  10 = round up (towards positive infinity)
  6330.                  11 = chop (truncate toward zero)
  6331.  
  6332.        cw.pc  precision control (2 bits)
  6333.  
  6334.                  00 = 24 bits
  6335.                  01 = reserved
  6336.                  10 = 53 bits
  6337.                  11 = 64 bits
  6338.  
  6339.        cw.iem interrupt enable mask (8087 only)
  6340.  
  6341.                  0 = interrupts enabled
  6342.                  1 = interrupts disabled (masked)
  6343.  
  6344.        cw.pm  precision (inexact result) mask
  6345.        cw.um  underflow mask
  6346.        cw.om  overflow mask
  6347.        cw.zm  zero-divide mask
  6348.        cw.dm  denormalized operand mask
  6349.        cw.im  invalid operand mask
  6350.  
  6351. sw     NDP status word (math coprocessor status word)
  6352. sw.sw_bit_name Individual bits in the status word
  6353.  
  6354.           sw_bit_name ::=  "b" | "c3" | "st" | "c2" | "c1" |
  6355.                                   "c0" | "es" | "sf" | "pe" | "ue" |
  6356.                                   "oe" | "ze" | "de" | "ie"
  6357.  
  6358.        The following table lists the full name for each of the status
  6359.        word bits:
  6360.  
  6361.        sw.b   busy
  6362.        sw.c3  condition code bit 3
  6363.        sw.st  stack stop pointer (3 bits)
  6364.  
  6365.                  000 = register 0 is stack top
  6366.                  001 = register 1 is stack top
  6367.                  010 = register 2 is stack top
  6368.                      .
  6369.                      .
  6370.                      .
  6371.                  111 = register 7 is stack top
  6372.  
  6373.        sw.c2  condition code bit 2
  6374.        sw.c1  condition code bit 1
  6375.        sw.c0  condition code bit 0
  6376.        sw.es  error summary (287, 387 only)
  6377.        sw.sf  stack fault (387 only)
  6378.        sw.pe  precision (inexact result) exception
  6379.        sw.ue  underflow exception
  6380.        sw.oe  overflow exception
  6381.        sw.ze  zero-divide exception
  6382.        sw.de  denormalized operand exception
  6383.        sw.ie  invalid operation exception
  6384.  
  6385. VIDEO permits the manipulation of register contents using any of the
  6386. operators described under the topics "C_OPERATORS" and "F77_OPERATORS".
  6387. By default, these predefined names are accessed just like any other
  6388. variables defined by the user or the application.  Should the situation
  6389. ever arise where the application defines a variable whose name
  6390. conflicts with that of one of these debugger variables, the module
  6391. specifier _dbg may be used to resolve the ambiguity.  For example, if
  6392. the application defines a variable called cs then _dbg@cs can be
  6393. specified to resolve the ambiguity.  The "_dbg@" prefix indicates that
  6394. we are referring to a VIDEO defined symbol rather than an application
  6395. defined symbol.
  6396.  
  6397. The flags register, the NDP control word, and the NDP status word can be
  6398. accessed as a whole or by its component status bits.
  6399.  
  6400. Example:
  6401.    /fl.c=0
  6402.    /cw.um=0
  6403.    ?sw.oe
  6404.  
  6405. In the above example, the "carry" flag is cleared, the NDP underflow
  6406. mask of the control word is cleared, and the NDP overflow exception bit
  6407. of the status word is printed.
  6408.  
  6409. The low order bit of the expression result is used to set or clear the
  6410. specified flag.
  6411.  
  6412. Example:
  6413.    fl.c=0x03a6
  6414.  
  6415. In the above example, the "carry" flag is cleared since the low order
  6416. bit of the result is 0.
  6417.  
  6418. VIDEO also defines some other special names.
  6419.  
  6420. dbg$32 This debugger symbol represents the mode in which the processor
  6421.        is running.
  6422.  
  6423.        0      16-bit mode
  6424.        1      32-bit mode
  6425.  
  6426. dbg$bottom This debugger symbol represents the number of the last line
  6427.        on the screen which may be used for windows (see also dbg$top,
  6428.        dbg$left, dbg$right).
  6429.  
  6430. dbg$bp This debugger symbol represents the register pair SS:BP (16-bit
  6431.        mode) or SS:EBP (32-bit mode).
  6432.  
  6433.        Example:
  6434.           ? dbg$bp
  6435.  
  6436. dbg$code This debugger symbol represents the current code location under
  6437.        examination.  The dot address "." is either set to dbg$code or
  6438.        dbg$data, depending on whether you were last looking at code or
  6439.        data.
  6440.  
  6441. dbg$cpu This debugger symbol represents the type of central processing
  6442.        unit which is in your personal computer system.
  6443.  
  6444.        0      Intel 8088, 8086 or compatible processor
  6445.        1      Intel 80188, 80186 or compatible processor
  6446.        2      Intel 80286 or compatible processor
  6447.        3      Intel 80386 or compatible processor
  6448.        4      Intel 80486 or compatible processor
  6449.  
  6450. dbg$ctid This debugger symbol represents the identification number of
  6451.        the current execution thread.  Under DOS, the current thread ID
  6452.        is always 1.  The current execution thread can be selected using
  6453.        the Thread window or the Thread command.
  6454.  
  6455. dbg$data This debugger symbol represents the current data location under
  6456.        examination.  The dot address "." is either set to dbg$code or
  6457.        dbg$data, depending on whether you were last looking at code or
  6458.        data.
  6459.  
  6460. dbg$etid This debugger symbol represents the identification number of
  6461.        the thread that was executing when the debugger was entered.
  6462.        Under DOS, the executing thread ID is always 1.
  6463.  
  6464. dbg$fpu This debugger symbol represents the type of numeric data
  6465.        processor (math coprocessor) that is installed in your personal
  6466.        computer system.
  6467.  
  6468.        -1     An 80x87 emulator is installed
  6469.        0      No coprocessor is installed
  6470.        1      An Intel 8087 is installed
  6471.        2      An Intel 80287 is installed
  6472.        3      An Intel 80387 is installed
  6473.        4      An Intel 80486 processor, supporting coprocessor
  6474.               instructions, is installed
  6475.  
  6476. dbg$ip This debugger symbol represents the register pair CS:IP (16-bit
  6477.        mode) or CS:EIP (32-bit mode).
  6478.  
  6479.        Example:
  6480.           ? dbg$ip
  6481.  
  6482. dbg$left This debugger symbol represents the number of the first column
  6483.        on the screen which may be used for windows (see also dbg$right,
  6484.        dbg$top, dbg$bottom).
  6485.  
  6486. dbg$monitor This debugger symbol represents the type of monitor adapter
  6487.        which is in use.
  6488.  
  6489.        0      IBM Monochrome Adapter
  6490.        1      IBM Colour Graphics Adapter (CGA)
  6491.        2      IBM Enhanced Graphics Adapter (EGA)
  6492.        3      IBM Video Graphics Array (VGA)
  6493.  
  6494. dbg$os This debugger symbol represents the operating system that is
  6495.        currently running the application.
  6496.  
  6497.        1      DOS
  6498.        2      OS/2
  6499.        3      386|DOS-Extender from Phar Lap Software, Inc.
  6500.        4      OS/386 from ERGO Computing, Inc.
  6501.        5      NetWare 386 from Novell, Inc.
  6502.        6      QNX from Quantum Software Systems Ltd.
  6503.        7      DOS/4GW from Rational Systems, Inc.
  6504.        8      Microsoft Windows
  6505.  
  6506. dbg$pid (OS/2, NetWare 386, QNX only) This debugger symbol contains the
  6507.        process identification value for the program being debugged.
  6508.  
  6509. dbg$psp (DOS only) This debugger symbol contains the segment value for
  6510.        the DOS "program segment prefix" of the program being debugged.
  6511.  
  6512. dbg$radix This debugger symbol represents the current default numeric
  6513.        radix.
  6514.  
  6515. dbg$remote This debugger symbol is 1 if the "REMotefiles" option was
  6516.        specified and 0 otherwise.
  6517.  
  6518. dbg$right This debugger symbol represents the number of the last column
  6519.        on the screen which may be used for windows (see also dbg$left,
  6520.        dbg$top, dbg$bottom).
  6521.  
  6522. dbg$sp This debugger symbol represents the register pair SS:SP (16-bit
  6523.        mode) or SS:ESP (32-bit mode).
  6524.  
  6525.        Example:
  6526.           ? dbg$sp
  6527.  
  6528. dbg$top This debugger symbol represents the number of the first line on
  6529.        the screen which may be used for windows (see also dbg$left,
  6530.        dbg$right, dbg$bottom).
  6531.  
  6532. dbg$view This debugger symbol is set by the View command.  It represents
  6533.        the segment and offset of the code corresponding to the line
  6534.        where the cursor was last positioned when viewing a module of the
  6535.        current application.  This variable has several uses.  For
  6536.        example, it can be used in a Break command to set a break point.
  6537.  
  6538.        Example:
  6539.           break dbg$view
  6540. ::::SYSTEM
  6541. ┌──────────────────────────────────────────────────────────────────────┐
  6542. │ SYstem[/(Remote | Local)] [ system_cmd | "{" system_cmd "}" ]        │
  6543. │ !                                                                    │
  6544. └──────────────────────────────────────────────────────────────────────┘
  6545.  
  6546. The SYstem or !  command may be used to run other commands or programs
  6547. without destroying the debugging environment.  If system_cmd is entered,
  6548. that command is executed by the operating system and control returns to
  6549. VIDEO.
  6550.  
  6551. If system_cmd is omitted, the operating system command interpreter or
  6552. shell is invoked.  Commands may be entered until an "exit" command is
  6553. entered.  The shell is terminated and control returns to the debugger.
  6554.  
  6555. The /Remote and /Local qualifiers may be specified when using the remote
  6556. debugging feature.  If the /Remote qualifier is specified, the command
  6557. is run on the task machine.  If the /Local qualifier is specified, the
  6558. command is run on the debugger machine.  If neither qualifier is
  6559. specified then "local" is assumed unless the Remotefiles option was
  6560. specified on the command line.  For more information on remote
  6561. debugging, see the chapter entitled "Remote Debugging".
  6562.  
  6563. Under QNX, a path specification that begins with a "/" could be
  6564. interpreted as a qualifier.
  6565.  
  6566. Example:
  6567.    DBG>system /users/fred/myapp
  6568.  
  6569. In the above example, the "/users" qualifier is not supported and an
  6570. error will result.  To resolve this conflict, the /Local qualifier must
  6571. be used.
  6572.  
  6573. Example:
  6574.    DBG>system/local /users/fred/myapp
  6575.  
  6576. ┌──────────────────────────────────────────────────────────────────────┐
  6577. │ Note:  There must be enough unused memory in the computer to run the │
  6578. │ specified program or shell.  Under DOS, the program being debugged   │
  6579. │ must have released some memory back to the system so that there is   │
  6580. │ room to load system_cmd.  For DOS, you can use the "RESIZE" command  │
  6581. │ file to set the size of the memory control block containing the      │
  6582. │ Program Segment Prefix (PSP) of the program being debugged.  See the │
  6583. │ topic "COMMAND_FILES" for more information on this command file.     │
  6584. │                                                                      │
  6585. │ You can also use the VIDEO "Checksize" option.  See the topic        │
  6586. │ "DOS_STARTUP" for more information on this option.                   │
  6587. └──────────────────────────────────────────────────────────────────────┘
  6588.  
  6589. Example:
  6590.    DBG>system c:\cmds\cset.com
  6591.  
  6592. In the above DOS example, the program "CSET.COM" is invoked from the "C"
  6593. disk and directory "\CMDS".
  6594.  
  6595. Example:
  6596.    DBG>system
  6597.  
  6598. The command shell is invoked.  The shell will not return to the debugger
  6599. until an "exit" command is executed.
  6600.  
  6601. Example:
  6602.    DBG>sys chdir \asmsrc
  6603.  
  6604. For DOS only, the shell is invoked to change the current directory to
  6605. "\ASMSRC".  Control is then immediately returned to VIDEO.
  6606.  
  6607. Example:
  6608.    DBG>! edit hello.c
  6609.  
  6610. An editor is invoked to edit the file "hello.c".  Corrections to the C
  6611. source code could be applied while the "HELLO" program is being
  6612. debugged.  When the editor exits, control is returned to VIDEO.
  6613.  
  6614. Example:
  6615.    DBG>! edit fftc.for
  6616.  
  6617. An editor is invoked to edit the file "fftc.for".  Corrections to the
  6618. FORTRAN source code could be applied while the "FFTC" program is being
  6619. debugged.  When the editor exits, control is returned to VIDEO.
  6620. ::::THREAD
  6621. ┌──────────────────────────────────────────────────────────────────────┐
  6622. │ THread                                                               │
  6623. │ ~                                                                    │
  6624. │         /Change   [id_num]                                           │
  6625. │         /Freeze   [id_num] | ["*"]                                   │
  6626. │         /Show     [id_num] | ["*"]                                   │
  6627. │         /Thaw     [id_num] | ["*"]                                   │
  6628. └──────────────────────────────────────────────────────────────────────┘
  6629.  
  6630. The THread or ~ command is used to manipulate the threads of execution
  6631. of a multi-threaded application under OS/2 or NetWare 386.  An execution
  6632. thread may be selected for examination by VIDEO (/Change), an execution
  6633. thread may be made not runnable (/Freeze), an execution thread may be
  6634. made runnable (/Thaw), or the status of execution threads may be
  6635. displayed (/Show).
  6636.  
  6637. In an application that has multiple threads of execution, a particular
  6638. thread may be selected for examination by specifying its thread
  6639. identification number or thread ID using the Change option.
  6640.  
  6641. Example:
  6642.    001>thread/change 2
  6643.  
  6644. In the above example, execution thread "2" is selected using the Change
  6645. option.  The debugger prompt will change to "002" if an execution
  6646. thread, whose ID is "2", exists.  Other windows on the screen will
  6647. change to reflect the selection of another execution thread.  In
  6648. particular, any Assembly, Source, FPU, and Register windows that are
  6649. present on the screen will change.
  6650.  
  6651. The Change option need not be specified since it is the default when
  6652. only a thread ID is specified.
  6653.  
  6654. Example:
  6655.    001>thread 2
  6656.  
  6657. In the above example, execution thread "2" is selected.
  6658.  
  6659. A particular thread may be "frozen" (i.e., made not runnable) by
  6660. specifying its thread ID using the Freeze option.
  6661.  
  6662. Example:
  6663.    002>thread/freeze 3
  6664.  
  6665. In the above example, execution thread "3" is made not runnable.
  6666.  
  6667. All threads may be frozen by specifying "*" for the thread ID.
  6668.  
  6669. Example:
  6670.    002>~/f *
  6671.  
  6672. The current thread may be frozen by omitting the thread ID.
  6673.  
  6674. Example:
  6675.    002>thread/freeze
  6676.  
  6677. A particular thread may be "thawed" (i.e., made runnable) by specifying
  6678. its thread ID using the Thaw option.
  6679.  
  6680. Example:
  6681.    002>thread/thaw 3
  6682.  
  6683. In the above example, execution thread "3" is made runnable.
  6684.  
  6685. All threads may be thawed by specifying "*" for the thread ID.
  6686.  
  6687. Example:
  6688.    002>thread/thaw *
  6689.  
  6690. The current thread may be thawed by omitting the thread ID.
  6691.  
  6692. Example:
  6693.    002>~/th
  6694.  
  6695. The status of a particular thread may be displayed by specifying its
  6696. thread ID using the Show option.
  6697.  
  6698. Example:
  6699.    002>thread/show 1
  6700.  
  6701. In the above example, the status of execution thread "1" is displayed.
  6702.  
  6703. The status of all threads may be displayed by specifying "*" for the
  6704. thread ID.
  6705.  
  6706. Example:
  6707.    002>th/sh *
  6708.  
  6709. Alternately, the status of all threads may be displayed by specifying
  6710. the Thread command without any arguments.
  6711.  
  6712. Example:
  6713.    002>thread
  6714.  
  6715. The status of the current thread may be displayed by specifying Show and
  6716. omitting the thread ID.
  6717.  
  6718. Example:
  6719.    002>~/s
  6720. ::::TRACE
  6721. ┌──────────────────────────────────────────────────────────────────────┐
  6722. │ Trace                                                                │
  6723. │     [/Assembly] [/Over | /Into | /Next] [start_addr_expr]            │
  6724. │     [/Mix]      [/Over | /Into | /Next] [start_addr_expr]            │
  6725. │     [/Source]   [/Over | /Into | /Next] [start_addr_expr]            │
  6726. └──────────────────────────────────────────────────────────────────────┘
  6727.  
  6728. The Trace command is used to step through the execution of a program.
  6729. Execution may be viewed one source line at a time (/Source), one
  6730. assembly instruction at a time (/Assembly), or a combination of both
  6731. source and assembly lines (/Mix).  The latter mode will display source
  6732. lines when they are available and switch to assembly instructions when
  6733. source line information is not available.
  6734.  
  6735. Source line numbers are displayed in the Source window when source line
  6736. information is included in the executable image (for additional
  6737. information, see the description of the compiler's "d1" option and the
  6738. WATCOM Linker "DEBUG" directive).  If the source file can be accessed
  6739. then the corresponding source text is also displayed.  For a discussion
  6740. of how VIDEO locates the source files that correspond to the modules in
  6741. your application, see the description of the Set Source command.
  6742. Assembly instructions are displayed in the Assembly window.
  6743.  
  6744. When source line information is available, both the Source and Assembly
  6745. windows are synchronized.
  6746.  
  6747. /Assembly [/Over | /Into | /Next] [start_addr_expr]
  6748.        VIDEO will trace execution of the application one assembly
  6749.        instruction at a time.
  6750.  
  6751.        Example:
  6752.           DBG>trace /assembly
  6753.  
  6754. /Mix [/Over | /Into | /Next] [start_addr_expr]
  6755.        VIDEO will trace execution of the application one source
  6756.        statement at a time, or one instruction at a time when no source
  6757.        text is available.
  6758.  
  6759.        Example:
  6760.           DBG>trace /mix
  6761.  
  6762. /Source [/Over | /Into | /Next] [start_addr_expr]
  6763.        VIDEO will trace execution of the application one source
  6764.        statement at a time.  Source line information must be available
  6765.        at the time that this command is issued.
  6766.  
  6767.        Example:
  6768.           DBG>trace /source
  6769.  
  6770. When none of the /Assembly, /Mix or /Source qualifiers is specified,
  6771. VIDEO will use a default trace mode.  Initially, the default is /Mix but
  6772. this default can be set with Set Level command.
  6773.  
  6774. By default, VIDEO will enter a tracing mode in which one source
  6775. statement or assembly instruction is executed each time one of the SPACE
  6776. bar or "I" or "N" keys is pressed.
  6777.  
  6778. If the SPACE bar is used to advance execution, the tracing of called
  6779. routines is skipped.  Tracing continues with the statement or
  6780. instruction following the routine invocation.
  6781.  
  6782. Example:
  6783.    C Programming Example
  6784.           8 int main()
  6785.           9   {
  6786.          10      printf( "Hello world\n" );
  6787.          11      return( 0 );
  6788.          12   }
  6789.  
  6790.    FORTRAN Programming Example
  6791.           8       PROGRAM DEMO
  6792.           9       EXTERNAL PRINTF
  6793.          10       CALL PRINTF( 'Hello world' )
  6794.          11       END
  6795.  
  6796. In the above example, we skip the trace of the execution of the "printf"
  6797. routine by pressing the SPACE bar when the "printf" statement is about
  6798. to be executed.
  6799.  
  6800. If the "I" or "into" key is used to advance execution, the execution of
  6801. called routines is traced.
  6802.  
  6803. Example:
  6804.    main_         mov    AX,0002
  6805.    main_+03      push   AX
  6806.    main_+04      call   printf
  6807.    main_+07      add    SP,2
  6808.    main_+0A      xor    AX,AX
  6809.  
  6810. In the above example, we can trace the execution of the "printf" routine
  6811. by pressing the "I" key when the "call" instruction at "main_+04" is
  6812. about to be executed.
  6813.  
  6814. The "N" or "next" key may be used to advance tracing to the next
  6815. sequential statement or instruction immediately following the current
  6816. statement or instruction.  In situations where you are at the bottom of
  6817. a loop, this permits you to skip over the tracing of statements or
  6818. instructions which might be repeated many times.
  6819.  
  6820. Example:
  6821.    _CSTART_+66   sub    SI,SI
  6822.    _CSTART_+68   cmp    BYTE PTR [SI],00
  6823.    _CSTART_+6B   movsb
  6824.    _CSTART_+6C  *jne    _CSTART_+68
  6825.    _CSTART_+6E   cmp    BYTE PTR [SI],00
  6826.  
  6827. In the above example, we can skip tracing of the loop from "_CSTART_+68"
  6828. to "_CSTART_+6C" by pressing the "N" key when the "jne" instruction at
  6829. "_CSTART_+6C" is about to be executed.  The "*" preceding the "jne"
  6830. indicates that the branch to "_CSTART_+68" will be taken.  The next
  6831. instruction to be traced will be the "cmp" at "_CSTART_+6E".
  6832.  
  6833. When using the "N" key, care must be taken to ensure that the execution
  6834. path will eventually reach the next statement or instruction.  If
  6835. execution fails to reach this point then the program may continue to
  6836. execute until completion.  This situation is akin to setting a break
  6837. point at a statement or assembly instruction which will never be
  6838. executed and then issuing a Go command.  In this situation, the
  6839. application would execute to completion.
  6840.  
  6841. Tracing can be discontinued by pressing any other key.
  6842.  
  6843. The /Over, /Into and /Next modifiers may be used to continue execution
  6844. to the "next" statement or instruction after which VIDEO will prompt for
  6845. another command.  This is often referred to as "single-step" mode.
  6846.  
  6847. /Over  This qualifier may be used to continue execution to the "next"
  6848.        statement or assembly instruction.  If the current statement or
  6849.        instruction invokes a routine then the "next" statement or
  6850.        instruction is the one which follows the invocation of the
  6851.        routine.
  6852.  
  6853. /Into  This qualifier may be used to continue execution to the "next"
  6854.        statement or assembly instruction.  If the current statement or
  6855.        instruction invokes a routine then the "next" statement or
  6856.        instruction is the first one in the called routine.
  6857.  
  6858. /Next  This qualifier may be used to continue execution to the "next"
  6859.        statement or assembly instruction which immediately follows the
  6860.        current statement or instruction in memory.  If the current
  6861.        statement or instruction is one that branches, care must be taken
  6862.        to ensure that the execution path will eventually reach the
  6863.        statement or instruction which follows.  If execution fails to
  6864.        reach this point then the program may continue to execute until
  6865.        completion.
  6866. ::::VIEW
  6867. ┌──────────────────────────────────────────────────────────────────────┐
  6868. │ View[/Binary]  [module_or_file_spec]                                 │
  6869. └──────────────────────────────────────────────────────────────────────┘
  6870.  
  6871. The View command invokes a simple file browser (i.e., you cannot make
  6872. changes to the file, only look at it).  If module_or_file_spec is not
  6873. specified then the current module name is assumed.
  6874.  
  6875. The argument module_or_file_spec is treated first as a possible module
  6876. name and then as a file name.  The debugger attempts to locate the
  6877. source file that corresponds to the module in the same manner as that
  6878. used when displaying source lines in the Source window.  VIDEO searches
  6879. for the file in the devices and paths that you specify in the Set Source
  6880. command.
  6881.  
  6882. In cases where there is a conflict between a module name and a file
  6883. name, a drive (DOS, OS/2), path or file extension can be specified to
  6884. resolve the ambiguity.  For example, suppose that you had a data file
  6885. called "printf".  If you entered the command view printf then VIDEO
  6886. would attempt to locate the file "printf.c".  On the other hand, if you
  6887. entered the command view printf.  then VIDEO would attempt to locate the
  6888. file "printf".
  6889.  
  6890. If /Binary is specified then the file contents are displayed in
  6891. hexadecimal notation.  A file name must be specified when this qualifier
  6892. is used.
  6893.  
  6894. The manipulation of the View window with keys and a mouse is described
  6895. under the topics "KEYS" and "MOUSE".
  6896.  
  6897. Under QNX, a path specification that begins with a "/" could be
  6898. interpreted as a qualifier.
  6899.  
  6900. Example:
  6901.    DBG>view /users/fred/test.dat
  6902.  
  6903. In the above example, the "/users" qualifier is not supported and an
  6904. error will result.  To resolve this conflict, the local file specifier
  6905. prefix "@l" can be used.
  6906.  
  6907. Example:
  6908.    DBG>view @l/users/fred/test.dat
  6909.  
  6910. Local and remote file specifier prefixes are described in the chapter
  6911. entitled "Remote Debugging".
  6912. ::::WATCH
  6913. ┌──────────────────────────────────────────────────────────────────────┐
  6914. │ Watch                                                                │
  6915. │     [/Set]       addr_expr [ cmd_list ]                              │
  6916. │     /Byte        addr_expr [ cmd_list ]                              │
  6917. │     /Word        addr_expr [ cmd_list ]                              │
  6918. │     /DWord       addr_expr [ cmd_list ]                              │
  6919. │     /Activate    "*" | index_expr | "/" addr_expr                    │
  6920. │     /Deactivate  "*" | index_expr | "/" addr_expr                    │
  6921. │     /Clear       "*" | index_expr | "/" addr_expr                    │
  6922. └──────────────────────────────────────────────────────────────────────┘
  6923.  
  6924. A watch point defines a memory location which, if modified, causes
  6925. execution of the application to suspend.  A watch point may be defined
  6926. for:
  6927.  
  6928. /Byte  a byte (8 bits)
  6929.  
  6930. /Word  a word (16 bits), and
  6931.  
  6932. /DWord a doubleword (32 bits)
  6933.  
  6934. /Set is implied when no other qualifier is specified.  If /Set or no
  6935. qualifier is specified, a watchpoint is set for a word or doubleword
  6936. depending on whether you are debugging a 16-bit or 32-bit application.
  6937. A watchpoint may be removed with the /Clear qualifier.  Watchpoints may
  6938. be enabled with the /Activate qualifier or disabled with the /Deactivate
  6939. qualifier.  Up to 7 watch points may be defined.  When an instruction
  6940. modifies a location guarded by an active watch point, application
  6941. execution is suspended and the debugger is entered.
  6942.  
  6943. Example:
  6944.    DBG>watch/set _listhead
  6945.    DBG>watch _listhead
  6946.  
  6947. In the above example, two equivalent commands are shown.  A watch point
  6948. is defined and automatically activated for the 16-bit memory location
  6949. defined by the global symbol _listhead.  Only one watch point may be
  6950. specified for a particular location in memory.
  6951.  
  6952. When the executing application modifies a memory location guarded by an
  6953. active watch point, application execution is suspended and the debugger
  6954. is entered.  If one or more debugger commands were specified when the
  6955. watch point was defined, the debugger commands are executed first.  The
  6956. command list that follows the address expression in the /Set, /Byte,
  6957. /Word, or /DWord qualifiers is defined as follows:
  6958.  
  6959.    cmd_list ::= "{" [cmd] { ";" [cmd] } "}"
  6960.  
  6961. This is simply a VIDEO command line placed inside of braces.
  6962.  
  6963. Notes:
  6964.  
  6965.    1. Execution of the application may be resumed if one of the commands
  6966.       was a Go command; otherwise the debugger prompts the user for a
  6967.       new command.
  6968.  
  6969.       Example:
  6970.          DBG>watch _listhead {if _listhead != 0 {go/keep}}
  6971.  
  6972.       Each time the "listhead" variable is modified, its value is
  6973.       compared with zero and execution is resumed only if the value is
  6974.       not zero.
  6975.  
  6976.    2. If no arguments are specified to the "Watch" command, the
  6977.       currently defined watch points will be displayed.  The first one
  6978.       shown is watch point number 1, the second one shown is watch point
  6979.       number 2, and so on.  These are called the watch point indices.
  6980.       Active watch points are shown in "active" attributes, inactive
  6981.       ones are shown in "plain" attributes.  See the description of the
  6982.       Paint command for a discussion of attributes.
  6983.  
  6984.    3. When activating, deactivating or clearing a watch point, either
  6985.       the watch point index or the address must be specified.  If "*" is
  6986.       specified as the watch point index then all watch points are
  6987.       affected.
  6988.  
  6989.       Example:
  6990.          DBG>watch/set _listhead; watch/deac 1
  6991.          DBG>watch/set _listhead; watch/deac /_listhead
  6992.  
  6993.       In both examples, a watch point is set and then a watch point is
  6994.       deactivated.  In the first example, the watch point set for
  6995.       _listhead is deactivated only if no other watch points have been
  6996.       set (since it will then be watch point number 1).  The second
  6997.       example illustrates how the watch point for _listhead will be
  6998.       deactivated under any circumstances.
  6999.  
  7000.       Example:
  7001.          DBG>watch/activate 2; watch/deactivate 1
  7002.  
  7003.       Watch point number 2 is activated and 1 is deactivated.
  7004.  
  7005.    4. The specified address need not be the name of a symbol.
  7006.  
  7007.       Example:
  7008.          DBG>watch/byte es:di
  7009.  
  7010.       A watch point is set for the 8-bit location specified by the
  7011.       contents of the ES:DI register pair.
  7012.  
  7013.       Example:
  7014.          DBG>watch/deactivate /bx
  7015.  
  7016.       The watch point whose address is specified by the contents of the
  7017.       DS:BX register pair is deactivated.
  7018.  
  7019.    5. All watch points may be removed in a single command.
  7020.  
  7021.       Example:
  7022.          DBG>watch/clear *
  7023.  
  7024.       The asterisk refers to all watch points.
  7025. ::::WHILE
  7026. ┌──────────────────────────────────────────────────────────────────────┐
  7027. │ WHile <expr> cmd_list                                                │
  7028. └──────────────────────────────────────────────────────────────────────┘
  7029.  
  7030. The WHile command permits execution of a list of commands while the
  7031. specified expression is true (i.e., evaluates to a non-zero result).
  7032. The command list that follows the command is defined as follows:
  7033.  
  7034.    cmd_list ::= "{" [cmd] { ";" [cmd] } "}"
  7035.  
  7036. Example:
  7037.    DBG>/ax=0; while ax!=25 {/ax++;print ax}
  7038.  
  7039. The above example prints the numbers from 1 to 25 in the Dialogue
  7040. window.  It first sets the AX register to 0.  While the content of the
  7041. AX register is not equal to 25, the debugger will increment the value in
  7042. the AX register and print the new value.
  7043.  
  7044. There are more complex scenarios in which the WHile command can be put
  7045. to good use.  For example, it could be used to follow a linked list
  7046. which is terminated by a NULL pointer.
  7047. ::::WINDOWS
  7048. VIDEO Windows
  7049. ─────────────
  7050.  
  7051. Windows are rectangular areas on the screen which are devoted to
  7052. displaying a particular type of debugging information such as source
  7053. lines, machine language instructions, and register contents.  Not all
  7054. windows need be present on the screen.  Windows are placed on the screen
  7055. with the VIDEO Display command.  The same command can be used to remove
  7056. windows from the screen.  The attributes of lines displayed in a window
  7057. are defined with the VIDEO Paint command.
  7058.  
  7059. Action Window
  7060. ─────────────
  7061.  
  7062. The debugger places this window on the screen after a text selection
  7063. sequence has been engaged and completed.  Using the keyboard, text
  7064. selection is engaged using the Ctrl/Enter key.  When the Ctrl/Enter key
  7065. is pressed a second time, the Action window appears on the screen.
  7066.  
  7067. Using the mouse, text selection is engaged when the right-hand mouse
  7068. button is pressed.  When the right-hand mouse button is released, the
  7069. Action window appears on the screen.
  7070.  
  7071. The entries in the Action window allow you to
  7072.  
  7073.    1. show the source code pertaining to the selected text,
  7074.  
  7075.    2. display the contents of the variable represented by the selected
  7076.       text,
  7077.  
  7078.    3. evaluate the selected text as an expression,
  7079.  
  7080.    4. examine the memory location represented by the selected text,
  7081.  
  7082.    5. set a break point at the location represented by the selected
  7083.       text,
  7084.  
  7085.    6. set a watch point on the location represented by the selected
  7086.       text,
  7087.  
  7088.    7. or copy the selected text to the Prompt window where it can be
  7089.       manipulated as part of some command.
  7090.  
  7091. The use of keys and mouse in the text selection process is described
  7092. later on in the sections entitled "Window Manipulation with Keys" and
  7093. "Using a Mouse with VIDEO".
  7094.  
  7095.  
  7096. Assembly Window
  7097. ───────────────
  7098.  
  7099. The debugger displays assembly instructions for the current code
  7100. location in this window.  If the Code Segment and Instruction Pointer
  7101. registers (CS:IP, CS:EIP) point to an instruction visible in the
  7102. Assembly window then the line containing that instruction is displayed
  7103. in "active" attributes.  When examining assembly instructions, one line
  7104. is designated as the current line and is displayed in "standout"
  7105. attributes.  The Source window, if present, is kept synchronized with
  7106. the Assembly window provided that source information is available.
  7107.  
  7108. Command Window
  7109. ──────────────
  7110.  
  7111. The debugger will display output from one or more commands that can be
  7112. bound to this window.  In the illustration above, the sample command
  7113. window is titled "date/time structure".
  7114.  
  7115.  
  7116. Dialogue Window
  7117. ───────────────
  7118.  
  7119. By default, the debugger displays responses to commands in this window.
  7120. When one of the other windows is not present on the screen, the output
  7121. normally destined for that window is displayed in the Dialogue window.
  7122.  
  7123.  
  7124. FPU Window
  7125. ──────────
  7126.  
  7127. The contents of the 80x87 numeric data processor (math coprocessor)
  7128. registers and status flags are displayed in this window.  When the FPU
  7129. window is active, the currently selected item is displayed in "active"
  7130. attributes.  When the contents of a register have changed from the last
  7131. time that the debugger was entered, it is displayed in "standout"
  7132. attributes.
  7133.  
  7134. Memory Window
  7135. ─────────────
  7136.  
  7137. A portion of memory is displayed in this window.  When the Memory window
  7138. is active, the currently selected memory location is displayed in
  7139. "active" attributes.  Memory window "hot spots" (e.g., BYTE ) are
  7140. displayed in "standout" attributes.  All other items are displayed in
  7141. "plain" attributes.
  7142.  
  7143.  
  7144. Prompt Window
  7145. ─────────────
  7146.  
  7147. The debugger command input prompt "DBG>" is displayed in a window that
  7148. is one line high.  The prompt window is used to enter command lines.
  7149.  
  7150. In multiple execution thread applications, the "DBG>" prompt is replaced
  7151. by a prompt that indicates the current thread.  The form of the prompt
  7152. is "ddd>" where "ddd" is the thread identification number.
  7153.  
  7154. Example:
  7155.    002>
  7156.  
  7157.  
  7158. Register Window
  7159. ───────────────
  7160.  
  7161. In 16-bit mode, the current contents of the 8086 registers are displayed
  7162. in the Register window.
  7163.  
  7164. In 32-bit mode, the current contents of the 32-bit registers are
  7165. displayed in the Register window.
  7166.  
  7167. When the Register window is active, the currently selected item is
  7168. displayed in "active" attributes.  When the contents of a register have
  7169. changed from the last time that the debugger was entered, it is
  7170. displayed in "standout" attributes.  An exception to this rule is the
  7171. Instruction Pointer (IP, EIP) register which is only displayed in
  7172. "standout" attributes when its value changes because some type of branch
  7173. or call instruction was executed.
  7174.  
  7175. If a register set other than register set 0 is displayed, then the
  7176. register set number is displayed in brackets (e.g., [1]) with "active"
  7177. attributes (see the description of the Register command).
  7178.  
  7179. Source Window
  7180. ─────────────
  7181.  
  7182. If program source code information is available for the current code
  7183. location then it will be displayed in this window.  If the Code Segment
  7184. and Instruction Pointer registers (CS:IP, CS:EIP) point to a source line
  7185. visible in the Source window then the line is displayed in "active"
  7186. attributes.  When examining source code, one line is designated as the
  7187. current line and is displayed in "standout" attributes.  The Assembly
  7188. window, if present, is kept synchronized with the Source window.
  7189.  
  7190. Stack Window
  7191. ────────────
  7192.  
  7193. A portion of the execution stack is displayed in this window.  If the
  7194. Base Pointer (BP, EBP) register points to a visible byte, word or
  7195. doubleword on the stack, that item is displayed in "standout"
  7196. attributes.  When the Stack window is active, the currently selected
  7197. stack location is displayed in "active" attributes.  All other items are
  7198. displayed in "plain" attributes.
  7199.  
  7200. Thread Window
  7201. ─────────────
  7202.  
  7203. The Thread window is used to display the identification number, state
  7204. and name of all program execution threads.  Whenever the debugger is
  7205. entered, the currently executing thread is displayed in "active"
  7206. attributes.  When a new thread entry has been selected, it is displayed
  7207. in "active" attributes.
  7208.  
  7209. Each entry in the Thread window has 3 fields.  The first field is the
  7210. thread identification number or thread ID.  The second field is the
  7211. thread state which may be one of "runnable" or "frozen".  The third
  7212. field is the thread name which is applicable to NetWare 386 server tasks
  7213. only.  The currently selected field is displayed in "standout"
  7214. attributes.  All other items are displayed in "plain" attributes.
  7215.  
  7216. Under DOS and QNX, there is only one execution thread so there is only
  7217. one entry in the Thread window.  Under OS/2 and NetWare 386, there may
  7218. be several execution threads so there may be be several entries in the
  7219. Thread window.
  7220.  
  7221. Variable Window
  7222. ───────────────
  7223.  
  7224. This window is created by the Print /Window command.  The debugger will
  7225. display output from a Print command in this window.  The window is
  7226. updated each time the debugger is entered or a VIDEO command is
  7227. executed.  In the illustration above, the sample Variable window is
  7228. titled "Variable Display".
  7229.  
  7230.  
  7231. View Window
  7232. ───────────
  7233.  
  7234. This window is created by the Help and View commands.  The View window
  7235. occupies the entire display area when it is active.  When the command
  7236. completes, the View window is removed and other windows are redisplayed.
  7237.  
  7238.  
  7239. Error Window
  7240. ────────────
  7241.  
  7242. In addition to the windows described in earlier sections, an "error"
  7243. window may appear in the middle of the screen when VIDEO wishes to issue
  7244. an error message.  This window will disappear when any key is pressed.
  7245. ::::~~~DEFAULT
  7246.       ┌──────────────────────────────────────────────────────────┐
  7247.       │                      W V I D E O                         │
  7248.       │  WATCOM Visual Interactive Debugging Execution Overseer  │
  7249.       └──────────────────────────────────────────────────────────┘
  7250.  
  7251.    Help is available on the following topics.  To obtain help on a
  7252.    particular topic, enter a command of the following form:
  7253.  
  7254.         HELP topic
  7255.  
  7256.     <BREAK>          <CALL>           <COMMAND_FILES>  <C_OPERATORS>
  7257.     <DISPLAY>        <DO>             <DOS_EXTENDER>   <DOS_STARTUP>
  7258.     <ERROR>          <EXAMINE>        <F77_OPERATORS>  <FLIP>
  7259.     <GO>             <HELP>           <IF>             <INVOKE>
  7260.     <KEYS>           <LOG>            <MENUS>          <MODIFY>
  7261.     <MOUSE>          <NEW>            <NOTATION>       <OS2_STARTUP>
  7262.     <PAINT>          <PRINT>          <PRINT_WINDOW>   <QNX_STARTUP>
  7263.     <QUIT>           <REGISTER>       <REMARK>         <SET>
  7264.     <SHOW>           <SUMMARY>        <SYMBOLS>        <SYSTEM>
  7265.     <THREAD>         <TRACE>          <VIEW>           <WATCH>
  7266.     <WHILE>          <WINDOWS>
  7267.  
  7268.    Short forms for the topic name may be specified.
  7269.