home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c500 / 3.ddi / VID_HELP.WPK / WVIDEO.HLP
Encoding:
Text File  |  1992-05-28  |  405.3 KB  |  10,599 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. ::::AUTOCAD
  6. Debugging AutoCAD Applications
  7. ══════════════════════════════
  8.  
  9. VIDEO can be used to debug AutoCAD Development System (ADS) and AutoCAD
  10. Device Interface (ADI) applications.  Before running VIDEO, add a line
  11. similar to the following to your "ACAD.ADS" file.  This line specifies the
  12. path to the "ADSHELP.EXP" file.
  13.  
  14.   C:\WATCOM\BIN\ADSHELP.EXP
  15.  
  16. The file "ACAD.ADS" contains a list of AutoCAD applications that are loaded
  17. by AutoCAD when AutoCAD is started.  "ADSHELP.EXP" is an AutoCAD application
  18. that is required by VIDEO for debugging AutoCAD applications.
  19.  
  20. To debug an ADS application, a special trap file "ADS.TRP" must be used.
  21.  
  22. ┌──────────────────────────────────────────────────────────────────────────┐
  23. │ WVIDEO /TRap=ADS                               │
  24. └──────────────────────────────────────────────────────────────────────────┘
  25.  
  26. If you do not have a two-monitor setup, you should also specify the "swap"
  27. option.
  28.  
  29. ┌──────────────────────────────────────────────────────────────────────────┐
  30. │ WVIDEO /TRap=ADS /Swap                           │
  31. └──────────────────────────────────────────────────────────────────────────┘
  32.  
  33. Note that we did not specify the AutoCAD executable file; the trap file,
  34. "ADS.TRP", will load AutoCAD automatically.  You should now be in VIDEO.  At
  35. this point, enter the following debugger command specifying the name of the
  36. file containing the symbolic debugging information for your AutoCAD
  37. application.  This is either the executable file or a symbolic debugging
  38. information file if the WATCOM Strip Utility was used.
  39.  
  40. ┌──────────────────────────────────────────────────────────────────────────┐
  41. │ DBG>ads file_spec                               │
  42. └──────────────────────────────────────────────────────────────────────────┘
  43.  
  44. You should now be in AutoCAD.  When you load your AutoCAD application from
  45. AutoLISP, the debugger will be entered and source for your program should be
  46. displayed in the source window.  The file "ADS.DBG" contains a sequence of
  47. debugger commands that starts AutoCAD, loads the debugging information from
  48. the executable file you specify, and relocates address information based on
  49. the code and data selector values for your application.  You are now ready
  50. to debug your AutoCAD application.
  51.  
  52. For large AutoCAD applications, you may get an error when the "ADS" debugger
  53. command file is invoked indicating that the debugger was unable to load the
  54. debugging information from the executable file because of memory constraints.
  55. If the error message "no memory for debugging information" or
  56. "no memory for debugging information - increase dynamic memory" is issued,
  57. use the debugger "dynamic" option to increase the amount of dynamic memory
  58. (the default is 40k).  The following example increases the amount of dynamic
  59. memory to 60k.
  60.  
  61. Example:
  62.   C>wvideo /trap=ads /swap /dynamic=60k
  63. ::::BREAK
  64. ┌──────────────────────────────────────────────────────────────────────────┐
  65. │ Break                                    │
  66. │     /Activate    "*" | index_expr | "/" addr_expr               │
  67. │     /Deactivate  "*" | index_expr | "/" addr_expr               │
  68. │     [/Set]       addr_expr  [ cmd_list ]                   │
  69. │     /Clear       "*" | index_expr | "/" addr_expr               │
  70. └──────────────────────────────────────────────────────────────────────────┘
  71.  
  72. A break point defines a place in an application where we would like
  73. execution to suspend so that we might examine the current environment.    A
  74. break point may be defined by using the /Set qualifier or removed by using
  75. the /Clear qualifier, enabled by using the /Activate qualifier or disabled
  76. by using the /Deactivate qualifier.  Up to 7 break points may be defined by
  77. using the /Set qualifier.  /Set is implied when no other qualifiers are
  78. specified.
  79.  
  80. Example:
  81.   DBG>break/set main_
  82.   DBG>break main_
  83.  
  84. In the above example, two equivalent commands are shown.  A break point is
  85. defined and automatically activated for the memory location defined by the
  86. global symbol main_.  Only one break point may be specified for a particular
  87. location in memory.  A "set" break point is indicated in the Source and
  88. Assembly windows by a left-pointing arrow ().
  89.  
  90. A break point may also be specified in terms of the module name and line
  91. number.
  92.  
  93. Example:
  94.   DBG>break calendar@36
  95.  
  96. After the command is entered, an arrow (), indicating a break point,
  97. appears at the start of the line.
  98.  
  99. Line numbers are shown in the Source window.  Source line information must
  100. be available in order to show source line numbers.
  101.  
  102.   1. Either compiler options "d1" or "d2" must have been specified when the
  103.     module was compiled.
  104.   2. The "debug lines" or "debug all" linker option must have preceded the
  105.     name of the object file containing the module when the application was
  106.     linked.
  107.  
  108. The module name need not be specified when it is the current module under
  109. examination.
  110.  
  111. Example:
  112.   DBG>break @36
  113.  
  114. A break point may be specified in terms of a module name and symbol name.
  115.  
  116. Example:
  117.   DBG>break calendar@Box
  118.  
  119. As with line numbers, the module name need not be specified when it is the
  120. current module under examination.
  121.  
  122. Example:
  123.   DBG>break Box
  124.  
  125. When specifying the symbol name only, the "@" is not necessary.  The "@" is
  126. always required with line numbers, since this distinguishes them from
  127. constants (e.g., "break 36" is equivalent to "break cs:36").
  128.  
  129. A break point may also be set or cleared with the mouse.  To set a break
  130. point, double-click the mouse on the desired source line or assembly line.
  131. A subsequent double-click on the same line will clear the break.
  132.  
  133. When the thread of execution encounters an active break point, application
  134. execution will suspend and the debugger is entered.  If one or more debugger
  135. commands were specified when the break point was defined, the debugger
  136. commands are executed first.  The command list that follows the address
  137. expression in the Break/Set command is defined as follows:
  138.  
  139.   cmd_list ::= "{" [cmd] { ";" [cmd] } "}"
  140.  
  141. This is simply a VIDEO command line placed inside of braces.
  142.  
  143. Notes:
  144.  
  145.   1. For a complete description of valid address expressions, see the
  146.     chapter entitled "VIDEO Expression Handling".
  147.  
  148.   2. Execution of the application may be resumed if one of the commands was
  149.     a Go command; otherwise the debugger prompts the user for a new command.
  150.  
  151.     Example:
  152.       DBG>do look_count = 0
  153.       DBG>break/set lookup { do look_count++; go/keep }
  154.  
  155.     Each time the "lookup" routine is entered, the debugger will increment
  156.     the user-defined variable look_count and resume execution (keeping any
  157.     user-defined temporary break point).  When execution of the application
  158.     terminates, the current value of look_count may be examined with the
  159.     Print command to determine how many times the "lookup" routine was
  160.     executed.
  161.  
  162.   3. If no arguments are specified to the Break command, the currently
  163.     defined break points will be displayed.  The first one shown is break
  164.     point number 1, the second one shown is break point number 2, and so on.
  165.     These are called the break point indices.  Active break points are shown
  166.     in "active" attributes, inactive ones are shown in "plain" attributes.
  167.     See the description of the Paint command for a discussion of attributes.
  168.  
  169.   4. When activating, deactivating or clearing a break point, either the
  170.     break point index or the address must be specified.  If "*" is specified
  171.     as the break point index then all break points are affected.
  172.  
  173.     Example:
  174.       DBG>break/set main_; break/deactivate 1
  175.       DBG>break/set main_; break/deactivate /main_
  176.  
  177.     In both examples, a break point is set and then a break point is
  178.     deactivated.  In the first example, the break point set for "main_" is
  179.     deactivated only if no other break points have been set (since it will
  180.     then be break point number 1).  The second example illustrates how the
  181.     break point for main_ will be deactivated under any circumstances.
  182.  
  183.     Example:
  184.       DBG>break/activate 2; break/deactivate 1
  185.  
  186.     Breakpoint number 2 is activated and 1 is deactivated.
  187.  
  188.   5. The specified address need not be the name of a symbol or module name
  189.     and line number.
  190.  
  191.     Example:
  192.       DBG>break es:di
  193.  
  194.     A break point is set for the location specified by the contents of the
  195.     ES:DI register pair.
  196.  
  197.     Example:
  198.       DBG>break/deactivate /bx
  199.  
  200.     The break point whose address is specified by the contents of the CS:BX
  201.     register pair is deactivated.
  202.  
  203.   6. The specified address can be "." which corresponds to the line of
  204.     source code or assembly code most recently examined.
  205.  
  206.   7. All break points may be removed in a single command.
  207.  
  208.     Example:
  209.       DBG>break/clear *
  210.  
  211.     The asterisk refers to all break points.
  212. ::::CALL
  213. ┌──────────────────────────────────────────────────────────────────────────┐
  214. │ Call [/Far | /Interrupt | /Near]                       │
  215. │      start_addr_expr [ "(" [arg_list] ")" [ "/" | print_list ] ]       │
  216. └──────────────────────────────────────────────────────────────────────────┘
  217.  
  218. The Call command may be used to call any routine present in the system.  The
  219. user specifies a starting address expression for the routine that is to be
  220. called.  The expression must evaluate to the segment and offset of the
  221. routine to be called.  The routine may be one of three types:
  222.  
  223.   /Far start_addr_expr ["(" [arg_list] ")" [ "/" | print_list ]]
  224.  
  225.        A "far" routine is one that eventually returns to its caller by
  226.        using a "far return" instruction (RETF).  In 16-bit mode, a
  227.        32-bit return address (segment and offset) is placed on the stack
  228.        by the debugger so that the routine will return to the debugger.
  229.        In 32-bit mode, a 64-bit return address (segment and offset) is
  230.        placed on the stack by the debugger so that the routine will
  231.        return to the debugger.  The "far" call and return mechanism is
  232.        used in the big code models (medium, large, and huge).
  233.  
  234.   /Interrupt start_addr_expr ["(" [arg_list] ")" [ "/" | print_list ]]
  235.  
  236.        An "interrupt" routine is one that eventually returns to its
  237.        caller by using an interrupt return instruction (IRET, IRETD).
  238.        In 16-bit mode, a 32-bit return address (segment and offset) and
  239.        the current contents of the flags register are placed on the
  240.        stack by the debugger so that the interrupt routine will return
  241.        to the debugger.  In 32-bit mode, a 64-bit return address
  242.        (segment and offset) and the current contents of the flags
  243.        register are placed on the stack by the debugger so that the
  244.        interrupt routine will return to the debugger.  Note that an
  245.        interrupt routine is called by its address, not an interrupt
  246.        number.
  247.  
  248.   /Near start_addr_expr ["(" [arg_list] ")" [ "/" | print_list ]]
  249.  
  250.        A "near" routine is one that eventually returns to its caller by
  251.        using a "near return" instruction (RET).  In 16-bit mode, a
  252.        16-bit return address (offset) is placed on the stack by the
  253.        debugger so that the routine will return to the debugger.  In
  254.        32-bit mode, a 32-bit return address (offset) is placed on the
  255.        stack by the debugger so that the routine will return to the
  256.        debugger.  The "near" call and return mechanism is used in the
  257.        small code models (small, compact, flat).
  258.  
  259.  
  260.  
  261. Call Argument List
  262. ══════════════════
  263. An argument list may be specified for the routine to be invoked.  If one is
  264. specified, it takes the following form:
  265.  
  266.   arg_list ::= [ arg_expr { "," arg_expr } ]
  267.   arg_expr ::= [ "/"reg_name | "/"reg_aggregate | "//" ] expr
  268.  
  269. Example:
  270.   DBG>call rtn0( )
  271.   DBG>call rtn1( arg1 )
  272.   DBG>call rtn5( arg1, arg2, arg3, arg4, arg5 )
  273.  
  274. The above examples illustrate how arguments may be specified.  By default,
  275. arguments are passed to the routine using the standard argument passing
  276. convention.  In 16-bit mode, the standard argument passing convention for
  277. 16-bit quantities is:
  278.  
  279.     argument 1 passed in register AX
  280.  
  281.     argument 2 passed in register DX
  282.  
  283.     argument 3 passed in register BX
  284.  
  285.     argument 4 passed in register CX
  286.  
  287.     argument N passed on the stack (N >= 5).
  288.  
  289. In 32-bit mode, the standard argument passing convention for 32-bit
  290. quantities is:
  291.  
  292.     argument 1 passed in register EAX
  293.  
  294.     argument 2 passed in register EDX
  295.  
  296.     argument 3 passed in register EBX
  297.  
  298.     argument 4 passed in register ECX
  299.  
  300.     argument N passed on the stack (N >= 5).
  301.  
  302. These defaults may be changed by using the Set Call command.  Alternatively,
  303. if you wish to specify a different argument passing convention then the
  304. "/reg_name" (register), "/reg_aggregate" (group of registers) or "//"
  305. (stack) modifiers may be used.
  306.  
  307. Example:
  308.   DBG>call stdrtn(/ax p1,/dx p2,/bx p3,/cx p4,// p5)
  309.       or
  310.   DBG>call stdrtn(/eax p1,/edx p2,/ebx p3,/ecx p4,// p5)
  311.  
  312. The above examples, in effect, illustrate the placement of arguments in
  313. registers and on the stack according to the standard argument passing
  314. conventions for 16-bit and 32-bit modes.
  315.  
  316. Example:
  317.   DBG>call longtostr( /[dx ax] long_arg )
  318.  
  319. The above 16-bit example illustrates that a 32-bit argument can be passed in
  320. a register aggregate.  Register aggregates are described in the chapter
  321. entitled "VIDEO Expression Handling".
  322.  
  323. Example:
  324.   DBG>call printf( //arg1, //arg2, //arg3 )
  325.  
  326. The above example illustrates how to pass all arguments on the stack.  The
  327. arguments are pushed onto the stack in a right to left order so that
  328. (preceding the actual call) "arg1" will be on the top of the stack, "arg2"
  329. will be next, and so on.
  330.  
  331. The arguments can be expressions and all expressions are evaluated before
  332. the arguments are assigned to registers or placed on the stack.
  333.  
  334. Example:
  335.   DBG>call rtn( /ax dx+1, /bx ax-cx, /cx 123)
  336.  
  337. The expressions "dx+1", "ax-cx" and "123" are evaluated.  The results of
  338. these expressions are then assigned to the AX, BX and CX registers
  339. respectively.  Note that the results would have been quite different if 123
  340. had been assigned to the CX register before the expression "ax-cx" was
  341. evaluated.
  342.  
  343. All register contents are preserved by the debugger.  Therefore, neither the
  344. choice of argument passing convention nor the called routine can permanently
  345. change the register contents.  The called routine could, however, have side
  346. effects such as modifying memory locations, performing input/output, etc.
  347.  
  348. Disposition of the Return Value
  349. ═══════════════════════════════
  350. One of three possible actions can occur after the called routine returns to
  351. the debugger.
  352.  
  353.   1. By default, the contents of the AX register (16-bit mode) or EAX
  354.     register (32-bit mode), which is returned by the routine, are printed in
  355.     the Dialogue window.  This default may be changed by using the Set Call
  356.     command.
  357.   2. A "/" may be used to indicate that the routine does not return any
  358.     value in which case nothing is printed.
  359.   3. A formatting string and list of expressions may be specified.  The
  360.     syntax of print_list is similar to that of the Print command.  The
  361.     expressions are evaluated and the results printed in the Dialogue
  362.     window.
  363.  
  364. Example:
  365.   DBG>call test1() /
  366.   DBG>call test2( s, t ) ax, bx, cx
  367.   DBG>call test3( a,b,c ){Results were %i,%i,%u}dx,ax,tag
  368.  
  369. In the first line of the above example, the routine does not return any
  370. useful information in the AX register so we suppress the printing of this
  371. register.  In the second line, the contents of the AX, BX and CX registers
  372. are displayed with default formatting.    In the third line, the contents of
  373. the DX and AX registers and the variable "tag" are displayed using the
  374. specified formatting string.  See the description of the Print command for
  375. more information on formatting strings.
  376.  
  377. Suppose that we want to update some of the registers in our current register
  378. set with values returned by the routine that we call.
  379.  
  380. Example:
  381.   DBG>call/far test() _ax=ax, _bx=bx;/ax=_ax;/bx=_bx
  382.  
  383. In the above example, we call the routine "test" using a "far" call.  Since
  384. register contents are unaffected by the call, we assign the values returned
  385. in the AX and BX registers to the variables _ax and _bx.  Subsequent
  386. debugger commands assign these saved values to the AX and BX registers in
  387. our current register set.  VIDEO allows us to define new variables simply by
  388. specifying a unique name and then assigning a value to it.
  389.  
  390. In the next example, we illustrate how to call a BIOS routine in 16-bit
  391. "real" mode.
  392.  
  393. Example:
  394.   DBG>c/int %0:(4*0x10) (/ah 3, /bh 0) {ct=%x,rc=%x}cx,dx
  395.  
  396. In the above example, we call the IBM BIOS "Video I/O" interrupt routine
  397. (INT 0x10) to obtain the current cursor type and position (AH=3) for video
  398. page 0 (BH=0).    The % operator yields the segment:offset pair stored at
  399. locations 0:40 through 0:43.  The cursor type is returned in the "CX"
  400. register and the cursor row and column are returned in the "DX" register;
  401. hence we ask the debugger to display the contents of both registers in
  402. hexadecimal format.
  403. ::::COMMAND_FILES
  404. The following sections describe the command files that are provided with
  405. VIDEO.
  406.  
  407. Under DOS or OS/2 systems, you should ensure that the "BINB" directory of
  408. the WATCOM compiler package is included in the PATH environment variable.
  409. This directory contains the command files provided with VIDEO.    VIDEO uses
  410. the PATH environment variable to locate command files.
  411.  
  412. Under QNX, the command files provided with VIDEO are usually located in the
  413. "/etc/wvideo" directory.  The search order for command files is as follows:
  414.  
  415.   1. the current directory,
  416.   2. the paths listed in the WVIDEO_PATH environment variable,
  417.   3. the path listed in the HOME environment variable, and, finally,
  418.   4. the "/etc/wvideo" directory.
  419.  
  420. The INvoke or < command is used to execute the commands within a command
  421. file.  The Set Implicit command can be used to turn automatic command file
  422. invocation "on" or "off".  When it is "on", VIDEO will attempt to invoke a
  423. command file when the command that is entered does not match one of those in
  424. its command set.  For more information on command file processing, see the
  425. "INVOKE" topic.
  426.  
  427.  
  428.  
  429. Setup for an AutoCAD ADS (or ADI) Application (ads.dbg)
  430. ═══════════════════════════════════════════════════════
  431. Syntax:    [INvoke | <] ads <symbol_file_name>
  432.  
  433. Synopsis:  This command file sets up a debugging session for an AutoCAD ADS
  434.        (or ADI) application.  The symbolic information is stored in
  435.        "symbol_file_name".
  436.  
  437.        Consult the AutoCAD Development System - Programmer's Reference
  438.        for more information on creating ADS applications.  See also the
  439.        chapter in your WATCOM C/386 or WATCOM FORTRAN 77/386 User's
  440.        Guide entitled "Creating AutoCAD Applications".  See the topic
  441.        "AUTOCAD" for more information.
  442.  
  443.  
  444.  
  445. Create Large Assembly Window (asm.dbg)
  446. ══════════════════════════════════════
  447. Syntax:    [INvoke | <] asm
  448.  
  449. Synopsis:  This command file creates an Assembly window that uses most of
  450.        the screen.    The Register window is placed on the right side of
  451.        the screen.    A Stack window is defined but not placed on the
  452.        screen.  Small Source and Dialogue windows are also created.  The
  453.        debugging level is set to "assembly".
  454.  
  455.  
  456.  
  457. Break on Count (bcnt.dbg)
  458. ═════════════════════════
  459. Syntax:    [INvoke | <] bcnt <count> <address>
  460.  
  461. Synopsis:  This command file is used to break execution after "count"
  462.        iterations at the specified "address".  The break point is
  463.        cleared afterwards.
  464.  
  465. Example:   bcnt 1000 StageD
  466.  
  467.        Execution is halted after the routine "StageD" has been called
  468.        1000 times.
  469.  
  470.  
  471.  
  472. Break If (bif.dbg)
  473. ══════════════════
  474. Syntax:    [INvoke | <] bif <expr> <address>
  475.  
  476. Synopsis:  This command file is used to break execution at the specified
  477.        "address" when "expr" is true (non-zero result).
  478.  
  479. Example:   bif {ax == 0} malloc
  480.  
  481.        bif {eax == 0} malloc
  482.  
  483.        Execution is halted whenever the "malloc" routine is called with
  484.        a request for 0 bytes of storage.  Note that the argument is
  485.        passed in register AX in 16-bit mode or EAX in 32-bit mode.
  486.  
  487.  
  488.  
  489. Count Breaks (cntbrks.dbg)
  490. ══════════════════════════
  491. Syntax:    [INvoke | <] cntbrks <address>
  492.  
  493. Synopsis:  Count the number of times <address> is executed.
  494.  
  495. Example:   cntbrks StageD
  496.  
  497.        The name of the variable that is created to tabulate the number
  498.        of iterations is displayed on the screen.  This variable can be
  499.        queried at any time with the VIDEO Print command.  When program
  500.        execution is started with the Go command, each break results in
  501.        the message "cnt$xxxx = n" being printed on the program screen.
  502.  
  503.  
  504.  
  505. Setup Window Colours (colours.dbg)
  506. ══════════════════════════════════
  507. Syntax:    [INvoke | <] colours
  508.  
  509. Synopsis:  This command file sets the colours for the various debugger
  510.        windows.  The selection can be tailored to your own needs.  The
  511.        command file is invoked by the start-up "profile.dbg" command
  512.        file whenever the debugger is run on a colour monitor.
  513.  
  514. See Also:  grays.dbg
  515.  
  516.  
  517.  
  518. Fill Memory (fill.dbg)
  519. ══════════════════════
  520. Syntax:    [INvoke | <] fill <address> <value> <length>
  521.  
  522. Synopsis:  This command file may be used to fill a region of memory with a
  523.        specific value.  The starting address to fill is specified by
  524.        <address>.  The byte value to fill with is specified by <value>.
  525.        The number of bytes to fill is specified by <length>.
  526.  
  527. Example:   fill es:0 ff 100
  528.        Fill 256 bytes of memory starting at ES:0 with the value 0xFF.  A
  529.        radix of 16 is assumed in this example.
  530.  
  531.  
  532.  
  533. Setup for a FoxPro External Routine (fox.dbg)
  534. ═════════════════════════════════════════════
  535. Syntax:    [INvoke | <] fox <symbol_file_name>
  536.  
  537. Synopsis:  This command file sets up a debugging session for a FoxPro
  538.        External Routine.  The symbolic information is stored in
  539.        "symbol_file_name".
  540.  
  541.        Make sure that you have coded a call to BreakPoint() in your
  542.        external routine.  This call should be in the first segment.
  543.  
  544. Example:   Start the external routine (e.g.,?  hello()).  The call to
  545.        BreakPoint() causes entry into debugger.  To start symbolic
  546.        debugging, enter a command similar to the following:
  547.  
  548.        Example:
  549.          DBG>fox hello.plb
  550.  
  551.        Consult the FoxPro External Routine API document for more
  552.        information on creating FoxPro External Routines.
  553.  
  554.  
  555.  
  556. Setup Window Colours for a Gray-Scale Monitor
  557. ═════════════════════════════════════════════
  558. Syntax:    [INvoke | <] grays
  559.  
  560. Synopsis:  This command file sets the "colours" for the various debugger
  561.        windows on a gray-scale monitor.  The selection can be tailored
  562.        to your own needs.  The command file should be invoked if you
  563.        have a gray-scale monitor.
  564.  
  565. See Also:  colours.dbg
  566.  
  567.  
  568.  
  569. Create Assembly and Source Windows (mix.dbg)
  570. ════════════════════════════════════════════
  571. Syntax:    [INvoke | <] mix
  572.  
  573. Synopsis:  This command file creates two evenly-sized Source and Assembly
  574.        windows that use up most of the screen.  The Register window is
  575.        placed on the right side of the screen.  A Stack window is
  576.        defined but not placed on the screen.  A small Dialogue window is
  577.        also created.  The debugging level is set to "mix".
  578.  
  579.  
  580.  
  581. VIDEO Initialization File (profile.dbg)
  582. ═══════════════════════════════════════
  583. Syntax:    [INvoke | <] profile
  584.  
  585. Synopsis:  This is the VIDEO initialization file.  It can be customized for
  586.        your own needs.  As distributed, it performs the following
  587.        initialization.
  588.  
  589.          1. The menu bar is turned on.
  590.  
  591.          2. The debugging level is set to "mix" which is source level
  592.            debugging whenever possible and assembly level debugging when
  593.            no source line information is available.
  594.  
  595.          3. The symbol name matching patterns are set to "*", "*_" and
  596.            "_*".
  597.  
  598.          4. Automatic command file invocation is enabled.  Any time an
  599.            unrecognized command is entered, the debugger will try to
  600.            execute a command file with the same name and extension
  601.            "DBG".
  602.  
  603.          5. Radix specifiers for decimal (0n), hexadecimal (0x) and
  604.            octal (0) numbers are defined.
  605.  
  606.          6. Default colours for various windows are set up.
  607.  
  608.          7. Command, Register, Stack, Fpu, Dialogue, Memory and Thread
  609.            window sizes are defined.  Window sizes are based upon the
  610.            number of screen lines that are available on the screen.  The
  611.            "SRC" command file is invoked to place Source and Dialogue
  612.            windows on the screen.
  613.  
  614.          8. "View", "src", "mix", "asm", and "flip" commands are added
  615.            to the user-definable "User" pop-down menu.  Note that "src",
  616.            "mix" and "asm" are the names of VIDEO command files.  For
  617.            FORTRAN applications, "new;go fmain" is also added to the
  618.            menus.  For C applications, "new;go main" is also added to
  619.            the menus.
  620.  
  621.          9. Function key "F1" is defined such that a press will cause
  622.            the "help" system to be invoked.
  623.  
  624.            Function key "F4" is defined to add and remove the FPU window
  625.            to and from the screen with alternate presses.
  626.  
  627.            Function key "F5" is set to issue a "register -1" command
  628.            when pressed.
  629.  
  630.            Function key "F6" is set to issue a "register +1" command
  631.            when pressed.
  632.  
  633.            Function key "F7" is defined such that a press will cause an
  634.            invocation of the "WIND" command file.  This key cycles
  635.            through different sizes for the Source and Assembly windows
  636.            by using the "SRC", "MIX" and "ASM" command files.
  637.  
  638.            Function key "F8" is defined such that alternate presses turn
  639.            the menu bar on and off.
  640.  
  641.            Function key "F10" is defined to activate menu selection in
  642.            the same way that pressing and releasing the Alt key would.
  643.  
  644.            Function key "Alt/F9" is defined such that a press will move
  645.            the cursor to the Source window.
  646.  
  647.            Function key "Alt/F10" is defined such that a press will move
  648.            the cursor to the Assembly window.
  649.  
  650.          10. Macro hot keys are defined for the Assembly window.  The
  651.            following keys are defined:
  652.  
  653.            'G'      {g} Resume execution
  654.            'g'      {g dbg$code} Continue execution to the currently
  655.               highlighted line
  656.            'i'      {t/a/i} Single-shot trace "into"
  657.            'n'      {t/a/n} Single-shot trace "next"
  658.            ' '      {t/a/o} Single-shot trace "over"
  659.            'b'      {b dbg$code} Set a break point at the currently
  660.               highlighted line
  661.            'c'      {b/c/dbg$code} Remove a break point at the
  662.               currently highlighted line
  663.  
  664.          11. Macro hot keys are defined for the Source window.  The
  665.            following keys are defined:
  666.  
  667.            'v'      {view} View the source code for the current module
  668.            'G'      {g} Resume execution
  669.            'g'      {g dbg$code} Continue execution to the currently
  670.               highlighted line
  671.            'i'      {t/s/i} Single-shot trace "into"
  672.            'n'      {t/s/n} Single-shot trace "next"
  673.            ' '      {t/s/o} Single-shot trace "over"
  674.            'b'      {b dbg$code} Set a break point at the currently
  675.               highlighted line
  676.            'c'      {b/c/dbg$code} Remove a break point at the
  677.               currently highlighted line
  678.  
  679.          12. Macro hot keys are defined for the FPU window.  The
  680.            following keys are defined:
  681.  
  682.            'b'      {set fpu binary} Set the display mode to
  683.               hexadecimal
  684.            'd'      {set fpu decimal} Set the display mode to decimal
  685.  
  686.          13. For MS Windows applications, VIDEO will issue a "go
  687.            WinMain" (C) or "go FWinMain" (FORTRAN) command if one of
  688.            these entry points is defined.
  689.  
  690.          14. For FORTRAN applications, VIDEO will issue a "go fmain"
  691.            command.  Otherwise, if the "main" entry point is defined
  692.            then VIDEO will issue a "go main" command.
  693.  
  694.  
  695.  
  696. Set DOS Memory Control Block (resize.dbg)
  697. ═════════════════════════════════════════
  698. Syntax:    [INvoke | <] resize <new_size>
  699.  
  700. Synopsis:  (DOS only) This command file sets the DOS memory control block
  701.        containing the PSP to a new size.  The PSP value is recorded in
  702.        the debugger variable _dbg@dbg$psp.    Before an application
  703.        starts, DOS gives it all of the remaining memory.  Normally, the
  704.        application should return to DOS that portion of memory which it
  705.        does not use.  This command file can be used in the event that
  706.        the application does not return unused memory to DOS and you wish
  707.        to start up a subprocess by using the VIDEO SYSTEM command.    In
  708.        this case, memory must be returned to DOS before a subprocess can
  709.        be started.
  710.  
  711. Example:   resize 0x1000
  712.  
  713.        Reset the memory control block containing the current PSP to 64K
  714.        bytes.
  715.  
  716. ┌────────────────────────────────────────────────────────────────────────────┐
  717. │ WARNING!  If an incorrect or inappropriate size is specified, the computer │
  718. │ system could hang.  Too small values will cause erratic operation.         │
  719. └────────────────────────────────────────────────────────────────────────────┘
  720.  
  721.  
  722.  
  723. Return from Current Routine (return.dbg)
  724. ════════════════════════════════════════
  725. Syntax:    [INvoke | <] return
  726.  
  727. Synopsis:  This command file may be used to return from the current routine.
  728.        Execution of the application is advanced until a RETURN
  729.        instruction is encountered.    Execution is then advanced by an
  730.        additional instruction in order to return to the calling routine.
  731.  
  732.  
  733.  
  734. Slow Motion Code Animation (slow.dbg)
  735. ═════════════════════════════════════
  736. Syntax:    [INvoke | <] slow <delay>
  737.  
  738. Synopsis:  This command file can be used to perform slow motion execution of
  739.        a program.  The <delay> value must be specified.  The larger the
  740.        value for <delay>, the slower the program will execute.
  741.  
  742.  
  743.  
  744. Save Current Setup (save.dbg)
  745. ═════════════════════════════
  746. Syntax:    [INvoke | <] save
  747.  
  748. Synopsis:  Creates a file called setup.dbg which contains the debugger
  749.        commands required to recreate the current debugger configuration.
  750.  
  751.  
  752.  
  753. Create Large Source Window (src.dbg)
  754. ════════════════════════════════════
  755. Syntax:    [INvoke | <] src
  756.  
  757. Synopsis:  This command file creates a Source window that uses most of the
  758.        screen.  A small Dialogue window is also created.  Any Register
  759.        or Stack windows are removed from the screen.  The Assembly
  760.        window is hidden under the Dialogue window.    The debugging level
  761.        is set to "source".    The command file is invoked by the start-up
  762.        "profile.dbg" command file.
  763.  
  764.  
  765.  
  766. Define Function Key Toggle (toggle.dbg)
  767. ═══════════════════════════════════════
  768. Syntax:    [INvoke | <] toggle <pfkey_number> <command_string_1>
  769.        <command_string_2>
  770.  
  771. Synopsis:  This command file sets up a PF key to alternate between two
  772.        commands.
  773.  
  774. Example:   toggle 10 {set menu on} {set menu off}
  775.  
  776.        Function key "F10" is defined to toggle the menu bar on and off.
  777.  
  778.  
  779.  
  780. View Output from CALL Command (vc.dbg)
  781. ══════════════════════════════════════
  782. Syntax:    [INvoke | <] vc <call_address_and_arguments>
  783.  
  784. Synopsis:  This command file uses the View command to examine the standard
  785.        output from a routine called by the Call command.  The file
  786.        "stdout.tmp" is created.
  787.  
  788. Example:   vc DumpTree( HeadNode )
  789.  
  790.  
  791.  
  792. View Source Code for Routine (vr.dbg)
  793. ═════════════════════════════════════
  794. Syntax:    [INvoke | <] vr <routine_name>
  795.  
  796. Synopsis:  This command file examines the source code for a given routine by
  797.        using the View command.
  798.  
  799. Example:   vr main
  800.  
  801.  
  802.  
  803. Window Management Utility Function (wind.dbg)
  804. ═════════════════════════════════════════════
  805. Syntax:    [INvoke | <] wind
  806.  
  807. Synopsis:  This command file invokes one of the "SRC", "ASM", or "MIX"
  808.        command files depending on the state of the _dbg@dbg$wind_split
  809.        variable.  It is primarily a utility command file that is invoked
  810.        by other command files or function keys.
  811.  
  812. ::::C_OPERATORS
  813. VIDEO supports most C operators and includes an additional set of operators
  814. for convenience.  The WATCOM C Language Reference manual describes many of
  815. these operators.
  816.  
  817. The syntax for VIDEO expressions is similar to that of the C programming
  818. language.  Operators are presented in order of precedence, from lowest to
  819. highest.  Operators on the same line have the same priority.
  820.  
  821.                       Lowest Priority
  822.   Assignment Operators
  823.       =  +=  -=  *=  /=  %=  &=  |=  ^=  <<=  >>=
  824.   Logical Operators
  825.       ||
  826.       &&
  827.   Bit Operators
  828.       |
  829.       ^
  830.       &
  831.   Relational Operators
  832.       ==  !=
  833.       <   <=   <   >=
  834.   Shift Operators
  835.       <<  >>
  836.   Arithmetic Operators
  837.       +  -
  838.       *  /  %
  839.   Unary Operators
  840.       +  -  ~  !  ++  --  &  *    %
  841.       sizeof unary_expr
  842.       sizeof(type_name)
  843.       (type_name) unary_expr
  844.       [type_name] unary_expr
  845.       ?
  846.   Binary Address Operator
  847.       :
  848.                       Highest Priority
  849.  
  850. Parentheses can be used to order the evaluation of an expression.
  851.  
  852. In addition to the operators listed above, a number of primary expression
  853. operators are supported.  These operators are used in identifying the object
  854. to be operated upon.
  855.  
  856. []       subscripting, substringing
  857.  
  858. ()       function call
  859.  
  860. .       field selection
  861.  
  862. ->       field selection using a pointer
  863.  
  864. The following sections describe the operators presented above.
  865.  
  866.  
  867.  
  868. Assignment Operators for the C Grammar
  869. ══════════════════════════════════════
  870. =       Assignment:    The value on the right is assigned to the object on
  871.        the left.
  872.  
  873. +=       Additive assignment:  The value of the object on the left is
  874.        augmented by the value on the right.
  875.  
  876. -=       Subtractive assignment:  The value of the object on the left is
  877.        reduced by the value on the right.
  878.  
  879. *=       Multiplicative assignment:  The value of the object on the left
  880.        is multiplied by the value on the right.
  881.  
  882. /=       Division assignment:  The value of the object on the left is
  883.        divided by the value on the right.
  884.  
  885. %=       Modulus assignment:    The object on the left is updated with
  886.        MOD(left,right).  The result is the remainder when the value of
  887.        the object on the left is divided by the value on the right.
  888.  
  889. &=       Bit-wise AND:  The bits in the object on the left are ANDed with
  890.        the bits of the value on the right.
  891.  
  892. |=       Bit-wise inclusive OR:  The bits in the object on the left are
  893.        ORed with the bits of the value on the right.
  894.  
  895. ^=       Bit-wise exclusive OR:  The bits in the object on the left are
  896.        exclusively ORed with the bits of the value on the right.
  897.  
  898. <<=       Left shift:    The bits in the object on the left are shifted to
  899.        the left by the amount of the value on the right.
  900.  
  901. >>=       Right shift:  The bits in the object on the left are shifted to
  902.        the right by the amount of the value on the right.  If the object
  903.        on the left is described as unsigned, the vacated high-order bits
  904.        are zeroed.    If the object on the left is described as signed,
  905.        the sign bit is propagated through the vacated high-order bits.
  906.        VIDEO treats registers as unsigned items.
  907.  
  908.  
  909.  
  910. Logical Operators for the C Grammar
  911. ═══════════════════════════════════
  912. &&       Logical conjunction:  The logical AND of the value on the left
  913.        and the value on the right is produced.  If either of the values
  914.        on the left or right is equal to 0 then the result is 0;
  915.        otherwise the result is 1.
  916.  
  917. ||       Logical inclusive disjunction:  The logical OR of the value on
  918.        the left and the value on the right is produced.  If either of
  919.        the values on the left or right is not equal to 0 then the result
  920.        is 1; otherwise the result is 0.  If the value on the left is not
  921.        equal to 0 then the expression on the right is not evaluated
  922.        (this is known as short-circuit expression evaluation).
  923.  
  924.  
  925.  
  926. Bit Operators for the C Grammar
  927. ═══════════════════════════════
  928. &       Bit-wise AND:  The bits of the value on the left and the value on
  929.        the right are ANDed.
  930.  
  931. |       Bit-wise OR:  The bits of the value on the left and the value on
  932.        the right are ORed.
  933.  
  934. ^       Bit-wise exclusive OR:  The bits of the value on the left and the
  935.        value on the right are exclusively ORed.
  936.  
  937.  
  938.  
  939. Relational Operators for the C Grammar
  940. ══════════════════════════════════════
  941. ==       Equal:  If the value on the left is equal to the value on the
  942.        right then the result is 1; otherwise the result is 0.
  943.  
  944. !=       Not equal:  If the value on the left is not equal to the value on
  945.        the right then the result is 1; otherwise the result is 0.
  946.  
  947. <       Less than:  If the value on the left is less than the value on
  948.        the right then the result is 1; otherwise the result is 0.
  949.  
  950. <=       Less than or equal:    If the value on the left is less than or
  951.        equal to the value on the right then the result is 1; otherwise
  952.        the result is 0.
  953.  
  954. >       Greater than:  If the value on the left is greater than the value
  955.        on the right then the result is 1; otherwise the result is 0.
  956.  
  957. >=       Greater than or equal:  If the value on the left is greater than
  958.        or equal to the value on the right then the result is 1;
  959.        otherwise the result is 0.
  960.  
  961.  
  962. Arithmetic/Logical Shift Operators for the C Grammar
  963. ════════════════════════════════════════════════════
  964. <<       Left shift:    The bits of the value on the left are shifted to the
  965.        left by the amount described by the value on the right.
  966.  
  967. >>       Right shift:  The bits of the value on the left are shifted to
  968.        the right by the amount described by the value on the right.  If
  969.        the object on the left is described as unsigned, the vacated
  970.        high-order bits are zeroed.    If the object on the left is
  971.        described as signed, the sign bit is propagated through the
  972.        vacated high-order bits.  VIDEO treats registers as unsigned
  973.        items.
  974.  
  975.  
  976.  
  977. Binary Arithmetic Operators for the C Grammar
  978. ═════════════════════════════════════════════
  979. +       Addition:  The value on the right is added to the value on the
  980.        left.
  981.  
  982. _       Subtraction:  The value on the right is subtracted from the value
  983.        on the left.
  984.  
  985. *       Multiplication:  The value on the left is multiplied by the value
  986.        on the right.
  987.  
  988. /       Division:  The value on the left is divided by the value on the
  989.        right.
  990.  
  991. %       Modulus:  The modulus of the value on the left with respect to
  992.        the value on the right is produced.    The result is the remainder
  993.        when the value on the left is divided by the value on the right.
  994.  
  995.  
  996.  
  997. Unary Arithmetic Operators for the C Grammar
  998. ════════════════════════════════════════════
  999. +       Plus:  The result is the value on the right.
  1000.  
  1001. _       Minus:  The result is the negation of the value on the right.
  1002.  
  1003. ~       Bit-wise complement:  The result is the bit-wise complement of
  1004.        the value on the right.
  1005.  
  1006. !       Logical complement:    If the value on the right is equal to 0 then
  1007.        the result is 1; otherwise it is 0.
  1008.  
  1009. ++       Increment:  Both prefix and postfix operators are supported.  If
  1010.        the object is on the right, it is pre-incremented by 1 (e.g.,
  1011.        ++x).  If the object is on the left, it is post-incremented by 1
  1012.        (e.g., x++).
  1013.  
  1014. _ _       Decrement:  Both prefix and postfix operators are supported.  If
  1015.        the object is on the right, it is pre-decremented by 1 (e.g.,
  1016.        --x).  If the object is on the left, it is post-decremented by 1
  1017.        (e.g., x--).
  1018.  
  1019. &       Address of:    The result is the address (segment:offset) of the
  1020.        object on the right (e.g., &main).
  1021.  
  1022. *       Points:  The result is the value stored at the location addressed
  1023.        by the value on the right (e.g., *(ds:100), *string.loc).  In the
  1024.        absence of typing information, a near pointer is produced.  If
  1025.        the operand does not have a segment specified, the stack segment
  1026.        is assumed.
  1027.  
  1028.            (SS:00FE) = FFFF
  1029.          var:  (SS:0100) = 0152
  1030.            (SS:0102) = 1240
  1031.            (SS:0104) = EEEE
  1032.  
  1033.        In the following example, memory locations are displayed starting
  1034.        at DS:152 for 16-bit mode and at DS:12400152 for 32-bit mode.
  1035.  
  1036.        Example:
  1037.          DBG>examine/byte *100
  1038.  
  1039. %       Value at address:  The result is the value stored at the location
  1040.        addressed by the value on the right (e.g., %(ds:100),
  1041.        %string.loc).  In the absence of typing information, a far
  1042.        pointer is produced.  If the operand does not have a segment
  1043.        specified, the stack segment is assumed.
  1044.  
  1045.            (SS:00FE) = FFFF
  1046.          var:  (SS:0100) = 0152
  1047.            (SS:0102) = 1240
  1048.            (SS:0104) = EEEE
  1049.  
  1050.        In the following example, memory locations are displayed starting
  1051.        at 1240:1052 for 16-bit mode and at EEEE:12400152 for 32-bit
  1052.        mode.
  1053.  
  1054.        Example:
  1055.          DBG>examine/byte %100
  1056.  
  1057.        Note that this operator is not found in the C programming
  1058.        language.
  1059.  
  1060.  
  1061.  
  1062. Special Unary Operators for the C Grammar
  1063. ═════════════════════════════════════════
  1064. sizeof unary_expression
  1065.  
  1066.        Example:
  1067.          DBG>print sizeof tyme
  1068.          2 (or 4 in 32-bit mode)
  1069.          DBG>print sizeof *tyme
  1070.          18
  1071.  
  1072. sizeof(type_name)
  1073.  
  1074.        Example:
  1075.          DBG>print sizeof( struct tm )
  1076.          18
  1077.  
  1078. (type_name) unary_expression The type conversion operator (type_name) is
  1079.        used to convert an item from one type to another.  The following
  1080.        describes the syntax of "type_name".
  1081.  
  1082.          type_name ::= type_spec { [ "near" | "far" | "huge" ] "*" }
  1083.          type_spec ::= typedef_name
  1084.                  |     "struct" structure_tag
  1085.                  |     "union"  union_tag
  1086.                  |     "enum"   enum_tag
  1087.                  |     scalar_type { scalar_type }
  1088.          scalar_type ::= "char" | "int" | "float" | "double"
  1089.                  |     "short" | "long" | "signed" | "unsigned"
  1090.  
  1091.        Example:
  1092.          DBG>print (float) 4
  1093.          4.
  1094.  
  1095.          DBG>print (int) 3.1415926
  1096.          3
  1097.  
  1098. [type_name] unary_expression You can force the debugger to treat a memory
  1099.        reference as a particular type of value by using a type coercion
  1100.        operator.  A type specification is placed inside brackets as
  1101.        shown above.  The basic types are char (character, 8 bits), short
  1102.        (short integer, 16 bits), long (long integer, 32 bits), float
  1103.        (single-precision floating-point, 32 bits), and double
  1104.        (double-precision floating-point, 64 bits).    Unless qualified by
  1105.        the short or long keyword, the int type will be 16 bits in 16-bit
  1106.        applications and 32 bits in 32-bit applications (386 and 486
  1107.        systems).  The character, short integer and long integer types
  1108.        may be treated as signed or unsigned items.    The default for the
  1109.        character type is unsigned.    The default for the integer types is
  1110.        signed.
  1111.  
  1112.        Example:
  1113.          [char]             (default unsigned)
  1114.          [signed char]
  1115.          [unsigned char]
  1116.          [int]             (default is signed)
  1117.          [short]             (default is signed)
  1118.          [short int]         (default is signed)
  1119.          [signed short int]
  1120.          [long]             (default is signed)
  1121.          [long int]          (default is signed)
  1122.          [signed long]
  1123.          [unsigned long int]
  1124.          [float]
  1125.          [double]
  1126.  
  1127.        Note that it is unnecessary to specify the int keyword when short
  1128.        or long are specified.
  1129.  
  1130. ?       Existence test:  The "?" unary operator may be used to test for
  1131.        the existence of a symbol.
  1132.  
  1133.        Example:
  1134.          DBG>print ?id
  1135.  
  1136.        The result of this expression is 1 if "id" is a symbol known to
  1137.        VIDEO and 0 otherwise.  If the symbol does not exist in the
  1138.        current scope then it must be qualified with its module name.
  1139.        Automatic symbols exist only in the current function.
  1140.  
  1141.  
  1142.  
  1143. Binary Address Operator for the C Grammar
  1144. ═════════════════════════════════════════
  1145. :       Memory locations can be referenced by using the binary ":"
  1146.        operator and a combination of constants, register names, and
  1147.        symbol names.  In the Intel 80x86 architecture, a memory
  1148.        reference requires a segment and offset specification.  A memory
  1149.        reference using the ":" operator takes the following form:
  1150.  
  1151.          segment:offset
  1152.  
  1153.        The elements segment and offset can be expressions.
  1154.  
  1155.        Example:
  1156.          (ES):(DI+100)
  1157.          (SS):(SP-20)
  1158.  
  1159.  
  1160.  
  1161. Primary Expression Operators for the C Grammar
  1162. ══════════════════════════════════════════════
  1163. []       Elements of an array can be identified using subscript
  1164.        expressions.  Consider the following 3-dimensional array defined
  1165.        in the "C" language.
  1166.  
  1167.        Example:
  1168.          char *ProcessorType[2][4][2] =
  1169.          { { { "Intel 8086",   "Intel 8088"  },
  1170.              { "Intel 80186",  "Intel 80188" },
  1171.              { "Intel 80286",  "unknown" },
  1172.              { "Intel 80386",  "unknown" } },
  1173.  
  1174.            { { "NEC V30",      "NEC V20" },
  1175.              { "unknown",      "unknown" },
  1176.              { "unknown",      "unknown" },
  1177.              { "unknown",      "unknown" } } };
  1178.  
  1179.        This array can be viewed as two layers of rectangular matrices of
  1180.        4 rows by 2 columns.  The array elements are all pointers to
  1181.        string values.
  1182.  
  1183.        By using a subscript expression, specific slices of an array can
  1184.        be displayed.  To see only the values of the first layer, the
  1185.        following command can be issued.
  1186.  
  1187.        Example:
  1188.          DBG>print processortype[0]
  1189.          {[0]={[0]=0x0024, [1]=0x002F},
  1190.           [1]={[0]=0x003A, [1]=0x0046},
  1191.           [2]={[0]=0x0052, [1]=0x005E},
  1192.           [3]={[0]=0x0066, [1]=0x005E}}
  1193.  
  1194.        The values shown are the addresses of the string values.
  1195.  
  1196.        To see only the first row of the first layer, the following
  1197.        command can be issued.
  1198.  
  1199.        Example:
  1200.          DBG>print processortype[0][0]
  1201.          {[0]=0x0024, [1]=0x002F}
  1202.  
  1203.        To see the second row of the first layer, the following command
  1204.        can be issued.
  1205.  
  1206.        Example:
  1207.          DBG>print processortype[0][1]
  1208.          {[0]=0x003A, [1]=0x0046}
  1209.  
  1210.        To see the value of a specific entry in a matrix, all the indices
  1211.        can be specified.
  1212.  
  1213.        Example:
  1214.          DBG>print {%s} processortype[0][0][0]
  1215.          Intel 8086
  1216.          DBG>print {%s} processortype[0][0][1]
  1217.          Intel 8088
  1218.          DBG>print {%s} processortype[0][1][0]
  1219.          Intel 80186
  1220.  
  1221.        In the above examples, we use the "%s" format specifier to
  1222.        display the string values.
  1223.  
  1224. ()       The function call operators appear to the right of a symbol name
  1225.        and identify a function call in an expression.  The parentheses
  1226.        can contain arguments.
  1227.  
  1228.        Example:
  1229.          DBG>print ClearScreen()
  1230.          DBG>print PosCursor( 10, 20 )
  1231.          DBG>print Line( 15, 1, 30, '-', '+', '-' )
  1232.  
  1233. .       The "." operator indicates field selection in a structure.  In
  1234.        the following example, tyme2 is a structure and tm_year is a
  1235.        field in the structure.
  1236.  
  1237.        Example:
  1238.          DBG>print tyme2.tm_year
  1239.  
  1240. ->       The "->" operator indicates field selection when using a pointer
  1241.        to a structure.  In the following example, tyme is the pointer
  1242.        and tm_year is a field in the structure to which it points.
  1243.  
  1244.        Example:
  1245.          DBG>print tyme->tm_year
  1246. ::::DISPLAY
  1247. ┌──────────────────────────────────────────────────────────────────────────┐
  1248. │ Display                                   │
  1249. │     Assembly [status] [title] [window_coord]                   │
  1250. │     Command  [status] [title] [window_coord] [cmd_list]           │
  1251. │     Dialogue [status] [title] [window_coord]                   │
  1252. │     Fpu      [status] [title] [window_coord]                   │
  1253. │     Memory   [status] [title] [window_coord] [mem_loc]           │
  1254. │     Prompt   [status] [title] [line_number]                   │
  1255. │     Register [status] [title] [window_coord]                   │
  1256. │     SOurce   [status] [title] [window_coord]                   │
  1257. │     STack    [status] [title] [window_coord]                   │
  1258. │     Thread   [status] [title] [window_coord]                   │
  1259. └──────────────────────────────────────────────────────────────────────────┘
  1260.  
  1261. The Display command is used to create or remove output windows for various
  1262. displays that the debugger can provide.  For each window, you may specify a
  1263. window status, a title, the starting line number of the window and, for
  1264. those windows which may vary in size, the ending line number.  VIDEO windows
  1265. are described in the "WINDOWS" topic.
  1266.  
  1267. When no window name is specified then all windows are updated.    This command
  1268. may be used to recreate window displays if the user's application has
  1269. overwritten them.  It may also be used in command lists to update the
  1270. display.
  1271.  
  1272.  
  1273.  
  1274. Window Titles
  1275. ═════════════
  1276. Each window that is created with the Display command may have a title.    The
  1277. title is specified by placing a string of characters inside curly braces and
  1278. is formally described as follows:
  1279.  
  1280.   title ::= "{" text "}"
  1281.  
  1282. An asterisk (*) may be specified as part of the string and represents a
  1283. place holder for the current module name.
  1284.  
  1285. Example:
  1286.   DBG>display assembly {Assembly: *}
  1287.  
  1288. In the above example, the Assembly window is given the title "Assembly:  *".
  1289. If the current module name was "hello" then the title would appear at the
  1290. top of the Assembly window as follows:
  1291.  
  1292.   ==| Assembly: hello |======================
  1293.  
  1294. To remove the title from a window, simply specify a pair of empty braces.
  1295.  
  1296. Example:
  1297.   DBG>display assembly {}
  1298.  
  1299.  
  1300.  
  1301. Window Placement
  1302. ════════════════
  1303. Starting at the top of the screen, output lines are numbered consecutively
  1304. starting with 1.  Columns are numbered from left to right starting with 1.
  1305. It is possible to define windows that overlap other windows thereby
  1306. partially obscuring the contents of the overlapped window.
  1307.  
  1308. Window coordinates are specified in terms of a top row, a bottom row, a left
  1309. column, and a right column.
  1310.  
  1311.   window_coord ::= [top][","[bottom][","[left][","right]]]
  1312.  
  1313. The top, bottom, left and right items are expressions which are always
  1314. evaluated with a radix of 10, regardless of the current default radix for
  1315. numbers.
  1316.  
  1317. Example:
  1318.   DBG>display assembly 3,20,1,80
  1319.  
  1320. In the above example, the Assembly window is defined to occupy lines 3
  1321. through 20 and columns 1 through 80.
  1322.  
  1323. Example:
  1324.   DBG>display assembly {Assembly: *} 3,20,1,80
  1325.  
  1326. This example is similar to the previous one but a window title is also
  1327. specified.
  1328.  
  1329. Example:
  1330.   DBG>display assembly ,,8,60
  1331.  
  1332. In this example, we redefine the starting and ending columns for the
  1333. Assembly window to be 8 and 60.
  1334.  
  1335.  
  1336.  
  1337. Window Disposition
  1338. ══════════════════
  1339. The disposition of each window that is created with the Display command may
  1340. be specified using one of the following status qualifiers.
  1341.  
  1342. /Open       The window is created and placed on the screen.
  1343.  
  1344.        Example:
  1345.          DBG>dis assembly /open {Asm: *} 13,19,1,71
  1346.  
  1347.        This is the default action when creating a window hence it is not
  1348.        necessary to specify this qualifier.
  1349.  
  1350. /Close       A window that is currently on the screen can be removed by
  1351.        specifying the /Close qualifier.  The debugger will not let you
  1352.        remove the Dialogue and Prompt windows but they can be moved to
  1353.        different positions on the screen.
  1354.  
  1355.        Example:
  1356.          DBG>display assembly /close
  1357.  
  1358.        In the above example, the Assembly window is removed from the
  1359.        screen.
  1360.  
  1361.        A window can be created but not placed on the screen.
  1362.  
  1363.        Example:
  1364.          DBG>display fpu /close {FPU} 3,13,1,64
  1365.  
  1366.        It may be placed on the screen at a later time using the Display
  1367.        command and it will not be necessary to respecify the window
  1368.        title or coordinates.
  1369.  
  1370. /Zoom       The window is created and immediately displayed on the screen
  1371.        using the full dimensions of the screen.
  1372.  
  1373.        Example:
  1374.          DBG>display source /zoom
  1375.  
  1376.        If the window is already on the screen then its size will
  1377.        alternate between its defined size and the full dimensions of the
  1378.        screen.
  1379.  
  1380.  
  1381.  
  1382. Window Attributes
  1383. ═════════════════
  1384. Various items in the window are displayed with special attributes.  See the
  1385. description of the Paint command for a discussion of "plain", "active",
  1386. "standout", "title" and "gadget" attributes.
  1387.  
  1388.  
  1389.  
  1390. The Assembly Window
  1391. ═══════════════════
  1392. ┌──────────────────────────────────────────────────────────────────────────┐
  1393. │ Display Assembly [status] [title] [window_coord]               │
  1394. └──────────────────────────────────────────────────────────────────────────┘
  1395.  
  1396. The debugger displays assembly instructions for the current code location in
  1397. this window.  If the Code Segment and Instruction Pointer registers (CS:IP
  1398. or CS:EIP) point to an instruction visible in the Assembly window then the
  1399. line containing that instruction is displayed in "active" attributes.  When
  1400. examining assembly instructions, one line is designated as the current line
  1401. and is displayed in "standout" attributes.  The Source window, if present,
  1402. is kept synchronized with the Assembly window provided that source
  1403. information is available.
  1404.  
  1405.  
  1406.  
  1407. The Command Window
  1408. ══════════════════
  1409. ┌──────────────────────────────────────────────────────────────────────────┐
  1410. │ Display Command [status] [title] [window_coord] [cmd_list]           │
  1411. └──────────────────────────────────────────────────────────────────────────┘
  1412.  
  1413. The Command window can be used to display the results of one or more
  1414. commands which you wish to have evaluated each time control returns to the
  1415. debugger.
  1416.  
  1417. The command list that follows the command is defined as follows:
  1418.  
  1419.   cmd_list ::= "{" [cmd] { ";" [cmd] } "}"
  1420.  
  1421. Example:
  1422.   DBG>display command 3, 8 {e es:bx,.+10,10,4; reg}
  1423.  
  1424. The output from commands such as:
  1425.  
  1426. Example:
  1427.   DBG>e es:bx,.+10,10,4
  1428.   DBG>reg
  1429.  
  1430. are normally displayed in other windows.  The list of commands that are
  1431. specified when the Command window is created is executed and the results are
  1432. displayed in the command window.  The commands are re-executed and the
  1433. results are displayed in the Command window whenever:
  1434.  
  1435.   1. the debugger is entered,
  1436.   2. one of the commands Display or Display Command is issued, or
  1437.   3. the Command window is selected (by using the mouse or tab keys).
  1438.  
  1439. This facility provides a mechanism for watching the values of one or more
  1440. variables change (see also the Print /Window command).
  1441.  
  1442.  
  1443.  
  1444. The Dialogue Window
  1445. ═══════════════════
  1446. ┌──────────────────────────────────────────────────────────────────────────┐
  1447. │ Display Dialogue [status] [title] [window_coord]               │
  1448. └──────────────────────────────────────────────────────────────────────────┘
  1449.  
  1450. By default, the debugger displays responses to commands in this window.
  1451. When one of the other windows is not present on the screen, the output
  1452. normally destined for that window is displayed in the Dialogue window.
  1453.  
  1454.  
  1455.  
  1456. The FPU Window
  1457. ══════════════
  1458. ┌──────────────────────────────────────────────────────────────────────────┐
  1459. │ Display Fpu [status] [title] [window_coord]                   │
  1460. └──────────────────────────────────────────────────────────────────────────┘
  1461.  
  1462. The contents of the 80x87 numeric data processor (math coprocessor)
  1463. registers and status flags are displayed in this window.  When the contents
  1464. of a register have changed from the last time that the debugger was entered,
  1465. it is displayed in "standout" attributes.
  1466.  
  1467.  
  1468.  
  1469. The Memory Window
  1470. ═════════════════
  1471. ┌──────────────────────────────────────────────────────────────────────────┐
  1472. │ Display Memory [status] [title] [window_coord] [mem_loc]           │
  1473. └──────────────────────────────────────────────────────────────────────────┘
  1474.  
  1475. A portion of memory is displayed in this window.  When the Memory window is
  1476. active, the currently selected memory location is displayed in "active"
  1477. attributes.  Memory window "hot spots" (e.g., BYTE ) are displayed in
  1478. "standout" attributes.    All other items are displayed in "plain" attributes.
  1479.  
  1480. Example:
  1481.   DBG>display memory /open {Low Mem} 3,9,,,ds:36
  1482.  
  1483. In the above example, memory starting at location DS:36 is displayed in a
  1484. Memory window that runs from lines 3 through 9 and columns 1 through 80.
  1485.  
  1486. Example:
  1487.   DBG>display memory /close
  1488.  
  1489. In the above example, the Memory window is removed from the screen.
  1490.  
  1491.  
  1492.  
  1493. The Prompt Window
  1494. ═════════════════
  1495. ┌──────────────────────────────────────────────────────────────────────────┐
  1496. │ Display Prompt [status] [title] [line_number]                │
  1497. └──────────────────────────────────────────────────────────────────────────┘
  1498.  
  1499. The debugger command input prompt "DBG>" is displayed in a window that is
  1500. one line high.    The prompt window is used to enter command lines.
  1501.  
  1502. In multiple execution thread applications, the "DBG>" prompt is replaced by
  1503. a prompt that indicates the current thread.  The form of the prompt is
  1504. "ddddd>" where "ddddd" is the thread identification number.
  1505.  
  1506. Example:
  1507.   00002>
  1508.  
  1509.  
  1510.  
  1511. The Register Window
  1512. ═══════════════════
  1513. ┌──────────────────────────────────────────────────────────────────────────┐
  1514. │ Display Register [status] [title] [window_coord]               │
  1515. └──────────────────────────────────────────────────────────────────────────┘
  1516.  
  1517. The current contents of the 80x86 registers are displayed in a window.    When
  1518. the contents of a register have changed from the last time that the debugger
  1519. was entered, it is displayed in "standout" attributes.    An exception to this
  1520. rule is the Instruction Pointer (IP, EIP) register which is only displayed
  1521. in "standout" attributes when its value changes because some type of branch
  1522. or call instruction was executed.
  1523.  
  1524. If a register set other than register set 0 is displayed, then the register
  1525. set number is displayed in brackets (e.g., [1]) with "active" attributes
  1526. (see the description of the Register command).
  1527.  
  1528.  
  1529.  
  1530. The Source Window
  1531. ═════════════════
  1532. ┌──────────────────────────────────────────────────────────────────────────┐
  1533. │ Display SOurce [status] [title] [window_coord]               │
  1534. └──────────────────────────────────────────────────────────────────────────┘
  1535.  
  1536. If program source code information is available for the current code
  1537. location then it will be displayed in this window.  If the Code Segment and
  1538. Instruction Pointer registers (CS:IP or CS:EIP) point to a source line
  1539. visible in the Source window then the line is displayed in "active"
  1540. attributes.  When examining source code, one line is designated as the
  1541. current line and is displayed in "standout" attributes.  The Assembly
  1542. window, if present, is kept synchronized with the Source window.
  1543.  
  1544.  
  1545.  
  1546. The Stack Window
  1547. ════════════════
  1548. ┌──────────────────────────────────────────────────────────────────────────┐
  1549. │ Display STack [status] [title] [window_coord]                │
  1550. └──────────────────────────────────────────────────────────────────────────┘
  1551.  
  1552. A portion of the execution stack is displayed in this window.  If the Base
  1553. Pointer (BP or EBP) register points to a visible byte, word, or doubleword
  1554. on the stack, the byte, word, or doubleword is displayed in "standout"
  1555. attributes.  All other words are displayed in "plain" attributes.
  1556.  
  1557.  
  1558.  
  1559. The Thread Window
  1560. ═════════════════
  1561. ┌──────────────────────────────────────────────────────────────────────────┐
  1562. │ Display Thread [status] [title] [window_coord]               │
  1563. └──────────────────────────────────────────────────────────────────────────┘
  1564.  
  1565. The Thread window is used to display the identification number, state and
  1566. name of all program execution threads.    Whenever the debugger is entered,
  1567. the currently executing thread is displayed in "active" attributes.  The
  1568. currently selected thread is displayed in "standout" attributes.  All other
  1569. items are displayed in "plain" attributes.
  1570.  
  1571. There are 3 entries in the Thread window.  The first entry is the thread
  1572. identification number or thread ID.  The second entry is the thread state
  1573. which may be one of "runnable" or "frozen".  The third entry is the thread
  1574. name which is applicable to NetWare 386 server tasks only.
  1575.  
  1576. Under DOS, MS Windows or QNX, there is only one execution thread so there is
  1577. only one entry in the Thread window.  Under OS/2 or NetWare 386, there may
  1578. be several execution threads so there may be be several entries in the
  1579. Thread window.
  1580.  
  1581. Example:
  1582.   DBG>display thread /open {Threads} 14,19,20,50
  1583.  
  1584. In the above example, execution thread information is displayed in a Thread
  1585. window that runs from lines 14 through 19 and columns 20 through 50.
  1586.  
  1587. Example:
  1588.   DBG>display thread /close
  1589.  
  1590. In the above example, the Thread window is removed from the screen.
  1591. ::::DO
  1592. ┌──────────────────────────────────────────────────────────────────────────┐
  1593. │ DO      expr                                   │
  1594. │ /                                       │
  1595. └──────────────────────────────────────────────────────────────────────────┘
  1596.  
  1597. The DO or / command evaluates an expression and discards the result.  It is
  1598. useful for assigning new values to registers and variables.  The expression
  1599. expr can involve registers, application variables and user-defined
  1600. variables.  The operations possible are patterned after those available in
  1601. the C and FORTRAN 77 programming languages.  Expressions are fully discussed
  1602. in the chapter entitled "VIDEO Expression Handling".
  1603.  
  1604. Example:
  1605.   DBG>do ax=1
  1606.   DBG>/ax=1
  1607.  
  1608. The above example illustrates two identical ways to set the contents of the
  1609. AX register to 1.
  1610.  
  1611. Example:
  1612.   DBG>/myvar=di-bx+1
  1613.  
  1614. The variable myvar is defined with the value resulting from subtracting the
  1615. contents of the BX register from the contents of the DI register and then
  1616. adding 1.
  1617.  
  1618. Example:
  1619.   DBG>/oldsi=si++
  1620.  
  1621. The variable oldsi is defined with the current contents of the SI register.
  1622. The current contents of the SI register are then incremented by 1 (the
  1623. C-like "++" operator increments the value of the variable).  Variables such
  1624. as oldsi need not be defined within the application.  VIDEO permits the
  1625. dynamic creation of new variables which will only exist for the duration of
  1626. the debug session.  These user-defined variables can be used to retain
  1627. information as we have shown in the above example.
  1628. ::::DOS_EXTENDER
  1629. Debugging 32-bit DOS Extender Applications
  1630. ══════════════════════════════════════════
  1631.  
  1632. Introduction
  1633. ════════════
  1634. Before reading this help text, you should be familiar with the material
  1635. presented in the "DOS_STARTUP" topic.  The general command line format
  1636. and options for DOS extender systems are presented under that topic.
  1637.  
  1638. VIDEO supports debugging of 32-bit applications developed with WATCOM C/386,
  1639. WATCOM FORTRAN 77/386, and assembly language.  A DOS extender must be used
  1640. to run the application.  The following DOS extenders are supported.
  1641.  
  1642. DOS/4GW    a DOS extender from Rational Systems, Inc.  DOS/4GW is a subset
  1643.        of Rational Systems' DOS/4G product.  DOS/4GW is customized for
  1644.        use with WATCOM C/386 and WATCOM FORTRAN 77/386 and is included
  1645.        in these packages.
  1646.  
  1647. OS/386       (version 2.1 or later) a DOS extender from ERGO Computing, Inc.
  1648.  
  1649. 386|DOS-Extender
  1650.        (version 2.2d or later) a DOS extender from Phar Lap Software,
  1651.        Inc.
  1652.  
  1653.  
  1654.  
  1655. VIDEO Command Line Format for DOS Extenders
  1656. ═══════════════════════════════════════════
  1657. The interface between VIDEO and the operating system/DOS extender is
  1658. contained in a special "trap" file.  The trap file is specified to VIDEO
  1659. using the "TRAP" option.
  1660.  
  1661. ┌──────────────────────────────────────────────────────────────────────────┐
  1662. │ WVIDEO /TRap=trap_file[;trap_parm] [:sym_file] file_spec [cmd_line]       │
  1663. └──────────────────────────────────────────────────────────────────────────┘
  1664.  
  1665. The TRap option must be specified when debugging applications that require a
  1666. 32-bit DOS extender.  For convenience, this option can be specified through
  1667. use of the WVIDEO environment variable.
  1668.  
  1669. ┌──────────────────────────────────────────────────────────────────────────┐
  1670. │ SET WVIDEO=/TRap#trap_file[;trap_parm]                   │
  1671. └──────────────────────────────────────────────────────────────────────────┘
  1672.  
  1673. When trap_parm is specified and it contains blank characters, the entire
  1674. parameter must be placed within braces (e.g., /trap=pls;{-minr 128}).
  1675.  
  1676. You must specify the name of one of the DOS extender "trap" files provided
  1677. with VIDEO.  The file extension defaults to ".TRP".
  1678.  
  1679. RSI.TRP    This interface module supports debugging on the local computer
  1680.        system running the Rational Systems "DOS/4GW" DOS extender (which
  1681.        is included in the WATCOM C/386 and WATCOM FORTRAN 77/386
  1682.        packages).  The optional "trap_parm" is ignored.
  1683.  
  1684. ECS.TRP    This interface module supports debugging on the local computer
  1685.        system running the ERGO Computing, Inc.  "OS/386" DOS extender.
  1686.        The optional "trap_parm" is ignored.
  1687.  
  1688. PLS.TRP    This interface module supports debugging on the local computer
  1689.        system running the Phar Lap Software, Inc.  386|DOS-Extender.
  1690.        The optional "trap_parm" is passed on to the DOS extender
  1691.        "RUN386" as command line switches.
  1692.  
  1693. ┌────────────────────────────────────────────────────────────────────────────┐
  1694. │ Note:  If you do not specify a trap file, the default trap file "STD.TRP"  │
  1695. │ will be loaded.  This interface module supports debugging on the local     │
  1696. │ computer system running DOS.    No 32-bit DOS extender debugging is         │
  1697. │ possible.                                     │
  1698. └────────────────────────────────────────────────────────────────────────────┘
  1699.  
  1700. The following diagram illustrates how memory might be organized when
  1701. debugging a 32-bit DOS extender application.
  1702.  
  1703.       │           │
  1704.       │           │
  1705.       ├────────────────┤
  1706.       │           │
  1707.       │     32─bit    │
  1708.       │   Application  │
  1709.   109C4   ├────────────────┤
  1710.       │           │
  1711.       │           │
  1712.       │           │
  1713.    7E6E   ├────────────────┤
  1714.       │  trap handler  │
  1715.       │    ECS.TRP<────│──┐
  1716.    7B27   ├───────│────────┤  │
  1717.       │      │       │  │
  1718.       │    WVIDEO       │  │
  1719.       │           │  │
  1720.    47A4   ├────────────────┤  │
  1721.       │           │  │
  1722.       │    OS/386       │  │
  1723.       │  DOS Extender<─│──┘
  1724.       │           │
  1725.    262C   │────────────────┤
  1726.       │           │
  1727.       │           │
  1728.       │           │
  1729.       │           │
  1730.    0000   └────────────────┘
  1731.  
  1732. Using the Rational Systems 32-bit DOS Extender
  1733. ══════════════════════════════════════════════
  1734. When using the Rational Systems DOS extender, the "DOS4GW.EXE" or
  1735. "DOS4G.EXE" file must be located in one of the directories listed in the DOS
  1736. PATH environment variable.  The "DOS4GW.EXE" file will usually be stored in
  1737. the "BIN" directory of the WATCOM compiler package.
  1738.  
  1739. ┌──────────────────────────────────────────────────────────────────────────┐
  1740. │ C>WVIDEO/TRap=RSI [:sym_file] file_spec [cmd_line]               │
  1741. └──────────────────────────────────────────────────────────────────────────┘
  1742.  
  1743. The /TRap=RSI option must be specified when debugging applications that are
  1744. to be run under the "DOS/4GW" DOS extender.  The "RSI.TRP" file will usually
  1745. be stored in the "BIN" directory of the WATCOM compiler package.  You should
  1746. ensure that this "BIN" directory is included in the DOS PATH environment
  1747. variable.  Otherwise, you must specify the full path name for the trap file.
  1748.  
  1749. The help file "RSIHELP.EXP" must also be located in one of the directories
  1750. listed in the DOS PATH environment variable.  It will usually be stored in
  1751. the "BIN" directory of the WATCOM compiler package.
  1752.  
  1753. Example:
  1754.   C>wvideo /trap=rsi hello
  1755.     or
  1756.   C>set wvideo=/trap#rsi
  1757.   C>wvideo hello
  1758.  
  1759.  
  1760.  
  1761. Using the ERGO 32-bit DOS Extender
  1762. ══════════════════════════════════
  1763. When using the ERGO Computing, Inc.  DOS extender, the "OS386" program must
  1764. be run first.
  1765.  
  1766. ┌──────────────────────────────────────────────────────────────────────────┐
  1767. │ C>OS386                                   │
  1768. │ C>WVIDEO/TRap=ECS [:sym_file] file_spec [cmd_line]               │
  1769. └──────────────────────────────────────────────────────────────────────────┘
  1770.  
  1771. The /TRap=ECS option must be specified when debugging applications that are
  1772. to be run under the "OS386" DOS extender.  The "ECS.TRP" file will usually
  1773. be stored in the "BIN" directory of the WATCOM compiler package.  You should
  1774. ensure that this "BIN" directory is included in the DOS PATH environment
  1775. variable.  Otherwise, you must specify the full path name for the trap file.
  1776.  
  1777. Example:
  1778.   C>wvideo /trap=ecs hello
  1779.     or
  1780.   C>set wvideo=/trap#ecs
  1781.   C>wvideo hello
  1782.  
  1783.  
  1784.  
  1785. Using the Phar Lap 32-bit DOS Extender
  1786. ══════════════════════════════════════
  1787. When using the Phar Lap Software, Inc.    DOS extender, the "RUN386.EXE",
  1788. "DBGLIB.REX" and "PLSHELP.EXP" files must be located in one of the
  1789. directories listed in the DOS PATH environment variable.
  1790.  
  1791. ┌──────────────────────────────────────────────────────────────────────────┐
  1792. │ C>WVIDEO/TRap=PLS[;trap_parm] [:sym_file] file_spec [cmd_line]       │
  1793. └──────────────────────────────────────────────────────────────────────────┘
  1794.  
  1795. The /TRap=PLS option must be specified when debugging applications that are
  1796. to be run under the Phar Lap DOS extender.  The "PLS.TRP" and "PLSHELP.EXP"
  1797. files will usually be stored in the "BIN" directory of the WATCOM compiler
  1798. package.  You should ensure that this "BIN" directory is included in the DOS
  1799. PATH environment variable.  Otherwise, you must specify the full path name
  1800. for the trap file.
  1801.  
  1802. The optional "trap_parm" is passed on to the DOS extender "RUN386" as
  1803. command line switches.    When trap_parm is specified and it contains blank
  1804. characters, the entire parameter must be placed within braces (e.g.,
  1805. /trap=pls;{-minr 128}).
  1806.  
  1807. Example:
  1808.   C>wvideo /trap=pls;{-maxreal 512} hello
  1809.     or
  1810.   C>set wvideo=/trap#pls;{-maxreal 512}
  1811.   C>wvideo hello
  1812. ::::DOS_GRAPHICS_APPLICATIONS
  1813. When debugging a graphics application, there are a number of VIDEO options
  1814. that could be specified depending on your situation.
  1815.  
  1816.   1. If you are debugging the graphics application on the same machine on
  1817.     which you start VIDEO and you have only one monitor attached to your
  1818.     system then the "Swap" option should be used.  The "Swap" option
  1819.     specifies that the application's screen memory and the debugger's screen
  1820.     memory are to be swapped back and forth using a single page.
  1821.  
  1822.   2. If you are debugging the graphics application on the same machine on
  1823.     which you start VIDEO and you have two monitors attached to your system
  1824.     then the "Two" and "Monochrome" options should be used.  The "Two"
  1825.     option specifies that a second monitor is connected to the system.    Note
  1826.     that if the monitor type (Monochrome, Color, Colour, Ega43, Vga50) is
  1827.     not specified then the monitor that is not currently being used is
  1828.     selected for the debugger's screen.  If you specify "Monochrome" then
  1829.     the monochrome monitor will be used for the debugger's screen.
  1830.  
  1831.   3. If you are debugging the graphics application using a second personal
  1832.     computer and the remote debugging feature of VIDEO then the choice of
  1833.     display and operation mode for VIDEO is somewhat irrelevant.  If one
  1834.     system is equipped with a graphics display and the other with a
  1835.     monochrome display then you will undoubtedly use the system equipped
  1836.     with the monochrome display to run VIDEO.
  1837. ::::DOS_INTERRUPTING_A_PROGRAM
  1838. Once a program has been loaded by VIDEO, its execution can be started by the
  1839. Go command (this command is described in the "GO" topic).
  1840.  
  1841. Example:
  1842.   C>wvideo myapp
  1843.    .
  1844.    .
  1845.    .
  1846.   DBG>go
  1847.  
  1848. As is sometimes the case during the development phase, a program may execute
  1849. endlessly.
  1850.  
  1851. Under DOS, execution of an application may be interrupted by pressing one of
  1852. the Print Screen (PrtSc) or System Request (SysRq) keys.  On some keyboards,
  1853. the Shift key must also be pressed to obtain the Print Screen function.
  1854.  
  1855. VIDEO will print a message in the "Dialogue" window indicating that the
  1856. program's execution has been interrupted.  Execution can be resumed with the
  1857. Go command.
  1858.  
  1859. The Ctrl/Break key combination may be used to interrupt execution of VIDEO
  1860. commands.
  1861.  
  1862. It also may be used to interrupt an executing program provided that the
  1863. following conditions are met:
  1864.  
  1865.   1. The program must not be handling Ctrl/Break interrupts itself, and
  1866.   2. the program must issue a DOS request (interrupt 0x21) as it is
  1867.     executing.
  1868.  
  1869. For information on how to interrupt executing programs when using the remote
  1870. debugging facility, see the "REMOTE_DEBUGGING" topic.
  1871. ::::DOS_REMOTE_DEBUGGING
  1872. ┌──────────────────────────────────────────────────────────────────────────┐
  1873. │ WVIDEO /TRap=trap_file[;trap_parm] [:sym_file] file_spec [cmd_line]       │
  1874. └──────────────────────────────────────────────────────────────────────────┘
  1875.  
  1876. The VIDEO TRap option must be specified when debugging an application using
  1877. a second computer system.  The format of file_spec depends on the target
  1878. machine's operating system, be it DOS, OS/2, NetWare 386, or QNX.  Under
  1879. QNX, file paths contain slashes ("/") as directory separators.    This brings
  1880. up an interesting problem when the debug machine is running DOS or OS/2.
  1881. Option specifiers can start with slashes also.    When the task machine is
  1882. running QNX and you wish to specify a file path, you must use a pair of
  1883. slashes to stop VIDEO from continuing its option scan.
  1884.  
  1885. Example:
  1886.   C>wvideo /trap=par /reg=4 // /users/fred/fdapp
  1887.  
  1888. When trap_parm is specified and it contains blank characters, the entire
  1889. parameter must be placed within braces (e.g., /trap=dqv;{WATCOM Server}).
  1890.  
  1891. You must specify the name of the "trap" file that corresponds to the Debug
  1892. Server that was started on the first computer system (the "task machine").
  1893. These files handle the machine-to-machine communication required for remote
  1894. debugging of an application.  Servers are described under the topics
  1895. "REMOTE_DEBUGGING" and "REMOTE_WIN3".
  1896.  
  1897. For DOS, the file extension defaults to ".TRP".  The DOS PATH environment
  1898. variable must contain the path of the trap files.  Trap files are usually
  1899. located in the "BIN" sub-directory of the directory that VIDEO is installed
  1900. in.
  1901.  
  1902. STD.TRP    Under DOS, if you do not specify a trap file, the default trap
  1903.        file "STD.TRP" will be loaded.  This interface module supports
  1904.        debugging on the local computer system running DOS.    No remote
  1905.        debugging is possible.  The trap file parameter "d" may be
  1906.        specified to disable the use of Debug Registers.
  1907.  
  1908. SER.TRP    This communications driver file supports debugging of an
  1909.        application running on another computer system using the serial
  1910.        ports of the two machines.  It communicates with the "SERSERV"
  1911.        Debug Server.  The serial port of the debugger machine is
  1912.        connected to the serial port of the task machine.  The
  1913.        "trap_parm" value specifies the port number to use and an
  1914.        optional maximum BAUD rate (which is separated from the port
  1915.        number by a period).  The port number is 1, 2, 3 or 4 (default is
  1916.        1).    These numbers correspond to the device number used when
  1917.        specifying the serial device "COMx" (as in "COM1", "COM2", etc.).
  1918.  
  1919.        Under DOS, the maximum BAUD rate can be one of:
  1920.  
  1921.          115200
  1922.           57600
  1923.           38400
  1924.           19200
  1925.            9600
  1926.            4800
  1927.            2400
  1928.            1200
  1929.           0 (a special case)
  1930.  
  1931.        The default maximum BAUD rate is 115,200.
  1932.  
  1933.        Except for the special BAUD rate of 0, a minimum of two digits
  1934.        must be specified to identify the desired maximum BAUD rate.  The
  1935.        maximum BAUD rate is explained in the section "Remote Debugging
  1936.        Over the Serial Port" under the topic "REMOTE_DEBUGGING".
  1937.        In the following example, port 2 and a maximum BAUD rate of
  1938.        19,200 is specified.
  1939.  
  1940.        Example:
  1941.          /trap=ser;2.19
  1942.  
  1943. PAR.TRP    This communications driver file supports debugging of an
  1944.        application running on another computer system using the parallel
  1945.        ports of the two machines.  It communicates with one of the
  1946.        "PARSERV" or "PARSERVW" (Microsoft Windows) Debug Servers.  The
  1947.        parallel port of the debugger machine is connected to the
  1948.        parallel port of the task machine.  The port number to use is
  1949.        specified by "trap_parm".  The port number is 1, 2 or 3 (default
  1950.        is 1).  These numbers correspond to the device number used when
  1951.        specifying the printer device "LPTx" (as in "LPT1", "LPT2",
  1952.        etc.).
  1953.  
  1954. NOV.TRP    This communications driver file supports debugging of an
  1955.        application running on another computer system that is connected
  1956.        to the Novell "NetWare" network (NetWare and Novell are
  1957.        trademarks of Novell, Inc.).  It communicates with the "NOVSERV"
  1958.        Debug Server.  Version 2.0 or later of NetWare must be used.  The
  1959.        server name to use is specified by "trap_parm".  The server name
  1960.        must match the name that you specified when starting the server
  1961.        on the "task" machine.  The default "server_name" is "NovLink".
  1962.        The server name must consist of less than 48 characters.
  1963.  
  1964. NET.TRP    This communications driver file supports debugging of an
  1965.        application running on another computer system using the NetBIOS
  1966.        network programming interface.  It communicates with one of the
  1967.        "NETSERV" or "NETSERVW" (Microsoft Windows) Debug Servers.  The
  1968.        server name to use is specified by "trap_parm".  The server name
  1969.        must match the name that you specified when starting the server
  1970.        on the "task" machine.  The default "server_name" is "NetLink".
  1971.        The server name may consist of up to 15 alphanumeric characters.
  1972.  
  1973. DQV.TRP    This communications driver file supports debugging of an
  1974.        application that is run under DESQview on DOS.  It communicates
  1975.        with the "DQVSERV" Debug Server.  The server name to use is
  1976.        specified by "trap_parm".  The server name must match the name
  1977.        that you specified when starting the server in a DESQview window.
  1978.        The default "server_name" is "WATCOM Server".
  1979.  
  1980.        ┌─────────────────────────────────────────────────────────────────┐
  1981.        │  Note:  In order to interrupt the execution of an application   │
  1982.        │ using one of the Print Screen (PrtSc) or System Request (SysRq) │
  1983.        │ keys, you should have DESQview version 2.26 or later.  Pressing │
  1984.        │ one of these keys with earlier versions of DESQview will result │
  1985.        │ in the current CS:IP pointing into DESQview code.             │
  1986.        └─────────────────────────────────────────────────────────────────┘
  1987.  
  1988. WIN.TRP    This communications driver file supports debugging of an
  1989.        application that is run in a Microsoft Windows DOS box.  It
  1990.        communicates with the "WINSERV" Debug Server.  The server name to
  1991.        use is specified by "trap_parm".  The server name must match the
  1992.        name that you specified when starting the server in a Microsoft
  1993.        Windows DOS box.  The default "server_name" is "WinLink".
  1994.  
  1995.        Microsoft Windows must be started in standard or enhanced mode.
  1996.        When debugging 32-bit applications, you must include the "device"
  1997.        specification listed below in the [386Enh] section of your Windows
  1998.        "SYSTEM.INI" file.
  1999.  
  2000.          DEVICE=[d:]\WATCOM\BINW\WDEBUG.386
  2001.  
  2002.        This device driver can be used when debugging 16-bit applications
  2003.        also.
  2004. ::::DOS_STARTUP
  2005. ┌──────────────────────────────────────────────────────────────────────────┐
  2006. │ WVIDEO [options] [:sym_file] file_spec [cmd_line]               │
  2007. └──────────────────────────────────────────────────────────────────────────┘
  2008.  
  2009. The square brackets [ ] denote items which are optional.
  2010.  
  2011. WVIDEO       is the program name for VIDEO.
  2012.  
  2013. options    is a list of valid VIDEO options, each preceded by a dash ("-")
  2014.        or a slash ("/").  Options may be specified in any order.
  2015.  
  2016. sym_file   is an optional symbolic debugging information file specification.
  2017.        The specification must be preceded by a colon (":").  For DOS,
  2018.        the syntax of sym_file is:
  2019.  
  2020.        [d:][path]filename[.ext]
  2021.  
  2022.        The default file extension of the symbol file is ".SYM".
  2023.  
  2024.        The symbolic information file can be produced by the WATCOM
  2025.        Linker WLINK or by the WATCOM Strip Utility WSTRIP.
  2026.  
  2027. file_spec  is the file name of the file to be loaded into memory.  For DOS,
  2028.        the syntax of file_spec is:
  2029.  
  2030.        [d:][path]filename[.ext]
  2031.  
  2032.        d:          is an optional drive specification such as "A:", "B:",
  2033.               etc.  If not specified, the default drive is assumed.
  2034.  
  2035.        path       is an optional path specification such as
  2036.               "\UTILS\BIN\".
  2037.  
  2038.        filename   is the file name of the file to be loaded into memory.
  2039.  
  2040.        ext          is the file extension of the file to be loaded into
  2041.               memory.  A null file extension may be specified by
  2042.               typing the period "." but not the extension.  If no
  2043.               file extension is specified (i.e., both the period and
  2044.               extension are omitted) then VIDEO will attempt to load
  2045.               an executable image file using, in succession, the
  2046.               following extensions.
  2047.  
  2048.               For DOS, the search order is:  .COM, .EXE
  2049.  
  2050.               For the ERGO DOS extender, the search order is:  .EXP,
  2051.               .PLX, .EXE
  2052.  
  2053.               For the Phar Lap DOS extender, the search order is:
  2054.               .EXP, .EXE
  2055.  
  2056.               For the Rational DOS extender, the search order is:
  2057.               .EXE
  2058.  
  2059.               For NetWare 386, the search order is:  .NLM, .DSK,
  2060.               .LAN
  2061.  
  2062. cmd_line   is an optional command line which will be passed on to the
  2063.        application.
  2064.  
  2065. If both drive and path are omitted, VIDEO will first attempt to locate the
  2066. file in the current directory of the default drive.  If this fails, VIDEO
  2067. will search for the file in each path listed in the PATH environment string.
  2068.  
  2069.  
  2070. Command Line Options
  2071. ════════════════════
  2072. ┌──────────────────────────────────────────────────────────────────────────┐
  2073. │     /Monochrome | /Color | /Colour | /Ega43 | /Vga50               │
  2074. │     /Overwrite | /Page | /Swap | /Two                    │
  2075. │     /Checksize=space                               │
  2076. │     /Dynamic=space                               │
  2077. │     /NOFpu                                   │
  2078. │     /Invoke=file_spec                            │
  2079. │     /NOInvoke                                │
  2080. │     /NOMouse                                   │
  2081. │     /Registers=number                            │
  2082. │     /REMotefiles                               │
  2083. │     /SIze=space                               │
  2084. │     /NOSNow                                   │
  2085. │     /NOSymbols                               │
  2086. │     /TRap=trap_file[;trap_parm]                       │
  2087. └──────────────────────────────────────────────────────────────────────────┘
  2088.  
  2089. Options may be specified in any order.    Short forms may be specified for
  2090. options and are shown above in capital letters.  If "space" is suffixed with
  2091. the letter "K" then "space" refers to multiples of 1K bytes (1024 bytes).
  2092. If "space" is suffixed with the letter "B" then "space" refers to the number
  2093. of bytes.  If no suffix is specified and "space" is a number less than 1000
  2094. then "space" is assumed to refer to multiples of 1K bytes (1024 bytes);
  2095. otherwise it refers to the number of bytes.
  2096.  
  2097. Display Selection
  2098.  
  2099. /Monochrome When two display devices are present in the system, this option
  2100.        indicates that the Monochrome display is to be used as the
  2101.        debugger's output device.  This option is used in conjunction
  2102.        with the Two option described below.
  2103.  
  2104. /Color, /Colour When two display devices are present in the system, this
  2105.        option indicates that the Colour display is to be used as the
  2106.        debugger's output device.  This option is used in conjunction
  2107.        with the Two option described below.
  2108.  
  2109. /Ega43       When an Enhanced Graphics Adapter (EGA) is present, 43 lines of
  2110.        output are displayed.
  2111.  
  2112. /Vga50       When an Video Graphics Array (VGA) is present, 50 lines of output
  2113.        are displayed.
  2114.  
  2115. Display Operation Modes
  2116.  
  2117. /Overwrite specifies that the debugger's output can overwrite program
  2118.        output.  In this mode, the application and the debugger are
  2119.        forced to share the same display area.
  2120.  
  2121.        This option may be used to conserve the amount of memory required
  2122.        to run VIDEO.  This option should not be used if you wish to
  2123.        debug a screen-oriented application (e.g., a graphics
  2124.        application) on the same machine.  See the topic entitled
  2125.        "DOS_GRAPHICS_APPLICATIONS".
  2126.  
  2127. /Page       specifies that page 0 of screen memory is to be used for the
  2128.        application's screen and that page 1 of screen memory should be
  2129.        used for the debugger's screen.  This option may be selected when
  2130.        using a graphics adapter such as the CGA, EGA or VGA.  Use of the
  2131.        Page option results in faster switching between the application
  2132.        and debugger screens and makes use of the extra screen memory
  2133.        available with the adapter.
  2134.  
  2135.        This option should not be used if you wish to debug a graphics
  2136.        application on the same machine.  See the topic entitled
  2137.        "DOS_GRAPHICS_APPLICATIONS".
  2138.  
  2139. /Swap       specifies that the application's screen memory and the debugger's
  2140.        screen memory are to be swapped back and forth using a single
  2141.        page.  The debugger allocates an area in its own data space for
  2142.        the inactive screen.  This reduces the amount of memory available
  2143.        to the application.    It also takes more time to switch between
  2144.        the application and debugger screens.
  2145.  
  2146.        This option MUST be used when debugging a graphics application on
  2147.        the same machine and a second monitor is not available.  See the
  2148.        topic entitled "DOS_GRAPHICS_APPLICATIONS".
  2149.  
  2150. /Two       specifies that a second monitor is connected to the system.    If
  2151.        the monitor type (Monochrome, Color, Colour, Ega43, Vga50) is not
  2152.        specified then the monitor that is not currently being used is
  2153.        selected for the debugger's screen.  If the monitor type is
  2154.        specified then the monitor corresponding to that type is used for
  2155.        the debugger's screen.
  2156.  
  2157.        This option should be used when debugging a graphics application
  2158.        on the same machine and a second monitor is available.  See the
  2159.        topic entitled "DOS_GRAPHICS_APPLICATIONS".
  2160.  
  2161. The default display operation is as follows:
  2162.  
  2163.   1. If you have a two display system, VIDEO uses both displays with the
  2164.     program output appearing on the active monitor and the debugger output
  2165.     appearing on the alternate monitor.  In other words, the Two option is
  2166.     selected by default.
  2167.   2. If you have one of the CGA, EGA or VGA graphics adapters installed in
  2168.     your system then VIDEO will select the Page option by default.
  2169.   3. Under all other circumstances, VIDEO will select the Swap option by
  2170.     default.
  2171.  
  2172. /Checksize=space specifies the minimum amount of storage, in kilobytes, that
  2173.        VIDEO is to provide to DOS for the purpose of running a program
  2174.        via the debugger's SYstem command (this command is described
  2175.        under the topic "SYSTEM").  This option is useful when the
  2176.        application that is being debugged uses up most or all of
  2177.        available storage, leaving insufficient memory to spawn
  2178.        secondary programs.    In order to provide the requested amount of
  2179.        free memory to DOS, the debugger will checkpoint as much of the
  2180.        application as is required.
  2181.  
  2182.        Checkpointing involves temporarily storing a portion of the
  2183.        memory-resident application on disk and then reusing the part of
  2184.        memory that it occupied for the spawned program.  When the
  2185.        spawned program terminates, the checkpointed part of the
  2186.        application is restored to memory.
  2187.  
  2188.        The default amount is 0K bytes.  In this case, the spawned
  2189.        program may or may not be run depending on how much free storage
  2190.        is available to DOS to run the program.
  2191.  
  2192.        ┌─────────────────────────────────────────────────────────────────┐
  2193.        │  WARNING!    If the application being debugged installs one or    │
  2194.        │ more interrupt handlers, the use of this option could hang your │
  2195.        │ system.  Your system could lock up if the debugger checkpoints  │
  2196.        │ a portion of the application's code that contains an interrupt  │
  2197.        │ handler.                                 │
  2198.        └─────────────────────────────────────────────────────────────────┘
  2199.  
  2200. /Dynamic=space specifies the amount of dynamic storage that VIDEO is to
  2201.        reserve for items such as windows, user-defined symbols, etc.
  2202.        The default amount that is set aside is 40960 bytes (40K bytes).
  2203.        The amount, if specified, can exceed 64K bytes.  The larger the
  2204.        amount, the less memory will be available for the application to
  2205.        be debugged.  If you are using the remote debugging feature,
  2206.        VIDEO will utilize as much of available memory as it requires.
  2207.  
  2208. /NOFpu       requests that the debugger ignore the presence of a math
  2209.        coprocessor.  No memory will be allocated by the debugger for
  2210.        saving the context of the 80x87 numeric data processor.  Use this
  2211.        option if your application will not use the math coprocessor and
  2212.        you wish to reduce the amount of memory required by the debugger.
  2213.  
  2214. /Invoke=file_spec may be used to specify an alternate name for the debugger
  2215.        command file which is to be automatically invoked at start-up
  2216.        time.  The default file name is "PROFILE.DBG".  VIDEO command
  2217.        files are found in the current directory or one of the
  2218.        directories listed in the DOS PATH environment string.
  2219.  
  2220. /NOInvoke  specifies that the default debugger command file is not to be
  2221.        invoked.
  2222.  
  2223. /NOMouse   requests that the debugger ignore any attached mouse.  This may
  2224.        be necessary if the program being debugged also uses the mouse
  2225.        and the mouse driver installed on the system does not support two
  2226.        applications sharing the mouse at the same time.  The program
  2227.        "CHKMOUSE.COM" will inform you if the mouse driver supports this
  2228.        function.  To determine the capabilities of your mouse driver,
  2229.        run the CHKMOUSE program at the DOS command prompt.
  2230.  
  2231.        Example:
  2232.          C>chkmouse
  2233.  
  2234.        The program displays a single line telling you that either your
  2235.        mouse driver supports applications sharing the mouse, that it
  2236.        does not support applications sharing the mouse, or that there is
  2237.        no mouse driver installed.  This program is provided with VIDEO.
  2238.  
  2239.        In order to use a mouse, you must install the IBM Mouse Driver
  2240.        program that is supplied with the IBM Mouse.  Alternatively, you
  2241.        may use a mouse and mouse driver that are compatible with the IBM
  2242.        Mouse and IBM Mouse Driver.    The IBM Mouse Driver is installed by
  2243.        running the "MOUSE.COM" program.
  2244.  
  2245.        Example:
  2246.          C>\dos\mouse
  2247.  
  2248. /Registers=number may be used to specify how many register sets to set aside
  2249.        for the recording of register contents.  The default number of
  2250.        register sets is 2.    See the description of the Register command
  2251.        for more information (this command is described under the topic
  2252.        "REGISTER").
  2253.  
  2254. /REMotefiles may be used in conjunction with the remote debugging
  2255.        capabilities of the debugger.  Remote debugging involves using
  2256.        two personal computers.  One, called the "task machine", is used
  2257.        to run the application; the other, called the "debugger machine",
  2258.        is used to run the debugger.  When REMotefiles is specified, all
  2259.        debugger files (except "trap" files) and application source files
  2260.        are opened on the task machine rather than the debugger machine
  2261.        (if you are doing local debugging, these two machines are
  2262.        actually the same).    The "trap" file must be located on the
  2263.        debugger machine because it contains the code to open files on
  2264.        the task machine.
  2265.  
  2266.        Note that the PATH environment variable on the task machine is
  2267.        always used in locating executable image files.  When REMotefiles
  2268.        is specified, the debugger also uses the task machine's PATH
  2269.        environment variable to locate debugger command files.
  2270.  
  2271. /SIze=space specifies the amount of additional overlay space that VIDEO may
  2272.        use for its overlay area.  The larger the area (up to a certain
  2273.        amount), the better the performance of VIDEO but less memory will
  2274.        be available for your application.  The default amount that is
  2275.        set aside is 70K bytes.
  2276.  
  2277. /NOSNow    requests that VIDEO omit the vertical retrace delay on CGA
  2278.        adapters when writing to video memory directly.  The omission of
  2279.        this delay will speed up display output.
  2280.  
  2281. /NOSymbols requests that VIDEO omit all debugging information when loading
  2282.        an executable image.  Information regarding global and local
  2283.        symbol names, data types, and line numbers is not processed.
  2284.  
  2285. /TRap=trap_file[;trap_parm] must be specified when debugging an application
  2286.        on a remote machine or debugging an application running under a
  2287.        32-bit DOS extender.  It may also be used to disable the use of
  2288.        386/486 Debug Registers.  You must specify the name of one of the
  2289.        "trap" files provided with VIDEO.  Under DOS, the file extension
  2290.        defaults to ".TRP".    The "BIN" directory contains the trap files
  2291.        provided with VIDEO.
  2292.  
  2293.        Under DOS, if you do not specify the TRap option, the default
  2294.        trap file "STD.TRP" will be loaded.    This interface module
  2295.        supports debugging on the local computer system running DOS.
  2296.  
  2297.        Example:
  2298.          C>wvideo calendar
  2299.  
  2300.        Of course, you may also explicitly name the "standard" trap file
  2301.        that you wish VIDEO to use.
  2302.  
  2303.        Example:
  2304.          C>wvideo /trap=std calendar
  2305.  
  2306.        See the topic "REMOTE_DEBUGGING" for more information on the
  2307.        TRap option.
  2308. ::::DOS_WVIDEO_ENVIRONMENT_VARIABLE
  2309. The WVIDEO environment variable can be used to specify commonly used VIDEO
  2310. options.  If the specification of an option involves the use of an "="
  2311. character then the "#" character may be used in its place (this is required
  2312. by the syntax of the "SET" command).  These options are processed before
  2313. options specified on the command line.
  2314.  
  2315. Example:
  2316.   C>set wvideo=/swap/vga50/reg#4
  2317.  
  2318. The above examples illustrate how to define default options for the
  2319. debugger.
  2320.  
  2321. Once the WVIDEO environment variable has been defined, those options listed
  2322. become the default each time VIDEO is invoked.
  2323. ::::ERROR
  2324. ┌──────────────────────────────────────────────────────────────────────────┐
  2325. │ ERror  text_string | "{" text_string "}"                   │
  2326. └──────────────────────────────────────────────────────────────────────────┘
  2327.  
  2328. The Error command may be used to display an error message on the screen
  2329. which requires an acknowledgement.  This command can be used most
  2330. effectively in VIDEO command files.  Currently executing command files are
  2331. terminated when the ERror command is issued.
  2332.  
  2333. Example:
  2334.   DBG>if ~ dbg$fpu {error No 80x87 processor/emulator!}
  2335.  
  2336. The message text is displayed in an Error window.
  2337. ::::EXAMINE
  2338. ┌──────────────────────────────────────────────────────────────────────────┐
  2339. │ Examine                                   │
  2340. │     [/Byte]          exam_data                        │
  2341. │     /Word          exam_data                        │
  2342. │     /Dword          exam_data                        │
  2343. │     /Pointer          exam_data                        │
  2344. │     /Assembly       addr_data                        │
  2345. │     /Source          addr_data                        │
  2346. │     /IOByte          port_data                        │
  2347. │     /IOWord          port_data                        │
  2348. │     /IODword          port_data                        │
  2349. └──────────────────────────────────────────────────────────────────────────┘
  2350.  
  2351. The Examine command is used to display the contents of memory and I/O ports
  2352. in one of several different ways.
  2353.  
  2354.  
  2355.  
  2356. Examining Memory as Data
  2357. ════════════════════════
  2358. /Byte exam_data When this qualifier is used, the output from the Examine
  2359.        command is written to the Dialogue window.  The output is
  2360.        formatted into 8-bit values (bytes) using hexadecimal (base 16)
  2361.        notation.  The default qualifier is /Byte.
  2362.  
  2363. /Word exam_data When this qualifier is used, the output from the Examine
  2364.        command is written to the Dialogue window.  The output is
  2365.        formatted into 16-bit values (words) using hexadecimal (base 16)
  2366.        notation.  The most significant byte of each word is shown first.
  2367.  
  2368. /Dword exam_data When this qualifier is used, the output from the Examine
  2369.        command is written to the Dialogue window.  The output is
  2370.        formatted into 32-bit values (doublewords) using hexadecimal
  2371.        (base 16) notation.    The most significant byte of each doubleword
  2372.        is shown first.
  2373.  
  2374. /Pointer exam_data When this qualifier is used, the output from the Examine
  2375.        command is written to the Dialogue window.  The output is
  2376.        formatted into segment/offset pairs (segment:offset) using
  2377.        hexadecimal (base 16) notation.
  2378.  
  2379.   exam_data ::= [start_addr_expr]
  2380.               [ "," [next_addr_expr]
  2381.               [ "," [len_expr]
  2382.               [ "," rpt_expr ] ] ]
  2383.  
  2384. The starting address start_addr_expr is any expression that defines a
  2385. segment and offset of memory to be displayed.  The next address
  2386. next_addr_expr is any expression that defines the next segment and offset of
  2387. memory to be displayed.  The length value len_expr is any expression that
  2388. defines the amount of memory to be displayed.  The repetition count rpt_expr
  2389. may be any expression that defines the number of times the command is to be
  2390. repeated.
  2391.  
  2392. For a complete description of valid expressions, see the chapter entitled
  2393. "VIDEO Expression Handling".
  2394.  
  2395. Example:
  2396.   DBG>examine ds:0x0000
  2397.   DBG>examine ds:0x0000,.+0x10,0x10
  2398.  
  2399. The above two examples are equivalent.    Memory is displayed as a sequence of
  2400. bytes starting at the segment defined by the contents of the DS register and
  2401. an offset of 0.
  2402.  
  2403. The default next_addr_expr is defined as the current starting address (".")
  2404. plus 16 (decimal).  The default len_expr is 16 (decimal).
  2405.  
  2406. One of the features of the Examine command is its ability to follow linked
  2407. lists.    This can be illustrated with an example from the C programming
  2408. language.  Imagine that the following structure was defined.
  2409.  
  2410.   typedef struct list_entry
  2411.     {
  2412.       int        entry_number;
  2413.       struct list_entry *next;
  2414.       int        flags;
  2415.       char        *buff_addr;
  2416.     } LIST;
  2417.  
  2418.   extern LIST *listhead;  /* start of linked list */
  2419.  
  2420. The structure definition indicates that the second item in each entry points
  2421. to the next entry in the linked list.  To examine the entries in the linked
  2422. list (in 16-bit mode), the following command could be issued.
  2423.  
  2424. Example:
  2425.   DBG>ex/word *listhead,*(.+2),list_entry
  2426.   2134:0100 0001 013C 0774 8B55
  2427.   2134:013C 0002 011E 0770 8B97
  2428.   2134:011E 0003 0142 0074 8B34
  2429.   2134:0142 0004 0000 0070 8B55
  2430.  
  2431. We use the pointer operator * to indicate memory indirection.  After the
  2432. first line is displayed, the current memory location "." is defined to be
  2433. "2134:0100".  Hence, ".+2" is "2134:0102" and "*(2134:0102)" is "013C".
  2434. Therefore, the next memory location to be displayed is 2134:013C.  Each time
  2435. the space bar is pressed, the next memory location is displayed and the
  2436. value for "." is updated.
  2437.  
  2438.   1. In the above example, we are using type information when we refer to
  2439.     list_entry.  In order to specify a type name such as this, the "d2"
  2440.     compiler option must have been specified when the module was compiled.
  2441.   2. In addition, the "debug types" or "debug all" linker option must have
  2442.     preceded the name of the object file containing the module when the
  2443.     application was linked.
  2444.  
  2445.  
  2446.  
  2447. Examining Memory as Instructions
  2448. ════════════════════════════════
  2449. /Assembly addr_data When this qualifier is used, the output from the Examine
  2450.        command is written to the Assembly window if one is present on
  2451.        the screen; otherwise output is written to the Dialogue window.
  2452.        The output is formatted into Intel machine language instructions.
  2453.        Numeric values are displayed in hexadecimal (base 16) notation.
  2454.        For any locations that are displayed as "<symbol_name>+offset",
  2455.        the value for "offset" is displayed in the current numeric radix.
  2456.  
  2457. /Source addr_data When this qualifier is used, the output from the Examine
  2458.        command is written to the Source window if one is present on the
  2459.        screen; otherwise output is written to the Dialogue window.    If
  2460.        both line number information and the source file are available
  2461.        then the source lines are displayed.  If only line number
  2462.        information is available then only line numbers are displayed.
  2463.        If no information is available then no lines will be displayed in
  2464.        the Source window.
  2465.  
  2466.        If present, line number information is extracted from the
  2467.        executable image file.  Source lines are extracted from a source
  2468.        file provided that the file can be located.    For more
  2469.        information, see the description of the Set Source command.
  2470.  
  2471.   addr_data ::= [start_addr_expr] [ "," rpt_expr ]
  2472.  
  2473. The starting address start_addr_expr is any expression that defines a
  2474. segment and offset of memory to be displayed in the form of assembly
  2475. instructions and source lines.    The repetition count rpt_expr may be any
  2476. expression that defines the number of times the command is to be repeated.
  2477. A positive repetition count is equivalent to that many presses of the space
  2478. bar (next).  A negative repetition count is equivalent to that many presses
  2479. of the "P" key (previous).
  2480.  
  2481. Example:
  2482.   DBG>examine/source main_
  2483.   DBG>e/s main_
  2484.  
  2485. In the above example, two equivalent commands are shown.  The latter is
  2486. simply the short form for the former command.  Source lines corresponding to
  2487. the application entry point main_ are displayed.
  2488.  
  2489. A starting address may also be specified in terms of the module name and
  2490. line number.
  2491.  
  2492. Example:
  2493.   DBG>ex/source calendar@36
  2494.  
  2495. The module name need not be specified when it is the current module under
  2496. examination.
  2497.  
  2498. Example:
  2499.   DBG>ex/source @159
  2500.  
  2501. Line numbers are shown in the Source window.  Source line information must
  2502. be available in order to show source line numbers.
  2503.  
  2504.   1. Either compiler options "d1" or "d2" must have been specified when the
  2505.     module was compiled.
  2506.   2. The "debug lines" or "debug all" linker option must have preceded the
  2507.     name of the object file containing the module when the application was
  2508.     linked.
  2509.  
  2510.  
  2511.  
  2512. Examining Input/Output Ports
  2513. ════════════════════════════
  2514. /IOByte port_data When this qualifier is used, the specified port is read
  2515.        and output from the Examine command is written to the Dialogue
  2516.        window.  The output is formatted into an 8-bit value (byte) using
  2517.        hexadecimal (base 16) notation.
  2518.  
  2519. /IOWord port_data When this qualifier is used, the specified port is read
  2520.        and output from the Examine command is written to the Dialogue
  2521.        window.  The output is formatted into 16-bit values (words) using
  2522.        hexadecimal (base 16) notation.  The most significant byte of
  2523.        each word is shown first.
  2524.  
  2525. /IODword port_data The IODword qualifier is supported on 386 systems or
  2526.        higher.  When this qualifier is used, the specified port is read
  2527.        and output from the Examine command is written to the Dialogue
  2528.        window.  The output is formatted into 32-bit values (doublewords)
  2529.        using hexadecimal (base 16) notation.  The most significant byte
  2530.        of each doubleword is shown first.
  2531.  
  2532.   port_data ::= [start_addr_expr] [ "," rpt_expr ]
  2533.  
  2534. The starting address start_addr_expr is any expression that defines an
  2535. input/output port at which to begin reading data.  The repetition count
  2536. rpt_expr may be any expression that defines the number of times the command
  2537. is to be repeated.  A positive repetition count is equivalent to that many
  2538. presses of the space bar (next).
  2539. ::::F77_OPERATORS
  2540. VIDEO supports most FORTRAN 77 operators and includes an additional set of
  2541. operators for convenience.  The additional operators are patterned after
  2542. those available in the C programming language.
  2543.  
  2544. The grammar that VIDEO supports is close to that of the FORTRAN 77 language
  2545. but there are a few instances where space characters must be used to clear
  2546. up any ambiguities.  For example, the expression
  2547.  
  2548.   1.eq.x
  2549.  
  2550. will result in an error since VIDEO will form a floating-point constant from
  2551. the "1." leaving the string "eq.x".  If we introduce a space character after
  2552. the "1" then we clear up the ambiguity.
  2553.  
  2554.   1 .eq.x
  2555.  
  2556. Unlike FORTRAN, the parser in VIDEO treats spaces as significant characters.
  2557. Thus spaces must not be introduced in the middle of symbol names, constants,
  2558. multi-character operators like .EQ.  or //, etc.
  2559.  
  2560. Operators are presented in order of precedence, from lowest to highest.
  2561. Operators on the same line have the same priority.
  2562.  
  2563.                       Lowest Priority
  2564.   Assignment Operators
  2565.       =  +=  -=  *=  /=  %=  &=  |=  ^=  <<=  >>=
  2566.   Logical Operators
  2567.       .EQV.  .NEQV.
  2568.       .OR.
  2569.       .AND.
  2570.       .NOT.
  2571.   Bit Operators
  2572.       |
  2573.       ^
  2574.       &
  2575.   Relational Operators
  2576.       .EQ.  .NE.  .LT.    .LE.  .GT.  .GE.
  2577.   Shift and Concatenation Operators
  2578.       <<  >>  //
  2579.   Arithmetic Operators
  2580.       +  -
  2581.       *  /  %
  2582.       ** (unsupported)
  2583.   Unary Operators
  2584.       +  -
  2585.       ~  ++  --  &   *     %
  2586.       [type_name] unary_expr
  2587.       ?
  2588.   Binary Address Operator
  2589.       :
  2590.                       Highest Priority
  2591.  
  2592. Parentheses can be used to order the evaluation of an expression.
  2593.  
  2594. In addition to the operators listed above, a number of primary expression
  2595. operators are supported.  These operators are used in identifying the object
  2596. to be operated upon.
  2597.  
  2598. ()       subscripting, substringing, or function call
  2599.  
  2600. .       field selection
  2601.  
  2602. ->       field selection using a pointer
  2603.  
  2604. The following built-in functions may be used to convert the specified
  2605. argument to a particular type.
  2606.  
  2607.   INT( )      conversion to integer
  2608.   REAL( )     conversion to real
  2609.   DBLE( )     conversion to double-precision
  2610.   CMPLX( )    conversion to complex
  2611.   DCMPLX( )   conversion to double-precision complex
  2612.  
  2613. The following sections describe the operators presented above.
  2614.  
  2615.  
  2616.  
  2617. Assignment Operators for the FORTRAN Grammar
  2618. ════════════════════════════════════════════
  2619. =       Assignment:    The value on the right is assigned to the object on
  2620.        the left.
  2621.  
  2622. +=       Additive assignment:  The object on the left is augmented by the
  2623.        value on the right.
  2624.  
  2625. -=       Subtractive assignment:  The object on the left is reduced by the
  2626.        value on the right.
  2627.  
  2628. *=       Multiplicative assignment:  The object on the left is multiplied
  2629.        by the value on the right.
  2630.  
  2631. /=       Division assignment:  The object on the left is divided by the
  2632.        value on the right.
  2633.  
  2634. %=       Modulus assignment:    The object on the left is updated with
  2635.        MOD(left,right).  The result is the remainder when the value of
  2636.        the object on the left is divided by the value on the right.
  2637.  
  2638. &=       Bit-wise AND:  The bits in the object on the left are ANDed with
  2639.        the bits of the value on the right.
  2640.  
  2641. |=       Bit-wise inclusive OR:  The bits in the object on the left are
  2642.        ORed with the bits of the value on the right.
  2643.  
  2644. ^=       Bit-wise exclusive OR:  The bits in the object on the left are
  2645.        exclusively ORed with the bits of the value on the right.
  2646.  
  2647. <<=       Left shift:    The bits in the object on the left are shifted to
  2648.        the left by the amount of the value on the right.
  2649.  
  2650. >>=       Right shift:  The bits in the object on the left are shifted to
  2651.        the right by the amount of the value on the right.  If the object
  2652.        on the left is described as unsigned, the vacated high-order bits
  2653.        are zeroed.    If the object on the left is described as signed,
  2654.        the sign bit is propagated through the vacated high-order bits.
  2655.        VIDEO treats registers as unsigned items.
  2656.  
  2657.  
  2658.  
  2659. Logical Operators for the FORTRAN Grammar
  2660. ═════════════════════════════════════════
  2661. .EQV.       Logical equivalence:  The logical equivalence of the value on the
  2662.        left and the value on the right is produced.
  2663.  
  2664. .NEQV.       Logical non-equivalence:  The logical non-equivalence of the
  2665.        value on the left and the value on the right is produced.
  2666.  
  2667. .OR.       Logical inclusive disjunction:  The logical OR of the value on
  2668.        the left and the value on the right is produced.
  2669.  
  2670. .AND.       Logical conjunction:  The logical AND of the value on the left
  2671.        and the value on the right is produced.
  2672.  
  2673. .NOT.       Logical negation:  The logical complement of the value on the
  2674.        right is produced.
  2675.  
  2676.  
  2677.  
  2678. Bit Operators for the FORTRAN Grammar
  2679. ═════════════════════════════════════
  2680. |       Bit-wise OR:  The bits of the value on the left and the value on
  2681.        the right are ORed.
  2682.  
  2683. ^       Bit-wise exclusive OR:  The bits of the value on the left and the
  2684.        value on the right are exclusively ORed.
  2685.  
  2686. &       Bit-wise AND:  The bits of the value on the left and the value on
  2687.        the right are ANDed.
  2688.  
  2689.  
  2690.  
  2691. Relational Operators for the FORTRAN Grammar
  2692. ════════════════════════════════════════════
  2693. .EQ.       Equal:  If the value on the left is equal to the value on the
  2694.        right then the result is 1; otherwise the result is 0.
  2695.  
  2696. .NE.       Not equal:  If the value on the left is not equal to the value on
  2697.        the right then the result is 1; otherwise the result is 0.
  2698.  
  2699. .LT.       Less than:  If the value on the left is less than the value on
  2700.        the right then the result is 1; otherwise the result is 0.
  2701.  
  2702. .LE.       Less than or equal:    If the value on the left is less than or
  2703.        equal to the value on the right then the result is 1; otherwise
  2704.        the result is 0.
  2705.  
  2706. .GT.       Greater than:  If the value on the left is greater than the value
  2707.        on the right then the result is 1; otherwise the result is 0.
  2708.  
  2709. .GE.       Greater than or equal:  If the value on the left is greater than
  2710.        or equal to the value on the right then the result is 1;
  2711.        otherwise the result is 0.
  2712.  
  2713.  
  2714.  
  2715. Arithmetic/Logical Shift Operators for the FORTRAN Grammar
  2716. ══════════════════════════════════════════════════════════
  2717. <<       Left shift:    The bits of the value on the left are shifted to the
  2718.        left by the amount described by the value on the right.
  2719.  
  2720. >>       Right shift:  The bits of the value on the left are shifted to
  2721.        the right by the amount described by the value on the right.  If
  2722.        the object on the left is described as unsigned, the vacated
  2723.        high-order bits are zeroed.    If the object on the left is
  2724.        described as signed, the sign bit is propagated through the
  2725.        vacated high-order bits.  VIDEO treats registers as unsigned
  2726.        items.
  2727.  
  2728.  
  2729.  
  2730. Concatenation Operator for the FORTRAN Grammar
  2731. ══════════════════════════════════════════════
  2732. //       String concatenation:  The concatenation of the character string
  2733.        value on the left and right is formed.
  2734.  
  2735.  
  2736.  
  2737. Binary Arithmetic Operators for the FORTRAN Grammar
  2738. ═══════════════════════════════════════════════════
  2739. +       Addition:  The value on the right is added to the value on the
  2740.        left.
  2741.  
  2742. _       Subtraction:  The value on the right is subtracted from the value
  2743.        on the left.
  2744.  
  2745. *       Multiplication:  The value on the left is multiplied by the value
  2746.        on the right.
  2747.  
  2748. /       Division:  The value on the left is divided by the value on the
  2749.        right.
  2750.  
  2751. %       Modulus:  The modulus of the value on the left with respect to
  2752.        the value on the right is produced.    The result is the remainder
  2753.        when the value on the left is divided by the value on the right.
  2754.  
  2755. **       Exponentiation:  This operation is not supported by VIDEO.
  2756.  
  2757.  
  2758.  
  2759. Unary Arithmetic Operators for the FORTRAN Grammar
  2760. ══════════════════════════════════════════════════
  2761. +       Plus:  The result is the value on the right.
  2762.  
  2763. _       Minus:  The result is the negation of the value on the right.
  2764.  
  2765. ~       Bit-wise complement:  The result is the bit-wise complement of
  2766.        the value on the right.
  2767.  
  2768. ++       Increment:  Both prefix and postfix operators are supported.  If
  2769.        the object is on the right, it is pre-incremented by 1 (e.g.,
  2770.        ++x).  If the object is on the left, it is post-incremented by 1
  2771.        (e.g., x++).
  2772.  
  2773. _ _       Decrement:  Both prefix and postfix operators are supported.  If
  2774.        the object is on the right, it is pre-decremented by 1 (e.g.,
  2775.        --x).  If the object is on the left, it is post-decremented by 1
  2776.        (e.g., x--).
  2777.  
  2778. &       Address of:    The result is the address (segment:offset) of the
  2779.        object on the right (e.g., &main).
  2780.  
  2781. *       Points:  The result is the value stored at the location addressed
  2782.        by the value on the right (e.g., *(ds:100), *string.loc).  In the
  2783.        absence of typing information, the value on the right is treated
  2784.        as a pointer into the stack segment and a near pointer is
  2785.        produced.
  2786.  
  2787.            (SS:00FE) = FFFF
  2788.          var:  (SS:0100) = 0152
  2789.            (SS:0102) = 1240
  2790.            (SS:0104) = EEEE
  2791.  
  2792.        In the following example, memory locations are displayed starting
  2793.        at DS:152 for 16-bit mode and at DS:12400152 for 32-bit mode.
  2794.  
  2795.        Example:
  2796.          DBG>examine/byte *100
  2797.  
  2798. %       Value at address:  The result is the value stored at the location
  2799.        addressed by the value on the right (e.g., %(ds:100),
  2800.        %string.loc).  In the absence of typing information, the value on
  2801.        the right is treated as a pointer into the stack segment and a
  2802.        far pointer is produced.
  2803.  
  2804.            (SS:00FE) = FFFF
  2805.          var:  (SS:0100) = 0152
  2806.            (SS:0102) = 1240
  2807.            (SS:0104) = EEEE
  2808.  
  2809.        In the following example, memory locations are displayed starting
  2810.        at 1240:0152 for 16-bit mode and at EEEE:12400152 for 32-bit
  2811.        mode.
  2812.  
  2813.        Example:
  2814.          DBG>examine/byte %100
  2815.  
  2816.        Note that this operator is not found in the FORTRAN 77
  2817.        programming language.
  2818.  
  2819.  
  2820.  
  2821. Special Unary Operators for the FORTRAN Grammar
  2822. ═══════════════════════════════════════════════
  2823. ?       Existence test:  The "?" unary operator may be used to test for
  2824.        the existence of a symbol.
  2825.  
  2826.        Example:
  2827.          DBG>print ?id
  2828.  
  2829.        The result of this expression is 1 if "id" is a symbol known to
  2830.        VIDEO and 0 otherwise.  If the symbol does not exist in the
  2831.        current scope then it must be qualified with its module name.
  2832.        Automatic symbols exist only in the current subprogram.
  2833.  
  2834.  
  2835.  
  2836. Binary Address Operator for the FORTRAN Grammar
  2837. ═══════════════════════════════════════════════
  2838. :       Memory locations can be referenced by using the binary ":"
  2839.        operator and a combination of constants, register names, and
  2840.        symbol names.  In the Intel 80x86 architecture, a memory
  2841.        reference requires a segment and offset specification.  A memory
  2842.        reference using the ":" operator takes the following form:
  2843.  
  2844.          segment:offset
  2845.  
  2846.        The elements segment and offset can be expressions.
  2847.  
  2848.        Example:
  2849.          (ES):(DI+100)
  2850.          (SS):(SP-20)
  2851.  
  2852. Primary Expression Operators for the FORTRAN Grammar
  2853. ════════════════════════════════════════════════════
  2854. ()       Elements of an array can be identified using subscript
  2855.        expressions.
  2856.  
  2857. .       The "." operator indicates field selection in a structure.  This
  2858.        operator is useful in mixed language applications where part of
  2859.        the application is written in the C programming language.  In the
  2860.        following example, tyme2 is a structure and tm_year is a field in
  2861.        the structure.
  2862.  
  2863.        Example:
  2864.          DBG>print tyme2.tm_year
  2865.  
  2866. ->       The "->" operator indicates field selection when using a pointer
  2867.        to a structure.  This operator is useful in mixed language
  2868.        applications where part of the application is written in the C
  2869.        programming language.  In the following example, tyme is the
  2870.        pointer and tm_year is a field in the structure to which it
  2871.        points.
  2872.  
  2873.        Example:
  2874.          DBG>print tyme->tm_year
  2875. ::::FLIP
  2876. ┌──────────────────────────────────────────────────────────────────────────┐
  2877. │ Flip    [ ON | OFf | expr]                           │
  2878. └──────────────────────────────────────────────────────────────────────────┘
  2879.  
  2880. The Flip command is used to display the application's screen.  Under DOS,
  2881. the "Page" or "Swap" options must have been specified when the debugger was
  2882. invoked.  To return to the VIDEO display screen, any key may be pressed or
  2883. the left mouse button may be clicked.  If neither of these options were
  2884. specified then this form of the command will have no effect.
  2885.  
  2886. The "on" and "off" options are used to turn screen switching "on" or "off".
  2887. By default, VIDEO will switch between the application's screen and the
  2888. debugger's screen (flip on) unless the remote debugging feature is used.  To
  2889. prevent VIDEO from switching between screens, flipping may be turned "off".
  2890.  
  2891. If an expression is specified, VIDEO will automatically return to the
  2892. debugger screen after that number of seconds have passed.  If you press a
  2893. key before the time interval has expired, VIDEO will return to the debugger
  2894. screen.  If no expression is specifed, VIDEO will wait indefinitely for a
  2895. key to be pressed.
  2896. ::::GO
  2897. ┌──────────────────────────────────────────────────────────────────────────┐
  2898. │ Go        [ start_addr_expr "," ] [ tmp_brk_addr_expr ]           │
  2899. │ Go [/Keep] [ start_addr_expr "," ]                       │
  2900. └──────────────────────────────────────────────────────────────────────────┘
  2901.  
  2902. The Go command is used to start or continue program execution.    Execution
  2903. resumes at the specified starting address start_addr_expr or, in the absence
  2904. of one, the location defined by the current contents of the CS:IP or CS:EIP
  2905. register pair.
  2906.  
  2907. If a starting address is specified, it must be followed by a comma.  In the
  2908. following example, VIDEO is instructed to resume execution at the start of
  2909. "rtn1".
  2910.  
  2911. Example:
  2912.   DBG>go rtn1,
  2913.  
  2914. The following example instructs VIDEO to resume execution at the start of
  2915. "rtn1" and also sets a temporary break point at "rtn1+73" so that execution
  2916. is suspended before executing the instruction at "rtn1+73".
  2917.  
  2918. Example:
  2919.   DBG>go rtn1,rtn1+73
  2920.  
  2921. A temporary break point may be specified without a starting address.  A
  2922. temporary break point is similar to a normal break point except that only
  2923. one of them is permitted.  Every time you issue a new Go command, the
  2924. previous temporary break point (if it exists) is discarded unless the /Keep
  2925. sub-command is specified.  If you wish to retain the previous temporary
  2926. break point then you may not specify a new one (since you can have only
  2927. one).
  2928.  
  2929. Example:
  2930.   DBG>go rtn1
  2931.   DBG>go rtn2
  2932.  
  2933. In the above example, the temporary break point at "rtn1" is replaced by the
  2934. temporary break point at "rtn2" when the second Go command is issued.
  2935.  
  2936. Example:
  2937.   DBG>go rtn1
  2938.   DBG>go
  2939.  
  2940. In the above example, the temporary break point at "rtn1" is removed when
  2941. the second Go command is issued.
  2942.  
  2943. Example:
  2944.   DBG>go rtn1
  2945.   DBG>go/keep
  2946.  
  2947. In the above example, the temporary break point at "rtn1" is kept when the
  2948. second Go command is issued.
  2949.  
  2950. See the description of the Break command for more information on break
  2951. points.
  2952.  
  2953. ┌────────────────────────────────────────────────────────────────────────────┐
  2954. │ Note:  Execution of a program may be interrupted and control returned to   │
  2955. │ the debugger.  The techniques for interrupting program execution are         │
  2956. │ described in the topics entitled "..._INTERRUPTING_A_PROGRAM" in         │
  2957. │ the topics dealing with the use of VIDEO under a particular operating      │
  2958. │ system.  The techniques for interrupting program execution when using the  │
  2959. │ remote debugging feature are described under the topic entitled         │
  2960. │ "REMOTE_DEBUGGING".                                 │
  2961. └────────────────────────────────────────────────────────────────────────────┘
  2962. ::::HELP
  2963. ┌──────────────────────────────────────────────────────────────────────────┐
  2964. │ Help     [topic]                               │
  2965. └──────────────────────────────────────────────────────────────────────────┘
  2966.  
  2967. The Help command may be used to obtain help on a particular topic.  If no
  2968. topic is specified then a default topic is displayed.  The default topic
  2969. includes a list of topics for which help is available.
  2970.  
  2971. Unique short forms may be specified for the desired topic.
  2972.  
  2973. Example:
  2974.   DBG>help go
  2975.  
  2976. The above example requests help on the VIDEO Go command.
  2977.  
  2978. Help information is displayed in the View window.  If you position the text
  2979. cursor on a word in the window and press the Enter key or double-click on it
  2980. with a mouse, VIDEO will search for a topic by that name.  More information
  2981. on the manipulation of this window with keys or mouse is presented under the
  2982. topic entitled "WINDOWS".
  2983. ::::IF
  2984. ┌──────────────────────────────────────────────────────────────────────────┐
  2985. │ IF  expr  if_cmd_list  [ else_cmd_list ]                   │
  2986. └──────────────────────────────────────────────────────────────────────────┘
  2987.  
  2988. The specified expression expr is evaluated and if it results in a non-zero
  2989. value then the list of debugger commands contained in if_cmd_list is
  2990. executed; otherwise the list of commands contained in else_cmd_list is
  2991. executed.  The two command lists are separated from one another by the use
  2992. of curly braces ({}).
  2993.  
  2994. Example:
  2995.   DBG>break/set gorun { if x>100 {print{done}}{go/keep} }
  2996.  
  2997. In the above example, a break point will occur each time the "gorun" routine
  2998. is entered.  The IF command is evaluated by the debugger and if the result
  2999. is "true" (i.e., not zero) then the message "done" will be printed in the
  3000. Dialogue window and the debugger will prompt for another command; otherwise
  3001. execution is resumed (keeping any temporary break point that we may have
  3002. specified).
  3003.  
  3004. A command of the sort presented next is very useful in locating a problem in
  3005. an application.  Let us assume that we are trying to discover which routine
  3006. calls our "gorun" routine such that the variable "x" has a zero value after
  3007. the "gorun" routine has executed.  The example assumes a 16-bit application.
  3008.  
  3009. Example:
  3010.   DBG>br gorun {br %sp {if x==0 {} {br/cl /.;go/k}}; go/k}
  3011.  
  3012. In the above example, the commands
  3013.  
  3014.   br %sp {if x==0 {} {br/cl /.;go/k}}
  3015.   go/k
  3016.  
  3017. are executed each time the "gorun" routine is entered.    This first command
  3018. defines a break point at the return address of the calling routine.  We are
  3019. assuming that "gorun" was invoked by a "far" call; hence the stack top
  3020. contains a 32-bit segment:offset return address in our 16-bit example.    The
  3021. second command resumes execution of the application.  The command
  3022.  
  3023.   if x==0 {} {br/cl /.;go/k}
  3024.  
  3025. is executed each time a return is made to the calling routine.    If the value
  3026. of "x" is zero then no commands are executed and the debugger is entered
  3027. (this may be the error case for which we are searching).  Otherwise the
  3028. break point for this location is cleared and execution is resumed (keeping
  3029. any temporary break point that we may have specified).
  3030. ::::INVOKE
  3031. ┌──────────────────────────────────────────────────────────────────────────┐
  3032. │ INvoke  cmd_file { parm | "{" parm "}" }                   │
  3033. │ <                                       │
  3034. └──────────────────────────────────────────────────────────────────────────┘
  3035.  
  3036. The INvoke or < command is used to invoke a file containing a number of
  3037. VIDEO commands.  The file specification cmd_file has an operating system
  3038. dependent form.  For DOS, MS Windows and OS/2, the format is:
  3039.  
  3040.   [d:][path]filename[.ext]
  3041.  
  3042. For QNX, the format is:
  3043.  
  3044.   [//node][path]filename[.ext]
  3045.  
  3046. If no file suffix or extension is specified (i.e., both the period and
  3047. extension are omitted) then the default is ".dbg".
  3048.  
  3049. Under DOS, MS Windows or OS/2, the search order for command files is as
  3050. follows:
  3051.  
  3052.   1. If only filename or filename.ext are specified, VIDEO will first
  3053.     attempt to locate the file in the current working directory.
  3054.   2. It will then search the paths listed in the PATH environment variable.
  3055.     You should ensure that the "BINB" directory of the WATCOM compiler
  3056.     package is included in the PATH environment variable.  This directory
  3057.     contains the command files provided with VIDEO.
  3058.  
  3059. Under QNX, the search order for command files is as follows:
  3060.  
  3061.   1. If only filename or filename.ext are specified, VIDEO will first
  3062.     attempt to locate the file in the current working directory.
  3063.   2. the paths listed in the WVIDEO_PATH environment variable,
  3064.   3. the path listed in the HOME environment variable, and, finally,
  3065.   4. the "/etc/wvideo" directory.  The command files provided with VIDEO are
  3066.     usually located in the "/etc/wvideo" directory.
  3067.  
  3068. Parameters may be passed to the command file.  If any of the parameters
  3069. require the use of a semicolon (";") or a space then you should use "{" and
  3070. "}" since the semicolon is interpreted as a command separator and the space
  3071. is interpreted as a parameter separator by VIDEO.
  3072.  
  3073. The parameters are matched up with sequences of <#> in the command file,
  3074. where # is a number from 1 to 9.  The first parameter is substituted for
  3075. every occurrence of <1>, the second for every occurrence of <2>, and so on.
  3076. Any occurrences of <0> are replaced by a unique integer value which is
  3077. supplied by the debugger each time the file is invoked.  This feature
  3078. permits the creation of unique variables with each invocation of the command
  3079. file.
  3080.  
  3081. A number of command files are provided with VIDEO that provide excellent
  3082. examples of the power and flexibility of command files.
  3083.  
  3084. In the following example, assume that the file "count.dbg" contains the
  3085. following two lines:
  3086.  
  3087.   /cnt_<1>=0
  3088.   break/set <1> {/cnt_<1>++; go/keep}
  3089.  
  3090. If you enter one of the commands:
  3091.  
  3092.   invoke count printf
  3093.   <count printf
  3094.  
  3095. then each appearance of "<1>" is replaced by "printf" and the resultant
  3096. commands are executed.
  3097.  
  3098. Example:
  3099.   DBG>/cnt_printf=0
  3100.   DBG>break/set printf {/cnt_printf++; go/keep}
  3101.  
  3102. Each time the "printf" routine is entered, the debugger will increment the
  3103. user-defined variable cnt_printf and resume execution (keeping any temporary
  3104. break point that we may have specified).  When execution of the application
  3105. terminates, the current value of cnt_printf may be examined by using the
  3106. Print command to determine how many times the "printf" routine was executed.
  3107.  
  3108. Example:
  3109.   set pf <1> {
  3110.       if !?_dbg@pf_<1> {/_dbg@pf_<1>=0};
  3111.       if (++_dbg@pf_<1>)&1 {<2>} {<3>}
  3112.   }
  3113.  
  3114. In the above example, taken from "toggle.dbg", three parameters are
  3115. specified to the command file.
  3116.  
  3117. As shown in the previous example, one VIDEO command line may be split across
  3118. several lines of a command file.  A line can be split at an opening brace
  3119. ("{").    To construct the command line, VIDEO will continue to read in input
  3120. lines until the matching closing brace is found ("}").
  3121.  
  3122. For additional information on command files, see also the description of the
  3123. Set Implicit command.
  3124. ::::LOG
  3125. ┌──────────────────────────────────────────────────────────────────────────┐
  3126. │ Log      [/Start | /Append | >] file_name                   │
  3127. │ >                                       │
  3128. └──────────────────────────────────────────────────────────────────────────┘
  3129.  
  3130. The Log or > command may be used to log Dialogue window output to a
  3131. specified file.
  3132.  
  3133. /Start file_name This qualifier is used to start logging to the specified
  3134.        file.
  3135.  
  3136.        Example:
  3137.          DBG>log/start dbg.log
  3138.          DBG>>/start dbg.log
  3139.  
  3140.        The previous contents of the file are lost (overwritten).  When
  3141.        file_name is specified and no qualifier is specified then /Start
  3142.        is implied.
  3143.  
  3144.        Example:
  3145.          DBG>log dbg.log
  3146.  
  3147.        When neither the qualifier nor filename is specified then any
  3148.        currently opened log file is closed.
  3149.  
  3150.        Example:
  3151.          DBG>log
  3152.  
  3153. /Append file_name This qualifier is used to start logging and append logging
  3154.        records to the end of the specified file.
  3155.  
  3156.        Example:
  3157.          DBG>log/append dbg.log
  3158.          DBG>>/app dbg.log
  3159.  
  3160. > file_name This operator is a synonym for "/append".  Thus it behaves
  3161.        identically to the /Append qualifier
  3162.  
  3163.        Example:
  3164.          DBG>log > dbg.log
  3165.          DBG>>> dbg.log
  3166.  
  3167. If a log file is currently open, it must be closed before logging can be
  3168. done to a different file.  The current log file is closed if a Log command
  3169. is entered with no qualifier and filename.  The log file is automatically
  3170. closed when the debugger exits (see the description of the Quit command).
  3171.  
  3172. Example:
  3173.   DBG>log/start debug.log
  3174.  
  3175. Output to the Dialogue window is also written to the file "debug.log".
  3176.  
  3177. Example:
  3178.   DBG>log/append debug.log
  3179.   DBG>log> debug.log
  3180.   DBG>>>debug.log
  3181.   DBG>>/append debug.log
  3182.  
  3183. The above examples are all equivalent forms of the Log/Append command.
  3184.  
  3185. Under QNX, a path specification that begins with a "/" could be interpreted
  3186. as a qualifier.
  3187.  
  3188. Example:
  3189.   DBG>log /users/fred/debug.log
  3190.  
  3191. In the above example, the "/users" qualifier is not supported and an error
  3192. will result.  To resolve this conflict, the /Start or /Append qualifiers can
  3193. be used.
  3194.  
  3195. Example:
  3196.   DBG>log /start /users/fred/debug.log
  3197. ::::MENUS
  3198. VIDEO Menus
  3199. ═══════════
  3200. The Set menu on command may be used to cause a menu bar to appear at the top
  3201. of the screen.    Menus are provided as an alternative to some of the more
  3202. common VIDEO commands.    In the following sections, we explain how to use
  3203. menus and provide a brief synopsis of each menu.
  3204.  
  3205.  
  3206.  
  3207. Menu Selection
  3208. ══════════════
  3209. Under DOS and MS Windows, menu selection may be activated by pressing and
  3210. releasing the Alt key.    The first menu item name or title is highlighted as
  3211. shown in the following illustration.
  3212.  
  3213. Under other systems (as well as DOS and Windows), press Alt and the first
  3214. letter of one of the menu names to select that menu (e.g., Alt/C for
  3215. Control).
  3216.  
  3217. The cursor left and right keys may be used to highlight a particular menu
  3218. item.  The Enter key may be used to select the highlighted menu item.
  3219.  
  3220. In some cases, the menu item opens up and a list of choices is usually
  3221. displayed.  In others, the menu item invokes an immediate action.  The
  3222. action menu items are identified by the "!" which is appended to the menu
  3223. title (e.g., Go!).  When a list of menu entries is displayed, the list may
  3224. be closed up by pressing the Escape key.  A second press of the Escape key
  3225. will return you to the Prompt window.
  3226.  
  3227. Alternately, direct selection of a menu item is possible by pressing both
  3228. the Alt key and the first letter shown in the menu name or title.  For
  3229. example, the "Control" menu may be activated by pressing both the "Alt" and
  3230. "C" keys ("Alt" must already be depressed when you press the "C" key).    If
  3231. you have a mouse, you can do the same thing by moving the mouse cursor to
  3232. one of the menu items in the menu bar and depressing the left mouse button.
  3233. If you then release the button, the currently selected item will be
  3234. performed.
  3235.  
  3236. Menus to the left or right of the current menu may be selected by using the
  3237. cursor left and right keys.  As you move left or right, only one menu is
  3238. activated.  With a mouse, you can do the same thing by dragging the mouse
  3239. through the various menu items in the menu bar.
  3240.  
  3241. If a menu opens up, one of the choices is highlighted.    This indicates the
  3242. current choice for that menu.  The cursor up and down keys may be used to
  3243. select a different choice.  With a mouse, different choices may be selected
  3244. by dragging the mouse to the desired item.  When an item has been picked,
  3245. the "Enter" key may be used to select it.  When using a mouse, the left
  3246. mouse button may be released.
  3247.  
  3248. The "Esc" key may be used to quit from a menu.    To quit from a menu with a
  3249. mouse, you can either:
  3250.  
  3251.   1. release the left button in an area outside of the menu, or
  3252.   2. click in an area outside of the menu.
  3253.  
  3254. The choice depends on the type of menu presented.
  3255.  
  3256. Some selections result in yet other menus being displayed.  The process for
  3257. making selections is the same.    Use the cursor left and right keys to move
  3258. left and right to other menus that may be shown.  Use the cursor up and down
  3259. keys to make a selection in each menu.    To signal that you have made your
  3260. selection, press the "Enter" key.  With a mouse you can use the actions of
  3261. dragging and clicking to make your selections.
  3262.  
  3263.  
  3264.  
  3265. The Control Menu
  3266. ════════════════
  3267. Help       This entry is used to invoke VIDEO's "Help" system.
  3268.  
  3269. System       This entry is used to start the system's command interpreter or
  3270.        "shell".  If you are using DOS, for example, then the
  3271.        "COMMAND.COM" program is run.  Certain conditions must be met
  3272.        before the shell can be run and these are listed in the
  3273.        description of the System command.
  3274.  
  3275. Restart    This entry is used to restart the current application.  The
  3276.        application is reloaded into memory and execution is suspended at
  3277.        the program's entry point.  At this point, a VIDEO command such
  3278.        as "go main" may be entered.  See the description of the New
  3279.        /restart command for more information.
  3280.  
  3281. View       This entry is used to select a file for viewing.  See the
  3282.        description of the View command for more information.
  3283.  
  3284. Log       This entry is used to commence logging of VIDEO commands and
  3285.        responses to a file.  See the description of the Log command for
  3286.        more information.
  3287.  
  3288. Quit       This entry is used to quit from the debugger thereby terminating
  3289.        the current application.  See the description of the Quit command
  3290.        for more information.
  3291.  
  3292.  
  3293.  
  3294. The User Menu
  3295. ═════════════
  3296. This is a user-definable list of menu items.  Each entry is created with the
  3297. Set menu add command.  An entry is a list of one or more VIDEO commands.
  3298. Each new entry is labelled with a letter from the alphabet.  Thus a
  3299. particular entry may be selected quickly by pressing the Alt key and the
  3300. letter corresponding to the desired entry.  The mouse can also be used to
  3301. select an entry.
  3302.  
  3303. Up to 20 items can be added to the "User" menu.
  3304.  
  3305.  
  3306.  
  3307. The Display Menu
  3308. ════════════════
  3309. The text cursor can be moved directly to a particular window by using this
  3310. menu.  Select the window to which you wish to move the text cursor.  See the
  3311. description of the Display command for more information.
  3312.  
  3313.  
  3314.  
  3315. The Paint Menu
  3316. ══════════════
  3317. The colours for all windows or a particular window may be selected by using
  3318. menus.
  3319.  
  3320. When using a mouse, clicking on the "Sample" window is equivalent to
  3321. pressing the Enter key.
  3322.  
  3323. See the description of the Paint command for more information.
  3324.  
  3325.  
  3326.  
  3327. The Break! Menu
  3328. ═══════════════
  3329. Break points may be "set", "cleared", "activated" or "deactivated" when
  3330. "Break!" is chosen.  Two windows are displayed, one containing a set of
  3331. instructions and one containing a list of the break points currently set.
  3332.  
  3333. You may press one of the keys "S", "C", "A" or "D" to select the desired
  3334. action.  The cursor up and down keys may be used to highlight individual
  3335. break points.
  3336.  
  3337. A mouse can be used on the list with the usual actions, clicking or dragging
  3338. to select a break point.  Clicking on the instruction box areas acts as if
  3339. the appropriate key has been pressed.  For example, clicking on the quadrant
  3340. that contains "s = set" acts as if the "S" key had been pressed.  See the
  3341. description of the Break command for more information.
  3342.  
  3343.  
  3344.  
  3345. The Watch! Menu
  3346. ═══════════════
  3347. Watch points may be "set", "cleared", "activated" or "deactivated" when
  3348. "Watch!" is chosen.  Two windows are displayed, one containing a set of
  3349. instructions and one containing a list of the watch points currently set.
  3350. You may press one of the keys "S", "C", "A" or "D" to select the desired
  3351. action.  The cursor up and down keys may be used to highlight individual
  3352. watch points.
  3353.  
  3354. A mouse can be used on the list by the ordinary actions, clicking or
  3355. dragging to select a watch point.  Clicking on the instruction box areas
  3356. acts as if the appropriate key has been pressed.  For example, clicking on
  3357. the quadrant that contains "s = set" acts as if the "S" key had been
  3358. pressed.  See the description of the Watch command for more information.
  3359.  
  3360.  
  3361.  
  3362. The Trace! Menu
  3363. ═══════════════
  3364. Selecting the "Trace!" menu causes a Trace command (with default arguments)
  3365. to be executed.  Trace prompts appear in the prompt window.  Once the trace
  3366. prompts are present, you can leave the mouse cursor pointing at the "Trace!"
  3367. menu item and select "trace/over" by pressing the left mouse button, and
  3368. "trace/into" by pressing the right mouse button.
  3369.  
  3370. If you have a mouse, you can click on the "hot-spots" in this window instead
  3371. of pressing a key.  For example, clicking on the "<i>" hot-spot is
  3372. equivalent to pressing the "I" key when selecting the "into" option of
  3373. trace.    See the description of the Trace command for more information.
  3374.  
  3375.  
  3376.  
  3377. The Go! Menu
  3378. ════════════
  3379. Selecting the "Go!" menu causes a Go command to be executed.  Program
  3380. execution is resumed at the current CS:IP (16-bit mode) or CS:EIP (32-bit
  3381. mode) location.  See the description of the Go command for more information.
  3382. ::::MODIFY
  3383. ┌──────────────────────────────────────────────────────────────────────────┐
  3384. │ Modify                                   │
  3385. │     [/Byte]     [addr_expr] [ "," expr_list ]                   │
  3386. │     /Word     [addr_expr] [ "," expr_list ]                   │
  3387. │     /Dword     [addr_expr] [ "," expr_list ]                   │
  3388. │     /Pointer     [addr_expr] [ "," expr_list ]                   │
  3389. │     /IOByte     [port_expr] [ "," expr_list ]                   │
  3390. │     /IOWord     [port_expr] [ "," expr_list ]                   │
  3391. │     /IODword     [port_expr] [ "," expr_list ]                   │
  3392. └──────────────────────────────────────────────────────────────────────────┘
  3393.  
  3394. The Modify command is used to modify the contents of memory in one of
  3395. several different ways.
  3396.  
  3397. /Byte [addr_expr] [ "," expr_list ] The starting address addr_expr
  3398.        identifies the beginning of a sequence of 8-bit values (bytes).
  3399.        Each value that you specify is stored modulo 256 (0x100).
  3400.  
  3401. /Word [addr_expr] [ "," expr_list ] The starting address addr_expr
  3402.        identifies the beginning of a sequence of 16-bit values (words).
  3403.        Each value that you specify is stored modulo 65,536 (0x10000).
  3404.  
  3405. /Dword [addr_expr] [ "," expr_list ] The starting address addr_expr
  3406.        identifies the beginning of a sequence of 32-bit values
  3407.        (doublewords).  Each value that you specify is stored modulo
  3408.        4,294,967,296 (0x100000000).
  3409.  
  3410. /Pointer [addr_expr] [ "," expr_list ] The starting address addr_expr
  3411.        identifies the beginning of a sequence of segment/offset pairs
  3412.        (segment:offset).  In 16-bit mode, each value in the pair that
  3413.        you specify is stored modulo 65536 (0x10000).  In 32-bit mode,
  3414.        each value in the pair that you specify is stored modulo
  3415.        4,294,967,296 (0x100000000).  If you do not specify the segment
  3416.        value, the current contents of the DS register is used.
  3417.  
  3418. /IOByte [port_expr] [ "," expr_list ] The starting port address port_expr
  3419.        identifies the beginning of a sequence of 8-bit ports (bytes).
  3420.        Each value that you specify is written to the port modulo 256
  3421.        (0x100).
  3422.  
  3423. /IOWord [port_expr] [ "," expr_list ] The starting port address addr_expr
  3424.        identifies the beginning of a sequence of 16-bit ports (words).
  3425.        Each value that you specify is written to the port modulo 65,536
  3426.        (0x10000).
  3427.  
  3428. /IODword [port_expr] [ "," expr_list ] The IODword qualifier is supported on
  3429.        386 systems or higher.  The starting port address addr_expr
  3430.        identifies the beginning of a sequence of 32-bit ports
  3431.        (doublewords).  Each value that you specify is written to the
  3432.        port modulo 4,294,967,296 (0x100000000).
  3433.  
  3434. If you do not specify a qualifier, the default is /Byte.  If you do not
  3435. specify a list of values, VIDEO will prompt for values until an empty line
  3436. is entered.  If you do not want to modify a location but want VIDEO to
  3437. continue prompting, you can enter a slash ("/") to indicate that the current
  3438. value is to be retained.  When specifying a list of values, a location can
  3439. be skipped by omitting the value (i.e., a consecutive pair of commas is
  3440. entered).
  3441.  
  3442. Example:
  3443.   DBG>modify 0x200,1,2,3
  3444.   DBG>modify/byte 0x200,1,2,3
  3445.  
  3446. In the above equivalent examples, memory locations DS:200, DS:201 and DS:202
  3447. are modified with the values 1, 2 and 3.
  3448.  
  3449. Example:
  3450.   DBG>modify 0x200,1,,3
  3451.  
  3452. In the above example, memory locations DS:200 and DS:202 are modified with
  3453. the values 1 and 3.
  3454.  
  3455. Example:
  3456.   DBG>modify/word 304
  3457.   2335:0304= 0001 :- 0x100
  3458.   2335:0306= 1323 :- 0x101
  3459.   2335:0308= 8730 :- 0x102
  3460.   2335:030A= 0020 :-
  3461.  
  3462. In the above example, VIDEO prompts for new word values to replace memory
  3463. locations DS:304, DS:306, DS:308 and DS:30A.  Memory location DS:30A is left
  3464. unmodified by simply pressing the Enter key in response to the prompt.
  3465.  
  3466. Example:
  3467.   DBG>modify/word 0x304
  3468.   2335:0304= 0001 :- 0x100
  3469.   2335:0306= 1323 :- /
  3470.   2335:0308= 8730 :- 0x102
  3471.   2335:030A= 0020 :-
  3472.  
  3473. In the above example, VIDEO prompts for new word values to replace memory
  3474. locations DS:304, DS:306, DS:308 and DS:30A.  Memory location DS:306 is left
  3475. unmodified by simply entering a "/" in response to the prompt.
  3476.  
  3477. Example:
  3478.   DBG>modify/pointer _jmptable
  3479.   _jmptable= 2223:0602 :- &test1
  3480.   _jmptable+04 = 2223:06BE :- &test2
  3481.   _jmptable+08 = 2223:0743 :- &test3
  3482.   _jmptable+0A = 2223:07B7 :- &test4
  3483.   _CMAIN_ = 5756:5153 :-
  3484.  
  3485. In the above 16-bit example, VIDEO prompts for new segment:offset values to
  3486. replace consecutive memory locations identified by the label _jmptable.  The
  3487. values supplied are the addresses of four different routines (the & operator
  3488. yields the segment/offset values for the specified location).  The memory
  3489. location identified as _CMAIN_ is left unmodified by simply pressing the
  3490. Enter key in response to the prompt.
  3491.  
  3492. Example:
  3493.   DBG>modify/iobyte 0x3F9,0x0D,0x01,0x03,0x0B
  3494.  
  3495. In the above example, ports 3F9, 3FA, 3FB and 3FC are modified with the
  3496. hexadecimal values 0D, 01, 03 and 0B.
  3497.  
  3498. Example:
  3499.   DBG>modify/ioword 0x2f8
  3500.   02F8= 000D :- 0x000E
  3501.   02FA= 0301 :- 0x0302
  3502.   02FC= 630B :- 0x630A
  3503.   02FE= 0000 :-
  3504.  
  3505. In the above example, VIDEO prompts for new word values to store in ports
  3506. 2F8, 2FA, 2FC, and 2FE.  Port 2FE is left unmodified by simply pressing the
  3507. Enter key in response to the prompt.
  3508. ::::NEW
  3509. ┌──────────────────────────────────────────────────────────────────────────┐
  3510. │ NEW                                       │
  3511. │     [/Restart]      [prog_parms]                       │
  3512. │     /Program         [:sym_file] program_name [prog_parms]           │
  3513. │     /STDIn          [file_name]                       │
  3514. │     /STDOut         [file_name]                       │
  3515. │     /SYmbol         sym_file [expr_list]                   │
  3516. └──────────────────────────────────────────────────────────────────────────┘
  3517.  
  3518. The NEW command is used to initialize various items.
  3519.  
  3520. /Restart [prog_parms] This qualifier is used to reload the current
  3521.        application and place it into an initial state where execution
  3522.        may be started over again.  The application may have undergone
  3523.        partial or complete execution.  If desired, a new command line
  3524.        may be specified for the application.
  3525.  
  3526.          prog_parms ::= prog_cmd_line | "{"prog_cmd_line"}"
  3527.  
  3528.        You must use "{" and "}" when you have a ";" in the command line
  3529.        since VIDEO uses the semicolon as a command separator.
  3530.  
  3531.        Example:
  3532.          DBG>new {Today is Tuesday}
  3533.  
  3534.        The /Restart qualifier is implied when no other qualifier is
  3535.        specified.
  3536.  
  3537.        Under QNX, a path specification that begins with a "/" could be
  3538.        interpreted as a qualifier.
  3539.  
  3540.        Example:
  3541.          DBG>new /users/fred/test.dat
  3542.  
  3543.        In the above example, the "/users" qualifier is not supported and
  3544.        an error will result.  To resolve this conflict, the /Restart
  3545.        qualifier must be used.
  3546.  
  3547.        Example:
  3548.          DBG>new/restart /users/fred/test.dat
  3549.  
  3550. /Program [:sym_file] program_name [prog_parms] This qualifier is used to
  3551.        load a new application and place it into an initial state where
  3552.        execution may be started.
  3553.  
  3554.        If the symbolic debugging information for the program has been
  3555.        placed in a separate file, this file can be specified.  The
  3556.        specification must be preceded by a colon (":").  The default
  3557.        file extension or suffix of the symbol file is ".sym".  The
  3558.        symbolic information file can be produced by the WATCOM Linker or
  3559.        by the WATCOM Strip Utility.
  3560.  
  3561.        If desired, a command line may be specified for the new
  3562.        application.
  3563.  
  3564.          prog_parms ::= prog_cmd_line | "{"prog_cmd_line"}"
  3565.  
  3566.        You must use "{" and "}" when you have a ";" in the command line
  3567.        since VIDEO uses the ";" as a command separator.
  3568.  
  3569.        Example:
  3570.          DBG>new/prog echo {Today is Tuesday}
  3571.  
  3572.        Any break or watch points which may have been active are
  3573.        deactivated.
  3574.  
  3575.        The specification program_name has the same format as the VIDEO
  3576.        command line.  For DOS, MS Windows, OS/2 and NetWare 386 systems,
  3577.        the format is:
  3578.  
  3579.          [d:][path]filename[.ext]
  3580.  
  3581.        For QNX, the format is:
  3582.  
  3583.          [//nid] pid
  3584.         or
  3585.          [//nid] [//node][path]filename
  3586.  
  3587.        The semantics for locating and loading a program are identical to
  3588.        that described under the topics dealing with the use of VIDEO
  3589.        under a particular operating system.
  3590.  
  3591. /STDIn [file_spec] This qualifier can be used to associate the standard
  3592.        input file handle with a particular file or device.    This is
  3593.        similar to specifying <file_spec on the command line.  When
  3594.        file_spec is omitted, the standard input file handle is restored
  3595.        to its original state.
  3596.  
  3597.        Note that the following command does not produce the effect that
  3598.        might be anticipated.
  3599.  
  3600.        Example:
  3601.          DBG>new/prog testit <input.fil
  3602.  
  3603.        Instead, the string "<input.fil" will be passed as a parameter to
  3604.        the program.  To accomplish the desired effect, the following two
  3605.        commands must be issued.
  3606.  
  3607.        Example:
  3608.          DBG>new/prog testit
  3609.          DBG>new/stdin input.fil
  3610.  
  3611. /STDOut [file_spec] This qualifier can be used to associate the standard
  3612.        output file handle with a particular file or device.  This is
  3613.        similar to specifying >file_spec on the command line.  When
  3614.        file_spec is omitted, the standard output file handle is restored
  3615.        to its original state.
  3616.  
  3617.        Note that the following command does not produce the effect that
  3618.        might be anticipated.
  3619.  
  3620.        Example:
  3621.          DBG>new/prog hello >output.log
  3622.  
  3623.        Instead, the string ">output.log" will be passed as a parameter
  3624.        to the program.  To accomplish the desired effect, the following
  3625.        two commands must be issued.
  3626.  
  3627.        Example:
  3628.          DBG>new/prog hello
  3629.          DBG>new/stdout output.log
  3630.  
  3631. /SYmbol sym_file [expr_list] This qualifier is used to load additional
  3632.        symbolic debugging information and specify the mapping between
  3633.        the linker addresses and the actual execution addresses.  This
  3634.        feature is useful when debugging Terminate-and-Stay-Resident
  3635.        (TSR) programs under DOS, when debugging FoxPro External
  3636.        Routines, when debugging AutoCAD ADS/ADI programs, or other
  3637.        similar situations.
  3638.  
  3639.        The default file extension or suffix of the symbol file is
  3640.        ".sym".  The symbolic information file can be produced by the
  3641.        WATCOM Linker or by the WATCOM Strip Utility.
  3642.  
  3643.        The specification sym_file is system dependent.  For DOS, MS
  3644.        Windows, OS/2 and NetWare 386 systems, the format is:
  3645.  
  3646.          [d:][path]filename[.ext]
  3647.  
  3648.        For QNX, the format is:
  3649.  
  3650.          [//node][path]filename
  3651.  
  3652.        The optional expression list expr_list varies according to the
  3653.        type of application that you are debugging.    For 16-bit,
  3654.        real-mode applications (e.g., DOS):
  3655.  
  3656.          new/symbol sym_file seg1
  3657.  
  3658.        seg1 is the base address (segment:offset) of the program.
  3659.  
  3660.        For 32-bit, protect-mode "flat model" applications (e.g., DOS
  3661.        extenders, 32-bit Windows, 32-bit OS/2):
  3662.  
  3663.          new/symbol sym_file seg1, seg2
  3664.  
  3665.        seg1 is the loaded code segment:offset of the program.  seg2 is
  3666.        the data/extra/stack segment alias for the loaded code segment
  3667.        (in the "flat" model, segments CS, DS, ES, SS all map to the same
  3668.        linear address but will have different selector values).
  3669.  
  3670.        For 16- or 32-bit, protect-mode segmented applications (e.g.,
  3671.        16-bit Windows, 16-bit OS/2, QNX):
  3672.  
  3673.          new/symbol sym_file seg1, seg2, seg3, ...
  3674.  
  3675.        segN is the loaded segment:offset value for the N'th segment of
  3676.        the program.
  3677.  
  3678.        If segN is a simple integer (e.g., 5), it is assumed to represent
  3679.        a segment value and the offset portion is assumed to be 0.  If
  3680.        seg:off is specified (e.g., 5:100) then "seg" is the loaded
  3681.        segment value and "off" is added to all symbol address offsets.
  3682.  
  3683.        If you do not specify all the required loaded segment values then
  3684.        the debugger will begin prompting for the missing values.
  3685.  
  3686.        For examples of the NEW /SYmbol command, see the VIDEO command
  3687.        file ADS.DBG or FOX.DBG.
  3688.  
  3689.        When debugging DOS applications locally, it may be necessary to
  3690.        specify the VIDEO "Dynamic" option when starting up the debugger.
  3691.        For example, you may get the message "no memory for symbolic
  3692.        information".  This indicates that the option must be specified.
  3693. ::::NOTATION
  3694. The following notation is used to describe the syntax of VIDEO commands.
  3695.  
  3696. Abc       The short form for the item abc is a.  For example, if the item
  3697.        is "COMPute", the valid forms are "comp", "compu", "comput" and
  3698.        "compute".
  3699.  
  3700. [abc]       The item abc is optional.
  3701.  
  3702. {abc}       The item abc may be repeated zero or more times.
  3703.  
  3704. "abc"       The characters abc are required.
  3705.  
  3706. a|b|c       One of a, b or c may be specified.
  3707.  
  3708. a ::= b    The item a is defined in terms of b.
  3709.  
  3710. To test your understanding of the above notation, consider the following
  3711. example.
  3712.  
  3713.   dec_digit ::= "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"
  3714.  
  3715. In the above example, a decimal digit (dec_digit) is defined as one of the
  3716. characters "0" through "9" (a "0" or a "1" or a "2", etc.).  We could then
  3717. define a decimal number to be
  3718.  
  3719.   decimal_number ::= dec_digit {dec_digit}
  3720.  
  3721. This is read as "a decimal number is defined to be a decimal digit followed
  3722. by zero or more decimal digits".  Clearly, "12345" conforms to our rule
  3723. whereas "12ABC" and "Hello" do not.
  3724.  
  3725. We also use several abbreviated terms in the description of VIDEO commands.
  3726.  
  3727. Short Form Explanation
  3728.  
  3729. addr       "address"
  3730. arg       "argument"
  3731. brk       "break", "break point"
  3732. char       "character"
  3733. cmd       "command"
  3734. expr       "expression"
  3735. num       "number"
  3736. parm       "parameter"
  3737. prog       "program"
  3738. reg       "register"
  3739. spec       "specifier"
  3740. tmp       "temporary"
  3741.  
  3742. We also concatenate these abbreviations by using the underscore to define
  3743. new abbreviations.
  3744.  
  3745. Examples:
  3746.  
  3747. addr_expr  "address expression"
  3748.  
  3749. cmd_spec   "command specifier"
  3750.  
  3751. Several commands may be entered on one line by separating them with
  3752. semicolons.
  3753.  
  3754. Example:
  3755.   DBG>do myvar=var*2;print myvar
  3756.  
  3757. In the above example, the first command sets the variable myvar to twice the
  3758. value of var and the second command prints this new value.
  3759.  
  3760. Using our notation, we define a command line as follows:
  3761.  
  3762.   cmd_line ::= [cmd] { ";" [cmd] }
  3763.  
  3764. While such definitions may be quite precise, they often tend to be somewhat
  3765. more obscure.  If we analyze the definition carefully, we will discover that
  3766. an empty line qualifies as a command.  In the following sections, we will
  3767. first present the concise command syntax.  This is followed by an
  3768. explanation of both the syntax and semantics of the command.  A number of
  3769. examples are also presented so that you may get a "feel" for the command's
  3770. syntax.
  3771. ::::OS2_INTERRUPTING_A_PROGRAM
  3772. Once a program has been loaded by VIDEO, its execution can be started by the
  3773. Go command (this command is described under the topic entitled "GO").
  3774.  
  3775. Example:
  3776.   [C:\]wvideo myapp
  3777.    .
  3778.    .
  3779.    .
  3780.   DBG>go
  3781.  
  3782. As is sometimes the case during the development phase, a program may execute
  3783. endlessly.
  3784.  
  3785. Under OS/2, execution of an application may be interrupted by pressing the
  3786. Ctrl/Break key combination in the VIDEO session.
  3787.  
  3788. VIDEO will print a message in the "Dialogue" window indicating that the
  3789. program's execution has been interrupted.  Execution can be resumed with the
  3790. Go command.
  3791.  
  3792. Also, execution of VIDEO commands may be interrupted by pressing the
  3793. Ctrl/Break key combination in the VIDEO session.
  3794.  
  3795. For information on how to interrupt executing programs when using the remote
  3796. debugging facility, see the topic entitled "REMOTE_DEBUGGING".
  3797. ::::OS2_REMOTE_DEBUGGING
  3798. ┌──────────────────────────────────────────────────────────────────────────┐
  3799. │ WVIDEO /TRap=trap_file[;trap_parm] [:sym_file] file_spec [cmd_line]       │
  3800. └──────────────────────────────────────────────────────────────────────────┘
  3801.  
  3802. The VIDEO TRap option must be specified when debugging an application using
  3803. a second computer system.  The format of file_spec depends on the target
  3804. machine's operating system, be it DOS, OS/2, NetWare 386, or QNX.  Under
  3805. QNX, file paths contain slashes ("/") as directory separators.    This brings
  3806. up an interesting problem when the debug machine is running DOS or OS/2.
  3807. Option specifiers can start with slashes also.    When the task machine is
  3808. running QNX and you wish to specify a file path, you must use a pair of
  3809. slashes to stop VIDEO from continuing its option scan.
  3810.  
  3811. Example:
  3812.   [C:\]wvideo /trap=par /reg=4 // /users/fred/fdapp
  3813.  
  3814. When trap_parm is specified and it contains blank characters, the entire
  3815. parameter must be placed within braces ({}).
  3816.  
  3817. You must specify the name of the "trap" file that corresponds to the Debug
  3818. Server that was started on the first computer system (the "task machine").
  3819. These files handle the machine-to-machine communication required for remote
  3820. debugging of an application.  Servers are described under the topics entitled
  3821. "REMOTE_DEBUGGING" and "REMOTE_WIN3".
  3822.  
  3823. For OS/2, the file extension defaults to ".DLL".  The OS/2 LIBPATH directive
  3824. in the "CONFIG.SYS" file must be used to identify the location of the "DLL"
  3825. trap files.  Trap files are usually located in the "BINP\DLL" sub-directory
  3826. of the directory that VIDEO is installed in.
  3827.  
  3828. STD16.DLL  Under OS/2 version 1.x, if you do not specify a trap file, the
  3829.        default trap file "STD16.DLL" will be loaded.  These interface
  3830.        modules support debugging on the local computer system running
  3831.        OS/2 1.x.  No remote debugging is possible.
  3832.  
  3833.        Under OS/2 version 1.x, if you do specify the trap file name
  3834.        "STD" then "STD16.DLL" is selected.
  3835.  
  3836. STD32.DLL  Under OS/2 version 2.x, if you do not specify a trap file, the
  3837.        default trap file "STD32.DLL" will be loaded.  These interface
  3838.        modules support debugging on the local computer system running
  3839.        OS/2 2.x.  No remote debugging is possible.
  3840.  
  3841.        Under OS/2 version 2.x, if you do specify the trap file name
  3842.        "STD" then "STD32.DLL" is selected.
  3843.  
  3844. SER.DLL    This communications driver file supports debugging of an
  3845.        application running on another computer system using the serial
  3846.        ports of the two machines.  It communicates with the "SERSERV"
  3847.        Debug Server.  The serial port of the debugger machine is
  3848.        connected to the serial port of the task machine.  The
  3849.        "trap_parm" value specifies the port number to use and an
  3850.        optional maximum BAUD rate (which is separated from the port
  3851.        number by a period).  The port number is 1, 2, 3 or 4 (default is
  3852.        1).    These numbers correspond to the device number used when
  3853.        specifying the serial device "COMx" (as in "COM1", "COM2", etc.).
  3854.  
  3855.        Under OS/2, the maximum BAUD rate can be one of:
  3856.  
  3857.           19200
  3858.            9600
  3859.            4800
  3860.            2400
  3861.            1200
  3862.           0 (a special case)
  3863.  
  3864.        The default maximum BAUD rate is 19,200.
  3865.  
  3866.        Except for the special BAUD rate of 0, a minimum of two digits
  3867.        must be specified to identify the desired maximum BAUD rate.  The
  3868.        maximum BAUD rate is explained in the section "Remote Debugging
  3869.        Over the Serial Port" under the topic entitled "REMOTE_DEBUGGING".
  3870.        In the following example, port 2 and a maximum BAUD rate of
  3871.        19,200 is specified.
  3872.  
  3873.        Example:
  3874.          /trap=ser;2.19
  3875.  
  3876. PAR.DLL    This communications driver file supports debugging of an
  3877.        application running on another computer system using the parallel
  3878.        ports of the two machines.  It communicates with one of the
  3879.        "PARSERV" or "PARSERVW" (Microsoft Windows) Debug Servers.  The
  3880.        parallel port of the debugger machine is connected to the
  3881.        parallel port of the task machine.  The port number to use is
  3882.        specified by "trap_parm".  The port number is 1, 2 or 3 (default
  3883.        is 1).  These numbers correspond to the device number used when
  3884.        specifying the printer device "LPTx" (as in "LPT1", "LPT2",
  3885.        etc.).
  3886.  
  3887. NOV.DLL    This communications driver file supports debugging of an
  3888.        application running on another computer system that is connected
  3889.        to the Novell "NetWare" network (NetWare and Novell are
  3890.        trademarks of Novell, Inc.).  It communicates with the "NOVSERV"
  3891.        Debug Server.  Version 2.0 or later of NetWare must be used.
  3892.        Version 1.3 or later of the NetWare requestor is also required
  3893.        and, in turn, this requires OS/2 version 1.2 or later.
  3894.  
  3895.        The server name to use is specified by "trap_parm".    The server
  3896.        name must match the name that you specified when starting the
  3897.        server on the "task" machine.
  3898.  
  3899. NET.DLL    This communications driver file supports debugging of an
  3900.        application running on another computer system using the NetBIOS
  3901.        network programming interface.  It communicates with one of the
  3902.        "NETSERV" or "NETSERVW" (Microsoft Windows) Debug Servers.  The
  3903.        server name to use is specified by "trap_parm".  The server name
  3904.        must match the name that you specified when starting the server
  3905.        on the "task" machine.  The server name may consist of up to 15
  3906.        alphanumeric characters.
  3907. ::::OS2_STARTUP
  3908. ┌──────────────────────────────────────────────────────────────────────────┐
  3909. │ WVIDEO [options] [:sym_file] file_spec [cmd_line]               │
  3910. └──────────────────────────────────────────────────────────────────────────┘
  3911.  
  3912. The square brackets [ ] denote items which are optional.
  3913.  
  3914. WVIDEO       is the program name for VIDEO.
  3915.  
  3916. options    is a list of valid VIDEO options, each preceded by a dash ("-")
  3917.        or a slash ("/").  Options may be specified in any order.
  3918.  
  3919. sym_file   is an optional symbolic debugging information file specification.
  3920.        The specification must be preceded by a colon (":").  For OS/2,
  3921.        the syntax of sym_file is:
  3922.  
  3923.        [d:][path]filename[.ext]
  3924.  
  3925.        The default file extension of the symbol file is ".SYM".
  3926.  
  3927.        The symbolic information file can be produced by the WATCOM
  3928.        Linker WLINK or by the WATCOM Strip Utility WSTRIP.
  3929.  
  3930. file_spec  is the file name of the file to be loaded into memory.  For OS/2,
  3931.        the syntax of file_spec is:
  3932.  
  3933.        [d:][path]filename[.ext]
  3934.  
  3935.        d:          is an optional drive specification such as "A:", "B:",
  3936.               etc.  If not specified, the default drive is assumed.
  3937.  
  3938.        path       is an optional path specification such as
  3939.               "\UTILS\BIN\".
  3940.  
  3941.        filename   is the file name of the file to be loaded into memory.
  3942.  
  3943.        ext          is the file extension of the file to be loaded into
  3944.               memory.  A null file extension may be specified by
  3945.               typing the period "." but not the extension.  If no
  3946.               file extension is specified (i.e., both the period and
  3947.               extension are omitted), the default is ".EXE".
  3948.  
  3949. cmd_line   is an optional command line which will be passed on to the
  3950.        application.
  3951.  
  3952. If both drive and path are omitted, VIDEO will first attempt to locate the
  3953. file in the current directory of the default drive.  If this fails, VIDEO
  3954. will search for the file in each path listed in the PATH environment string.
  3955.  
  3956.  
  3957.  
  3958. Command Line Options
  3959. ════════════════════
  3960. ┌──────────────────────────────────────────────────────────────────────────┐
  3961. │     /Dynamic=space                               │
  3962. │     /NOFpu                                   │
  3963. │     /Invoke=file_spec                            │
  3964. │     /Lines=number                               │
  3965. │     /NOInvoke                                │
  3966. │     /NOMouse                                   │
  3967. │     /Registers=number                            │
  3968. │     /REMotefiles                               │
  3969. │     /NOSymbols                               │
  3970. │     /TRap=trap_file[;trap_parm]                       │
  3971. └──────────────────────────────────────────────────────────────────────────┘
  3972.  
  3973. Options may be specified in any order.    Short forms may be specified for
  3974. options and are shown above in capital letters.  If "space" is suffixed with
  3975. the letter "K" then "space" refers to multiples of 1K bytes (1024 bytes).
  3976. If "space" is suffixed with the letter "B" then "space" refers to the number
  3977. of bytes.  If no suffix is specified and "space" is a number less than 1000
  3978. then "space" is assumed to refer to multiples of 1K bytes (1024 bytes);
  3979. otherwise it refers to the number of bytes.
  3980.  
  3981. /Dynamic=space specifies the initial amount of dynamic storage that VIDEO is
  3982.        to reserve for items such as windows, user-defined symbols, etc.
  3983.        The default amount that is set aside is 40960 bytes (40K bytes).
  3984.        As additional storage is required, VIDEO will allocate it.
  3985.  
  3986. /NOFpu       requests that the debugger ignore the presence of a math
  3987.        coprocessor.  No memory will be allocated by the debugger for
  3988.        saving the context of the 80x87 numeric data processor.  Use this
  3989.        option if your application will not use the math coprocessor and
  3990.        you wish to reduce the amount of memory required by the debugger.
  3991.  
  3992. /Invoke=file_spec may be used to specify an alternate name for the debugger
  3993.        command file which is to be automatically invoked at start-up
  3994.        time.  The default file name is "PROFILE.DBG".  VIDEO command
  3995.        files are found in the current directory or one of the
  3996.        directories listed in the OS/2 PATH environment string.
  3997.  
  3998. /Lines=number may be used to specify the number of display lines that VIDEO
  3999.        is to use.  If this option is not specified, the default number
  4000.        of output lines is selected.  When an Enhanced Graphics Adapter
  4001.        (EGA) is present, 43 lines of output may be requested.  When an
  4002.        Video Graphics Array (VGA) is present, 28 or 50 lines of output
  4003.        may be requested.
  4004.  
  4005. /NOInvoke  specifies that the default debugger command file is not to be
  4006.        invoked.
  4007.  
  4008. /NOMouse   requests that the debugger ignore any attached mouse.
  4009.  
  4010. /Registers=number may be used to specify how many register sets to set aside
  4011.        for the recording of register contents.  The default number of
  4012.        register sets is 2.    See the description of the Register command
  4013.        for more information (this command is described under the topic
  4014.        entitled "REGISTER").
  4015.  
  4016. /REMotefiles may be used in conjunction with the remote debugging
  4017.        capabilities of the debugger.  Remote debugging involves using
  4018.        two personal computers.  One, called the "task machine", is used
  4019.        to run the application; the other, called the "debugger machine",
  4020.        is used to run the debugger.  When REMotefiles is specified, all
  4021.        debugger files (except "trap" files) and application source files
  4022.        are opened on the task machine rather than the debugger machine
  4023.        (if you are doing local debugging, these two machines are
  4024.        actually the same).    The "trap" file must be located on the
  4025.        debugger machine because it contains the code to open files on
  4026.        the task machine.
  4027.  
  4028.        Note that the PATH environment variable on the task machine is
  4029.        always used in locating executable image files.  When REMotefiles
  4030.        is specified, the debugger also uses the task machine's PATH
  4031.        environment variable to locate debugger command files.
  4032.  
  4033. /NOSymbols requests that VIDEO omit all debugging information when loading
  4034.        an executable image.  Information regarding global and local
  4035.        symbol names, data types, and line numbers is not processed.
  4036.  
  4037. /TRap=trap_file[;trap_parm] must be specified when debugging an application
  4038.        on a remote machine.  You must specify the name of one of the
  4039.        "trap" files provided with VIDEO.  Under OS/2, the file extension
  4040.        defaults to ".DLL".    The "BINP\DLL" directory contains the
  4041.        dynamic link libraries (DLL) provided with VIDEO.  The OS/2
  4042.        LIBPATH directive in the "CONFIG.SYS" file must be used to
  4043.        identify the location of the "DLL" trap files.
  4044.  
  4045.        If you do not specify the TRap option then VIDEO assumes that the
  4046.        application is to be run on the same computer system and it uses
  4047.        one of the default trap files described next.
  4048.  
  4049.        Example:
  4050.          [C:\]wvideo calendar
  4051.  
  4052.        Under OS/2 version 1.x, if you do not specify a trap file, the
  4053.        default trap file "STD16.DLL" will be loaded.  This interface
  4054.        module supports debugging on the local computer system running
  4055.        OS/2 1.x.
  4056.  
  4057.        Under OS/2 version 2.x, if you do not specify a trap file, the
  4058.        default trap file "STD32.DLL" will be loaded.  This interface
  4059.        module supports debugging on the local computer system running
  4060.        OS/2 2.x.
  4061.  
  4062.        If you do specify the trap file name "STD" then "STD16.DLL" is
  4063.        selected for OS/2 version 1.x systems and "STD32.DLL" is selected
  4064.        for OS/2 version 2.x systems.
  4065.  
  4066.        Example:
  4067.          [C:\]wvideo /trap=std calendar
  4068.  
  4069.        Of course, you may also explicitly name the "standard" trap file
  4070.        that you wish VIDEO to use.
  4071.  
  4072.        Example:
  4073.          [C:\]wvideo /trap=std16 calendar
  4074.  
  4075.        See the topic entitled "REMOTE_DEBUGGING" for more
  4076.        information on the TRap option.
  4077. ::::OS2_WVIDEO_ENVIRONMENT_VARIABLE
  4078. The WVIDEO environment variable can be used to specify commonly used VIDEO
  4079. options.  If the specification of an option involves the use of an "="
  4080. character then the "#" character may be used in its place (this is required
  4081. by the syntax of the "SET" command).  These options are processed before
  4082. options specified on the command line.
  4083.  
  4084. Example:
  4085.   [C:\]set wvideo=/lines#50/reg#4
  4086.  
  4087. The above examples illustrate how to define default options for the
  4088. debugger.
  4089.  
  4090. Once the WVIDEO environment variable has been defined, those options listed
  4091. become the default each time VIDEO is invoked.
  4092. ::::PAINT
  4093. ┌──────────────────────────────────────────────────────────────────────────┐
  4094. │ PAint (window_name | ["*"]) attr_name [ fg_col ["," bg_col] ]        │
  4095. └──────────────────────────────────────────────────────────────────────────┘
  4096.  
  4097. The PAint command is used to define the colour composition of windows.    The
  4098. valid window names are:
  4099.  
  4100.   Assembly
  4101.   Command
  4102.   Dialogue
  4103.   Fpu
  4104.   Memory
  4105.   Prompt
  4106.   Register
  4107.   SOurce
  4108.   STack
  4109.   Thread
  4110.  
  4111. An asterisk ("*") may be used to denote all of them.  If a window name is
  4112. omitted then "*" is assumed.
  4113.  
  4114. Five different attributes of a window may be individually coloured.  The
  4115. attribute attr_name may be one of:
  4116.  
  4117.   Plain
  4118.   Active
  4119.   Standout
  4120.   Title
  4121.   Gadget
  4122.  
  4123. Foreground (fg_col) and background (bg_col) colours may be selected from the
  4124. following:
  4125.  
  4126.   BLAck
  4127.   BLUe
  4128.   GREEn
  4129.   Cyan
  4130.   Red
  4131.   Magenta
  4132.   BROwn
  4133.   White
  4134.  
  4135. In addition, the following foreground colour variations may be selected:
  4136.  
  4137.   BRIght BLAck
  4138.   BRIght BLUe
  4139.   BRIght GREEn
  4140.   BRIght Cyan
  4141.   BRIght Red
  4142.   BRIght Magenta
  4143.   BRIght BROwn
  4144.   BRIght White
  4145.   GRAy
  4146.   GREY
  4147.   Yellow
  4148.  
  4149. "GRAy" and "GREY" are synonyms for "BRIght BLAck".  "Yellow" is a synonym
  4150. for "BRIght BROwn".  The "BLINking" keyword may be also precede a foreground
  4151. colour to specify that the item should also blink when it is displayed.
  4152. Please note that colour attributes on the IBM Monochrome Display and Printer
  4153. Adapter will behave as described in the following table.
  4154.  
  4155. Colour       Monochrome
  4156.  
  4157. black       (invisible)
  4158. blue       underlined white
  4159. green       white
  4160. cyan       white
  4161. red       white
  4162. magenta    white
  4163. brown       white
  4164. white       white
  4165. bright black (invisible)
  4166. bright blue bright white
  4167. bright green white
  4168. bright cyan white
  4169. bright red white
  4170. bright magenta white
  4171. bright brown white
  4172. bright white white
  4173.  
  4174. When specifying colour attributes for a window item, the foreground colour
  4175. is specified first and the background colour last.  If one of the foreground
  4176. or background colours is omitted, it will remain unchanged.  Note that the
  4177. background colour specification is always preceded by a comma.
  4178.  
  4179. Attributes: Description:
  4180.  
  4181. Plain       Each window displays "plain" text.  This text usually forms the
  4182.        greater part of a window.
  4183.  
  4184.        Example:
  4185.          DBG>paint * plain white,blue
  4186.  
  4187.        In the above example, the plain text of all windows is set to
  4188.        white characters on a blue background.
  4189.  
  4190.        Example:
  4191.          DBG>paint assembly plain bright green,red
  4192.  
  4193.        In the above example, the plain text of the Assembly window only
  4194.        is set to bright green characters on a red background.
  4195.  
  4196. Active       Some items in a window may be highlighted in the "active" colour
  4197.        combination.  For example, the source line or assembler
  4198.        instruction that is about to be executed is displayed in the
  4199.        "active" colour attributes.
  4200.  
  4201.        Example:
  4202.          DBG>paint * active bright white,blue
  4203.  
  4204.        In the above example, the "active" text of all windows is set to
  4205.        bright white characters on a blue background.
  4206.  
  4207.        Example:
  4208.          DBG>paint source active cyan,brown
  4209.  
  4210.        In the above example, the "active" text of the Source window only
  4211.        is set to cyan characters on a brown background.
  4212.  
  4213. Standout   Some items in a window may be highlighted with the "standout"
  4214.        colour combination.    For example, the source line or assembler
  4215.        instruction that is displayed by using the Examine /Source
  4216.        command is displayed in the "standout" colour attributes.
  4217.  
  4218.        Example:
  4219.          DBG>paint * standout red,white
  4220.  
  4221.        In the above example, the "standout" text for all windows is set
  4222.        to red characters on a white background.
  4223.  
  4224.        Example:
  4225.          DBG>paint source standout brown,cyan
  4226.  
  4227.        In the above example, the "standout" text of the Source window
  4228.        only is set to brown characters on a cyan background.
  4229.  
  4230. Title       Each window may be titled and the colours for the title line may
  4231.        be selected.
  4232.  
  4233.        Example:
  4234.          DBG>paint * title yellow,magenta
  4235.  
  4236.        In the above example, the title lines for all windows bearing
  4237.        titles are displayed with yellow characters on a magenta
  4238.        background.
  4239.  
  4240.        Example:
  4241.          DBG>paint assembly title magenta,green
  4242.  
  4243.        In the above example, if there is a title line for the Assembly
  4244.        window then it will be displayed with magenta characters on a
  4245.        green background.
  4246.  
  4247. Gadget       Mouse window gadgets are displayed in the "gadget" colour
  4248.        combination.
  4249.  
  4250.        Example:
  4251.          DBG>paint * gadget black, cyan
  4252.  
  4253.        In the above example, the "gadget" colours for all windows is set
  4254.        to black characters on a cyan background.
  4255. ::::PRINT
  4256. ┌──────────────────────────────────────────────────────────────────────────┐
  4257. │ Print [/Program] { "{"format_spec"}" expr_list }               │
  4258. │ ?                                       │
  4259. └──────────────────────────────────────────────────────────────────────────┘
  4260.  
  4261. The Print or ?    command evaluates one or more expressions and prints the
  4262. results in the Dialogue window, or the application's standard error area
  4263. (usually the screen of the task machine) if the /Program qualifier is
  4264. specified.  The Print command is useful for examining the values of
  4265. variables and expressions.  The expressions can involve registers,
  4266. application variables and user-defined debugger variables.  The operations
  4267. possible are patterned after those available in the WATCOM C and WATCOM
  4268. FORTRAN 77 compilers.  Expressions are fully discussed in the chapter
  4269. entitled "VIDEO Expression Handling".
  4270.  
  4271. By default, integer values are printed in the current default numeric radix,
  4272. pointer values are printed in hexadecimal notation, and floating-point
  4273. values are printed in floating-point notation.    In addition, if the
  4274. expression is an enumerated type, the name of the enumeration constant
  4275. corresponding to the numeric value of the expression is printed.  If the
  4276. numeric value does not have a corresponding enumeration constant, the value
  4277. is printed in the current default numeric radix.
  4278.  
  4279. To print out the value in some other representation, a format string may
  4280. also be specified.  Formally, the format specification is defined as
  4281. follows:
  4282.  
  4283.   format_spec ::= { char | "%"specifier }
  4284.   specifier   ::= "i" | "d" | "u" | "x" | "X"
  4285.               | "o" | "p" | "c" | "s" | "%"
  4286.               | "f" | "g" | "G" | "e" | "E"
  4287.               | "r" | "a" | "l"
  4288.  
  4289. Text may be included to annotate the output.
  4290.  
  4291. Specifiers: Description:
  4292.  
  4293. "i"       The corresponding argument is printed out as a signed decimal
  4294.        integer value.
  4295.  
  4296. "d"       The corresponding argument is printed out as a signed decimal
  4297.        integer value.
  4298.  
  4299. "u"       The corresponding argument is printed out as an unsigned decimal
  4300.        integer value.
  4301.  
  4302. "x"       The corresponding argument is printed out as an unsigned
  4303.        hexadecimal integer value.  Letter digits are printed in lower
  4304.        case (a-f).
  4305.  
  4306. "X"       The corresponding argument is printed out as an unsigned
  4307.        hexadecimal integer value.  Letter digits are printed in upper
  4308.        case (A-F).
  4309.  
  4310. "o"       The corresponding argument is printed out as an unsigned octal
  4311.        integer value.
  4312.  
  4313. "p"       The corresponding argument is printed out as a pointer
  4314.        (segment:offset) value in hexadecimal notation.
  4315.  
  4316. "c"       The corresponding argument is printed out as a single character
  4317.        value.
  4318.  
  4319. "s"       The corresponding argument is printed out as a C string value.
  4320.        The argument must point to a string of characters terminated by a
  4321.        byte whose value is zero.
  4322.  
  4323. "%"       To print out a percentage symbol, the "%" must be doubled up
  4324.        (i.e.  %%).
  4325.  
  4326. "f"       The corresponding argument is printed out in floating-point
  4327.        representation.  If the floating-point value has a very large or
  4328.        small magnitude, you should use one of "g", "G", "e" or "E"
  4329.        formatting.
  4330.  
  4331. "g"       The corresponding argument is printed out in floating-point
  4332.        representation.  Numbers of very large or small magnitude are
  4333.        printed out in scientific "E" notation (e.g., 1.54352e+16).    The
  4334.        exponent letter is printed in lower case.
  4335.  
  4336. "G"       The corresponding argument is printed out in floating-point
  4337.        representation.  Numbers of very large or small magnitude are
  4338.        printed out in scientific "E" notation (e.g., 1.54352E+16).    The
  4339.        exponent letter is printed in upper case.
  4340.  
  4341. "e"       The corresponding argument is printed out in scientific "E"
  4342.        notation (e.g., 1.23456e+02).  The exponent letter is printed in
  4343.        lower case.
  4344.  
  4345. "E"       The corresponding argument is printed out in scientific "E"
  4346.        notation (e.g., 1.23456E+02).  The exponent letter is printed in
  4347.        upper case.
  4348.  
  4349. "r"       The corresponding argument is printed out in the current default
  4350.        numeric radix.
  4351.  
  4352. "a"       The corresponding argument is printed out as a symbol reference
  4353.        (symbol_name+offset) when possible; otherwise it is printed out
  4354.        as a pointer (segment:offset) value in hexadecimal notation.
  4355.  
  4356. "l"       The corresponding argument is printed out as a line number
  4357.        reference (module_name@line_number+offset) when possible;
  4358.        otherwise it is printed out as a pointer (segment:offset) value
  4359.        in hexadecimal notation.
  4360.  
  4361. Example:
  4362.   DBG>print ax
  4363.   DBG>? ax
  4364.  
  4365. The value of the AX register is displayed in hexadecimal format (assuming a
  4366. default numeric radix of 16) in the Dialogue window.
  4367.  
  4368. Example:
  4369.   DBG>? [dx ax]
  4370.  
  4371. The contents of the DX and AX registers are treated as a single 32-bit long
  4372. integer and displayed in hexadecimal format (assuming a default numeric
  4373. radix of 16).  This grouping of registers is called an aggregate.
  4374.  
  4375. Example:
  4376.   DBG>? {%i} [cx bx]
  4377.  
  4378. The aggregate formed by concatenating the CX and BX registers is treated as
  4379. a 32-bit long integer and displayed in decimal integer format.
  4380.  
  4381. Example:
  4382.   DBG>? (float) [ax bx]
  4383.  
  4384. By employing type casting, the long integer value in this register aggregate
  4385. is converted to a floating-point value and displayed in floating-point
  4386. format.
  4387.  
  4388. Example:
  4389.   DBG>? [float] [ax bx]
  4390.  
  4391. By employing the type "pun" operator, the 32-bit value in this register
  4392. aggregate is treated as a floating-point value and displayed in
  4393. floating-point format.    By default, the 32-bit quantity would have been
  4394. treated as a long integer.
  4395.  
  4396. Example:
  4397.   DBG>? [ax bx cx dx]
  4398.  
  4399. The aggregate formed from the AX, BX, CX and DX registers is treated as a
  4400. 64-bit floating-point entity and displayed in floating-point format.  By
  4401. default, 64-bit register aggregates are treated as double precision
  4402. floating-point values.
  4403.  
  4404. Example:
  4405.   DBG>print {The answer is %d (0x%x)} ans=foo/2, ans
  4406.  
  4407. The result of dividing the value of foo by 2 is displayed in the Dialogue
  4408. window in both decimal and hexadecimal format.
  4409.  
  4410. Example:
  4411.   DBG>? &main_
  4412.  
  4413. The address of main_ (segment:offset) is displayed in the Dialogue window.
  4414.  
  4415. Example:
  4416.   DBG>? {The address of "main" is %p} &main_
  4417.  
  4418. The address of main_ (segment:offset) is displayed as part of a string of
  4419. text in the Dialogue window.
  4420.  
  4421. Example:
  4422.   DBG>? ax=dx
  4423.  
  4424. The contents of the DX register are assigned to the AX register and the
  4425. result is displayed in the Dialogue window.
  4426.  
  4427. Example:
  4428.   DBG>print {%c-%c-%c-%c}3,4,5,6
  4429.  
  4430. The "heart", "diamond", "club" and "spade" characters are displayed in the
  4431. Dialogue window separated by hyphens.
  4432.  
  4433. Example:
  4434.   DBG>print {%f} flt_val1
  4435.  
  4436. The variable flt_val1 is displayed in floating-point notation.
  4437.  
  4438. Example:
  4439.   DBG>? {%i} (int) 3.1415926
  4440.  
  4441. The argument is displayed as the decimal integer value 3.
  4442.  
  4443. Example:
  4444.   DBG>? (char *) 256
  4445.  
  4446. The argument (a pointer) is displayed as a pointer value in hexadecimal
  4447. notation (e.g., "0100").  This is the default formatting for pointers.
  4448.  
  4449. Example:
  4450.   DBG>? {%r} (char *) 256
  4451.  
  4452. The argument (a pointer) is displayed in the current default radix ("0256"
  4453. if the current default radix is decimal).
  4454.  
  4455. Consider the following 16-bit example.
  4456.  
  4457. Example:
  4458.   DBG>? {%x,%x} 65536, (int) 65536
  4459.  
  4460. The first argument, the long integer 65536, is displayed as "10000".  The
  4461. second argument is converted to a short integer and is displayed as "0"
  4462. since 65536 exceeds the range of 16-bit unsigned values by 1.
  4463.  
  4464.  
  4465.  
  4466. Printing Array Slices
  4467. ═════════════════════
  4468. When the appropriate type information is available, VIDEO can print out the
  4469. contents of an array.  By default, the debugger will print out the contents
  4470. of the entire array.  Consider the following 3-dimensional array defined in
  4471. the C programming language.
  4472.  
  4473. Example:
  4474.   char *ProcessorType[2][4][2] =
  4475.       { { { "Intel 8086",   "Intel 8088"  },
  4476.       { "Intel 80186",  "Intel 80188" },
  4477.       { "Intel 80286",  "unknown" },
  4478.       { "Intel 80386",  "unknown" } },
  4479.  
  4480.     { { "NEC V30",        "NEC V20" },
  4481.       { "unknown",        "unknown" },
  4482.       { "unknown",        "unknown" },
  4483.       { "unknown",        "unknown" } } };
  4484.  
  4485. This array can be viewed as two layers of rectangular matrices of 4 rows by
  4486. 2 columns.  The array elements are all pointers to string values.
  4487.  
  4488. To examine the contents of the array, the following command can be issued.
  4489. The response to the command is also shown.
  4490.  
  4491. Example:
  4492.   DBG>?processortype
  4493.   {[0]={[0]={[0]=0x0024, [1]=0x002F},
  4494.     [1]={[0]=0x003A, [1]=0x0046},
  4495.     [2]={[0]=0x0052, [1]=0x005E},
  4496.     [3]={[0]=0x0066, [1]=0x005E}},
  4497.    [1]={[0]={[0]=0x0072, [1]= 0x007A},
  4498.     [1]={[0]=0x005E, [1]=0x005E},
  4499.     [2]={[0]=0x005E, [1]=0x005E},
  4500.     [3]={[0]=0x005E, [1]=0x005E}}}
  4501.  
  4502. The values shown are the addresses of the string values.
  4503.  
  4504. By using dimension specifiers, specific slices of an array can be displayed.
  4505. To see only the values of the first layer, the following command can be
  4506. issued.
  4507.  
  4508. Example:
  4509.   DBG>?processortype[0]
  4510.   {[0]={[0]=0x0024, [1]=0x002F},
  4511.    [1]={[0]=0x003A, [1]=0x0046},
  4512.    [2]={[0]=0x0052, [1]=0x005E},
  4513.    [3]={[0]=0x0066, [1]=0x005E}}
  4514.  
  4515. Note that this corresponds to the first half of the addresses displayed in
  4516. the previous example.
  4517.  
  4518. To see only the first row of the first layer, the following command can be
  4519. issued.
  4520.  
  4521. Example:
  4522.   DBG>?processortype[0][0]
  4523.   {[0]=0x0024, [1]=0x002F}
  4524.  
  4525. To see the second row of the first layer, the following command can be
  4526. issued.
  4527.  
  4528. Example:
  4529.   DBG>?processortype[0][1]
  4530.   {[0]=0x003A, [1]=0x0046}
  4531.  
  4532. To see the value of a specific entry in a matrix, all the indices can be
  4533. specified.
  4534.  
  4535. Example:
  4536.   DBG>?{%s} processortype[0][0][0]
  4537.   Intel 8086
  4538.   DBG>?{%s} processortype[0][0][1]
  4539.   Intel 8088
  4540.   DBG>?{%s} processortype[0][1][0]
  4541.   Intel 80186
  4542.  
  4543. In the above examples, we use the "%s" format specifier to display the
  4544. string values.
  4545. ::::PRINT_WINDOW
  4546. ┌──────────────────────────────────────────────────────────────────────────┐
  4547. │ Print /Window expr                               │
  4548. │ ?                                       │
  4549. └──────────────────────────────────────────────────────────────────────────┘
  4550.  
  4551. The Print /Window command may be used to display the results of a Print
  4552. command in a Variable Display window that is created dynamically.
  4553.  
  4554. A Variable Display window is placed on the screen showing the variable
  4555. including fields if it is a structure.    The window is updated each time the
  4556. debugger is entered.  The window may be manipulated in the same manner as
  4557. other windows.    When the Variable Display window is created, it inherits the
  4558. colour attributes of the Dialogue window.  The Ctrl/P (paint) key may be
  4559. used to redefine the window's colour attributes.  It may be resized using
  4560. the Ctrl/N (narrow), Ctrl/W (widen), Ctrl/S (shrink), and Ctrl/G (grow) keys
  4561. or by manipulating the "resizer" gadget with a mouse.  It may be moved using
  4562. the Ctrl/U (up), Ctrl/D (down), Ctrl/L (left) and Ctrl/R (right) keys or by
  4563. dragging the title line with a mouse.  The window may be removed using the
  4564. Ctrl/E (erase) key or by clicking on the "close" gadget.
  4565.  
  4566. If a structure is displayed, the cursor up and down keys may be used to move
  4567. up and down through fields.  To display the contents of a field, the Enter
  4568. key can be pressed.  To return to the previous level, the Backspace key can
  4569. be pressed.  Entries that represent structures are displayed by using
  4570. "{...}" and entries that represent arrays are displayed by using "(...)"
  4571. Essentially, the Enter key permits you to "descend" to nested structures and
  4572. the Backspace key permits you to "ascend" to a previous level.
  4573.  
  4574. If an entry represents a string, the "S" key can be used to display the
  4575. entry as a string.  The Backspace key can be used to return to the original
  4576. display format.
  4577.  
  4578. The top entry in the window displays the current structure nesting level.
  4579. You can move the cursor to this entry and edit it.  If the entry represents
  4580. a field in a structure, you can ascend to the previous level by removing the
  4581. trailing field.  By adding new fields, you can descend to nested levels.
  4582.  
  4583. A mouse can be used to select and view fields by clicking on them.  If you
  4584. click on the line of dashes in the window, you will ascend to previous
  4585. levels.
  4586.  
  4587. The Escape key or the mouse can be used to move to the Prompt window.
  4588. ::::QNX_DEBUGGING_USING_POSTMORTEM_DUMP
  4589. A limited form of debugging of an application that has terminated and
  4590. produced a postmortem dump can be done under QNX.  In order to use this
  4591. feature, the QNX "dumper" program must be started.
  4592.  
  4593. ┌──────────────────────────────────────────────────────────────────────────┐
  4594. │ dumper [-d path] &                               │
  4595. └──────────────────────────────────────────────────────────────────────────┘
  4596.  
  4597. dumper       is the program name for the QNX postmortem dump program.
  4598.  
  4599. -d path    is an option to specify the directory in which postmortem dumps
  4600.        should be written.  If the -d option is not specified, the
  4601.        default directory is /usr/dumps.
  4602.  
  4603. &       must be specified so that the shell is rejoined.
  4604.  
  4605. Example:
  4606.   % dumper &
  4607.   % dumper -d /usr/fred/dump_area &
  4608.  
  4609. Whenever a program terminates abnormally, a dump of the current state of the
  4610. program in memory is written to disk.  The dump file name is the same as the
  4611. program name.  For example, if the program name is a.out then the dump will
  4612. be written to /usr/dumps/a.out (provided that the default dump directory was
  4613. selected when the dumper program was started).    If VIDEO was being used to
  4614. debug the program at the time that it abnormally terminated then the dump is
  4615. written to /usr/dumps/wvideo (provided that the default dump directory was
  4616. selected when the dumper program was started).
  4617.  
  4618. To examine the contents of the postmortem dump, VIDEO may be used.  The
  4619. interface between VIDEO and the postmortem dump is contained in a special
  4620. "trap" file.  The trap file is specified to VIDEO using the "TRAP" option.
  4621.  
  4622. ┌──────────────────────────────────────────────────────────────────────────┐
  4623. │ wvideo -TRap=pmd[;i] [:sym_file] file_spec                   │
  4624. └──────────────────────────────────────────────────────────────────────────┘
  4625.  
  4626. wvideo       is the program name for VIDEO.
  4627.  
  4628. -TRap=pmd[ ;i] must be specified when debugging an application that has
  4629.        terminated and produced a postmortem dump.  The optional ";i" is
  4630.        specified when the modification date of the original program file
  4631.        does not match the information contained in the dumper file.  It
  4632.        indicates that the symbolic debugging information in the program
  4633.        file may be out-of-date.  It instructs VIDEO to ignore the date
  4634.        mismatch.
  4635.  
  4636. sym_file   is an optional symbolic information file specification.  The
  4637.        specification must be preceded by a colon (":").  When specifying
  4638.        a symbol file name, a path such as "//5/etc/" may be included.
  4639.        For QNX, the default file suffix of the symbol file is ".sym".
  4640.  
  4641. file_spec  is the file name of the dumper file to be loaded into memory.
  4642.        When specifying a file name, a path such as "//5/etc/" may be
  4643.        included.  If a path is omitted, VIDEO will first attempt to
  4644.        locate the file in the current directory and, if not successful,
  4645.        attempt to locate the file in the default dumper directory:
  4646.        /usr/dumps.
  4647.  
  4648. Basically, VIDEO is fully functional when a postmortem dump is examined.
  4649. However, there are some operations which are not allowed.  Among these are:
  4650.  
  4651.   1. Task execution cannot be restarted using the "GO" command.
  4652.  
  4653.   2. A register can be modified for the purposes of expression evaluation.
  4654.     The "GO" command can be used to restore the register contents to their
  4655.     original postmortem state.
  4656.  
  4657.   3. Memory cannot be modified.
  4658.  
  4659.   4. Memory outside of regions owned by the program cannot be examined.
  4660.  
  4661.   5. I/O ports cannot be examined.
  4662. ::::QNX_INTERRUPTING_A_PROGRAM
  4663. Once a program has been loaded by VIDEO, its execution can be started by the
  4664. Go command (this command is described under the topic entitled "GO").
  4665.  
  4666. Example:
  4667.   % wvideo myapp
  4668.    .
  4669.    .
  4670.    .
  4671.   DBG>go
  4672.  
  4673. As is sometimes the case during the development phase, a program may execute
  4674. endlessly.
  4675.  
  4676. Under QNX, execution of an application may be interrupted in a number of
  4677. ways.
  4678.  
  4679.   1. If the application program has not taken over the SIGINT signal then
  4680.     execution may be interrupted by pressing Ctrl/Break or Ctrl/C (settable
  4681.     by "stty") at the virtual console of the application program.
  4682.  
  4683.   2. When debugging locally, execution may be interrupted by pressing
  4684.     Ctrl/Break at the virtual console of the debugger.
  4685.  
  4686.   3. Any signal that will kill the executing application program (e.g.,
  4687.     SIGSEGV, SIGTERM) may be issued at another virtual console.  You must
  4688.     obtain the process-id of the application program and then issue a QNX
  4689.     "kill" command.
  4690.  
  4691.     Example:
  4692.       % kill -term 1423
  4693.  
  4694.     You should not use the "SIGKILL" signal if you wish to be able to resume
  4695.     execution of the application with the debugger.
  4696.  
  4697.     An alternative to the "kill" command is the QNX "slay" command which
  4698.     requires a process name.
  4699.  
  4700.     Example:
  4701.       % slay myapp
  4702.  
  4703.     By default, the "slay" command issues the "SIGTERM" signal.
  4704.  
  4705. VIDEO will print a message in the "Dialogue" window indicating that the
  4706. program's execution has been interrupted.  Execution can be resumed with the
  4707. Go command.
  4708.  
  4709. Also, execution of VIDEO commands may be interrupted by pressing Ctrl/Break
  4710. at the virtual console of the debugger.
  4711.  
  4712. For information on how to interrupt executing programs when using the remote
  4713. debugging facility, see the topic entitled "REMOTE_DEBUGGING".
  4714. ::::QNX_REMOTE_DEBUGGING
  4715. ┌──────────────────────────────────────────────────────────────────────────┐
  4716. │ wvideo -TRap=trap_file[;trap_parm] [:sym_file] file_spec [cmd_line]       │
  4717. └──────────────────────────────────────────────────────────────────────────┘
  4718.  
  4719. The VIDEO TRap option must be specified when debugging an application using
  4720. a second computer system.  The format of file_spec depends on the target
  4721. machine's operating system, be it DOS, OS/2, NetWare 386, or QNX.  You can
  4722. use a pair of dashes to stop VIDEO from continuing its option scan.
  4723.  
  4724. Example:
  4725.   C>wvideo -trap=par -reg=4 -- --fdap--
  4726.  
  4727. When trap_parm is specified and it contains blank characters, the entire
  4728. parameter must be placed within braces ({}).
  4729.  
  4730. You must specify the name of the "trap" file that corresponds to the Debug
  4731. Server that was started on the first computer system (the "task machine").
  4732. These files handle the machine-to-machine communication required for remote
  4733. debugging of an application.  Servers are described under the topics entitled
  4734. "REMOTE_DEBUGGING" and "REMOTE_WIN3".
  4735.  
  4736. For QNX, the default file suffix of the trap file is ".trp".  Trap files are
  4737. usually located in the "/etc/wvideo" directory.
  4738.  
  4739. std.trp    Under QNX, if you do not specify a trap file, the default trap
  4740.        file "std.trp" will be loaded.  This interface module supports
  4741.        debugging on the local computer system running QNX.    No remote
  4742.        debugging is possible.
  4743.  
  4744. ser.trp    This communications driver file supports debugging of an
  4745.        application running on another computer system using the serial
  4746.        ports of the two machines.  It communicates with the "SERSERV"
  4747.        Debug Server.  The serial port of the debugger machine is usually
  4748.        connected to the serial port of the task machine.  However, the
  4749.        serial port of another node can be used by the debugger.  The
  4750.        "trap_parm" value specifies the port number to use and an
  4751.        optional maximum BAUD rate (which is separated from the port
  4752.        number by a period).  The port number is 1, 2, 3, etc.  (default
  4753.        is 1).  These numbers correspond to the serial port number used
  4754.        when specifying a serial device (as in "/dev/ser1", "/dev/ser2",
  4755.        etc.).  When the serial port is on another node, the node id and
  4756.        port must be specified.
  4757.  
  4758.          [nid,][port_number][.max_baud]
  4759.  
  4760.        The node number is specified first, then a comma, and then the
  4761.        port number.
  4762.  
  4763.        Example:
  4764.          -tr=ser;7,2.9600
  4765.  
  4766.        Under QNX, the maximum BAUD rate can be one of:
  4767.  
  4768.           38400
  4769.           19200
  4770.            9600
  4771.            4800
  4772.            2400
  4773.            1200
  4774.           0 (a special case)
  4775.  
  4776.        The default maximum BAUD rate is 38,400.
  4777.  
  4778.        Except for the special BAUD rate of 0, a minimum of two digits
  4779.        must be specified to identify the desired maximum BAUD rate.  The
  4780.        maximum BAUD rate is explained in the section "Remote Debugging
  4781.        Over the Serial Port" under the topic entitled "REMOTE_DEBUGGING".
  4782.        In the following example, port 2 and a maximum BAUD rate of
  4783.        19,200 is specified.
  4784.  
  4785.        Example:
  4786.          -trap=ser;2.19
  4787.  
  4788. par.trp    This communications driver file supports debugging of an
  4789.        application running on another computer system using the parallel
  4790.        ports of the two machines.  It communicates with one of the
  4791.        "PARSERV" or "PARSERVW" (Microsoft Windows) Debug Servers.  The
  4792.        parallel port of the debugger machine is connected to the
  4793.        parallel port of the task machine.  The port number to use is
  4794.        specified by "trap_parm".  The port number is 1, 2 or 3 (default
  4795.        is 1).  These numbers correspond to the device number used when
  4796.        specifying the parallel port (as in "/dev/par1", "/dev/par2",
  4797.        etc.).  Unlike the serial port, the parallel port cannot be on
  4798.        another node.
  4799. ::::QNX_SEARCH_ORDER
  4800. There are several supporting files provided with VIDEO.  These files fall
  4801. into five categories.
  4802.  
  4803.   1. VIDEO command files (files with the ".dbg" suffix).
  4804.  
  4805.   2. VIDEO trap files (files with the ".trp" suffix).
  4806.  
  4807.   3. VIDEO parser files (files with the ".prs" suffix).
  4808.  
  4809.   4. VIDEO help files (files with the ".hlp" suffix).
  4810.  
  4811.   5. VIDEO symbolic debugging information files (files with the ".sym"
  4812.     suffix).
  4813.  
  4814. The search order for VIDEO support files is as follows:
  4815.  
  4816.   1. the current directory,
  4817.   2. the paths listed in the WVIDEO_PATH environment variable,
  4818.   3. the path listed in the HOME environment variable, and, finally,
  4819.   4. the "/etc/wvideo" directory.
  4820.  
  4821. You should note the following when using the remote debugging feature of
  4822. VIDEO.    When the REMotefiles option is specified, the debugger also attempts
  4823. to locate VIDEO's support files (command files, trap files, etc.) on the
  4824. task machine.
  4825. ::::QNX_STARTUP
  4826. ┌──────────────────────────────────────────────────────────────────────────┐
  4827. │ wvideo [options] [:sym_file] [//nid] pid                   │
  4828. │    or                                    │
  4829. │ wvideo [options] [:sym_file] [//nid] file_spec [cmd_line]           │
  4830. └──────────────────────────────────────────────────────────────────────────┘
  4831.  
  4832. The square brackets [ ] denote items which are optional.
  4833.  
  4834. wvideo       is the program name for VIDEO.
  4835.  
  4836. options    is a list of valid VIDEO options, each preceded by a dash ("-").
  4837.        Options may be specified in any order.
  4838.  
  4839. sym_file   is an optional symbolic debugging information file specification.
  4840.        The specification must be preceded by a colon (":").  When
  4841.        specifying a symbol file name, a path such as "//5/etc/" may be
  4842.        included.  For QNX, the default file suffix of the symbol file is
  4843.        ".sym".
  4844.  
  4845.        The symbolic information file can be produced by the WATCOM
  4846.        Linker wlink or by the WATCOM Strip Utility wstrip.
  4847.  
  4848. nid       is an optional network node identification (nid) on which to
  4849.        locate or run the process.  If omitted, the process will be
  4850.        located or run on the current node.
  4851.  
  4852. pid       is a process identification number of a currently executing
  4853.        process.  If a process id is given then VIDEO will attempt to
  4854.        attach the specified process.  If a "nid" was also given then
  4855.        VIDEO will attempt to attach the specified process on the
  4856.        specified node.
  4857.  
  4858. file_spec  is the file name of the file to be loaded into memory.  When
  4859.        specifying a file name, a path such as "//5/etc/" may be
  4860.        included.  If a path is omitted, VIDEO will first attempt to
  4861.        locate the file in the current directory.  If this fails, VIDEO
  4862.        will search for the file in each path listed in the PATH
  4863.        environment string.
  4864.  
  4865. cmd_line   is an optional command line which will be passed on to the
  4866.        application.
  4867.  
  4868. Example 1:
  4869.   % wvideo -reg=4 myapp
  4870.  
  4871. VIDEO is invoked with 4 register sets and loads the application called
  4872. "myapp".
  4873.  
  4874. Example 2:
  4875.   % wvideo -reg=4 //5 //7/usr/fred/myapp -x test.dat
  4876.  
  4877. VIDEO is invoked with 4 register sets and loads the application called
  4878. "myapp", located on node 7 of the network, onto node 5 of the network.    The
  4879. command line "-x test.dat" is passed to "myapp".
  4880.  
  4881. Example 3:
  4882.   % wvideo //5 0342
  4883.  
  4884. VIDEO is invoked to attach a process identified by pid "0342" running on
  4885. node 5.
  4886.  
  4887.  
  4888.  
  4889. Command Line Options
  4890. ════════════════════
  4891. ┌──────────────────────────────────────────────────────────────────────────┐
  4892. │     -Console=number                               │
  4893. │     -Dynamic=space                               │
  4894. │     -NOFpu                                   │
  4895. │     -Invoke=file_spec                            │
  4896. │     -Lines=number                               │
  4897. │     -NOInvoke                                │
  4898. │     -NOMouse                                   │
  4899. │     -Registers=number                            │
  4900. │     -REMotefiles                               │
  4901. │     -NOSymbols                               │
  4902. │     -TRap=trap_file[;trap_parm]                       │
  4903. └──────────────────────────────────────────────────────────────────────────┘
  4904.  
  4905. Options may be specified in any order.    Short forms may be specified for
  4906. options and are shown above in capital letters.  If "space" is suffixed with
  4907. the letter "K" then "space" refers to multiples of 1K bytes (1024 bytes).
  4908. If "space" is suffixed with the letter "B" then "space" refers to the number
  4909. of bytes.  If no suffix is specified and "space" is a number less than 1000
  4910. then "space" is assumed to refer to multiples of 1K bytes (1024 bytes);
  4911. otherwise it refers to the number of bytes.
  4912.  
  4913. -Console=number specifies the virtual console number to use for debugger
  4914.        windows.  By default, VIDEO will use the first "free" virtual
  4915.        console.
  4916.  
  4917. -Dynamic=space specifies the initial amount of dynamic storage that VIDEO is
  4918.        to reserve for items such as windows, user-defined symbols, etc.
  4919.        The default amount that is set aside is 40960 bytes (40K bytes).
  4920.        As additional storage is required, VIDEO will allocate it.
  4921.  
  4922. -NOFpu       requests that the debugger ignore the presence of a math
  4923.        coprocessor or emulator.  No memory will be allocated by the
  4924.        debugger for saving the context of the 80x87 numeric data
  4925.        processor.  Use this option if your application will not use the
  4926.        math coprocessor and you wish to reduce the amount of memory
  4927.        required by the debugger.
  4928.  
  4929. -Invoke=file_spec may be used to specify an alternate name for the debugger
  4930.        command file which is to be automatically invoked at start-up
  4931.        time.  The default file name is "profile.dbg".  See the topic
  4932.        entitled "QNX_SEARCH_ORDER" for information on how command files
  4933.        are located.
  4934.  
  4935. -Lines=number may be used to specify the number of display lines that VIDEO
  4936.        is to use.  If this option is not specified, the default number
  4937.        of output lines is selected.  When an Enhanced Graphics Adapter
  4938.        (EGA) is present, 43 lines of output may be requested.  When an
  4939.        Video Graphics Array (VGA) is present, 50 lines of output may be
  4940.        requested.
  4941.  
  4942. -NOInvoke  specifies that the default debugger command file is not to be
  4943.        invoked.
  4944.  
  4945. -NOMouse   requests that the debugger ignore any attached mouse.
  4946.  
  4947. -Registers=number may be used to specify how many register sets to set aside
  4948.        for the recording of register contents.  The default number of
  4949.        register sets is 2.    See the description of the Register command
  4950.        for more information (this command is described under the topic
  4951.        entitled "REGISTER").
  4952.  
  4953. -REMotefiles may be used in conjunction with the remote debugging
  4954.        capabilities of the debugger.  Remote debugging involves using
  4955.        two personal computers that are connected by means other than the
  4956.        network.  One, called the "task machine", is used to run the
  4957.        application; the other, called the "debugger machine", is used to
  4958.        run the debugger.  When REMotefiles is specified, all debugger
  4959.        files (except "trap" files) and application source files are
  4960.        opened on the task machine rather than the debugger machine (if
  4961.        you are doing local debugging, these two machines are actually
  4962.        the same).  The "trap" file must be located on the debugger
  4963.        machine because it contains the code to open files on the task
  4964.        machine.
  4965.  
  4966.        Note that the PATH environment variable on the task machine is
  4967.        always used in locating executable image files.  When REMotefiles
  4968.        is specified, the debugger also attempts to locate VIDEO's
  4969.        support files (command files, trap files, etc.) on the task
  4970.        machine.
  4971.  
  4972. -NOSymbols requests that VIDEO omit all debugging information when loading
  4973.        an executable image.  Information regarding global and local
  4974.        symbol names, data types, and line numbers is not processed.
  4975.  
  4976. -TRap=trap_file[;trap_parm] must be specified when debugging an application
  4977.        on a remote machine.  You must specify the name of one of the
  4978.        "trap" files provided with VIDEO.  For QNX, the default file
  4979.        suffix of the trap file is ".trp".  Trap files are usually
  4980.        located in the "/etc/wvideo" directory.  See the topic entitled
  4981.        "QNX_SEARCH_ORDER" for information on how trap files are located.
  4982.  
  4983.        Under QNX, if you do not specify the TRap option, the default
  4984.        trap file "std.trp" will be loaded.    This interface module
  4985.        supports debugging on the local computer system running QNX.
  4986.  
  4987.        Example:
  4988.          % wvideo calendar
  4989.  
  4990.        Of course, you may also explicitly name the "standard" trap file
  4991.        that you wish VIDEO to use.
  4992.  
  4993.        Example:
  4994.          % wvideo -trap=std calendar
  4995.  
  4996.        If trap_parm is specified, it may be necessary to escape the ";"
  4997.        depending on the command shell in use.
  4998.  
  4999.        See the topic entitled "REMOTE_DEBUGGING" for more information
  5000.        on the TRap option.
  5001. ::::QNX_WVIDEO_ENVIRONMENT_VARIABLE
  5002. The WVIDEO environment variable can be used to specify commonly used VIDEO
  5003. options.  These options are processed before options specified on the
  5004. command line.
  5005.  
  5006. Example:
  5007.   % export "WVIDEO=-nofpu -reg=4"
  5008.  
  5009. The above examples illustrate how to define default options for the
  5010. debugger.  Under QNX, care must be taken to specify the environment variable
  5011. name entirely in uppercase letters.
  5012.  
  5013. Once the WVIDEO environment variable has been defined, those options listed
  5014. become the default each time VIDEO is invoked.
  5015. ::::QUIT
  5016. ┌──────────────────────────────────────────────────────────────────────────┐
  5017. │ QUIT                                       │
  5018. └──────────────────────────────────────────────────────────────────────────┘
  5019.  
  5020. The QUIT command is used to terminate VIDEO and return to the operating
  5021. system.  Any application which may have partially executed is also
  5022. terminated.
  5023. ::::REGISTER
  5024. ┌──────────────────────────────────────────────────────────────────────────┐
  5025. │ Register [expr]                               │
  5026. └──────────────────────────────────────────────────────────────────────────┘
  5027.  
  5028. The Register command is used to select a VIDEO register set.
  5029.  
  5030. Whenever VIDEO is entered, it saves the current register values in a ring of
  5031. register sets.    The size of this ring is determined at start-up time with
  5032. the Registers option (the default is 2, the maximum is 100).  When the
  5033. expression result is negative, a previous register set is selected.  When
  5034. the expression result is positive, a more recent register set is selected.
  5035. When the expression is omitted, the current register set is selected.
  5036.  
  5037. If the Register window is not present on the screen, the register display is
  5038. written to the Dialogue window.  A Register window is created by using the
  5039. Display Register command.  If you are not at the most recent register set, a
  5040. number will appear in square brackets somewhere in the Register window.
  5041. This number represents the number of register sets that are more recent than
  5042. the one that is currently being displayed.  When you issue a Go or Trace
  5043. command, the currently displayed register set becomes the "current" register
  5044. values.  This feature provides the user with a "checkpoint/restart"
  5045. capability.
  5046.  
  5047. Example:
  5048.   DBG>register -1
  5049.  
  5050. In the above example, we back up to the previous register set.
  5051. ::::REMARK
  5052. ┌──────────────────────────────────────────────────────────────────────────┐
  5053. │ REMark   comment_line                            │
  5054. │ *                                       │
  5055. └──────────────────────────────────────────────────────────────────────────┘
  5056.  
  5057. The REMark or * command provides a means for documenting VIDEO command
  5058. files.
  5059.  
  5060. Example:
  5061.   * Count the number of times a routine is executed
  5062.     /cnt_<1>=0
  5063.   * Remove the break point definition
  5064.   * just in case one already exists
  5065.     break/clear /<1>
  5066.   * Set the new break point
  5067.     break/set <1> {/cnt_<1>++; go/keep}
  5068. ::::REMOTE_DEBUGGING
  5069. Remote Debugging
  5070. ════════════════
  5071.  
  5072. Remote debugging involves using two computer systems to debug your
  5073. application.  One PC, called the "task machine", is used to run the
  5074. application; the other PC, called the "debugger machine", is used to run the
  5075. debugger.  Remote debugging can be used when there is not enough memory on
  5076. one computer system to run both the application and the debugger.
  5077.  
  5078. When using the remote debugging feature, the application that is to be
  5079. debugged must reside on the task machine so that the operating system can
  5080. load it.  The application's source files should be accessible from the
  5081. debugger machine so that VIDEO can display source lines for a particular
  5082. module.
  5083.  
  5084.  
  5085. Let us assume that PC #1 is your primary development machine.  It contains
  5086. your application, its data files, its source files, and the programs that
  5087. you have been using to develop your application (editor, compiler, linker,
  5088. debugger, etc.).  Let us assume that PC #2 is a spare machine that is
  5089. available for your use.  Since two computer systems are involved, there are
  5090. two possible scenarios.
  5091.  
  5092.   1. You could copy the application and any required data files to PC #2.
  5093.     In this scenario, your primary development machine (PC #1) will be used
  5094.     to run the debugger.  Thus, the source files for your application are
  5095.     present on the debugger machine.
  5096.  
  5097.   2. You could copy the debugger over to PC #2.  In this scenario, your
  5098.     primary development machine (PC #1) will be used to run the application.
  5099.     Unless you copy all of the application's source files to PC #2, the
  5100.     debugger will not have access to them.  In this case, you can use the
  5101.     VIDEO "REMotefiles" option to inform the debugger that source files are
  5102.     to be obtained over the communications link from the task machine (PC
  5103.     #1).  Another advantage to the "REMotefiles" option is that the debugger
  5104.     will also locate debugger command files, by default, on the task
  5105.     machine.  If this option is not specified then the debugger command
  5106.     files must also be copied over to the debugger machine (PC #2).
  5107.  
  5108. The decision as to which machine you should be using for the task and which
  5109. for the debugger is up to you.    In certain cases, it may depend on the
  5110. amount of available memory on each machine or the speed of their respective
  5111. processors.  If a large amount of memory is required for your application
  5112. then it makes sense that the task machine be the one with the most memory.
  5113. If application execution speed is important then it makes sense that the
  5114. task machine be the faster of the two.
  5115.  
  5116. ┌────────────────────────────────────────────────────────────────────────────┐
  5117. │ Note:  Under QNX, it is possible to debug a task running on another QNX    │
  5118. │ node.  This is an inherent feature of the QNX system and should not be     │
  5119. │ considered "remote" debugging.  Remote debugging is most effectively used  │
  5120. │ when the computers are on two separate QNX networks, or one computer is    │
  5121. │ running QNX and the other is running one of the other operating systems    │
  5122. │ supported by VIDEO.                                 │
  5123. │                                         │
  5124. │ See the topic entitled "QNX_STARTUP".                      │
  5125. └────────────────────────────────────────────────────────────────────────────┘
  5126.  
  5127. Notes:
  5128.  
  5129.   1. Version 2.0 or later of DOS is required to support remote debugging of
  5130.     applications.
  5131.  
  5132.   2. Version 3.0 or later of Microsoft Windows is required to support remote
  5133.     debugging of applications.
  5134.  
  5135.   3. Version 1.2 or later of OS/2 is required to support remote debugging of
  5136.     applications.
  5137.  
  5138.   4. Version 3.1 or later of NetWare 386 is required to support debugging of
  5139.     applications running on the NetWare server.  The remote debugging
  5140.     facility requires that a server task be run on the task machine (the
  5141.     NetWare server) before VIDEO is started on the debugger machine.
  5142.  
  5143.   5. Version 4.0 or later of QNX is required to support remote debugging of
  5144.     applications.
  5145.  
  5146.  
  5147.  
  5148. Communications Servers Under DOS and OS/2
  5149. ═════════════════════════════════════════
  5150. There are several servers provided for use with VIDEO under DOS and OS/2.
  5151.  
  5152. SERSERV.EXE
  5153.        This program supports remote debugging over the serial port.
  5154.  
  5155. PARSERV.EXE
  5156.        This program supports remote debugging over the parallel port.
  5157.  
  5158. NOVSERV.EXE
  5159.        This program supports remote debugging over the Novell "NetWare"
  5160.        network.
  5161.  
  5162. NETSERV.EXE
  5163.        This program supports remote debugging using NetBIOS support.
  5164.  
  5165. DQVSERV.EXE
  5166.        (DOS Only) This program supports remote debugging using DESQview.
  5167.        In the following discussion, the "task machine" is the DESQview
  5168.        window in which the server is started and the "debugger machine"
  5169.        is the DESQview window in which the debugger is started.
  5170.  
  5171. WINSERV.EXE
  5172.        (Microsoft Windows 3.x Only) This program supports remote
  5173.        debugging using Windows DOS boxes.  In the following discussion,
  5174.        the "task machine" is the Windows DOS box in which the server is
  5175.        started and the "debugger machine" is the Windows DOS box in
  5176.        which the debugger is started.
  5177.  
  5178. These programs are described in subsequent sections.  The general syntax of
  5179. the command line is shown below.
  5180.  
  5181. ┌──────────────────────────────────────────────────────────────────────────┐
  5182. │ server_name [/TRap=trap_file[;trap_parm]] server_specs           │
  5183. └──────────────────────────────────────────────────────────────────────────┘
  5184.  
  5185. The /TRap option is only specified in three situations:
  5186.  
  5187.   1. under DOS, in order to prevent the server task from using the 386/486
  5188.     Debug Registers (a hardware feature used to assist debugging),
  5189.  
  5190.   2. for 386 applications that require the services of a DOS extender, and
  5191.  
  5192.   3. in special applications where more than two computer systems are
  5193.     chained together in series.
  5194.  
  5195.  
  5196. In general, the server program receives requests from another computer
  5197. system (the debugger machine).    It can process these requests locally or
  5198. pass them on to a server running on another computer system.
  5199.  
  5200. STD.TRP, STD16.DLL, STD32.DLL
  5201.        By default, requests will be handled locally by the "STD.TRP"
  5202.        file when DOS is running, the "STD16.DLL" file when OS/2 1.x is
  5203.        running, or the "STD32.DLL" file when OS/2 2.x is running,
  5204.  
  5205.        Under DOS, it may be necessary to prevent the server task from
  5206.        using the 386/486 Debug Registers (a hardware feature used to
  5207.        assist debugging).  This situation arises with certain DOS
  5208.        control programs that do not properly manage Debug Registers.  If
  5209.        the server task fails upon startup on a 386/486 system, it is a
  5210.        good indication that use of the Debug Registers must be disabled.
  5211.        With "STD.TRP", the trap file parameter "d" may be specified to
  5212.        disable the use of Debug Registers.    The following example
  5213.        illustrates the specification of the "d" trap file parameter.
  5214.  
  5215.        Example:
  5216.          C>serserv /trap=std;d
  5217.          or
  5218.          C>parserv /trap=std;d
  5219.          etc.
  5220.  
  5221. ECS.TRP    When the application is to be run with the ERGO Computing, Inc.
  5222.        "OS/386" DOS extender on the task machine, the "ECS.TRP"
  5223.        interface module can be used with a communications server.  The
  5224.        optional "trap_parm" is ignored.
  5225.  
  5226.        Example:
  5227.          C>serserv /trap=ecs
  5228.          or
  5229.          C>parserv /trap=ecs
  5230.          etc.
  5231.  
  5232. PLS.TRP    When the application is to be run with the Phar Lap Software,
  5233.        Inc.  386|DOS-Extender on the task machine, the "PLS.TRP"
  5234.        interface module can be used with a communications server.  The
  5235.        optional "trap_parm" is passed on to the DOS extender "RUN386" as
  5236.        command line switches.
  5237.  
  5238.        Example:
  5239.          C>serserv /trap=pls
  5240.          or
  5241.          C>parserv /trap=pls
  5242.          etc.
  5243.  
  5244. RSI.TRP    When the application is to be run with the Rational Systems, Inc.
  5245.        "DOS/4GW" DOS extender on the task machine, the "RSI.TRP"
  5246.        interface module can be used with a communications server.  This
  5247.        DOS extender is included in the WATCOM C/386 and WATCOM FORTRAN
  5248.        77/386 packages.  The optional "trap_parm" is ignored.
  5249.  
  5250.        Example:
  5251.          C>serserv /trap=rsi
  5252.          or
  5253.          C>parserv /trap=rsi
  5254.          etc.
  5255.  
  5256.  
  5257.  
  5258. Communications Servers Under Microsoft Windows
  5259. ══════════════════════════════════════════════
  5260. There are two servers provided for use with VIDEO under Windows 3.x.
  5261.  
  5262. PARSERVW.EXE
  5263.        This program supports remote debugging over the parallel port.
  5264.  
  5265. NETSERVW.EXE
  5266.        This program supports remote debugging using NetBIOS support.
  5267.  
  5268. These programs are described in subsequent sections.  The general syntax of
  5269. the command line is shown below.
  5270.  
  5271. ┌──────────────────────────────────────────────────────────────────────────┐
  5272. │ server_name server_specs                           │
  5273. └──────────────────────────────────────────────────────────────────────────┘
  5274.  
  5275.  
  5276.  
  5277. Communications Servers Under Novell NetWare 386
  5278. ═══════════════════════════════════════════════
  5279. There are three servers provided for use with VIDEO under Novell NetWare
  5280. 386.
  5281.  
  5282. SERSERV.NLM
  5283.        This program supports remote debugging over the serial port.
  5284.  
  5285. PARSERV.NLM
  5286.        This program supports remote debugging over the parallel port.
  5287.  
  5288. NOVSERV.NLM
  5289.        This program supports remote debugging over the Novell "NetWare"
  5290.        network.
  5291.  
  5292. These programs are described in the following sections.  The general syntax
  5293. of the command line is shown below.
  5294.  
  5295. ┌──────────────────────────────────────────────────────────────────────────┐
  5296. │ LOAD server_name server_specs                        │
  5297. └──────────────────────────────────────────────────────────────────────────┘
  5298.  
  5299. Example:
  5300.   : LOAD PARSERV 2
  5301.  
  5302. The above example loads the parallel port server which will use parallel
  5303. port 2 of the NetWare server for communication.
  5304.  
  5305.  
  5306.  
  5307. Communications Servers Under QNX
  5308. ════════════════════════════════
  5309. There are two servers provided for use with VIDEO under QNX.
  5310.  
  5311. serserv    This program supports remote debugging over the serial port.
  5312.  
  5313. parserv    This program supports remote debugging over the parallel port.
  5314.  
  5315. These programs are described in the following sections.  The general syntax
  5316. of the command line is shown below.
  5317.  
  5318. ┌──────────────────────────────────────────────────────────────────────────┐
  5319. │ server_name [-TRap=trap_file[;trap_parm]] server_specs           │
  5320. └──────────────────────────────────────────────────────────────────────────┘
  5321.  
  5322. The -TRap option can be specified.  In general, the server program receives
  5323. requests from another computer system (the debugger machine).  It can
  5324. process these requests locally or pass them on to a server running on
  5325. another computer system.  By default, requests will be handled locally by
  5326. the "std.trp" file.
  5327.  
  5328.  
  5329.  
  5330. Examples of PC to PC Communication Links
  5331. ════════════════════════════════════════
  5332. In the following diagram, we illustrate the use of VIDEO running under DOS
  5333. to debug an application running under DOS on another computer system.  In
  5334. the example, parallel communications are used.
  5335.  
  5336.     PC #1              PC #2
  5337.   ┌────────────────┐        ┌────────────────┐
  5338.   │Debugger Machine│        │  Task Machine  │
  5339.   │     DOS       │        │       DOS         │
  5340.   │           │        │             │
  5341.   │    WVIDEO       │    ┌───│────>PARSERV    │
  5342.   │      │       │    │   │        │         │
  5343.   │      V       │    │   │        V         │
  5344.   │ trap handler<──│────┘   │  trap handler  │
  5345.   │    PAR.TRP       │        │     STD.TRP     │
  5346.   └────────────────┘        └────────────────┘
  5347.  
  5348.  
  5349. Figure 21. Remote Debugging from DOS to DOS
  5350.  
  5351. In the following diagram, we illustrate the use of VIDEO running under DOS
  5352. to debug an application running under OS/2 on another computer system.    In
  5353. the example, serial communications are used.
  5354.  
  5355.     PC #1              PC #2
  5356.   ┌────────────────┐        ┌────────────────┐
  5357.   │Debugger Machine│        │  Task Machine  │
  5358.   │     DOS       │        │     OS/2 1.x    │
  5359.   │           │        │             │
  5360.   │    WVIDEO       │    ┌───│────>SERSERV    │
  5361.   │      │       │    │   │        │         │
  5362.   │      V       │    │   │        V         │
  5363.   │ trap handler<──│────┘   │  trap handler  │
  5364.   │    SER.TRP       │        │     STD16.DLL   │
  5365.   └────────────────┘        └────────────────┘
  5366.  
  5367. Figure 22. Remote Debugging from DOS to OS/2
  5368.  
  5369. In the following diagram, we illustrate the use of VIDEO running under OS/2
  5370. to debug an application running under a DOS extender on another computer
  5371. system.  In the example, serial communications are used.
  5372.  
  5373.     PC #1              PC #2
  5374.   ┌────────────────┐        ┌────────────────┐
  5375.   │Debugger Machine│        │  Task Machine  │
  5376.   │     OS/2       │        │386│DOS─Extender│
  5377.   │           │        │             │
  5378.   │    WVIDEO       │    ┌───│────>SERSERV    │
  5379.   │      │       │    │   │        │         │
  5380.   │      V       │    │   │        V         │
  5381.   │ trap handler<──│────┘   │  trap handler  │
  5382.   │    SER.DLL       │        │     PLS.TRP     │
  5383.   └────────────────┘        └────────────────┘
  5384.  
  5385. Figure 23. Remote Debugging from OS/2 to DOS Extender
  5386.  
  5387. In the following diagram, we illustrate the use of VIDEO running under QNX
  5388. to debug an application running under QNX on another computer system.  In
  5389. the example, parallel communications are used.
  5390.  
  5391.     PC #1              PC #2
  5392.   ┌────────────────┐        ┌────────────────┐
  5393.   │Debugger Machine│        │  Task Machine  │
  5394.   │     QNX       │        │       QNX         │
  5395.   │           │        │             │
  5396.   │    wvideo       │    ┌───│────>parserv    │
  5397.   │      │       │    │   │        │         │
  5398.   │      V       │    │   │        V         │
  5399.   │ trap handler<──│────┘   │  trap handler  │
  5400.   │    par.trp       │        │     std.trp     │
  5401.   └────────────────┘        └────────────────┘
  5402.  
  5403. Figure 24. Remote Debugging from QNX to QNX
  5404.  
  5405. In the following diagram, we illustrate the use of VIDEO running under DOS
  5406. to debug an application running under QNX on another computer system.  In
  5407. the example, serial communications are used.
  5408.  
  5409.     PC #1              PC #2
  5410.   ┌────────────────┐        ┌────────────────┐
  5411.   │Debugger Machine│        │  Task Machine  │
  5412.   │     DOS       │        │       QNX         │
  5413.   │           │        │             │
  5414.   │    WVIDEO       │    ┌───│────>serserv    │
  5415.   │      │       │    │   │        │         │
  5416.   │      V       │    │   │        V         │
  5417.   │ trap handler<──│────┘   │  trap handler  │
  5418.   │    SER.TRP       │        │     std.trp     │
  5419.   └────────────────┘        └────────────────┘
  5420.  
  5421. Figure 25. Remote Debugging from DOS to QNX
  5422.  
  5423. In the following diagram, we illustrate the use of VIDEO running under QNX
  5424. to debug an application running under a DOS extender on another computer
  5425. system.  In the example, serial communications are used.
  5426.  
  5427.  
  5428.     PC #1              PC #2
  5429.   ┌────────────────┐        ┌────────────────┐
  5430.   │Debugger Machine│        │  Task Machine  │
  5431.   │     QNX       │        │386│DOS─Extender│
  5432.   │           │        │             │
  5433.   │    wvideo       │    ┌───│────>SERSERV    │
  5434.   │      │       │    │   │        │         │
  5435.   │      V       │    │   │        V         │
  5436.   │ trap handler<──│────┘   │  trap handler  │
  5437.   │    ser.trp       │        │     PLS.TRP     │
  5438.   └────────────────┘        └────────────────┘
  5439.  
  5440. Figure 26. Remote Debugging from QNX to DOS Extender
  5441.  
  5442. Many other combinations are possible.  In the following diagram, we
  5443. illustrate the use of VIDEO running under DOS to debug an application
  5444. running under DOS on a third computer system which is connected indirectly
  5445. to the first system.  In the example, parallel communications are used to
  5446. get from PC #1 to PC #2 and NetWare network communications are used to get
  5447. from PC #2 to PC #3.
  5448.  
  5449.     PC #1              PC #2             PC #3
  5450.   ┌────────────────┐        ┌────────────────┐          ┌────────────────┐
  5451.   │Debugger Machine│        │    Go─Between   │          │  Task Machine  │
  5452.   │     DOS       │        │       DOS         │          │      DOS       │
  5453.   │           │        │             │          │            │
  5454.   │    WVIDEO       │    ┌───│────>PARSERV    │      ┌───│────>NOVSERV    │
  5455.   │      │       │    │   │        │         │      │   │       │        │
  5456.   │      V       │    │   │        V         │      │   │       V        │
  5457.   │ trap handler<──│────┘   │ trap handler<──│────┘   │  trap handler  │
  5458.   │    PAR.TRP       │        │     NOV.TRP     │          │    STD.TRP     │
  5459.   └────────────────┘        └────────────────┘          └────────────────┘
  5460.  
  5461. Figure 27. Remote Debugging via an Intermediate
  5462.  
  5463. Notes:
  5464.  
  5465.   1. You should note the following regarding keyboard input.  Anything that
  5466.     is typed to the debugger itself must be typed on the debugger machine.
  5467.     As well, anything that is typed to the application being debugged must
  5468.     be typed on the task machine.
  5469.  
  5470.   2. The same is true of screen output.  All debugger output comes out on
  5471.     the debugger machine, while all program output occurs on the task
  5472.     machine.
  5473.  
  5474. The wiring required for serial and parallel communications is described under
  5475. the topic entitled "WIRING".
  5476.  
  5477.  
  5478.  
  5479. Remote Debugging Over the Serial Port
  5480. ═════════════════════════════════════
  5481. Remote debugging over the serial port requires that a server task be run on
  5482. the task machine before VIDEO is started on the debugger machine.  This is
  5483. required since VIDEO will begin to communicate immediately with the task
  5484. machine via this special server program.
  5485.  
  5486. The wiring required for serial communications is described under the topic
  5487. entitled "WIRING" in the section entitled "Serial Port Wiring Considerations".
  5488.  
  5489. The debugger and server will automatically synchronize on a communications
  5490. speed.    They may communicate at rates as high as 115,200 BAUD.    Since the
  5491. BAUD rate, parity, number of data bits and stop bits is automatically
  5492. chosen, the DOS or OS/2 "MODE" command or the QNX "stty" command need not be
  5493. used.
  5494.  
  5495. For DOS and OS/2, the formal serial port debug server command line syntax is
  5496. shown below.
  5497.  
  5498. ┌──────────────────────────────────────────────────────────────────────────┐
  5499. │ SERSERV [/TRap=trap_file[;trap_parm]] [port_number][.max_baud]       │
  5500. └──────────────────────────────────────────────────────────────────────────┘
  5501.  
  5502. For NetWare 386, the formal serial port debug server command line syntax is
  5503. shown below.
  5504.  
  5505. ┌──────────────────────────────────────────────────────────────────────────┐
  5506. │ LOAD SERSERV [port_number][.max_baud]                    │
  5507. └──────────────────────────────────────────────────────────────────────────┘
  5508.  
  5509. For QNX, the formal serial port debug server command line syntax is shown
  5510. below.
  5511.  
  5512. ┌──────────────────────────────────────────────────────────────────────────┐
  5513. │ serserv [-TRap=trap_file[;trap_parm]] [nid,][port_number][.max_baud]       │
  5514. └──────────────────────────────────────────────────────────────────────────┘
  5515.  
  5516. The "port_number" for the serial server is the serial port number (1, 2, 3,
  5517. etc.) that the server should use to communicate with VIDEO running on the
  5518. debugger machine.  The default port number is 1.
  5519.  
  5520. Under DOS, OS/2 and NetWare 386, these numbers correspond to the device
  5521. number used when specifying the serial device "COMx" (as in "COM1", "COM2",
  5522. etc.).
  5523.  
  5524. Under QNX, these numbers correspond to the serial port number used when
  5525. specifying a serial device (as in "/dev/ser1", "/dev/ser2", etc.).  When the
  5526. serial port is on another node, the node id must be specified.    If a node id
  5527. is specified and the port number is not specified, it defaults to 1.
  5528.  
  5529.   [nid,][port_number][.max_baud]
  5530.  
  5531. The node number is specified first, then a comma, and then the port number.
  5532.  
  5533. Example:
  5534.   serserv 7,2.9600
  5535.  
  5536. The optional "max_baud" value specifies the maximum BAUD rate.    It is
  5537. separated from the port number by a period.
  5538.  
  5539. Under DOS, the maximum BAUD rate can be one of:
  5540.  
  5541.   115200
  5542.    57600
  5543.    38400
  5544.    19200
  5545.     9600
  5546.     4800
  5547.     2400
  5548.     1200
  5549.        0 (a special case)
  5550.  
  5551. The default maximum BAUD rate is 115,200.
  5552.  
  5553. Under OS/2, the maximum BAUD rate can be one of:
  5554.  
  5555.    19200
  5556.     9600
  5557.     4800
  5558.     2400
  5559.     1200
  5560.        0 (a special case)
  5561.  
  5562. The default maximum BAUD rate is 19,200.
  5563.  
  5564. Under QNX, the maximum BAUD rate can be one of:
  5565.  
  5566.    38400
  5567.    19200
  5568.     9600
  5569.     4800
  5570.     2400
  5571.     1200
  5572.        0 (a special case)
  5573.  
  5574. The default maximum BAUD rate is 38,400.
  5575.  
  5576. Except for the special BAUD rate of 0, a minimum of two digits must be
  5577. specified to identify the desired maximum BAUD rate.  Specification of a
  5578. maximum BAUD rate is useful when the maximum rate at which the two machines
  5579. can communicate effectively is known.  The server and debugger normally
  5580. start at the fastest possible speed and work downwards until an effective
  5581. (error-free) rate is established.  If the maximum rate is specified ahead of
  5582. time, this will help reduce the startup time.  The BAUD rate actually
  5583. selected will be the minimum of the maximum rates specified when both the
  5584. server and debugger are started and the rate at which the two can
  5585. effectively communicate.  An example may help to explain this.
  5586.  
  5587. Example:
  5588.   Task    machine: serserv 2.38400
  5589.   Debug machine: wvideo -trap=ser;1.57600 hello
  5590.  
  5591. In the above example, the maximum rate at which the two machines could
  5592. communicate is 38,400 BAUD (since it is the minimum of 38,400 and 57,600).
  5593. However, the actual rate selected for effective communications may be less
  5594. than this.
  5595.  
  5596. If 0 is specified for the maximum BAUD rate when both the server and
  5597. debugger are started, the process of searching for the maximum rate at which
  5598. the two machines can communicate is eliminated.  The BAUD rate for each side
  5599. must be established through other means (such as the DOS or OS/2 "MODE"
  5600. command or the QNX "stty" command) and the rates must be identical.  The
  5601. parity, word length and number of stop bits are selected by the server and
  5602. the debugger so you need not specify these parameters.    The BAUD rate value
  5603. 0 should be specified when modems are employed between the two machines
  5604. (yes, you can debug applications over the phone).  The following example
  5605. sets the BAUD rate to 2400 using the DOS or OS/2 "MODE" command.  For QNX,
  5606. use the appropriate "stty" command.
  5607.  
  5608. Example:
  5609.   Task    machine: mode com2:2400
  5610.   Task    machine: serserv 2.0
  5611.   Debug machine: mode com1:2400
  5612.   Debug machine: wvideo -trap=ser;1.0 hello
  5613.  
  5614. In the above example, the rate at which the two machines can communicate is
  5615. 2400 BAUD (since it is the specified externally using the DOS or OS/2 "MODE"
  5616. command).
  5617.  
  5618. When debugging over the serial port, the following files are required on the
  5619. task machine:
  5620.  
  5621.   1. one of the following serial servers:
  5622.  
  5623.     DOS, OS/2  SERSERV.EXE
  5624.     NetWare    SERSERV.NLM
  5625.     QNX        serserv
  5626.  
  5627.   2. one of the following sets of files:
  5628.  
  5629.     DOS        STD.TRP
  5630.     OS/2 1.x   STD16.DLL
  5631.     OS/2 2.x   STD32.DLL and OS2V2HLP.EXE
  5632.     QNX        std.trp
  5633.     ERGO       ECS.TRP and OS386.EXE
  5634.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  5635.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  5636.  
  5637.   3. the executable file to be debugged, and
  5638.  
  5639.   4. any data files required by the executable.
  5640.  
  5641. The following files are required on the debugger machine:
  5642.  
  5643.   1. the WATCOM debugger
  5644.  
  5645.     DOS, OS/2  WVIDEO.EXE
  5646.     QNX        wvideo
  5647.  
  5648.   2. one of the following trap files:
  5649.  
  5650.     DOS        SER.TRP
  5651.     OS/2       SER.DLL
  5652.     QNX        ser.trp
  5653.  
  5654. The following is a sequence of commands that one might issue to debug an
  5655. application remotely over the serial port:
  5656.  
  5657.   Task    machine: serserv 2
  5658.   Debug machine: wvideo -trap=ser;1 bug
  5659.   Debug machine: VIDEO commands such as "go".
  5660.   Task    machine: Type any keyboard input that is required
  5661.   Debug machine: quit
  5662.   Task    machine: q
  5663.  
  5664. In the example, serial port 2 is used on the task machine and serial port 1
  5665. is used on the debugger machine.  An appropriately-wired cable must run
  5666. between serial port 2 of the task machine and serial port 1 of the debugger
  5667. machine.  Messages will appear on both the task and debugger machines
  5668. indicating the BAUD rate at which the two machines are communicating.
  5669.  
  5670. The final "q" typed on the keyboard of the task machine is used to terminate
  5671. the server.  If this is not done, the server returns to its start-up state
  5672. and you could rerun VIDEO again for further debugging.
  5673.  
  5674.  
  5675.  
  5676. Remote Debugging Over the Parallel Port
  5677. ═══════════════════════════════════════
  5678. Debugging over the parallel port is significantly faster than the serial
  5679. port.  Remote debugging over the parallel port requires that a server task
  5680. be run on the task machine before VIDEO is started on the debugger machine.
  5681. This is required since VIDEO will begin to communicate immediately with the
  5682. task machine via this special server program.
  5683.  
  5684. The wiring required for parallel communications is described under the topic
  5685. entitled "WIRING" in the section entitled "Parallel Port Wiring
  5686. Considerations".
  5687.  
  5688. For DOS and OS/2, the formal parallel port debug server command line syntax
  5689. is shown below.
  5690.  
  5691. ┌──────────────────────────────────────────────────────────────────────────┐
  5692. │ PARSERV [/TRap=trap_file[;trap_parm]] [port_number]               │
  5693. └──────────────────────────────────────────────────────────────────────────┘
  5694.  
  5695. For Microsoft Windows, the formal parallel port debug server command line
  5696. syntax is shown below.
  5697.  
  5698. ┌──────────────────────────────────────────────────────────────────────────┐
  5699. │ PARSERVW [port_number]                           │
  5700. └──────────────────────────────────────────────────────────────────────────┘
  5701.  
  5702. For NetWare 386, the formal parallel port debug server command line syntax
  5703. is shown below.
  5704.  
  5705. ┌──────────────────────────────────────────────────────────────────────────┐
  5706. │ LOAD PARSERV [port_number]                           │
  5707. └──────────────────────────────────────────────────────────────────────────┘
  5708.  
  5709. For QNX, the formal parallel port debug server command line syntax is shown
  5710. below.
  5711.  
  5712. ┌──────────────────────────────────────────────────────────────────────────┐
  5713. │ parserv [-TRap=trap_file[;trap_parm]] [port_number]               │
  5714. └──────────────────────────────────────────────────────────────────────────┘
  5715.  
  5716. The "port_number" for the parallel server is the parallel port number
  5717. (between 1 and 3) that the server should use to communicate with VIDEO
  5718. running on the debugger machine.  The default port number is 1.
  5719.  
  5720. Under DOS, MS Windows, OS/2 and NetWare 386, these numbers correspond to the
  5721. device number used when specifying the parallel printer device "LPTx" (as in
  5722. "LPT1", "LPT2", etc.).
  5723.  
  5724. Under QNX, these numbers correspond to the parallel port number used when
  5725. specifying the parallel port (as in "/dev/par1", "/dev/par2", etc.).
  5726.  
  5727. When debugging over the parallel port, the following files are required on
  5728. the task machine:
  5729.  
  5730.   1. one of the following parallel servers:
  5731.  
  5732.     DOS, OS/2  PARSERV.EXE
  5733.     MS Windows PARSERVW.EXE
  5734.     NetWare    PARSERV.NLM
  5735.     QNX        parserv
  5736.  
  5737.   2. one of the following sets of files:
  5738.  
  5739.     DOS        STD.TRP
  5740.     MS Windows STD.DLL and WINDEBUG.DLL
  5741.     OS/2 1.x   STD16.DLL
  5742.     OS/2 2.x   STD32.DLL and OS2V2HLP.EXE
  5743.     QNX        std.trp
  5744.     ERGO       ECS.TRP and OS386.EXE
  5745.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  5746.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  5747.  
  5748.   3. the executable file to be debugged, and
  5749.  
  5750.   4. any data files required by the executable.
  5751.  
  5752. The following files are required on the debugger machine:
  5753.  
  5754.   1. the WATCOM debugger
  5755.  
  5756.     DOS, OS/2  WVIDEO.EXE
  5757.     QNX        wvideo
  5758.  
  5759.   2. one of the following trap files:
  5760.  
  5761.     DOS        PAR.TRP
  5762.     OS/2       PAR.DLL
  5763.     QNX        par.trp
  5764.  
  5765. The following is a sequence of commands that one might issue to debug an
  5766. application remotely over the parallel port:
  5767.  
  5768.   Task    machine: parserv 1
  5769.   Debug machine: wvideo -trap=par;2 bug
  5770.   Debug machine: VIDEO commands such as "go".
  5771.   Task    machine: Type any keyboard input that is required
  5772.   Debug machine: quit
  5773.   Task    machine: q
  5774.  
  5775. In the example, parallel port 1 is used on the task machine and parallel
  5776. port 2 is used on the debugger machine.  An appropriately-wired cable must
  5777. run between parallel port 1 of the task machine and parallel port 2 of the
  5778. debugger machine.
  5779.  
  5780. The final "q" typed on the keyboard of the task machine is used to terminate
  5781. the server.  If this is not done, the server returns to its start-up state
  5782. and you could rerun VIDEO again for further debugging.
  5783.  
  5784.  
  5785.  
  5786. Remote Debugging Over the Novell "NetWare" Network (DOS, OS/2 Only)
  5787. ═══════════════════════════════════════════════════════════════════
  5788. Remote debugging over the Novell "NetWare" network requires the NetWare
  5789. shell.    The Sequenced Packet Exchange (SPX) must be loaded first and the
  5790. server task must be run on the task machine before VIDEO is started on the
  5791. debugger machine.  This is required since VIDEO will begin to communicate
  5792. immediately with the task machine via this special server program.
  5793.  
  5794. For DOS and OS/2, the formal NetWare debug server command line syntax is
  5795. shown below.
  5796.  
  5797. ┌──────────────────────────────────────────────────────────────────────────┐
  5798. │ NOVSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  5799. └──────────────────────────────────────────────────────────────────────────┘
  5800.  
  5801. For NetWare 386, the formal NetWare debug server command line syntax is
  5802. shown below.
  5803.  
  5804. ┌──────────────────────────────────────────────────────────────────────────┐
  5805. │ LOAD NOVSERV [server_name]                           │
  5806. └──────────────────────────────────────────────────────────────────────────┘
  5807.  
  5808. The "server_name" is case insensitive and it must be unique (you will be
  5809. notified if it is not unique).    The name is restricted to less than 48
  5810. characters.  It cannot contain the following special characters:
  5811.  
  5812.   / \ : ; . , * ? + -
  5813.  
  5814. Any invalid characters are removed and any excess characters are dropped
  5815. from the name.    The "server_name" uniquely identifies the server to VIDEO
  5816. running on the debugger machine.  The default "server_name" is "NovLink".
  5817.  
  5818.  
  5819. When debugging over the "NetWare" network, the following files are required
  5820. on the task machine:
  5821.  
  5822.   1. one of the following NetWare servers:
  5823.  
  5824.     DOS, OS/2  NOVSERV.EXE
  5825.     NetWare    NOVSERV.NLM
  5826.  
  5827.   2. one of the following sets of files:
  5828.  
  5829.     DOS        STD.TRP
  5830.     OS/2 1.x   STD16.DLL
  5831.     OS/2 2.x   STD32.DLL and OS2V2HLP.EXE
  5832.     ERGO       ECS.TRP and OS386.EXE
  5833.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  5834.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  5835.  
  5836.   3. the executable file to be debugged, and
  5837.  
  5838.   4. any data files required by the executable.
  5839.  
  5840. The following files are required on the debugger machine:
  5841.  
  5842.   1. the WATCOM debugger
  5843.  
  5844.     DOS, OS/2  WVIDEO.EXE
  5845.  
  5846.   2. one of the following trap files:
  5847.  
  5848.     DOS        NOV.TRP
  5849.     OS/2       NOV.DLL
  5850.  
  5851. The following is a sequence of commands that one might issue to debug an
  5852. application remotely over the "NetWare" network:
  5853.  
  5854.   Task    machine: novserv rmt_dbg
  5855.   Debug machine: wvideo -trap=nov;rmt_dbg bug
  5856.   Debug machine: VIDEO commands such as "go".
  5857.   Task    machine: Type any keyboard input that is required
  5858.   Debug machine: quit
  5859.   Task    machine: q
  5860.  
  5861. In the example, server name "RMT_DBG" is used on the task machine so server
  5862. name "RMT_DBG" is also used on the debugger machine.
  5863.  
  5864. The final "q" typed on the keyboard of the task machine is used to terminate
  5865. the server.  If this is not done, the server returns to its start-up state
  5866. and you could rerun VIDEO again for further debugging.
  5867.  
  5868.  
  5869.  
  5870. Remote Debugging Using NetBIOS Support (DOS, OS/2 Only)
  5871. ═══════════════════════════════════════════════════════
  5872. Debugging with the NetBIOS network programming interface can also be done.
  5873. Remote debugging with this network protocol requires that a server task be
  5874. run on the task machine before VIDEO is started on the debugger machine.
  5875. This is required since VIDEO will begin to communicate immediately with the
  5876. task machine via this special server program.
  5877.  
  5878. For DOS and OS/2, the formal NetBIOS debug server command line syntax is
  5879. shown below.
  5880.  
  5881. ┌──────────────────────────────────────────────────────────────────────────┐
  5882. │ NETSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  5883. └──────────────────────────────────────────────────────────────────────────┘
  5884.  
  5885. For Microsoft Windows, the formal NetBIOS debug server command line syntax
  5886. is shown below.
  5887.  
  5888. ┌──────────────────────────────────────────────────────────────────────────┐
  5889. │ NETSERVW [server_name]                           │
  5890. └──────────────────────────────────────────────────────────────────────────┘
  5891.  
  5892. The "server_name" is case sensitive and it must be unique (you will be
  5893. notified if it is not unique).    The name may be up to 15 alphanumeric
  5894. characters.  The "server_name" uniquely identifies the server to VIDEO
  5895. running on the debugger machine.  The default "server_name" is "NetLink".
  5896.  
  5897.  
  5898. When debugging with the NetBIOS network programming interface, the following
  5899. files are required on the task machine:
  5900.  
  5901.   1. the NetBIOS server:
  5902.  
  5903.     DOS, OS/2  NETSERV.EXE
  5904.     MS Windows NETSERVW.EXE
  5905.  
  5906.   2. one of the following sets of files:
  5907.  
  5908.     DOS        STD.TRP
  5909.     MS Windows STD.DLL
  5910.     OS/2 1.x   STD16.DLL
  5911.     OS/2 2.x   STD32.DLL and OS2V2HLP.EXE
  5912.     ERGO       ECS.TRP and OS386.EXE
  5913.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  5914.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  5915.  
  5916.   3. the executable file to be debugged, and
  5917.  
  5918.   4. any data files required by the executable.
  5919.  
  5920. The following files are required on the debugger machine:
  5921.  
  5922.   1. the WATCOM debugger
  5923.  
  5924.     DOS, OS/2  WVIDEO.EXE
  5925.  
  5926.   2. one of the following trap files:
  5927.  
  5928.     DOS        NET.TRP
  5929.     OS/2       NET.DLL
  5930.  
  5931. The following is a sequence of commands that one might issue to debug an
  5932. application remotely with the NetBIOS network programming interface:
  5933.  
  5934.   Task    machine: netserv rmt_dbg
  5935.   Debug machine: wvideo -trap=net;rmt_dbg bug
  5936.   Debug machine: VIDEO commands such as "go".
  5937.   Task    machine: Type any keyboard input that is required
  5938.   Debug machine: quit
  5939.   Task    machine: q
  5940.  
  5941. In the example, server name "rmt_dbg" is used on the task machine so server
  5942. name "rmt_dbg" is also used on the debugger machine.
  5943.  
  5944. The final "q" typed on the keyboard of the task machine is used to terminate
  5945. the server.  If this is not done, the server returns to its start-up state
  5946. and you could rerun VIDEO again for further debugging.
  5947.  
  5948.  
  5949.  
  5950. Remote Debugging Using DESQview (DOS Only)
  5951. ══════════════════════════════════════════
  5952. Debugging with DESQview windows can also be done.  Remote debugging with
  5953. DESQview requires that a server task be run in a window (the "task" window)
  5954. before VIDEO is started in another window (the "debugger" window).  This is
  5955. required since VIDEO will begin to communicate immediately with the task
  5956. window via this special server program.
  5957.  
  5958. For DOS, the formal DESQview debug server command line syntax is shown
  5959. below.
  5960.  
  5961. ┌──────────────────────────────────────────────────────────────────────────┐
  5962. │ DQVSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  5963. └──────────────────────────────────────────────────────────────────────────┘
  5964.  
  5965. The "server_name" is case insensitive and it must be unique (you will be
  5966. notified if it is not unique).    The name may be any string of alphanumeric
  5967. characters.  The "server_name" uniquely identifies the server to VIDEO
  5968. running in the debugger window.  The default "server_name" is "WATCOM
  5969. Server".
  5970.  
  5971. When debugging with DESQview windows, the following files are required for
  5972. the task window:
  5973.  
  5974.   1. the DESQview server, DQVSERV.EXE,
  5975.  
  5976.   2. one of the following sets of files:
  5977.  
  5978.     DOS        STD.TRP
  5979.     ERGO       ECS.TRP and OS386.EXE
  5980.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  5981.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  5982.  
  5983.   3. the executable file to be debugged, and
  5984.  
  5985.   4. any data files required by the executable.
  5986.  
  5987. The following files are required for the debugger window:
  5988.  
  5989.   1. the WATCOM debugger, WVIDEO.EXE, and
  5990.  
  5991.   2. the trap file, DQV.TRP.
  5992.  
  5993. The following is a sequence of commands that one might issue to debug an
  5994. application with DESQview windows:
  5995.  
  5996.   Task    window: dqvserv rmt_dbg
  5997.   Debug window: wvideo -trap=dqv;rmt_dbg bug
  5998.   Debug window: VIDEO commands such as "go".
  5999.   Task    window: Type any keyboard input that is required
  6000.   Debug window: quit
  6001.   Task    window: q
  6002.  
  6003. In the example, server name "rmt_dbg" is used in the task window so server
  6004. name "rmt_dbg" is also used in the debugger window.
  6005.  
  6006. The final "q" typed on the keyboard when the task window is active
  6007. terminates the server.    If this is not done, the server returns to its
  6008. start-up state and you could rerun VIDEO again for further debugging.
  6009.  
  6010.  
  6011.  
  6012. Remote Debugging Using Microsoft Windows DOS Boxes
  6013. ══════════════════════════════════════════════════
  6014. Debugging with a Microsoft Windows DOS box can also be done.  Remote
  6015. debugging with Windows requires that a server task be run in a DOS box (the
  6016. "task" window) before VIDEO is started in another DOS box (the "debugger"
  6017. window).  This is required since VIDEO will begin to communicate immediately
  6018. with the task window via this special server program.
  6019.  
  6020. Microsoft Windows must be started in standard or enhanced mode.  You must
  6021. include the "device" specification listed below in the [386Enh] section of
  6022. your Windows "SYSTEM.INI" file.
  6023.  
  6024.   DEVICE=[d:]\WATCOM\BINW\WDEBUG.386
  6025.  
  6026. This device driver supports debugging of both 16-bit and 32-bit
  6027. applications.
  6028.  
  6029. The formal Microsoft Windows DOS box debug server command line syntax is
  6030. shown below.
  6031.  
  6032. ┌──────────────────────────────────────────────────────────────────────────┐
  6033. │ WINSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  6034. └──────────────────────────────────────────────────────────────────────────┘
  6035.  
  6036. The "server_name" is case insensitive and it must be unique (you will be
  6037. notified if it is not unique).    The name may be any string of alphanumeric
  6038. characters.  The "server_name" uniquely identifies the server to VIDEO
  6039. running in the debugger window.  The default "server_name" is "WinLink".
  6040.  
  6041. When debugging with Windows DOS boxes, the following files are required for
  6042. the task window:
  6043.  
  6044.   1. the Windows server, WINSERV.EXE,
  6045.  
  6046.   2. one of the following sets of files:
  6047.  
  6048.     DOS        STD.TRP
  6049.     ERGO       ECS.TRP and OS386.EXE
  6050.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  6051.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  6052.  
  6053.   3. the executable file to be debugged, and
  6054.  
  6055.   4. any data files required by the executable.
  6056.  
  6057.  
  6058. The following files are required for the debugger window:
  6059.  
  6060.   1. the WATCOM debugger, WVIDEO.EXE, and
  6061.  
  6062.   2. the trap file, WIN.TRP.
  6063.  
  6064. The following is a sequence of commands that one might issue to debug an
  6065. application with Windows DOS boxes:
  6066.  
  6067.   Task    window: winserv rmt_dbg
  6068.   Debug window: wvideo -trap=win;rmt_dbg bug
  6069.   Debug window: VIDEO commands such as "go".
  6070.   Task    window: Type any keyboard input that is required
  6071.   Debug window: quit
  6072.   Task    window: q
  6073.  
  6074. In the example, server name "rmt_dbg" is used in the task window so server
  6075. name "rmt_dbg" is also used in the debugger window.
  6076.  
  6077. The final "q" typed on the keyboard when the task window is active
  6078. terminates the server.    If this is not done, the server returns to its
  6079. start-up state and you could rerun VIDEO again for further debugging.
  6080.  
  6081.  
  6082.  
  6083. Specifying Files on Task and Debugger Machines
  6084. ══════════════════════════════════════════════
  6085. When debugging an application with the remote debugging facility, a method
  6086. for identifying files on either of the task and debugger machines is
  6087. required.  In order to identify files on either the task or debugger
  6088. machine, two special prefixes are supported by the debugger:  "@L" and "@R".
  6089.  
  6090. The "@L" or "@l" prefix is used to indicate that the file resides on the
  6091. local debugger machine.
  6092.  
  6093. DOS, OS/2, NetWare
  6094.        @L[d:][path]filename[.ext]
  6095.  
  6096.        When "[path]" is not specified, the current directory of the
  6097.        specified drive of the local machine is assumed.  When "[d:]" is
  6098.        not specified, the current drive of the local machine is assumed.
  6099.  
  6100.        Example:
  6101.          view @loutput.log
  6102.          invoke @l\cmds\setup.dbg
  6103.          invoke @ld:\cmds\setup.dbg
  6104.          log @llpt2
  6105.  
  6106. QNX       @L[path]filename
  6107.  
  6108.        When "[path]" is not specified, the current working directory of
  6109.        the local machine is assumed.
  6110.  
  6111.        Example:
  6112.          view @loutput.log
  6113.          invoke @l/usr/fred/setup.dbg
  6114.          invoke @//7/usr/fred/setup.dbg
  6115.          log @l/dev/par2
  6116.  
  6117. The "@R" or "@r" prefix is used to indicate that the file resides on the
  6118. remote task machine.
  6119.  
  6120. DOS, OS/2, NetWare
  6121.        @R[d:][path]filename[.ext]
  6122.  
  6123.        When "[path]" is not specified, the current directory of the
  6124.        specified drive of the remote machine is assumed.  When "[d:]" is
  6125.        not specified, the current drive of the remote machine is
  6126.        assumed.
  6127.  
  6128.        Example:
  6129.          view @rmyappl.dat
  6130.          view @r\programs\src\uilib.c
  6131.          view @rd:\programs\exe\myappl.lnk
  6132.          log @rlpt1
  6133.  
  6134. QNX       @R[path]filename
  6135.  
  6136.        When "[path]" is not specified, the current working directory of
  6137.        the remote machine is assumed.
  6138.  
  6139.        Example:
  6140.          view @rmyappl.dat
  6141.          view @r/programs/src/uilib.c
  6142.          view @r//7/programs/exe/myappl.lnk
  6143.          log @r/dev/par1
  6144.  
  6145. Thus a file may be identified to the debugger in three different ways:
  6146.  
  6147. DOS, OS/2, NetWare
  6148.        [d:][path]filename[.ext]
  6149.  
  6150.        @L[d:][path]filename[.ext]
  6151.  
  6152.        @R[d:][path]filename[.ext]
  6153.  
  6154. QNX       [path]filename
  6155.  
  6156.        @L[path]filename
  6157.  
  6158.        @R[path]filename
  6159.  
  6160. A file of the first form resides on the debugger machine unless the
  6161. "REMotefiles" option has been specified, in which case, it resides on the
  6162. task machine.  A file of the second form always resides on the debugger
  6163. machine.  A file of the third form always resides on the task machine.
  6164.  
  6165. ┌────────────────────────────────────────────────────────────────────────────┐
  6166. │ Note:  The special drive prefixes "@L" and "@R" cannot be used in your own │
  6167. │ application to reference files on two different machines.  These prefixes  │
  6168. │ are recognized by VIDEO and the RFX utility only.  Should the situation    │
  6169. │ arise where one of your filenames begins with the same prefix ("@L", "@l", │
  6170. │ "@R" or "@r") then "@@" can be used.    For example, if your wish to refer   │
  6171. │ to the file on disk called "@link@" then you could specify "@@link@".      │
  6172. │ Note that ".\@link@" (DOS, OS/2, NetWare) or "./@link@" (QNX) would also   │
  6173. │ suffice.                                     │
  6174. └────────────────────────────────────────────────────────────────────────────┘
  6175.  
  6176.  
  6177.  
  6178. Interrupting an Executing Program on the Task Machine
  6179. ═════════════════════════════════════════════════════
  6180. Once a program has been loaded by VIDEO, its execution can be started by the
  6181. Go command (this command is described under the topic entitled "GO").  As is
  6182. sometimes the case during the development phase, a program may execute
  6183. endlessly.
  6184.  
  6185.  
  6186. Interrupting an Executing Program Under DOS
  6187. ───────────────────────────────────────────
  6188. When an application is executing under DOS on the task machine, it may be
  6189. interrupted by pressing one of the Print Screen (PrtSc) or System Request
  6190. (SysRq) keys on the task machine (the PC that is running the application).
  6191. On some keyboards, the Shift key must also be pressed to obtain the Print
  6192. Screen function.
  6193.  
  6194. The Ctrl/Break key combination may be pressed on the keyboard of the
  6195. debugger machine to interrupt execution of VIDEO commands.
  6196.  
  6197.  
  6198.  
  6199. Interrupting an Executing Program Under OS/2
  6200. ────────────────────────────────────────────
  6201. When an application is executing under OS/2 on the task machine, it may be
  6202. interrupted by pressing the Ctrl/Break key combination in the remote server
  6203. session (the session that is running the server program).
  6204.  
  6205. The Ctrl/Break key combination may be pressed in the VIDEO session of the
  6206. debugger machine to interrupt execution of VIDEO commands.
  6207.  
  6208.  
  6209.  
  6210. Interrupting an Executing Program Under QNX
  6211. ───────────────────────────────────────────
  6212. When an application is executing under QNX on the task machine, it may be
  6213. interrupted by pressing Ctrl/Break at the application's virtual console
  6214. (provided that the application has not taken over the SIGINT signal).  If
  6215. the application has taken over the SIGINT signal then the following
  6216. technique for interrupting program execution may be used.  Any signal that
  6217. will kill the executing application program (e.g., SIGKILL, SIGSEGV) may be
  6218. issued at another virtual console.  You must obtain the process-id of the
  6219. application program and then issue a "kill" command.
  6220.  
  6221. Example:
  6222.   % kill -kill 1423
  6223.  
  6224. VIDEO will print a message in the "Dialogue" window indicating that the
  6225. program's execution has been interrupted.  Execution can be resumed with the
  6226. Go command.
  6227.  
  6228. The Ctrl/Break key combination may be pressed at the debugger's virtual
  6229. console to interrupt execution of VIDEO commands.
  6230. ::::REMOTE_WIN3
  6231. Remote Debugging of MS Windows Applications
  6232. ═══════════════════════════════════════════
  6233.  
  6234. Many of the concepts of remote debugging are presented in the
  6235. "REMOTE_DEBUGGING" help topic.    You may wish to refer to this topic for more
  6236. detailed explanations.
  6237.  
  6238. The personal computer that is used to run the Windows application is called
  6239. the "task machine".  Microsoft Windows must be installed on this PC.  One of
  6240. the VIDEO server tasks, described below, must be present on the task machine
  6241. so that it can be started from Windows.  The application that is to be
  6242. debugged must be accessible from the task machine so that it can be loaded
  6243. by the server task running under Windows.
  6244.  
  6245. The other personal computer, called the "debugger machine", is used to run
  6246. the debugger.  It is not necessary for Windows to be installed on this
  6247. machine.  This system could be running DOS, OS/2 or QNX.  The application's
  6248. source files should be accessible from the debugger machine so that VIDEO
  6249. can display source lines for a particular module.
  6250.  
  6251. Let us assume that PC #1 is your primary development machine.  It contains
  6252. your application, its data files, its source files, and the programs that
  6253. you have been using to develop your application (editor, compiler, linker,
  6254. debugger, etc.).  It also contains an installed copy of Microsoft Windows.
  6255. Let us assume that PC #2 is a spare machine that is available for your use.
  6256. Since two computer systems are involved, there are two possible scenarios.
  6257.  
  6258.   1. You could copy the application and any required data files to PC #2.
  6259.     You would also have to make sure that Microsoft Windows is installed on
  6260.     this machine.  In this scenario, your primary development machine (PC
  6261.     #1) will be used to run the debugger and your spare machine will be used
  6262.     to run your Windows application.  Thus, the source files for your
  6263.     application are present on the debugger machine.
  6264.  
  6265.   2. You could copy the debugger over to PC #2.  In this scenario, your
  6266.     primary development machine (PC #1) will be used to run your Windows
  6267.     application.  Unless you copy all of the application's source files to
  6268.     PC #2, the debugger will not have access to them.  In this case, you can
  6269.     use the VIDEO "REMotefiles" option to inform the debugger that source
  6270.     files are to be obtained over the communications link from the task
  6271.     machine (PC #1).  Another advantage to the "REMotefiles" option is that
  6272.     the debugger will also locate debugger command files, by default, on the
  6273.     task machine.  If this option is not specified then the debugger command
  6274.     files must also be copied over to the debugger machine (PC #2).
  6275.  
  6276. The decision as to which machine you should be using for the task and which
  6277. for the debugger is up to you.    In certain cases, it may depend on the
  6278. amount of available memory on each machine or the speed of their respective
  6279. processors.  If a large amount of memory is required for your application
  6280. then it makes sense that the task machine be the one with the most memory.
  6281. If application execution speed is important then it makes sense that the
  6282. task machine be the faster of the two.
  6283.  
  6284.  
  6285. Remote Debugging with Microsoft Windows
  6286. ═══════════════════════════════════════
  6287. To use the remote debugging capabilities of VIDEO, Microsoft Windows must be
  6288. started in standard or enhanced mode.  When debugging 32-bit applications,
  6289. you must include the "device" specification listed below in the [386Enh]
  6290. section of your Windows "SYSTEM.INI" file.
  6291.  
  6292.   DEVICE=[d:]\WATCOM\BINW\WDEBUG.386
  6293.  
  6294. This device driver can be used when debugging 16-bit applications also.
  6295.  
  6296. You must include the Windows SDK file "WINDEBUG.DLL" in your path.  This
  6297. file is included in the WATCOM software package.
  6298.  
  6299.  
  6300.  
  6301. VIDEO Communications Servers for Windows
  6302. ════════════════════════════════════════
  6303. Version 3.0 or later of Microsoft Windows is required to support debugging
  6304. of Windows applications.  A server task must be run on the task machine
  6305. before VIDEO is started on the debugger machine.  There are a number of
  6306. servers provided for use with VIDEO under Windows.
  6307.  
  6308. PARSERVW.EXE
  6309.        This program supports Windows debugging over the parallel port.
  6310.  
  6311. NETSERVW.EXE
  6312.        This program supports Windows debugging using NetBIOS support.
  6313.  
  6314. These programs are described in subsequent sections.
  6315.  
  6316. In the following diagram, we illustrate the use of VIDEO running on a second
  6317. computer system to debug an application running under Windows on the first
  6318. computer system.  In the example, parallel communications are used.
  6319.  
  6320.     PC #1              PC #2
  6321.   ┌────────────────┐        ┌────────────────┐
  6322.   │  Task Machine  │        │Debugger Machine│
  6323.   │    Windows       │        │       DOS         │
  6324.   │           │        │             │
  6325.   │    PARSERVW<───│────┐   │      WVIDEO     │
  6326.   │      │       │    │   │        │         │
  6327.   │      V       │    │   │        V         │
  6328.   │  trap handler  │    └───│──>trap handler │
  6329.   │    STD.DLL       │        │     PAR.TRP     │
  6330.   └────────────────┘        └────────────────┘
  6331.  
  6332. Figure 29. MS Windows Debugging using Two Computer Systems
  6333.  
  6334. Notes:
  6335.  
  6336.   1. You should note the following regarding keyboard input.  Anything that
  6337.     is typed to the debugger itself must be typed on the debugger machine.
  6338.     As well, anything that is typed to the application being debugged must
  6339.     be typed on the task machine.
  6340.  
  6341.   2. The same is true of screen output.  All debugger output comes out on
  6342.     the debugger machine, while all program output occurs on the task
  6343.     machine.
  6344.  
  6345. Select the window in which you have installed the VIDEO Debug Server
  6346. programs.  Icons are presented for each of the debug servers.  Double-click
  6347. on the one that you wish to use.
  6348.  
  6349.  
  6350.  
  6351. The Parallel Port Server
  6352. ════════════════════════
  6353. The parallel port server task must be started on the task machine before
  6354. VIDEO is started on the debugger machine.  This is required since VIDEO will
  6355. begin to communicate immediately with the task machine via this special
  6356. server program.
  6357.  
  6358. The wiring required for parallel communications is described under the topic
  6359. entitled "WIRING" in the section entitled "Parallel Port Wiring
  6360. Considerations".
  6361.  
  6362. The parallel server task can be told the number (1, 2, 3) of the parallel
  6363. port to use.  The default port number is 1.
  6364.  
  6365. These numbers correspond to the device number used when specifying the
  6366. parallel printer device "LPTx" (as in "LPT1", "LPT2", etc.).
  6367.  
  6368. When debugging over the parallel port, the following files are required on
  6369. the task machine:
  6370.  
  6371.   1. the parallel port server task, "PARSERVW.EXE",
  6372.  
  6373.   2. the interface to Microsoft Windows, "STD.DLL",
  6374.  
  6375.   3. the Microsoft SDK file, "WINDEBUG.DLL",
  6376.  
  6377.   4. the device driver, "WDEBUG.386",
  6378.  
  6379.   5. the executable file to be debugged, and
  6380.  
  6381.   6. any data files required by the executable.
  6382.  
  6383. The following files are required on the debugger machine:
  6384.  
  6385.   1. the WATCOM debugger
  6386.  
  6387.     DOS, OS/2  WVIDEO.EXE
  6388.     QNX        wvideo
  6389.  
  6390.   2. one of the following trap files:
  6391.  
  6392.     DOS        PAR.TRP
  6393.     OS/2       PAR.DLL
  6394.     QNX        par.trp
  6395.  
  6396.  
  6397.  
  6398. The NetBIOS Server (DOS, OS/2 Only)
  6399. ═══════════════════════════════════
  6400. Debugging with the NetBIOS network programming interface can also be done.
  6401. Remote debugging with this network protocol requires that the NetBIOS server
  6402. task be run on the task machine before VIDEO is started on the debugger
  6403. machine.  This is required since VIDEO will begin to communicate immediately
  6404. with the task machine via this special server program.
  6405.  
  6406. A "server name" can be specified.  The server name is case sensitive and it
  6407. must be unique (you will be notified if it is not unique).  The name may be
  6408. up to 15 alphanumeric characters.  The server name uniquely identifies the
  6409. server to VIDEO running on the debugger machine.  The default server name is
  6410. "NetLink".
  6411.  
  6412. When debugging with the NetBIOS network programming interface, the following
  6413. files are required on the task machine:
  6414.  
  6415.   1. the NetBIOS server task, "NETSERVW.EXE",
  6416.  
  6417.   2. the interface to Microsoft Windows, "STD.DLL",
  6418.  
  6419.   3. the Microsoft SDK file, "WINDEBUG.DLL",
  6420.  
  6421.   4. the device driver, "WDEBUG.386",
  6422.  
  6423.   5. the executable file to be debugged, and
  6424.  
  6425.   6. any data files required by the executable.
  6426.  
  6427. The following files are required on the debugger machine:
  6428.  
  6429.   1. the WATCOM debugger
  6430.  
  6431.     DOS, OS/2  WVIDEO.EXE
  6432.  
  6433.   2. one of the following trap files:
  6434.  
  6435.     DOS        NET.TRP
  6436.     OS/2       NET.DLL
  6437. ::::RFX
  6438. Remote File Operations (DOS, OS/2 Only)
  6439. ═══════════════════════════════════════
  6440.  
  6441. The Remote File eXchange program, RFX, may be used to manipulate files on a
  6442. personal computer which is connected to your personal computer using one of
  6443. the connection strategies described later on under this topic.    The types of
  6444. file operations that are supported on both local and remote machines
  6445. include:
  6446.  
  6447.   1. directory creation, listing and removal,
  6448.  
  6449.   2. setting of current drive and directory, and
  6450.  
  6451.   3. file display, renaming, erasure, and copying (including PC to PC file
  6452.     transfers).
  6453.  
  6454. The PC to PC links that are currently supported are:
  6455.  
  6456.   1. serial port to serial port,
  6457.  
  6458.   2. parallel port to parallel port,
  6459.  
  6460.   3. the Novell "NetWare" network, and
  6461.  
  6462.   4. the NetBIOS network programming interface.
  6463.  
  6464. To run the remote file operations utility, RFX, the following syntax is
  6465. used.
  6466.  
  6467. ┌──────────────────────────────────────────────────────────────────────────┐
  6468. │ RFX trap_file[;trap_parm] [rfx_cmd]                       │
  6469. └──────────────────────────────────────────────────────────────────────────┘
  6470.  
  6471. The name of a trap file must be specified when running RFX.  These files
  6472. handle the machine-to-machine communication required for remote file
  6473. operations.
  6474.  
  6475. For DOS, the file extension defaults to ".TRP".  The DOS PATH environment
  6476. variable must contain the path of the trap files.  Trap files are usually
  6477. located in the "BIN" sub-directory of the directory that VIDEO is installed
  6478. in.
  6479.  
  6480. For OS/2, the file extension defaults to ".DLL".  The OS/2 LIBPATH directive
  6481. in the "CONFIG.SYS" file must be used to identify the location of the "DLL"
  6482. trap files.  Trap files are usually located in the "BINP\DLL" sub-directory
  6483. of the directory that VIDEO is installed in.
  6484.  
  6485. Trap files are described in the next section.
  6486.  
  6487. An optional command rfx_cmd may be specified.  RFX commands are described in
  6488. the sections following "RFX Commands".    When RFX is run without specifying a
  6489. command then RFX may be used in an interactive mode.  A prompt will appear
  6490. that resembles your DOS or OS/2 prompt.  Commands will be processed by RFX
  6491. until the "EXIT" command is entered.
  6492.  
  6493.  
  6494.  
  6495. Trap Files
  6496. ══════════
  6497. The following trap files may be used with RFX to support machine-to-machine
  6498. communications.
  6499.  
  6500. STD.TRP, STD16.DLL, STD32.DLL
  6501.        Under DOS, if you do not specify a trap file, the default trap
  6502.        file "STD.TRP" will be loaded.  Under OS/2 1.x, if you do not
  6503.        specify a trap file, the default trap file "STD16.DLL" will be
  6504.        loaded.  Under OS/2 2.x, if you do not specify a trap file, the
  6505.        default trap file "STD32.DLL" will be loaded.  These interface
  6506.        modules support file operations on the local personal computer
  6507.        only.  No remote file operations are possible.  The optional
  6508.        "trap_parm" is ignored.
  6509.  
  6510.  
  6511. SER.TRP, SER.DLL
  6512.        This communications driver file supports remote file operations
  6513.        between two personal computers using the serial ports of the two
  6514.        machines.  If RFX is to run under DOS then "SER.TRP" must be
  6515.        used.  If RFX is to run under OS/2 then "SER.DLL" must be used.
  6516.        The serial port of the local machine is connected to the serial
  6517.        port of the remote machine.    The "trap_parm" value specifies the
  6518.        port number to use and an optional maximum BAUD rate (which is
  6519.        separated from the port number by a period).  The port number is
  6520.        1, 2, 3 or 4 (default is 1).  These numbers correspond to the
  6521.        device number used when specifying the serial device "COMx" (as
  6522.        in "COM1", "COM2", etc.).
  6523.  
  6524.        Under DOS, the maximum BAUD rate can be one of:
  6525.  
  6526.          115200
  6527.           57600
  6528.           38400
  6529.           19200
  6530.            9600
  6531.            4800
  6532.            2400
  6533.            1200
  6534.           0 (a special case)
  6535.  
  6536.        The default maximum BAUD rate is 115,200.
  6537.  
  6538.        Under OS/2, the maximum BAUD rate can be one of:
  6539.  
  6540.           19200
  6541.            9600
  6542.            4800
  6543.            2400
  6544.            1200
  6545.           0 (a special case)
  6546.  
  6547.        The default maximum BAUD rate is 19,200.
  6548.  
  6549.        Except for the special BAUD rate of 0, a minimum of two digits
  6550.        must be specified to identify the desired maximum BAUD rate.  The
  6551.        maximum BAUD rate is explained in the section "Remote File
  6552.        Operations Over the Serial Port".  In the following example, port
  6553.        2 and a maximum BAUD rate of 19,200 is specified.
  6554.  
  6555.        Example:
  6556.          /trap=ser;2.19
  6557.  
  6558. PAR.TRP, PAR.DLL
  6559.        This communications driver file supports remote file operations
  6560.        between two personal computers using the parallel ports of the
  6561.        two machines.  If RFX is to run under DOS then "PAR.TRP" must be
  6562.        used.  If RFX is to run under OS/2 then "PAR.DLL" must be used.
  6563.        The parallel port of the local machine is connected to the
  6564.        parallel port of the remote machine.  The port number to use is
  6565.        specified by "trap_parm".  The port number is 1, 2 or 3 (default
  6566.        is 1).  These numbers correspond to the device number used when
  6567.        specifying the printer device "LPTx" (as in "LPT1", "LPT2",
  6568.        etc.).
  6569.  
  6570. NOV.TRP, NOV.TRP
  6571.        This communications driver file supports remote file operations
  6572.        between two personal computers that are connected to the Novell
  6573.        "NetWare" network.  Version 2.0 or higher of NetWare must be
  6574.        used.  The server name to use is specified by "trap_parm".  The
  6575.        server name must match the name that you specified when starting
  6576.        the server on the "task" machine.  The notion of a "server" is
  6577.        explained in the section "Communications Servers".
  6578.  
  6579. NET.TRP, NET.DLL
  6580.        This communications driver file supports remote file operations
  6581.        between two personal computers using the NetBIOS network
  6582.        programming interface.  The server name to use is specified by
  6583.        "trap_parm".  The server name must match the name that you
  6584.        specified when starting the server on the remote machine.  The
  6585.        server name may consist of up to 15 alphanumeric characters.  The
  6586.        notion of a "server" is explained in the section "Communications
  6587.        Servers".
  6588.  
  6589.  
  6590.  
  6591. Communications Servers
  6592. ══════════════════════
  6593. The remote file manipulation facility requires that a server task be run on
  6594. the remote machine before RFX is started on the local machine.    There are
  6595. four such servers provided for use with RFX.
  6596.  
  6597. SERSERV.EXE This program supports remote file operations over the serial
  6598.        port.
  6599.  
  6600. PARSERV.EXE This program supports remote file operations over the parallel
  6601.        port.
  6602.  
  6603. NOVSERV.EXE This program supports remote file operations over the Novell
  6604.        "NetWare" network.
  6605.  
  6606. NETSERV.EXE This program supports remote file operations using NetBIOS
  6607.        support.
  6608.  
  6609. These programs are described in the following sections.
  6610.  
  6611.  
  6612.  
  6613. Remote File Operations Over the Serial Port
  6614. ═══════════════════════════════════════════
  6615. Remote file operations over the serial port require that a server task be
  6616. run on the remote machine before RFX is started on the local machine.  This
  6617. is required since RFX will immediately begin to communicate with the remote
  6618. machine via this special server program.
  6619.  
  6620. RFX and the server will automatically synchronize on a communications speed.
  6621. They may communicate at rates as high as 115,200 BAUD.    Since the BAUD rate,
  6622. parity, number of data bits and stop bits is automatically chosen, the DOS
  6623. or OS/2 "MODE" command need not be used.
  6624.  
  6625. For DOS or OS/2, the formal serial port server command line syntax is shown
  6626. below.
  6627.  
  6628. ┌──────────────────────────────────────────────────────────────────────────┐
  6629. │ SERSERV [/TRap=trap_file[;trap_parm]] [port_number][.max_baud]       │
  6630. └──────────────────────────────────────────────────────────────────────────┘
  6631.  
  6632. The "port_number" for the serial server is the serial port number (between 1
  6633. and 4) that the server should use to communicate with the RFX running on the
  6634. local machine.    The default port number is 1.  These numbers correspond to
  6635. the device number used when specifying a serial device "COMx" (as in "COM1",
  6636. "COM2", etc.).
  6637.  
  6638. The optional "max_baud" value specifies the maximum BAUD rate.    It is
  6639. separated from the port number by a period.  The maximum BAUD rate can be
  6640. one of:
  6641.  
  6642.   115200
  6643.    57600
  6644.    38400
  6645.    19200
  6646.     9600
  6647.     4800
  6648.     2400
  6649.     1200
  6650.        0 (a special case)
  6651.  
  6652. The default maximum BAUD rate is 115,200.  Except for the special BAUD rate
  6653. of 0, a minimum of two digits must be specified to identify the desired
  6654. maximum BAUD rate.  Specification of a maximum BAUD rate is useful when the
  6655. maximum rate at which the two machines can communicate effectively is known.
  6656. The server and RFX normally start at the fastest possible speed and work
  6657. downwards until an effective (error-free) rate is established.    Each trial
  6658. speed can require up to 5 seconds to test.  If the maximum rate is specified
  6659. ahead of time, this will help reduce the startup time.    The BAUD rate
  6660. actually selected will be the minimum of the maximum rates specified when
  6661. both the server and RFX are started and the rate at which the two can
  6662. effectively communicate.  An example may help to explain this.
  6663.  
  6664. Example:
  6665.   Remote machine: C>serserv 2.38400
  6666.   Local  machine: D>rfx ser;1.57600
  6667.  
  6668. In the above example, the maximum rate at which the two machines could
  6669. communicate is 38,400 BAUD (since it is the minimum of 38,400 and 57,600).
  6670. However, the actual rate selected for effective communications may be less
  6671. than this.
  6672.  
  6673. If 0 is specified for the maximum BAUD rate when both the server and RFX are
  6674. started, the process of searching for the maximum rate at which the two
  6675. machines can communicate is eliminated.  The BAUD rate for each side must be
  6676. established through other means (such as the DOS or OS/2 "MODE" command) and
  6677. the rates must be identical.  The parity, word length and number of stop
  6678. bits are selected by the server and RFX so you need not specify these
  6679. parameters.  The BAUD rate value 0 should be specified when modems are
  6680. employed between the two machines.
  6681.  
  6682. Example:
  6683.   Remote machine: C>mode com2:2400
  6684.   Remote machine: C>serserv 2.0
  6685.   Local  machine: D>mode com1:2400
  6686.   Local  machine: D>rfx ser;1.0
  6687.  
  6688. In the above example, the rate at which the two machines can communicate is
  6689. 2400 BAUD (since it is the specified externally using the DOS or OS/2 "MODE"
  6690. command).
  6691.  
  6692. The "TRap" option is only specified in special applications where more than
  6693. two personal computers are chained together in series.    "SERSERV" receives
  6694. requests over a serial port.  It can process these requests locally or pass
  6695. them on to a server running on another computer system.  By default,
  6696. requests will be handled locally by the "STD.TRP" file when DOS is running,
  6697. the "STD16.DLL" file when OS/2 1.x is running, and the "STD32.DLL" file when
  6698. OS/2 2.x is running.
  6699.  
  6700. When manipulating files over the serial port, the following files are
  6701. required on the remote machine:
  6702.  
  6703.   SERSERV.EXE
  6704.   STD.TRP, STD16.DLL, or STD32.DLL
  6705.  
  6706. The following files are required on the local machine:
  6707.  
  6708.   RFX.EXE
  6709.   SER.TRP or SER.DLL
  6710.  
  6711. The following is a sequence of commands that one might issue on DOS to
  6712. manipulate files remotely over the serial port:
  6713.  
  6714.   Remote machine: C>serserv 2
  6715.   Local  machine: D>rfx ser;1
  6716.   Local  machine: commands such as "copy", "dir", etc.
  6717.   Local  machine: exit
  6718.   Remote machine: q
  6719.  
  6720. In the example, serial port 2 is used on the remote machine and serial port
  6721. 1 is used on the local machine.  An appropriately-wired cable (described
  6722. below) runs between serial port 2 of the remote machine and serial port 1 of
  6723. the local machine.  Messages will appear on both the remote and local
  6724. machines indicating the BAUD rate at which the two machines are
  6725. communicating.
  6726.  
  6727. The final "q" typed on the keyboard of the remote machine is used to
  6728. terminate the server.  If this is not done, the server returns to its
  6729. start-up state and you could rerun RFX or run VIDEO.
  6730.  
  6731. The wiring required for serial communications is described under the topic
  6732. entitled "WIRING" in the section entitled "Serial Port Wiring Considerations".
  6733.  
  6734.  
  6735.  
  6736. Remote File Operations Over the Parallel Port
  6737. ═════════════════════════════════════════════
  6738. Remote file operations over the the parallel port are significantly faster
  6739. than the serial port.  Remote file operations over the parallel port require
  6740. that a server task be run on the remote machine before RFX is started on the
  6741. local machine.    This is required since RFX will immediately begin to
  6742. communicate with the remote machine via this special server program.
  6743.  
  6744. For DOS or OS/2, the formal parallel port server command line syntax is
  6745. shown below.
  6746.  
  6747. ┌──────────────────────────────────────────────────────────────────────────┐
  6748. │ PARSERV [/TRap=trap_file[;trap_parm]] [port_number]               │
  6749. └──────────────────────────────────────────────────────────────────────────┘
  6750.  
  6751. The "port_number" for the parallel server is the parallel port number
  6752. (between 1 and 3) that the server should use to communicate with RFX running
  6753. on the local machine.  The default port number is 1.  These numbers
  6754. correspond to the device number used when specifying the parallel printer
  6755. device "LPTx" (as in "LPT1", "LPT2", etc.).
  6756.  
  6757. The "TRap" option is only specified in special applications where more than
  6758. two personal computers are chained together in series.    "PARSERV" receives
  6759. requests over a parallel port.    It can process these requests locally or
  6760. pass them on to a server running on another computer system.  By default,
  6761. requests will be handled locally by the "STD.TRP" file when DOS is running,
  6762. the "STD16.DLL" file when OS/2 1.x is running, and the "STD32.DLL" file when
  6763. OS/2 2.x is running.
  6764.  
  6765. When manipulating files over the parallel port, the following files are
  6766. required on the remote machine:
  6767.  
  6768.   PARSERV.EXE
  6769.   STD.TRP, STD16.DLL, or STD32.DLL
  6770.  
  6771. The following files are required on the local machine:
  6772.  
  6773.   RFX.EXE
  6774.   PAR.TRP or PAR.DLL
  6775.  
  6776. The following is a sequence of commands that one might issue on DOS to
  6777. manipulate files remotely over the parallel port:
  6778.  
  6779.   Remote machine: C>parserv 1
  6780.   Local  machine: D>rfx par;2
  6781.   Local  machine: commands such as "copy", "dir", etc.
  6782.   Local  machine: exit
  6783.   Remote machine: q
  6784.  
  6785. In the example, parallel port 1 is used on the remote machine and parallel
  6786. port 2 is used on the local machine.  An appropriately-wired cable
  6787. (described below) runs between parallel port 1 of the remote machine and
  6788. parallel port 2 of the local machine.
  6789.  
  6790. The final "q" typed on the keyboard of the remote machine is used to
  6791. terminate the server.  If this is not done, the server returns to its
  6792. start-up state and you could rerun RFX or run VIDEO.
  6793.  
  6794. The wiring required for parallel communications is described under the topic
  6795. entitled "WIRING" in the section entitled "Parallel Port Wiring
  6796. Considerations".
  6797.  
  6798.  
  6799.  
  6800. Remote File Operations Over the Novell "NetWare" Network
  6801. ════════════════════════════════════════════════════════
  6802. Remote file operations over the Novell "NetWare" network requires the
  6803. NetWare shell.    The Internetwork Packet Exchange (IPX) must be loaded first
  6804. and the server task must be run on the remote machine before RFX is started
  6805. on the local machine.  This is required since RFX will immediately begin to
  6806. communicate with the remote machine via this special server program.
  6807.  
  6808. For DOS or OS/2, the formal NetWare server command line syntax is shown
  6809. below.
  6810.  
  6811. ┌──────────────────────────────────────────────────────────────────────────┐
  6812. │ NOVSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  6813. └──────────────────────────────────────────────────────────────────────────┘
  6814.  
  6815. The "server_name" is case insensitive and it must be unique (you will be
  6816. notified if it is not unique).    The name is restricted to less than 48
  6817. characters.  It cannot contain the following special characters:
  6818.  
  6819.   / \ : ; . , * ? + -
  6820.  
  6821. Any invalid characters are removed and any excess characters are dropped
  6822. from the name.    The "server_name" uniquely identifies the server to RFX
  6823. running on the local machine.  The default "server_name" is "NovLink".
  6824.  
  6825. The "TRap" option is only specified in special applications where more than
  6826. two personal computers are chained together in series.    "NOVSERV" receives
  6827. requests over the "NetWare" network.  It can process these requests locally
  6828. or pass them on to a server running on another computer system.  By default,
  6829. requests will be handled locally by the "STD.TRP" file when DOS is running,
  6830. the "STD16.DLL" file when OS/2 1.x is running, and the "STD32.DLL" file when
  6831. OS/2 2.x is running.
  6832.  
  6833. When manipulating files over the "NetWare" network, the following files are
  6834. required on the remote machine:
  6835.  
  6836.   NOVSERV.EXE
  6837.   STD.TRP, STD16.DLL, or STD32.DLL
  6838.  
  6839. The following files are required on the local machine:
  6840.  
  6841.   RFX.EXE
  6842.   NOV.TRP or NOV.DLL
  6843.  
  6844. The following is a sequence of commands that one might issue on DOS to
  6845. manipulate files remotely over the "NetWare" network:
  6846.  
  6847.   Remote machine: C>novserv rmt_dbg
  6848.   Local  machine: D>rfx nov;rmt_dbg
  6849.   Local  machine: commands such as "copy", "dir", etc.
  6850.   Local  machine: exit
  6851.   Remote machine: q
  6852.  
  6853. In the example, server name "RMT_DBG" is used on the remote machine so
  6854. server name "RMT_DBG" is also used on the local machine.
  6855.  
  6856. The final "q" typed on the keyboard of the remote machine is used to
  6857. terminate the server.  If this is not done, the server returns to its
  6858. start-up state and you could rerun RFX or run VIDEO.
  6859.  
  6860.  
  6861.  
  6862. Remote File Operations Using NetBIOS Support
  6863. ════════════════════════════════════════════
  6864. Remote file operations using the NetBIOS network programming interface can
  6865. also be done.  Remote file operations using this network protocol requires
  6866. that a server task be run on the remote machine before RFX is started on the
  6867. local machine.    This is required since RFX will immediately begin to
  6868. communicate with the remote machine via this special server program.
  6869.  
  6870. For DOS or OS/2, the formal NetBIOS server command line syntax is shown
  6871. below.
  6872.  
  6873. ┌──────────────────────────────────────────────────────────────────────────┐
  6874. │ NETSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  6875. └──────────────────────────────────────────────────────────────────────────┘
  6876.  
  6877. The "server_name" is case sensitive and it must be unique (you will be
  6878. notified if it is not unique).    The name may be up to 15 alphanumeric
  6879. characters.  The "server_name" uniquely identifies the server to RFX running
  6880. on the local machine.  The default "server_name" is "NetLink".
  6881.  
  6882. The "TRap" option is only specified in special applications where more than
  6883. two personal computers are chained together in series.    "NETSERV" receives
  6884. requests over a network using the NetBIOS network programming interface.  It
  6885. can process these requests locally or pass them on to a server running on
  6886. another computer system.  By default, requests will be handled locally by
  6887. the "STD.TRP" file when DOS is running, the "STD16.DLL" file when OS/2 1.x
  6888. is running, and the "STD32.DLL" file when OS/2 2.x is running.
  6889.  
  6890. When manipulating files with the NetBIOS network programming interface, the
  6891. following files are required on the remote machine:
  6892.  
  6893.   NETSERV.EXE
  6894.   STD.TRP, STD16.DLL, or STD32.DLL
  6895.  
  6896. The following files are required on the local machine:
  6897.  
  6898.   RFX.EXE
  6899.   NET.TRP or NET.DLL
  6900.  
  6901. The following is a sequence of commands that one might issue on DOS to
  6902. manipulate files remotely with the NetBIOS network programming interface:
  6903.  
  6904.   Remote machine: C>netserv rmt_dbg
  6905.   Local  machine: D>rfx net;rmt_dbg
  6906.   Local  machine: commands such as "copy", "dir", etc.
  6907.   Local  machine: exit
  6908.   Remote machine: q
  6909.  
  6910. In the example, server name "rmt_dbg" is used on the remote machine so
  6911. server name "rmt_dbg" is also used on the local machine.
  6912.  
  6913. The final "q" typed on the keyboard of the remote machine is used to
  6914. terminate the server.  If this is not done, the server returns to its
  6915. start-up state and you could rerun RFX or run VIDEO.
  6916.  
  6917.  
  6918.  
  6919. Specifying Files on Remote and Local Machines
  6920. ═════════════════════════════════════════════
  6921. When using the remote file operations facility, a method for identifying
  6922. files on either of the local or remote machines is required.  In order to
  6923. identify files on either the local or remote machine, two special prefixes
  6924. are supported by RFX.
  6925.  
  6926. @L       The "@L" prefix is used to indicate that the file resides on the
  6927.        local machine (the one on which RFX is running).
  6928.  
  6929.          @L[d:][path]filename[.ext]
  6930.  
  6931.        When "[path]" is not specified, the current directory of the
  6932.        specified drive of the local machine is assumed.  When "[d:]" is
  6933.        not specified, the current drive of the local machine is assumed.
  6934.  
  6935.        Example:
  6936.          TYPE @LOUTPUT.LOG
  6937.          COPY @LOUTPUT.LOG @LLPT2
  6938.          DIR @LD:\CMDS
  6939.          ERASE @LD:\CMDS\DATA.TMP
  6940.  
  6941. @R       The "@R" prefix is used to indicate that the file resides on the
  6942.        remote machine.
  6943.  
  6944.          @R[d:][path]filename[.ext]
  6945.  
  6946.        When "[path]" is not specified, the current directory of the
  6947.        specified drive of the remote machine is assumed.  When "[d:]" is
  6948.        not specified, the current drive of the remote machine is
  6949.        assumed.
  6950.  
  6951.        Example:
  6952.          TYPE @RMYAPPL.DAT
  6953.          ERASE @RD:\PROGRAMS\EXE\MYAPPL.LNK
  6954.          DIR @R\PROGRAMS\SRC
  6955.          COPY @R\PROGRAMS\SRC\UILIB.C @RLPT1
  6956.  
  6957. Thus a file may be identified to RFX in three different ways.
  6958.  
  6959.   [d:][path]filename[.ext]
  6960.   @L[d:][path]filename[.ext]
  6961.   @R[d:][path]filename[.ext]
  6962.  
  6963. A file of the first form resides on either the local or remote machine
  6964. depending on whether the current drive is a local or remote drive.  A file
  6965. of the second form always resides on the local machine.  A file of the third
  6966. form always resides on the remote machine.
  6967.  
  6968. Notes:
  6969.  
  6970.   1. In the each form, the omission of "[d:]" indicates the current drive.
  6971.  
  6972.       [path]filename[.ext]
  6973.       @L[path]filename[.ext]
  6974.       @R[path]filename[.ext]
  6975.  
  6976.   2. In the each form, the omission of "[path]" indicates the current path
  6977.     of the specified drive.
  6978.  
  6979.       [d:]filename[.ext]
  6980.       @L[d:]filename[.ext]
  6981.       @R[d:]filename[.ext]
  6982.  
  6983.     Observe that if "[d:]" is omitted also then the following forms are
  6984.     obtained:
  6985.  
  6986.       filename[.ext]
  6987.       @Lfilename[.ext]
  6988.       @Rfilename[.ext]
  6989.  
  6990.   3. The special drive prefixes "@L" and "@R" cannot be used in your own
  6991.     application to reference files on two different machines.  These
  6992.     prefixes are recognized by RFX and VIDEO only.  Should the situation
  6993.     arise where one of your filenames begins with the same prefix ("@L",
  6994.     "@l", "@R" or "@r") then "@@" can be used.    For example, if your wish to
  6995.     refer to the file on disk called "@link@" then you could specify
  6996.     "@@link@".    Note that ".\@link@" would also suffice.
  6997.  
  6998.  
  6999.  
  7000. RFX Commands
  7001. ════════════
  7002. When RFX is run without specifying a command, the DOS or OS/2 prompt will
  7003. change as illustrated in the following example.
  7004.  
  7005. Example:
  7006.   Mon  11-06-1989 15:17:05.84 E:\DOC\UG
  7007.   E>rfx par
  7008.   [RFX] Mon  11-06-1989 15:17:12.75 @LE:\DOC\UG
  7009.   [RFX] E>
  7010.  
  7011. Note that the current drive specifier "E" in "E:\DOC\UG" has changed to
  7012. "@LE" indicating that the current drive is the local "E" drive.
  7013.  
  7014. Any command can be typed in response to the prompt.  RFX recognizes a
  7015. special set of commands and passes all others on to DOS or OS/2 for
  7016. processing.  The following sections describe RFX commands.
  7017.  
  7018.  
  7019.  
  7020. Set Current Drive - drive:
  7021. ══════════════════════════
  7022. ┌──────────────────────────────────────────────────────────────────────────┐
  7023. │ drive:                                   │
  7024. └──────────────────────────────────────────────────────────────────────────┘
  7025.  
  7026. The current drive and locale can be set using this command.  The "@L" or
  7027. "@R" prefix may be used to specify the locale (local or remote).
  7028.  
  7029. Example:
  7030.   d:
  7031.  
  7032. Make the "D" disk of the current locale (local or remote) the current drive.
  7033. Since the locale is not specified, it remains unchanged.
  7034.  
  7035. Example:
  7036.   @rc:
  7037.  
  7038. Make the "C" disk of the remote machine the current drive.  Both locale and
  7039. disk are specified.
  7040.  
  7041. Example:
  7042.   @le:
  7043.  
  7044. Make the "E" disk of the local machine the current drive.  Both locale and
  7045. disk are specified.
  7046.  
  7047.  
  7048.  
  7049. Change Directory - CHDIR, CD
  7050. ════════════════════════════
  7051. ┌──────────────────────────────────────────────────────────────────────────┐
  7052. │ chdir dir_spec                               │
  7053. │ cd dir_spec                                   │
  7054. └──────────────────────────────────────────────────────────────────────────┘
  7055.  
  7056. This command may be used to change the current directory of any disk on the
  7057. local or remote machine.  CD is a short form for CHDIR.  The "@L" or "@R"
  7058. prefix may be used to specify the locale (local or remote).
  7059.  
  7060. Example:
  7061.   cd \tmp
  7062.  
  7063. Make the "TMP" directory of the current drive the current directory.
  7064.  
  7065. Example:
  7066.   cd d:\etc
  7067.  
  7068. Make the "ETC" directory of the "D" disk of the current locale (local or
  7069. remote) the current directory of that drive.
  7070.  
  7071. Example:
  7072.   cd @rc:\demo
  7073.  
  7074. Make the "DEMO" directory of the "C" disk of the remote machine the current
  7075. directory of that drive.  Both locale and disk are specified.
  7076.  
  7077. Example:
  7078.   cd @le:test
  7079.  
  7080. Make the "TEST" subdirectory of the current directory of the "E" disk of the
  7081. local machine the current directory of that drive.  Both locale and disk are
  7082. specified.
  7083.  
  7084.  
  7085.  
  7086. Copy Files - COPY
  7087. ═════════════════
  7088. ┌──────────────────────────────────────────────────────────────────────────┐
  7089. │ copy [/s] src_spec [dst_spec] [/s]                       │
  7090. └──────────────────────────────────────────────────────────────────────────┘
  7091.  
  7092. The COPY command operates in a manner very similar to the DOS "COPY" and
  7093. "XCOPY" commands.  Files may be copied from the local machine to the local
  7094. or remote machine.  Similarly files may be copied from the remote machine to
  7095. the local or remote machine.  If /s is specified then subdirectories are
  7096. copied as well.  Directories will be created as required for the destination
  7097. files.    If dst_spec is not specified then the default destination will be
  7098. the current directory of the other locale (i.e., remote, if the file's
  7099. locale is local or, local, if the file's locale is remote).
  7100.  
  7101. Example:
  7102.   copy *.for @rd:\tmp
  7103.  
  7104. All files of type "FOR" in the current directory are copied to the "TMP"
  7105. directory of the "D" disk on the remote machine.  If the current locale is
  7106. the local machine then files are copied from the local machine to the remote
  7107. machine.  If the current locale is the remote machine then files are copied
  7108. from the remote machine to the remote machine.
  7109.  
  7110. ┌────────────────────────────────────────────────────────────────────────────┐
  7111. │ Note:  If your default drive is set to one of the disks on the local         │
  7112. │ machine then the locale is local (e.g., @LC:, @LD:, @LE:, etc.).  If your  │
  7113. │ default drive is set to one of the disks on the remote machine then the    │
  7114. │ locale is remote (e.g., @RC:, @RD:, @RE:, etc.).  If your DOS or OS/2      │
  7115. │ prompt contains the current drive and directory then it will be easy to    │
  7116. │ identify which locale is current.                         │
  7117. └────────────────────────────────────────────────────────────────────────────┘
  7118.  
  7119. Example:
  7120.   copy @rd:\tmp\*.for
  7121.  
  7122. All files of type "FOR" in the "TMP" directory of the "D" disk on the remote
  7123. machine are copied to the current directory of the local machine.  Whenever
  7124. a destination is not specified, the current directory of the opposite locale
  7125. is used.  If the source locale is the remote machine then files are copied
  7126. from the remote to the local machine.  If the source locale is the current
  7127. machine then files are copied from the local to the remote machine.
  7128.  
  7129. Example:
  7130.   copy @rc:\watcom\*.* /s
  7131.  
  7132. All files and subdirectories of the "WATCOM" directory of the "C" disk on
  7133. the remote machine are copied to the current directory of the local machine.
  7134. Whenever a destination is not specified, the current directory of the
  7135. opposite locale is used.  If the source locale is the remote machine then
  7136. files are copied from the remote to the local machine.    If the source locale
  7137. is the current machine then files are copied from the local to the remote
  7138. machine.  Subdirectories are created as required.
  7139.  
  7140. ┌────────────────────────────────────────────────────────────────────────────┐
  7141. │ Note:  The "COPY" command is most effectively used when copying files from │
  7142. │ one machine to the other.  Copying of large amounts of files from one      │
  7143. │ place on the remote machine to another place on the remote machine could   │
  7144. │ be done more effectively using the remote machine's DOS or OS/2.  This     │
  7145. │ would eliminate the transfer of data from the remote machine to the local  │
  7146. │ machine and back to the remote machine.                     │
  7147. └────────────────────────────────────────────────────────────────────────────┘
  7148.  
  7149.  
  7150.  
  7151. List Directory - DIR
  7152. ════════════════════
  7153. ┌──────────────────────────────────────────────────────────────────────────┐
  7154. │ dir [/w] dir_spec [/w]                           │
  7155. └──────────────────────────────────────────────────────────────────────────┘
  7156.  
  7157. This command may be used to list the directories of any disk on the local or
  7158. remote machine.  Any of the DOS or OS/2 "wild card" characters ("?" and "*")
  7159. may be used.  If /w is specified then file names are displayed across the
  7160. screen ("wide") and the file creation date and time are omitted.
  7161.  
  7162. Example:
  7163.   dir \tmp
  7164.  
  7165. List the names of files in the "TMP" directory of the current drive.
  7166.  
  7167. Example:
  7168.   dir d:\etc
  7169.  
  7170. List the names of files in the "ETC" directory of the "D" disk of the
  7171. current locale (local or remote).
  7172.  
  7173. Example:
  7174.   dir @rc:\demo
  7175.  
  7176. List the names of files in the "DEMO" directory of the "C" disk of the
  7177. remote machine.  Both locale and disk are specified.
  7178.  
  7179. Example:
  7180.   dir @le:test
  7181.  
  7182. List the names of files in the "TEST" subdirectory of the current directory
  7183. of the "E" disk of the local machine.  If no "TEST" subdirectory exists then
  7184. the names of all files named "TEST" will be listed.  Both locale and disk
  7185. are specified.
  7186.  
  7187. Example:
  7188.   dir @le:test.*
  7189.  
  7190. List the names of all files named "TEST" in the current directory of the "E"
  7191. disk of the local machine.  Both locale and disk are specified.
  7192.  
  7193.  
  7194.  
  7195. Erase File - ERASE, DEL
  7196. ═══════════════════════
  7197. ┌──────────────────────────────────────────────────────────────────────────┐
  7198. │ erase [/s] file_spec [/s]                           │
  7199. │ del [/s] file_spec [/s]                           │
  7200. └──────────────────────────────────────────────────────────────────────────┘
  7201.  
  7202. This command may be used to erase files from the directories of any disk on
  7203. the local or remote machine.  DEL is a short form for ERASE.  Any of the DOS
  7204. or OS/2 "wild card" characters ("?" and "*") may be used.  If /s is
  7205. specified then subdirectories are also processed.
  7206.  
  7207. Example:
  7208.   erase \tmp\*.*
  7209.  
  7210. Erase all the files in the "TMP" directory of the current drive.
  7211.  
  7212. Example:
  7213.   erase d:\etc\*.lst
  7214.  
  7215. Erase all files of type "LST" in the "ETC" directory of the "D" disk of the
  7216. current locale (local or remote).
  7217.  
  7218. Example:
  7219.   erase @rc:\demo\*.obj
  7220.  
  7221. Erase all files of type "OBJ" in the "DEMO" directory of the "C" disk of the
  7222. remote machine.  Both locale and disk are specified.
  7223.  
  7224. Example:
  7225.   erase @le:trial.*
  7226.  
  7227. Erase all files named "TRIAL" of any type in the current directory of the
  7228. "E" disk of the local machine.    Both locale and disk are specified.
  7229.  
  7230.  
  7231.  
  7232. Exit from RFX - EXIT
  7233. ════════════════════
  7234. ┌──────────────────────────────────────────────────────────────────────────┐
  7235. │ exit                                       │
  7236. └──────────────────────────────────────────────────────────────────────────┘
  7237.  
  7238. This command may be used to exit from RFX and return to the invoking
  7239. process.
  7240.  
  7241.  
  7242.  
  7243. Make Directory - MKDIR, MD
  7244. ══════════════════════════
  7245. ┌──────────────────────────────────────────────────────────────────────────┐
  7246. │ mkdir dir_spec                               │
  7247. │ md dir_spec                                   │
  7248. └──────────────────────────────────────────────────────────────────────────┘
  7249.  
  7250. This command may be used to create a directory on any disk on the local or
  7251. remote machine.  MD is a short form for MKDIR.    The "@L" or "@R" prefix may
  7252. be used to specify the locale (local or remote).
  7253.  
  7254. Example:
  7255.   md \tmp
  7256.  
  7257. Create a "TMP" directory in the root of the current drive.
  7258.  
  7259. Example:
  7260.   md d:\etc
  7261.  
  7262. Create an "ETC" directory in the root of the "D" disk of the current locale
  7263. (local or remote).
  7264.  
  7265. Example:
  7266.   md @rc:\demo
  7267.  
  7268. Create a "DEMO" directory in the root of the "C" disk of the remote machine.
  7269. Both locale and disk are specified.
  7270.  
  7271. Example:
  7272.   md @le:test
  7273.  
  7274. Create a "TEST" subdirectory in the current directory of the "E" disk of the
  7275. local machine.    Both locale and disk are specified.
  7276.  
  7277.  
  7278.  
  7279. Rename - RENAME, REN
  7280. ════════════════════
  7281. ┌──────────────────────────────────────────────────────────────────────────┐
  7282. │ rename file_spec new_name                           │
  7283. │ ren file_spec new_name                           │
  7284. └──────────────────────────────────────────────────────────────────────────┘
  7285.  
  7286. This command may be used to rename a file in any directory on any disk on
  7287. the local or remote machine.  REN is a short form for RENAME.  The "@L" or
  7288. "@R" prefix may be used to specify the locale (local or remote).  Unlike the
  7289. DOS "RENAME" command, a file can be moved to a different directory if the
  7290. directory is specified in new_name.
  7291.  
  7292. Example:
  7293.   ren test.tmp test1.tmp
  7294.  
  7295. Rename the file "TEST.TMP" in the current directory of the current drive to
  7296. "TEST1.TMP".
  7297.  
  7298. Example:
  7299.   ren d:\etc\test.tmp test1.tmp
  7300.  
  7301. Rename the file "TEST.TMP" in the "ETC" directory of the "D" disk of the
  7302. current locale (local or remote) to "TEST1.TMP".
  7303.  
  7304. Example:
  7305.   ren @rc:\demo\test.tmp test1.tmp
  7306.  
  7307. Rename the file "TEST.TMP" in the "DEMO" directory of the "C" disk of the
  7308. remote machine to "TEST1.TMP".    Both locale and disk are specified.
  7309.  
  7310. Example:
  7311.   ren @le:trial.dat trial1.dat
  7312.  
  7313. Rename the file "TRIAL.DAT" in the current directory of the "E" disk of the
  7314. local machine to "TRIAL1.DAT".    Both locale and disk are specified.
  7315.  
  7316. Example:
  7317.   ren @le:trial.dat ..\trial1.dat
  7318.  
  7319. Rename the file "TRIAL.DAT" in the current directory of the "E" disk of the
  7320. local machine to "TRIAL1.DAT" and move it to the parent directory.  Both
  7321. locale and disk are specified.
  7322.  
  7323.  
  7324.  
  7325. Remove Directory - RMDIR, RD
  7326. ════════════════════════════
  7327. ┌──────────────────────────────────────────────────────────────────────────┐
  7328. │ rmdir [/s] dir_spec [/s]                           │
  7329. │ rd [/s] dir_spec [/s]                            │
  7330. └──────────────────────────────────────────────────────────────────────────┘
  7331.  
  7332. This command may be used to remove one or more directories on any disk on
  7333. the local or remote machine.  RD is a short form for RMDIR.  The "@L" or
  7334. "@R" prefix may be used to specify the locale (local or remote).  If /s is
  7335. specified then subdirectories are also removed.  Before a directory can be
  7336. removed, it must not contain any files.
  7337.  
  7338. Example:
  7339.   rd \tmp
  7340.  
  7341. Remove the "TMP" directory from the root of the current drive.
  7342.  
  7343. Example:
  7344.   rd d:\etc
  7345.  
  7346. Remove the "ETC" directory from the root of the "D" disk of the current
  7347. locale (local or remote).
  7348.  
  7349. Example:
  7350.   rd @rc:\demo
  7351.  
  7352. Remove the "DEMO" directory from the root of the "C" disk of the remote
  7353. machine.  Both locale and disk are specified.
  7354.  
  7355. Example:
  7356.   rd @le:test
  7357.  
  7358. Remove the "TEST" subdirectory from the current directory of the "E" disk of
  7359. the local machine.  Both locale and disk are specified.
  7360.  
  7361.  
  7362.  
  7363. Display File Contents - TYPE
  7364. ════════════════════════════
  7365. ┌──────────────────────────────────────────────────────────────────────────┐
  7366. │ type dir_spec                                │
  7367. └──────────────────────────────────────────────────────────────────────────┘
  7368.  
  7369. This command may be used to list the contents of a file on any disk on the
  7370. local or remote machine.  The "@L" or "@R" prefix may be used to specify the
  7371. locale (local or remote).  Unlike the DOS "TYPE" command, DOS or OS/2 "wild
  7372. card" characters ("?" or "*") may be used.
  7373.  
  7374. Example:
  7375.   type \tmp\test.dat
  7376.  
  7377. List the contents of the file "TEST.DAT" in the "TMP" directory of the
  7378. current drive.
  7379.  
  7380. Example:
  7381.   type d:\etc\*.lst
  7382.  
  7383. List the contents of all files of type "LST" in the "ETC" directory of the
  7384. "D" disk of the current locale (local or remote).
  7385.  
  7386. Example:
  7387.   type @rc:\demo\test.c
  7388.  
  7389. List the contents of the file "TEST.C" in the "DEMO" directory of the "C"
  7390. disk of the remote machine.  Both locale and disk are specified.
  7391.  
  7392. Example:
  7393.   type @le:trial.*
  7394.  
  7395. List the contents of all files named "TRIAL" of any type in the current
  7396. directory of the "E" disk of the local machine.  Both locale and disk are
  7397. specified.
  7398. ::::SET
  7399. ┌──────────────────────────────────────────────────────────────────────────┐
  7400. │ Set                                       │
  7401. │     Assembly { Lower | Upper | Inside | Outside }               │
  7402. │     Bell     ON | OFf                            │
  7403. │     Call     [dflt_call] [dflt_parms] [dflt_return]               │
  7404. │     Dclick   expr                               │
  7405. │     Fpu      Binary | Decimal                        │
  7406. │     Implicit ON | OFf                            │
  7407. │     INput    window_name                           │
  7408. │     LAnguage lang_name                           │
  7409. │     Level    Assembly | Mix | Source                       │
  7410. │     MAcro    window_name key_expr [cmd_list]                   │
  7411. │     Menu     ON | OFf | Add cmd_list | ACtivate               │
  7412. │     Pfkey    expr (string | "{" string "}")                   │
  7413. │     Radix    expr | ("/"radix_spec [expr])                   │
  7414. │     SOurce   [/Add] { "{" {char} "*" {char} "}" }               │
  7415. │     SYmbol   [/Add] { [/(Respect | Ignore)] "{" {char} "*" {char} "}" }  │
  7416. │     Tab      expr                               │
  7417. │     Visible  Assembly | Source [top][,[bot][,bias]]               │
  7418. └──────────────────────────────────────────────────────────────────────────┘
  7419.  
  7420. The Set command is used to establish operational defaults for other VIDEO
  7421. commands.
  7422.  
  7423.  
  7424.  
  7425. Disassembly Options
  7426. ═══════════════════
  7427. ┌──────────────────────────────────────────────────────────────────────────┐
  7428. │ Set Assembly { Lower | Upper | Inside | Outside }               │
  7429. └──────────────────────────────────────────────────────────────────────────┘
  7430.  
  7431. These options control how assembly instructions and operands are displayed.
  7432. The "lower" option causes opcodes and registers to be displayed in
  7433. lowercase.  The "upper" option causes opcodes and registers to be displayed
  7434. in uppercase.  The "inside" option causes register indexing displacements to
  7435. be shown inside brackets (e.g., [BP-2], [EBP-2]).  The "outside" option
  7436. causes register indexing displacements to be shown outside brackets (e.g.,
  7437. -2[BP], -2[EBP]).
  7438.  
  7439.  
  7440.  
  7441. Warning Bell
  7442. ════════════
  7443. ┌──────────────────────────────────────────────────────────────────────────┐
  7444. │ Set Bell ON | OFf                               │
  7445. └──────────────────────────────────────────────────────────────────────────┘
  7446.  
  7447. The warning beep issued by VIDEO may be turned "on" or "off".  A beep is
  7448. issued whenever an error message is printed by the debugger.
  7449.  
  7450.  
  7451.  
  7452. Default Call
  7453. ════════════
  7454. ┌──────────────────────────────────────────────────────────────────────────┐
  7455. │ Set Call [dflt_call] [dflt_parms] [dflt_return]               │
  7456. └──────────────────────────────────────────────────────────────────────────┘
  7457.  
  7458. The default call type (Far, Interrupt or Near) and the default argument
  7459. passing mechanism to be used by the VIDEO Call command may be set.
  7460.  
  7461.   dflt_call ::= /(Far | Interrupt | Near)
  7462.   dflt_parms ::= "(" [ dflt_loc { "," dflt_loc } ] ")"
  7463.   dflt_return ::= "/" | print_list
  7464.   dflt_loc ::= reg_name | reg_aggregate
  7465.  
  7466. In the following example, we define WATCOM's default calling conventions for
  7467. the Call command.
  7468.  
  7469. Example:
  7470.   DBG>set call /far (ax, dx, bx, cx) ax
  7471.  
  7472. To change the default calling convention to one in which "near" calls are
  7473. used and all parameters are passed on the stack, we could issue the
  7474. following command.
  7475.  
  7476. Example:
  7477.   DBG>set call /near () ax
  7478.  
  7479. See the description of the Call command for more information on argument
  7480. passing.
  7481.  
  7482.  
  7483.  
  7484. Setting Double-click Rate
  7485. ═════════════════════════
  7486. ┌──────────────────────────────────────────────────────────────────────────┐
  7487. │ Set Dclick expr                               │
  7488. └──────────────────────────────────────────────────────────────────────────┘
  7489.  
  7490. This command sets the maximum amount of time, in milliseconds, that is
  7491. allowed between two presses of the mouse button, for the two clicks to be
  7492. recognized as a double-click and not two single clicks.  The default value
  7493. is 250 milliseconds (1/4 of a second).
  7494.  
  7495. Example:
  7496.   DBG>set dclick 750
  7497.  
  7498. The above example will cause two mouse presses separated by more than 750
  7499. milliseconds (3/4 of a second) to be regarded as two separate clicks rather
  7500. than a double-click.
  7501.  
  7502. The command show set dclick will show the current value.
  7503.  
  7504.  
  7505.  
  7506. Format of Numeric Data Processor Display
  7507. ════════════════════════════════════════
  7508. ┌──────────────────────────────────────────────────────────────────────────┐
  7509. │ Set Fpu Binary | Decimal                           │
  7510. └──────────────────────────────────────────────────────────────────────────┘
  7511.  
  7512. The contents of the 80x87 Numeric Data Processor (NDP, math coprocessor)
  7513. registers ST(0), ST(1), etc.  can be displayed in hexadecimal (binary)
  7514. format or scientific notation (decimal).  The registers and flags of the
  7515. math coprocessor are displayed in the FPU window.
  7516.  
  7517. The command show set fpu will show the current setting.
  7518.  
  7519.  
  7520.  
  7521. Automatic Command File Invocation
  7522. ═════════════════════════════════
  7523. ┌──────────────────────────────────────────────────────────────────────────┐
  7524. │ Set Implicit    ON │ OFf                           │
  7525. └──────────────────────────────────────────────────────────────────────────┘
  7526.  
  7527. When "implicit" is "on", VIDEO will treat an unknown command as the name of
  7528. a command file and automatically attempt to invoke it.    When "implicit" is
  7529. "off", the INvoke command must be used.
  7530.  
  7531. Example:
  7532.   DBG>set implicit on
  7533.   DBG>* invoke "mix" command file
  7534.   DBG>mix
  7535.  
  7536. Under QNX, it is possible for a conflict to arise when "implicit" is on.  If
  7537. a path is specified for a command file name, it will be confused with the
  7538. short form of the DO command which is "/".
  7539.  
  7540. Example:
  7541.   DBG>/etc=1
  7542.   DBG>/etc/wvideo/mix
  7543.  
  7544. The first example assigns the value 1 to the variable etc.  The second
  7545. example attempts to run the "mix" command file from the "/etc/wvideo"
  7546. directory but a syntactical error results.  To resolve this conflict, you
  7547. can use either the INvoke command or the local file specifier prefix "@l".
  7548.  
  7549. Example:
  7550.   DBG>invoke /etc/wvideo/mix
  7551.   DBG>@l/etc/wvideo/mix
  7552.  
  7553. A similar problem arises under DOS, MS Windows or OS/2 when a drive
  7554. specifier forms part of the file name.
  7555.  
  7556. Example:
  7557.   DBG>d:\\watcom\binb\mix
  7558.   DBG>invoke d:\\watcom\binb\mix
  7559.   DBG>@ld:\\watcom\binb\mix
  7560.  
  7561. The first example results in a syntactical error ("d" is interpreted as the
  7562. short form of the Display command).  The second and third examples resolve
  7563. the problem.
  7564.  
  7565. Local and remote file specifier prefixes are described under the topic
  7566. entitled "REMOTE_DEBUGGING".
  7567.  
  7568.  
  7569.  
  7570. Current Window
  7571. ══════════════
  7572. ┌──────────────────────────────────────────────────────────────────────────┐
  7573. │ Set INput window_name                            │
  7574. └──────────────────────────────────────────────────────────────────────────┘
  7575.  
  7576. The Set INput command is used to move the text cursor directly to the
  7577. specified window.  The valid window names are:
  7578.  
  7579.   Assembly
  7580.   Command
  7581.   Dialogue
  7582.   Fpu
  7583.   Memory
  7584.   Prompt
  7585.   Register
  7586.   SOurce
  7587.   STack
  7588.   Thread
  7589.  
  7590. The Tab and Shift Tab keys can also be used to move the text cursor to the
  7591. following or previous window.  The selected window becomes the active
  7592. window.  Keys and the mouse react in the manner described in the sections
  7593. "Window Manipulation with Keys" and "Window Manipulation with a Mouse" under
  7594. the topic entitled "WINDOWS".
  7595.  
  7596. Expression Syntax
  7597. ═════════════════
  7598. ┌──────────────────────────────────────────────────────────────────────────┐
  7599. │ Set LAnguage lang_name                           │
  7600. └──────────────────────────────────────────────────────────────────────────┘
  7601.  
  7602. The debugger expression processor can be set to understand the syntax of
  7603. certain programming languages.    The operand lang_name represents the name of
  7604. an expression syntax or "parse" file.
  7605.  
  7606. C       The file "c.prs" describes the ANSI C programming language
  7607.        expression syntax supported by VIDEO.
  7608.  
  7609. FORTRAN    The file "fortran.prs" describes the ANSI FORTRAN 77 programming
  7610.        language expression syntax supported by VIDEO.
  7611.  
  7612. Under DOS, MS Windows or OS/2, the "prs" files are usually located in the
  7613. "BINB" sub-directory of the directory that VIDEO is installed in.  You
  7614. should ensure that the "BINB" directory is included in the PATH environment
  7615. variable.
  7616.  
  7617. Under QNX, the "prs" files are usually located in the "/etc/wvideo"
  7618. directory.  The search order for language parsing files is as follows:
  7619.  
  7620.   1. the current directory,
  7621.   2. the paths listed in the WVIDEO_PATH environment variable,
  7622.   3. the path listed in the HOME environment variable, and, finally,
  7623.   4. the "/etc/wvideo" directory.
  7624.  
  7625. Example:
  7626.   DBG>set language fortran
  7627.  
  7628. The debugger will load the expression syntax for FORTRAN 77 from the file
  7629. "fortran.prs".
  7630.  
  7631. The command show set language will show the current setting.
  7632.  
  7633.  
  7634.  
  7635. Debugging Level
  7636. ═══════════════
  7637. ┌──────────────────────────────────────────────────────────────────────────┐
  7638. │ Set Level Assembly | Mix | Source                       │
  7639. └──────────────────────────────────────────────────────────────────────────┘
  7640.  
  7641. The Set Level command is used to set the default debugging level.
  7642.  
  7643. Assembly   VIDEO will display debugging information at the assembly language
  7644.        level.
  7645.  
  7646.        Example:
  7647.          DBG>set level assembly
  7648.  
  7649. Mix       VIDEO will display debugging information at the source language
  7650.        level whenever possible, or at the assembly language level when
  7651.        no source line information is available.
  7652.  
  7653.        Example:
  7654.          DBG>set level mix
  7655.  
  7656.        This is the default mode of VIDEO.
  7657.  
  7658. Source       The source language level is similar to the mix language level
  7659.        except that modules for which no source line information is
  7660.        available are not traced unless explicitly requested.
  7661.  
  7662.        Example:
  7663.          DBG>set level source
  7664.  
  7665.  
  7666.  
  7667. Macro Hot Keys
  7668. ══════════════
  7669. ┌──────────────────────────────────────────────────────────────────────────┐
  7670. │ Set MAcro window_name key_expr [cmd_list]                   │
  7671. └──────────────────────────────────────────────────────────────────────────┘
  7672.  
  7673. The Set MAcro command may be used to define "hot" keys for various windows.
  7674. The valid window names are:
  7675.  
  7676.   Assembly
  7677.   Command
  7678.   Dialogue
  7679.   Fpu
  7680.   Memory
  7681.   Register
  7682.   SOurce
  7683.   STack
  7684.   Thread
  7685.  
  7686. The value for key_expr must fall within the range 32 (space) to 126 (tilde).
  7687. These are the ASCII printable characters.  One or more debugger commands can
  7688. be specified for cmd_list.
  7689.  
  7690. Example:
  7691.   DBG>set macro source 'v' {view}
  7692.  
  7693. In the above example, the command view will be invoked if a lowercase "v" is
  7694. pressed when the Source window is active (i.e., when the text cursor is in
  7695. the Source window).
  7696.  
  7697. Example:
  7698.   DBG>set macro assembly 'b' {break dbg$code}
  7699.  
  7700. In the above example, the command break dbg$code will be invoked if a
  7701. lowercase "b" is pressed when the Assembly window is active (i.e., when the
  7702. text cursor is in the Assembly window).  A break point will be set at the
  7703. currently highlighted line.
  7704.  
  7705. Example:
  7706.   DBG>set macro source ' ' {trace/source/over}
  7707.  
  7708. In the above example, the command trace/source/over will be invoked if the
  7709. space bar is pressed when the Source window is active (i.e., when the text
  7710. cursor is in the Source window).  A single-shot trace command will be
  7711. executed.
  7712.  
  7713. ┌────────────────────────────────────────────────────────────────────────────┐
  7714. │ Note:  The Prompt window is the only window where hot keys cannot be         │
  7715. │ defined since text must be entered in this window.                 │
  7716. └────────────────────────────────────────────────────────────────────────────┘
  7717.  
  7718.  
  7719.  
  7720. Menu Bar
  7721. ════════
  7722. ┌──────────────────────────────────────────────────────────────────────────┐
  7723. │ Set Menu ON | OFf | Add cmd_list | ACtivate                   │
  7724. └──────────────────────────────────────────────────────────────────────────┘
  7725.  
  7726. The Set Menu ON and Set menu OFf commands turn the menu bar display "on" or
  7727. "off".
  7728.  
  7729. The Set Menu Add command permits the creation of command entries in the
  7730. "User" pop-down menu.  An entry is a list of one or more VIDEO commands.
  7731. Each new entry is labelled with a letter from the alphabet.  An entry may be
  7732. selected by pressing Alt/U to engage the "User" pop-down menu and then
  7733. Alt/<letter> where <letter> corresponds to the letter beside the desired
  7734. entry.    The mouse can also be used to select an entry.    When an entry is
  7735. selected, the commands listed in that entry are executed.  Up to 20 items
  7736. can be added to the "User" menu.
  7737.  
  7738. The Set Menu ACtivate command emulates the action of pressing and releasing
  7739. the Alt key.
  7740.  
  7741. Example:
  7742.   DBG>set pfkey 10 {set menu activate}
  7743.  
  7744. In the above example, we bind the Set Menu ACtivate command to programmable
  7745. function key 10.
  7746.  
  7747. For a description of VIDEO menus, see the topic entitled "MENUS".
  7748.  
  7749.  
  7750.  
  7751. Programmable Function Keys
  7752. ══════════════════════════
  7753. ┌──────────────────────────────────────────────────────────────────────────┐
  7754. │ Set Pfkey expr (string | "{" string "}")                   │
  7755. └──────────────────────────────────────────────────────────────────────────┘
  7756.  
  7757. One or more VIDEO commands can be assigned to a programmable function (PF)
  7758. key.  Each time that key is pressed, the commands are executed.  You must
  7759. use "{" and "}" when you have a ";" in the string since VIDEO uses the
  7760. semicolon as a command separator.  If the string is omitted then the current
  7761. assignment for the specified PF key is removed.  PF keys are numbered from 1
  7762. to 40.
  7763.  
  7764. F1-F10       PF keys 1 through 10 are obtained by pressing one of the keys F1
  7765.        through F10 (on some keyboards, these may be labeled PF1 through
  7766.        PF10).
  7767.  
  7768. F11-F20    PF keys 11 through 20 are obtained by pressing both the Shift key
  7769.        and one of keys F1 through F10.
  7770.  
  7771. F21-F30    PF keys 21 through 30 are obtained by pressing both the Ctrl key
  7772.        and one of keys F1 through F10.
  7773.  
  7774. F31-F40    PF keys 31 through 40 are obtained by pressing both the Alt key
  7775.        and one of keys F1 through F10.
  7776.  
  7777. The expression expr is always evaluated with a radix of 10, regardless of
  7778. the current default radix for numbers.
  7779.  
  7780. Example:
  7781.   DBG>set pfkey 1 go/keep
  7782.  
  7783. In the above example, function key F1 is defined with a go/keep command.
  7784. Each time the F1 key is pressed, VIDEO will execute this command.  This form
  7785. of the "go" command keeps any temporary break point that may have been
  7786. specified in a previous "go" command.
  7787.  
  7788. Example:
  7789.   DBG>set pf 1 {go/keep;?ax}
  7790.  
  7791. The above example is similar to the previous except that a second command
  7792. has been added.  Now, whenever F1 is pressed, two commands will be executed.
  7793. When a break point occurs, the contents of the AX register are displayed in
  7794. the Dialogue window.  This example demonstrates the importance of the
  7795. braces.
  7796.  
  7797. Example:
  7798.   DBG>set pf 1 go/keep;?ax
  7799.  
  7800. If omitted as shown above, VIDEO will first execute a Set command and then
  7801. it will execute a Print (?) command.  This is equivalent to issuing the two
  7802. commands on two separate command lines.
  7803.  
  7804. Example:
  7805.   DBG>set pf 1 go/keep
  7806.   DBG>?ax
  7807.  
  7808. Example:
  7809.   DBG>/k1=-1
  7810.   DBG>set pf 1 if ++k1%3==0{<src}{if k1%3==1{<asm}{<mix}}
  7811.  
  7812. The user-defined symbol k1 is set to -1 and programmable function key 1 is
  7813. assigned a command which may be used to cycle through each one of the
  7814. "src.dbg", "asm.dbg" and "mix.dbg" command files.
  7815.  
  7816. Example:
  7817.   DBG>set pf 1
  7818.  
  7819. The current assignment to programmable function key 1 is removed.
  7820.  
  7821.  
  7822.  
  7823. Default Numeric Radix and Specifiers
  7824. ════════════════════════════════════
  7825. ┌──────────────────────────────────────────────────────────────────────────┐
  7826. │ Set Radix expr | ("/"radix_spec [expr])                   │
  7827. └──────────────────────────────────────────────────────────────────────────┘
  7828.  
  7829. This command may be used to define both the default radix of numbers entered
  7830. by the user and what character strings are to be interpreted as radix
  7831. specifiers.  The expression expr is always evaluated with a radix of 10,
  7832. regardless of the current default radix for numbers.
  7833.  
  7834.  
  7835.  
  7836. Setting Default Radix
  7837. ═════════════════════
  7838. ┌──────────────────────────────────────────────────────────────────────────┐
  7839. │ Set Radix expr                               │
  7840. └──────────────────────────────────────────────────────────────────────────┘
  7841.  
  7842. Example:
  7843.   DBG>set radix 10
  7844.   DBG>set radix 16
  7845.   DBG>set radix 8
  7846.  
  7847. The above examples illustrate the setting of a default radix for numeric
  7848. values input by the user.  In the first example, we set the default radix to
  7849. decimal (i.e., base 10); in the second example, to hexadecimal (i.e., base
  7850. 16); and in the third example, to octal (i.e., base 8).  The minimum radix
  7851. that you may specify is 2 and the maximum is 36.  The digits that may be
  7852. used to form numeric values are taken from the set of digits (0-9) and the
  7853. letters of the alphabet (A-Z or a-z).
  7854.  
  7855. Suppose that the default radix was set to 36.  In terms of decimal values,
  7856. 'A' represents the value 10, 'B' represents the value 11, and so on up to
  7857. 'Z' which represents the value 35.
  7858.  
  7859. In the absence of a radix specifier, only characters which are valid for the
  7860. default radix may appear in a numeric value.  For example, if the default
  7861. radix is 16 then you cannot use the letters 'G' through 'Z'.
  7862.  
  7863. When a numeric constant could legitimately be interpreted as a symbol name,
  7864. VIDEO will first try to find a symbol by that name and, if the search was
  7865. unsuccessful, it will treat the string as a constant.
  7866.  
  7867. Example:
  7868.   DBG>/abc=1
  7869.   DBG>?abc
  7870.  
  7871. In the above example, the user defines a variable called "abc" and assigns
  7872. it the value 1.  In the second statement, the debugger is asked to print the
  7873. value of "abc".  If the default radix was 16, this could represent a numeric
  7874. value (10*16**2 + 11*16 + 12).    However, VIDEO will first attempt to locate
  7875. the symbol "abc".  Since this will succeed, the value displayed in the
  7876. Dialogue window is 1.  Note that we could quite easily form a numeric
  7877. constant by preceding the letters by a '0' digit.
  7878.  
  7879. Example:
  7880.   DBG>?0abc
  7881.  
  7882. Any time a constant begins with one of the digits '0' through '9', VIDEO
  7883. will interpret the item as a numeric value.  Thus a symbol name must not
  7884. begin with one of the numeric digits (0-9).
  7885.  
  7886.  
  7887.  
  7888. Setting A Radix Specifier
  7889. ═════════════════════════
  7890. ┌──────────────────────────────────────────────────────────────────────────┐
  7891. │ Set Radix "/"radix_spec [expr]                       │
  7892. └──────────────────────────────────────────────────────────────────────────┘
  7893.  
  7894. The second feature of the Set Radix command is the ability to define one or
  7895. more radix specifiers.
  7896.  
  7897. Example:
  7898.   DBG>set radix /0x 16
  7899.  
  7900. In the above example, the string "0x" is defined to introduce hexadecimal
  7901. (base 16) numbers.  Thus 0x12 represents a hexadecimal constant.
  7902.  
  7903. If the expression is omitted then the string is removed from the set of
  7904. current defined radix specifiers.
  7905.  
  7906. Example:
  7907.   DBG>set radix /0x
  7908.  
  7909. In the above example, the string "0x" is removed from the set of radix
  7910. specifiers.  Now 0x12 is an illegal construct.
  7911.  
  7912. Example:
  7913.   DBG>set radix /# 10
  7914.  
  7915. In the above example, the string "#" is defined to introduce decimal (base
  7916. 10) numbers.  Thus #12 represents a decimal constant.
  7917.  
  7918. By defining a selection of radix specifiers, we can enter numeric values in
  7919. any radix of our choosing and remain independent of the current default
  7920. radix.
  7921.  
  7922.  
  7923.  
  7924. Source File Search Patterns
  7925. ═══════════════════════════
  7926. ┌──────────────────────────────────────────────────────────────────────────┐
  7927. │ Set SOurce [/Add] { {char} "*" {char} }                   │
  7928. └──────────────────────────────────────────────────────────────────────────┘
  7929.  
  7930. This command is used to define patterns to be applied to module names when
  7931. VIDEO searches for a corresponding source file.  VIDEO will first attempt to
  7932. open the source file by using the file specification used to compile the
  7933. file.  We require a mechanism for specifying other candidates for the source
  7934. file in the following cases.
  7935.  
  7936.   1. A relative path specification was given at compile time and the
  7937.     directory from which you are running the program is different from the
  7938.     directory from which the file was compiled.
  7939.   2. The source file has been moved to a different directory since it was
  7940.     compiled.
  7941.  
  7942. The following examples use file name specifications from DOS, MS Windows or
  7943. OS/2.  To construct equivalent QNX examples, the path separator "\" should
  7944. be replaced by "/" and all file specifications should be in lowercase
  7945. letters.
  7946.  
  7947. Suppose the current directory is "\TEST\O" and the source file ("HELLO.C")
  7948. is contained in the directory "\TEST\C".  Suppose we use the following
  7949. command to compile "HELLO.C".
  7950.  
  7951. Example:
  7952.   C>wcc ..\c\hello -d2
  7953.  
  7954. The compiler will place the string "..\C\HELLO.C" in the object file.
  7955. Suppose that we move up a level in the directory and link our program.    We
  7956. then use VIDEO to load and run the program while in the "\TEST" directory.
  7957. The debugger will not be able to locate the source file since it will use
  7958. the file specification "..\C\HELLO.C".
  7959.  
  7960. Example:
  7961.   DBG>set source *.c
  7962.  
  7963. In the above example, we specify that VIDEO should also try to locate a
  7964. source file by appending ".c" to the module name.  The asterisk is used as a
  7965. place holder for the module name.  The module name in the previous example
  7966. is "HELLO".  Thus, after unsuccessfully trying to locate "..\C\HELLO.C", an
  7967. attempt will be made to locate the file "HELLO.C".  This attempt will also
  7968. fail.
  7969.  
  7970. Example:
  7971.   DBG>set source \test\c\*.c
  7972.  
  7973. In the above example, we revise the pattern to include the path
  7974. specification for the source file.  Now an attempt will be made to locate
  7975. the file "\TEST\C\HELLO.C" and this attempt will succeed.
  7976.  
  7977. Example:
  7978.   DBG>set source *.c \test\c\*.c
  7979.  
  7980. In the above example, we add a second pattern to the list of possible names
  7981. for the source file.  If VIDEO is unsuccessful at locating the source file
  7982. in the current directory as "HELLO.C", it will also try "\TEST\C\HELLO.C" as
  7983. a possibility.
  7984.  
  7985. To indicate that we wish to add more patterns to the currently defined
  7986. pattern set, we can specify the /Add qualifier.  Without this qualifier,
  7987. VIDEO will replace the current pattern set with the one that we specify.
  7988. The following example is equivalent to the previous one.
  7989.  
  7990. Example:
  7991.   DBG>set source *.c
  7992.   DBG>set source /add \progs\src\*.c
  7993.  
  7994. Under QNX, a path specification that begins with a "/" could be interpreted
  7995. as a qualifier.
  7996.  
  7997. Example:
  7998.   DBG>set source /users/fred/*.c
  7999.  
  8000. In the above example, the "/users" qualifier is not supported and an error
  8001. will result.  To resolve this conflict, the local file specifier prefix "@l"
  8002. can be used.
  8003.  
  8004. Example:
  8005.   DBG>set source @l/users/fred/*.c
  8006.  
  8007. Local and remote file specifier prefixes are described under the topic
  8008. entitled "REMOTE_DEBUGGING".
  8009.  
  8010.  
  8011.  
  8012. Symbol Name Pattern Matching
  8013. ════════════════════════════
  8014. ┌──────────────────────────────────────────────────────────────────────────┐
  8015. │ Set SYmbol [/Add] {[/(Respect | Ignore)] {char} "*" {char}}           │
  8016. └──────────────────────────────────────────────────────────────────────────┘
  8017.  
  8018. This command is used to control the manner in which VIDEO will look up a
  8019. symbol.  By default, symbol names match if they agree in case (both upper
  8020. and lower case characters) and in spelling.  This command can be used to
  8021. loosen those restrictions.
  8022.  
  8023. Language compilers often prefix or suffix a user-defined global symbol with
  8024. one or more special characters such as underscores "_" or currency symbols
  8025. "$".  Sometimes all the characters in the name are converted entirely to
  8026. upper case or lower case.  To simplify the specification of symbol names,
  8027. you can define a series of patterns which VIDEO will use when looking up a
  8028. symbol.
  8029.  
  8030. Example:
  8031.   DBG>set symbol *_
  8032.  
  8033. The above pattern indicates that an underscore could be suffixed to the name
  8034. you specify.  For example, main might actually be spelled main_.  The
  8035. asterisk is used as a place holder for the user-specified name.
  8036.  
  8037. We can specify several patterns.
  8038.  
  8039. Example:
  8040.   DBG>set symbol *_ _*
  8041.  
  8042. In this example, we are stating that possible alternatives for the spelling
  8043. of main are main_ and _main.  VIDEO will search for a symbol by using the
  8044. specified patterns.  Patterns are processed in the order they were given.
  8045. If no patterns exist, VIDEO will look for an exact match.
  8046.  
  8047. Curly braces may be used to delimit a pattern.
  8048.  
  8049. Example:
  8050.   DBG>set symbol {*_} {_*}
  8051.  
  8052. Within braces, space characters are significant.  Therefore, you would
  8053. normally not include them except in the rare case where symbol names could
  8054. contain space characters.
  8055.  
  8056. To indicate that we wish to add more patterns to the currently defined
  8057. pattern set, we can specify the /Add qualifier.  Without this qualifier,
  8058. VIDEO will replace the current pattern set with the one that we specify.
  8059.  
  8060. To indicate whether the case of the name is important in the process of
  8061. looking up the name, we can specify one of /Respect or /Ignore in front of
  8062. the list of patterns.
  8063.  
  8064. Example:
  8065.   DBG>set symbol /ignore *_ _*
  8066.  
  8067. In the above example, we indicate for each pattern substitution that the
  8068. case of the name is not important.  In this case, the user-specified name
  8069. main could match many possible spellings such as main_, Main_, MAIN_, _MaiN,
  8070. and so on.
  8071.  
  8072. In the previous example, we did not include MAIN as a possible match for the
  8073. user-specified main.  To include this case, we could issue the following
  8074. command:
  8075.  
  8076. Example:
  8077.   DBG>set symbol /add /ignore *
  8078.  
  8079. VIDEO will now also look for an exact spelling with no regard to case.
  8080.  
  8081. We could invent more complicated rules for pattern matching based on case.
  8082.  
  8083. Example:
  8084.   DBG>set symbol /ignore * *_ _* /respect _*_
  8085.  
  8086. In the above example, we indicate for the first three patterns that the case
  8087. of the name is not important but that the case must match for the last
  8088. pattern.  If the user-specified name is cmain and the actual spelling is
  8089. _CMAIN_ then the debugger will not produce a match.  However, if the user
  8090. specified CMAIN then the debugger would match it with _CMAIN_.
  8091.  
  8092.  
  8093.  
  8094. Setting the Tab Interval
  8095. ════════════════════════
  8096. ┌──────────────────────────────────────────────────────────────────────────┐
  8097. │ Set Tab expr                                   │
  8098. └──────────────────────────────────────────────────────────────────────────┘
  8099.  
  8100. This command controls how the debugger will display text files with embedded
  8101. TAB characters.  A TAB character causes the text following it to start at
  8102. the next tab stop.  By default, tab stops are set for every 8 columns.    You
  8103. can alter this default using the Set Tab command.
  8104.  
  8105. Example:
  8106.   DBG>set tab 4
  8107.  
  8108. The above example will set tab stops for every 4 columns.
  8109.  
  8110. The command show set tab will show the current value.
  8111.  
  8112.  
  8113.  
  8114. Source and Assembly Window Line Context
  8115. ═══════════════════════════════════════
  8116. ┌──────────────────────────────────────────────────────────────────────────┐
  8117. │ Set Visible Source | Assembly [top][,[bot],[bias]]               │
  8118. └──────────────────────────────────────────────────────────────────────────┘
  8119.  
  8120. This command controls how the debugger will display source text in the
  8121. Source window or assembly code in the Assembly window.    In these two
  8122. windows, the debugger can be instructed to leave so many lines above (top)
  8123. and below (bot) the current line when scrolling text or assembly lines.  The
  8124. debugger can also be instructed to display lines beginning at some column
  8125. other than 1 (bias).
  8126.  
  8127. Example:
  8128.   DBG>set visible source 1,2,9
  8129.  
  8130. In the above example, the debugger is instructed to display at least one
  8131. line above the current line, to display at least 2 lines below the current
  8132. line, and to not display the first 8 columns of source text.  If the window
  8133. is too small for the debugger to adhere to these constraints, it will do the
  8134. best it can.
  8135.  
  8136. The command "show set visible" will show the current settings for the Source
  8137. and Assembly windows.
  8138. ::::SHOW
  8139. ┌──────────────────────────────────────────────────────────────────────────┐
  8140. │ SHow                                       │
  8141. │     Calls   [expr]                               │
  8142. │     Display {window_name}                           │
  8143. │     Flip                                   │
  8144. │     Modules [name]                               │
  8145. │     Paint   {window_name}                           │
  8146. │     Set     {Assembly | Bell | Call | Dclick | Fpu | Implicit |       │
  8147. │          INput | LAnguage | Level | MAcro | Menu | Pfkey |        │
  8148. │          Radix | SOurce | SYmbol | Tab | Visible}               │
  8149. └──────────────────────────────────────────────────────────────────────────┘
  8150.  
  8151. The SHow command may be used to display information about the currently
  8152. executing application and various VIDEO settings.
  8153.  
  8154.  
  8155.  
  8156. Show Calling Sequence
  8157. ═════════════════════
  8158. ┌──────────────────────────────────────────────────────────────────────────┐
  8159. │ SHow Calls [expr]                               │
  8160. └──────────────────────────────────────────────────────────────────────────┘
  8161.  
  8162. This command is used to display an execution trace-back of the calling
  8163. sequence.  In order to display the execution trace-back, local symbol
  8164. information is required for all functions in the trace-back.  VIDEO will
  8165. list all functions up to the first for which no local symbol information is
  8166. available.  For information on generating local symbol information, see the
  8167. book entitled "WATCOM Linker User's Guide" ("The DEBUG Directive").
  8168.  
  8169. If an expression is specified, it is evaluated and only that many levels of
  8170. the calling sequence are displayed.
  8171.  
  8172. In the following example, we show a calling sequence in the C "Calendar"
  8173. program.
  8174.  
  8175. Example:
  8176.   DBG>show calls
  8177.   at          PosCursor+32(calendar@160)
  8178.   called from Line+68(calendar@147)
  8179.   called from Box+39(calendar@121)
  8180.   called from Calendar+43(calendar@79)
  8181.   called from main+70(calendar@40)
  8182.  
  8183. In the following example, we show a calling sequence in the FORTRAN 77
  8184. "Calendar" program.
  8185.  
  8186. Example:
  8187.   DBG>show calls
  8188.   at          POSCURSOR+22(calendar@149)
  8189.   called from LINE+234(calendar@124)
  8190.   called from BOX+65(calendar@101)
  8191.   called from CALENDAR+107(calendar@63)
  8192.   called from FMAIN+120(calendar@22)
  8193.   DBG>log
  8194.  
  8195.  
  8196.  
  8197. Show Window Settings
  8198. ════════════════════
  8199. ┌──────────────────────────────────────────────────────────────────────────┐
  8200. │ SHow Display {window_name}                           │
  8201. └──────────────────────────────────────────────────────────────────────────┘
  8202.  
  8203. This command is used to display the settings for all or some windows.  The
  8204. valid window names are:
  8205.  
  8206.   Assembly
  8207.   Command
  8208.   Dialogue
  8209.   Fpu
  8210.   Memory
  8211.   Prompt
  8212.   Register
  8213.   SOurce
  8214.   STack
  8215.   Thread
  8216.  
  8217. Example:
  8218.   DBG>show display assembly register
  8219.   display assembly /open {Assembly: *} 20,24,1,80
  8220.   display register /close {CPU} 3,22,72,80
  8221.  
  8222. If no window name is specified then the settings for all windows are
  8223. displayed.
  8224.  
  8225.  
  8226.  
  8227. Show Flip Setting
  8228. ═════════════════
  8229. ┌──────────────────────────────────────────────────────────────────────────┐
  8230. │ SHow Flip                                   │
  8231. └──────────────────────────────────────────────────────────────────────────┘
  8232.  
  8233. This command is used to show the current setting for screen flipping.  See
  8234. the description of the Flip command for more information.
  8235.  
  8236.  
  8237.  
  8238. Show Module Names
  8239. ═════════════════
  8240. ┌──────────────────────────────────────────────────────────────────────────┐
  8241. │ SHow Modules [name]                               │
  8242. └──────────────────────────────────────────────────────────────────────────┘
  8243.  
  8244. This command is used to display the names of modules in the current
  8245. application.  If name is specified, only those module names that begin with
  8246. "name" are displayed.
  8247.  
  8248. Example:
  8249.   DBG>show module fp
  8250.   FPRTF FPUTC
  8251.  
  8252. In the above example, any module names that begin with the letters "fp" are
  8253. displayed in the Dialogue window.
  8254.  
  8255.  
  8256.  
  8257. Show Window Attributes
  8258. ══════════════════════
  8259. ┌──────────────────────────────────────────────────────────────────────────┐
  8260. │ SHow Paint {window_names}                           │
  8261. └──────────────────────────────────────────────────────────────────────────┘
  8262.  
  8263. This command is used to display the settings of attributes for all or some
  8264. windows.  The valid window names are:
  8265.  
  8266.   Assembly
  8267.   Command
  8268.   Dialogue
  8269.   Fpu
  8270.   Memory
  8271.   Prompt
  8272.   Register
  8273.   SOurce
  8274.   STack
  8275.   Thread
  8276.  
  8277. If no window name is specified then the settings of attributes for all
  8278. windows are displayed.    To display a subset, specify only those window names
  8279. in which you are interested.
  8280.  
  8281. Example:
  8282.   DBG>show paint source dialogue
  8283.   paint source    plain cyan,black
  8284.   paint source    active black,cyan
  8285.   paint source    standout brown,black
  8286.   paint source    title bright brown,black
  8287.   paint source    gadget black,white
  8288.   paint dialogue  plain white,black
  8289.   paint dialogue  active bright brown,black
  8290.   paint dialogue  standout bright magenta,black
  8291.   paint dialogue  title bright brown,black
  8292.   paint dialogue  gadget black,white
  8293.  
  8294.  
  8295.  
  8296. Show Debugger Settings
  8297. ══════════════════════
  8298. ┌──────────────────────────────────────────────────────────────────────────┐
  8299. │ SHow Set {item_names}                            │
  8300. └──────────────────────────────────────────────────────────────────────────┘
  8301.  
  8302. This command is used to display the current settings of various VIDEO
  8303. parameters.  Valid item names are:
  8304.  
  8305.   Assembly
  8306.   Bell
  8307.   Call
  8308.   Dclick
  8309.   Fpu
  8310.   Implicit
  8311.   INput
  8312.   LAnguage
  8313.   Level
  8314.   MAcro
  8315.   Menu
  8316.   Pfkey
  8317.   Radix
  8318.   SOurce
  8319.   SYmbol
  8320.   Tab
  8321.   Visible
  8322.  
  8323. If no argument is specified then all settings are displayed.  To display a
  8324. subset, specify only those items in which you are interested.
  8325.  
  8326. Example:
  8327.   DBG>show set pfkey radix
  8328.   set pfkey 1 {help}
  8329.   set pfkey 4 {if !?_dbg@pf_4 {/_dbg@pf_4=0};
  8330.       if (++_dbg@pf_4)&1 {disp fpu /o} {disp fpu /c}}
  8331.   set pfkey 5 {reg -1}
  8332.   set pfkey 6 {reg +1}
  8333.   set pfkey 7 {/++_dbg@dbg$wind_split;<wind}
  8334.   set pfkey 8 {if !?_dbg@pf_8 {/_dbg@pf_8=0};
  8335.       if (++_dbg@pf_8)&1 {set menu off;<wind}
  8336.       {set menu on;<wind}}
  8337.   set pfkey 9 {set input source}
  8338.   set pfkey 10 {set input assembly}
  8339.   set radix /0n 10
  8340.   set radix /0x 16
  8341.   set radix /0 8
  8342.   set radix 10
  8343.  
  8344. In the above example, the current settings of the programmable function keys
  8345. and the default radix and radix specifiers are displayed.
  8346.  
  8347. ::::SUMMARY
  8348. BREAK       - set a break point
  8349. CALL       - call a routine
  8350. DISPLAY    - create and remove VIDEO windows
  8351. DO       - assign values to variables, registers, etc.
  8352. ERROR       - report an error to the screen
  8353. EXAMINE    - examine memory contents
  8354. FLIP       - flip to the application's output screen
  8355. GO       - resume execution
  8356. HELP       - request the interactive help facility
  8357. IF       - conditionally execute one or more VIDEO commands
  8358. INVOKE       - execute a VIDEO command file
  8359. LOG       - log VIDEO output to a file
  8360. MODIFY       - modify memory locations
  8361. NEW       - reload a task, respecify the command line, or redirect the
  8362.        standard input and output files
  8363. PAINT       - establish colour attributes for VIDEO windows
  8364. PRINT       - display variable contents
  8365. QUIT       - quit debugging the application and leave VIDEO
  8366. REGISTER   - restore a specific register set
  8367. REMARK       - document a VIDEO command file
  8368. SET       - establish various VIDEO operating parameters (disassembly
  8369.        format, warning bell, "Call" command conventions, mouse double
  8370.        click rate, math coprocessor display, command file invocation,
  8371.        current window, expression grammar, language level, macro hot
  8372.        keys, menu display, programmable function keys, numerical radix,
  8373.        source file location and naming patterns, symbol name case
  8374.        sensitivity and naming conventions, source file tab expansion
  8375.        factor, source and assembly window text display boundaries)
  8376. SHOW       - show various VIDEO operating parameters
  8377. SYSTEM       - invoke a subprocess from within VIDEO
  8378. THREAD       - manipulate the threads of execution of a multi-threaded
  8379.        application under OS/2 or NetWare 386
  8380. TRACE       - trace program execution one statement at a time
  8381. VIEW       - examine the contents of a file
  8382. WATCH       - request VIDEO to watch for changes to a variable or memory
  8383.        location
  8384. WHILE       - execute one or more VIDEO commands while an expression is true
  8385. ::::SYMBOLS
  8386. VIDEO defines a number of symbols which have special meaning.  Each of the
  8387. registers is designated by a special name.
  8388.  
  8389. eax       32-bit EAX register (32-bit mode only)
  8390. ax       16-bit AX register
  8391. al       8-bit AL register
  8392. ah       8-bit AH register
  8393. ebx       32-bit EBX register (32-bit mode only)
  8394. bx       16-bit BX register
  8395. bl       8-bit BL register
  8396. bh       8-bit BH register
  8397. ecx       32-bit ECX register (32-bit mode only)
  8398. cx       16-bit CX register
  8399. cl       8-bit CL register
  8400. ch       8-bit CH register
  8401. edx       32-bit EDX register (32-bit mode only)
  8402. dx       16-bit DX register
  8403. dl       8-bit DL register
  8404. dh       8-bit DH register
  8405. eip       Instruction pointer register (32-bit mode only)
  8406. ip       Instruction pointer register
  8407. esi       Source index register (32-bit mode only)
  8408. si       Source index register
  8409. edi       Destination index register (32-bit mode only)
  8410. di       Destination index register
  8411. esp       Stack pointer register (32-bit mode only)
  8412. sp       Stack pointer register
  8413. ebp       Base pointer register (32-bit mode only)
  8414. bp       Base pointer register
  8415. cs       Code segment register
  8416. ds       Data segment register
  8417. es       Extra segment register
  8418. fs       Segment register (32-bit mode only)
  8419. gs       Segment register (32-bit mode only)
  8420. ss       Stack segment register
  8421. fl       Flags register
  8422. efl       Flags register (32-bit mode only)
  8423. fl.flg_bit_name Individual bits in Flags register
  8424.  
  8425.          flg_bit_name ::= "c" | "p" | "a" | "z" | "s" | "i" | "d" | "o"
  8426.  
  8427. efl.flg_bit_name Individual bits in Flags register
  8428.  
  8429.          flg_bit_name ::= "c" | "p" | "a" | "z" | "s" | "i" | "d" | "o"
  8430.  
  8431.        The following table lists the full name for each of the flags
  8432.        register bits:
  8433.  
  8434.        fl.o, efl.o overflow flag
  8435.        fl.d, efl.d direction flag
  8436.        fl.i, efl.i interrupt flag
  8437.        fl.s, efl.s sign flag
  8438.        fl.z, efl.z zero flag
  8439.        fl.a, efl.a auxiliary carry flag
  8440.        fl.p, efl.p parity flag
  8441.        fl.c, efl.c carry flag
  8442.  
  8443. st0 - st7  Numeric Data Processor registers (math coprocessor registers)
  8444. cw       NDP control word (math coprocessor control word)
  8445. cw.cw_bit_name Individual bits in the control word
  8446.  
  8447.          cw_bit_name ::= "ic" | "rc" | "pc" | "iem" | "pm" |
  8448.                      "um" | "om" | "zm" | "dm" | "im"
  8449.  
  8450.        The following table lists the full name for each of the control
  8451.        word bits:
  8452.  
  8453.        cw.ic      infinity control
  8454.  
  8455.             0 = projective
  8456.             1 = affine
  8457.  
  8458.        cw.rc      rounding control (2 bits)
  8459.  
  8460.             00 = round to nearest or even
  8461.             01 = round down (towards negative infinity)
  8462.             10 = round up (towards positive infinity)
  8463.             11 = chop (truncate toward zero)
  8464.  
  8465.        cw.pc      precision control (2 bits)
  8466.  
  8467.             00 = 24 bits
  8468.             01 = reserved
  8469.             10 = 53 bits
  8470.             11 = 64 bits
  8471.  
  8472.        cw.iem     interrupt enable mask (8087 only)
  8473.  
  8474.             0 = interrupts enabled
  8475.             1 = interrupts disabled (masked)
  8476.  
  8477.        cw.pm      precision (inexact result) mask
  8478.        cw.um      underflow mask
  8479.        cw.om      overflow mask
  8480.        cw.zm      zero-divide mask
  8481.        cw.dm      denormalized operand mask
  8482.        cw.im      invalid operand mask
  8483.  
  8484. sw       NDP status word (math coprocessor status word)
  8485. sw.sw_bit_name Individual bits in the status word
  8486.  
  8487.          sw_bit_name ::=  "b" | "c3" | "st" | "c2" | "c1" |
  8488.                      "c0" | "es" | "sf" | "pe" | "ue" |
  8489.                      "oe" | "ze" | "de" | "ie"
  8490.  
  8491.        The following table lists the full name for each of the status
  8492.        word bits:
  8493.  
  8494.        sw.b       busy
  8495.        sw.c3      condition code bit 3
  8496.        sw.st      stack stop pointer (3 bits)
  8497.  
  8498.             000 = register 0 is stack top
  8499.             001 = register 1 is stack top
  8500.             010 = register 2 is stack top
  8501.                 .
  8502.                 .
  8503.                 .
  8504.             111 = register 7 is stack top
  8505.  
  8506.        sw.c2      condition code bit 2
  8507.        sw.c1      condition code bit 1
  8508.        sw.c0      condition code bit 0
  8509.        sw.es      error summary (287, 387 only)
  8510.        sw.sf      stack fault (387 only)
  8511.        sw.pe      precision (inexact result) exception
  8512.        sw.ue      underflow exception
  8513.        sw.oe      overflow exception
  8514.        sw.ze      zero-divide exception
  8515.        sw.de      denormalized operand exception
  8516.        sw.ie      invalid operation exception
  8517.  
  8518. VIDEO permits the manipulation of register contents using any of the
  8519. operators described under the topics "C_OPERATORS" or "F77_OPERATORS".    By
  8520. default, these predefined names are accessed just like any other variables
  8521. defined by the user or the application.  Should the situation ever arise
  8522. where the application defines a variable whose name conflicts with that of
  8523. one of these debugger variables, the module specifier _dbg may be used to
  8524. resolve the ambiguity.    For example, if the application defines a variable
  8525. called cs then _dbg@cs can be specified to resolve the ambiguity.  The
  8526. "_dbg@" prefix indicates that we are referring to a VIDEO defined symbol
  8527. rather than an application defined symbol.
  8528.  
  8529. The flags register, the NDP control word, and the NDP status word can be
  8530. accessed as a whole or by its component status bits.
  8531.  
  8532. Example:
  8533.   /fl.c=0
  8534.   /cw.um=0
  8535.   ?sw.oe
  8536.  
  8537. In the above example, the "carry" flag is cleared, the NDP underflow mask of
  8538. the control word is cleared, and the NDP overflow exception bit of the
  8539. status word is printed.
  8540.  
  8541. The low order bit of the expression result is used to set or clear the
  8542. specified flag.
  8543.  
  8544. Example:
  8545.   fl.c=0x03a6
  8546.  
  8547. In the above example, the "carry" flag is cleared since the low order bit of
  8548. the result is 0.
  8549.  
  8550. VIDEO also defines some other special names.
  8551.  
  8552. dbg$32       This debugger symbol represents the mode in which the processor
  8553.        is running.
  8554.  
  8555.        0          16-bit mode
  8556.        1          32-bit mode
  8557.  
  8558. dbg$bottom This debugger symbol represents the number of the last line on
  8559.        the screen which may be used for windows (see also dbg$top,
  8560.        dbg$left, dbg$right).
  8561.  
  8562. dbg$bp       This debugger symbol represents the register pair SS:BP (16-bit
  8563.        mode) or SS:EBP (32-bit mode).
  8564.  
  8565.        Example:
  8566.          ? dbg$bp
  8567.  
  8568. dbg$code   This debugger symbol represents the current code location under
  8569.        examination.  The dot address "." is either set to dbg$code or
  8570.        dbg$data, depending on whether you were last looking at code or
  8571.        data.
  8572.  
  8573. dbg$cpu    This debugger symbol represents the type of central processing
  8574.        unit which is in your personal computer system.
  8575.  
  8576.        0          Intel 8088, 8086 or compatible processor
  8577.        1          Intel 80188, 80186 or compatible processor
  8578.        2          Intel 80286 or compatible processor
  8579.        3          Intel 80386 or compatible processor
  8580.        4          Intel 80486 or compatible processor
  8581.  
  8582. dbg$ctid   This debugger symbol represents the identification number of the
  8583.        current execution thread.  Under DOS and QNX, the current thread
  8584.        ID is always 1.  The current execution thread can be selected
  8585.        using the Thread window or the Thread command.
  8586.  
  8587. dbg$data   This debugger symbol represents the current data location under
  8588.        examination.  The dot address "." is either set to dbg$code or
  8589.        dbg$data, depending on whether you were last looking at code or
  8590.        data.
  8591.  
  8592. dbg$etid   This debugger symbol represents the identification number of the
  8593.        thread that was executing when the debugger was entered.  Under
  8594.        DOS and QNX, the executing thread ID is always 1.
  8595.  
  8596. dbg$fpu    This debugger symbol represents the type of numeric data
  8597.        processor (math coprocessor) that is installed in your personal
  8598.        computer system.
  8599.  
  8600.        -1          An 80x87 emulator is installed
  8601.        0          No coprocessor is installed
  8602.        1          An Intel 8087 is installed
  8603.        2          An Intel 80287 is installed
  8604.        3          An Intel 80387 is installed
  8605.        4          An Intel 80486 processor, supporting coprocessor
  8606.               instructions, is installed
  8607.  
  8608. dbg$ip       This debugger symbol represents the register pair CS:IP (16-bit
  8609.        mode) or CS:EIP (32-bit mode).
  8610.  
  8611.        Example:
  8612.          ? dbg$ip
  8613.  
  8614. dbg$left   This debugger symbol represents the number of the first column on
  8615.        the screen which may be used for windows (see also dbg$right,
  8616.        dbg$top, dbg$bottom).
  8617.  
  8618. dbg$monitor This debugger symbol represents the type of monitor adapter
  8619.        which is in use.
  8620.  
  8621.        0          IBM Monochrome Adapter
  8622.        1          IBM Colour Graphics Adapter (CGA)
  8623.        2          IBM Enhanced Graphics Adapter (EGA)
  8624.        3          IBM Video Graphics Array (VGA)
  8625.  
  8626. dbg$os       This debugger symbol represents the operating system that is
  8627.        currently running the application.
  8628.  
  8629.        1          DOS
  8630.        2          OS/2
  8631.        3          386|DOS-Extender from Phar Lap Software, Inc.
  8632.        4          OS/386 from ERGO Computing, Inc.
  8633.        5          NetWare 386 from Novell, Inc.
  8634.        6          QNX from Quantum Software Systems Ltd.
  8635.        7          DOS/4GW from Rational Systems, Inc.  (included in the
  8636.               WATCOM C/386 and WATCOM FORTRAN 77/386 packages)
  8637.        8          Microsoft Windows from Microsoft Corporation
  8638.        9          PenPoint from GO Corporation
  8639.  
  8640. dbg$pid    (OS/2, NetWare 386, QNX only) This debugger symbol contains the
  8641.        process identification value for the program being debugged.
  8642.  
  8643. dbg$psp    (DOS only) This debugger symbol contains the segment value for
  8644.        the DOS "program segment prefix" of the program being debugged.
  8645.  
  8646. dbg$radix  This debugger symbol represents the current default numeric
  8647.        radix.
  8648.  
  8649. dbg$remote This debugger symbol is 1 if the "REMotefiles" option was
  8650.        specified and 0 otherwise.
  8651.  
  8652. dbg$right  This debugger symbol represents the number of the last column on
  8653.        the screen which may be used for windows (see also dbg$left,
  8654.        dbg$top, dbg$bottom).
  8655.  
  8656. dbg$sp       This debugger symbol represents the register pair SS:SP (16-bit
  8657.        mode) or SS:ESP (32-bit mode).
  8658.  
  8659.        Example:
  8660.          ? dbg$sp
  8661.  
  8662. dbg$top    This debugger symbol represents the number of the first line on
  8663.        the screen which may be used for windows (see also dbg$left,
  8664.        dbg$right, dbg$bottom).
  8665.  
  8666. dbg$view   This debugger symbol is set by the View command.  It represents
  8667.        the segment and offset of the code corresponding to the line
  8668.        where the cursor was last positioned when viewing a module of the
  8669.        current application.  This variable has several uses.  For
  8670.        example, it can be used in a Break command to set a break point.
  8671.  
  8672.        Example:
  8673.          break dbg$view
  8674. ::::SYSTEM
  8675. ┌──────────────────────────────────────────────────────────────────────────┐
  8676. │ SYstem[/(Remote | Local)] [ system_cmd | "{" system_cmd "}" ]        │
  8677. │ !                                       │
  8678. └──────────────────────────────────────────────────────────────────────────┘
  8679.  
  8680. The SYstem or !  command may be used to run other commands or programs
  8681. without destroying the debugging environment.  If system_cmd is entered,
  8682. that command is executed by the operating system and control returns to
  8683. VIDEO.
  8684.  
  8685. If system_cmd is omitted, the operating system command interpreter or shell
  8686. is invoked.  Commands may be entered until an "exit" command is entered.
  8687. The shell is terminated and control returns to the debugger.
  8688.  
  8689. The /Remote and /Local qualifiers may be specified when using the remote
  8690. debugging feature.  If the /Remote qualifier is specified, the command is
  8691. run on the task machine.  If the /Local qualifier is specified, the command
  8692. is run on the debugger machine.  If neither qualifier is specified then
  8693. "local" is assumed unless the Remotefiles option was specified on the
  8694. command line.  For more information on remote debugging, see the topic
  8695. entitled "REMOTE_DEBUGGING".
  8696.  
  8697. Under QNX, a path specification that begins with a "/" could be interpreted
  8698. as a qualifier.
  8699.  
  8700. Example:
  8701.   DBG>system /users/fred/myapp
  8702.  
  8703. In the above example, the "/users" qualifier is not supported and an error
  8704. will result.  To resolve this conflict, the /Local qualifier must be used.
  8705.  
  8706. Example:
  8707.   DBG>system/local /users/fred/myapp
  8708.  
  8709. ┌────────────────────────────────────────────────────────────────────────────┐
  8710. │ Note:  There must be enough unused memory in the computer to run the         │
  8711. │ specified program or shell.  Under DOS, the program being debugged must    │
  8712. │ have released some memory back to the system so that there is room to load │
  8713. │ system_cmd.  For DOS, you can use the "RESIZE" command file to set the     │
  8714. │ size of the memory control block containing the Program Segment Prefix     │
  8715. │ (PSP) of the program being debugged.    See the topic entitled             │
  8716. │ "COMMAND_FILES" for more information on this command file.             │
  8717. │                                         │
  8718. │ You can also use the VIDEO "Checksize" option.  See the topic entitled     │
  8719. │ "DOS_STARTUP" for more information on this option.                 │
  8720. └────────────────────────────────────────────────────────────────────────────┘
  8721.  
  8722. Example:
  8723.   DBG>system c:\cmds\cset.com
  8724.  
  8725. In the above DOS example, the program "CSET.COM" is invoked from the "C"
  8726. disk and directory "\CMDS".
  8727.  
  8728. Example:
  8729.   DBG>system
  8730.  
  8731. The command shell is invoked.  The shell will not return to the debugger
  8732. until an "exit" command is executed.
  8733.  
  8734. Example:
  8735.   DBG>sys chdir \asmsrc
  8736.  
  8737. For DOS only, the shell is invoked to change the current directory to
  8738. "\ASMSRC".  Control is then immediately returned to VIDEO.
  8739.  
  8740. Example:
  8741.   DBG>! edit hello.c
  8742.  
  8743. An editor is invoked to edit the file "hello.c".  Corrections to the C
  8744. source code could be applied while the "HELLO" program is being debugged.
  8745. When the editor exits, control is returned to VIDEO.
  8746.  
  8747. Example:
  8748.   DBG>! edit fftc.for
  8749.  
  8750. An editor is invoked to edit the file "fftc.for".  Corrections to the
  8751. FORTRAN source code could be applied while the "FFTC" program is being
  8752. debugged.  When the editor exits, control is returned to VIDEO.
  8753. ::::THREAD
  8754. ┌──────────────────────────────────────────────────────────────────────────┐
  8755. │ THread                                   │
  8756. │ ~                                       │
  8757. │      /Change   [id_num]                           │
  8758. │      /Freeze   [id_num] | ["*"]                       │
  8759. │      /Show     [id_num] | ["*"]                       │
  8760. │      /Thaw     [id_num] | ["*"]                       │
  8761. └──────────────────────────────────────────────────────────────────────────┘
  8762.  
  8763. The THread or ~ command is used to manipulate the threads of execution of a
  8764. multi-threaded application under OS/2 or NetWare 386.  An execution thread
  8765. may be selected for examination by VIDEO (/Change), an execution thread may
  8766. be made not runnable (/Freeze), an execution thread may be made runnable
  8767. (/Thaw), or the status of execution threads may be displayed (/Show).
  8768.  
  8769. In an application that has multiple threads of execution, a particular
  8770. thread may be selected for examination by specifying its thread
  8771. identification number or thread ID using the Change option.
  8772.  
  8773. Example:
  8774.   00001>thread/change 2
  8775.  
  8776. In the above example, execution thread "2" is selected using the Change
  8777. option.  The debugger prompt will change to "00002" if an execution thread,
  8778. whose ID is "2", exists.  Other windows on the screen will change to reflect
  8779. the selection of another execution thread.  In particular, any Assembly,
  8780. Source, FPU, and Register windows that are present on the screen will
  8781. change.
  8782.  
  8783. The Change option need not be specified since it is the default when only a
  8784. thread ID is specified.
  8785.  
  8786. Example:
  8787.   00001>thread 2
  8788.  
  8789. In the above example, execution thread "2" is selected.
  8790.  
  8791. A particular thread may be "frozen" (i.e., made not runnable) by specifying
  8792. its thread ID using the Freeze option.
  8793.  
  8794. Example:
  8795.   00002>thread/freeze 3
  8796.  
  8797. In the above example, execution thread "3" is made not runnable.
  8798.  
  8799. All threads may be frozen by specifying "*" for the thread ID.
  8800.  
  8801. Example:
  8802.   00002>~/f *
  8803.  
  8804. The current thread may be frozen by omitting the thread ID.
  8805.  
  8806. Example:
  8807.   00002>thread/freeze
  8808.  
  8809. A particular thread may be "thawed" (i.e., made runnable) by specifying its
  8810. thread ID using the Thaw option.
  8811.  
  8812. Example:
  8813.   00002>thread/thaw 3
  8814.  
  8815. In the above example, execution thread "3" is made runnable.
  8816.  
  8817. All threads may be thawed by specifying "*" for the thread ID.
  8818.  
  8819. Example:
  8820.   00002>thread/thaw *
  8821.  
  8822. The current thread may be thawed by omitting the thread ID.
  8823.  
  8824. Example:
  8825.   00002>~/th
  8826.  
  8827. The status of a particular thread may be displayed by specifying its thread
  8828. ID using the Show option.
  8829.  
  8830. Example:
  8831.   00002>thread/show 1
  8832.  
  8833. In the above example, the status of execution thread "1" is displayed.
  8834.  
  8835. The status of all threads may be displayed by specifying "*" for the thread
  8836. ID.
  8837.  
  8838. Example:
  8839.   00002>th/sh *
  8840.  
  8841. Alternately, the status of all threads may be displayed by specifying the
  8842. Thread command without any arguments.
  8843.  
  8844. Example:
  8845.   00002>thread
  8846.  
  8847. The status of the current thread may be displayed by specifying Show and
  8848. omitting the thread ID.
  8849.  
  8850. Example:
  8851.   00002>~/s
  8852. ::::TRACE
  8853. ┌──────────────────────────────────────────────────────────────────────────┐
  8854. │ Trace                                    │
  8855. │     [/Assembly] [/Over | /Into | /Next] [start_addr_expr]           │
  8856. │     [/Mix]        [/Over | /Into | /Next] [start_addr_expr]           │
  8857. │     [/Source]   [/Over | /Into | /Next] [start_addr_expr]           │
  8858. └──────────────────────────────────────────────────────────────────────────┘
  8859.  
  8860. The Trace command is used to step through the execution of a program.
  8861. Execution may be viewed one source line at a time (/Source), one assembly
  8862. instruction at a time (/Assembly), or a combination of both source and
  8863. assembly lines (/Mix).    The latter mode will display source lines when they
  8864. are available and switch to assembly instructions when source line
  8865. information is not available.
  8866.  
  8867. Source line numbers are displayed in the Source window when source line
  8868. information is included in the executable image (for additional information,
  8869. see the description of the compiler's "d1" option and the WATCOM Linker
  8870. "DEBUG" directive).  If the source file can be accessed then the
  8871. corresponding source text is also displayed.  For a discussion of how VIDEO
  8872. locates the source files that correspond to the modules in your application,
  8873. see the description of the Set Source command.
  8874.  
  8875. Assembly instructions are displayed in the Assembly window.
  8876.  
  8877. When source line information is available, both the Source and Assembly
  8878. windows are synchronized.
  8879.  
  8880. /Assembly [/Over | /Into | /Next] [start_addr_expr]
  8881.        VIDEO will trace execution of the application one assembly
  8882.        instruction at a time.
  8883.  
  8884.        Example:
  8885.          DBG>trace /assembly
  8886.  
  8887. /Mix [/Over | /Into | /Next] [start_addr_expr]
  8888.        VIDEO will trace execution of the application one source
  8889.        statement at a time, or one instruction at a time when no source
  8890.        text is available.
  8891.  
  8892.        Example:
  8893.          DBG>trace /mix
  8894.  
  8895. /Source [/Over | /Into | /Next] [start_addr_expr]
  8896.        VIDEO will trace execution of the application one source
  8897.        statement at a time.  Source line information must be available
  8898.        at the time that this command is issued.
  8899.  
  8900.        Example:
  8901.          DBG>trace /source
  8902.  
  8903. When none of the /Assembly, /Mix or /Source qualifiers is specified, VIDEO
  8904. will use a default trace mode.    Initially, the default is /Mix but this
  8905. default can be set with Set Level command.
  8906.  
  8907. By default, VIDEO will enter a tracing mode in which one source statement or
  8908. assembly instruction is executed each time one of the SPACE bar or "I" or
  8909. "N" keys is pressed.
  8910.  
  8911. If the SPACE bar is used to advance execution, the tracing of called
  8912. routines is skipped.  Tracing continues with the statement or instruction
  8913. following the routine invocation.
  8914.  
  8915. Example:
  8916.   C Programming Example
  8917.      8 int main()
  8918.      9   {
  8919.     10    printf( "Hello world\n" );
  8920.     11    return( 0 );
  8921.     12   }
  8922.  
  8923.   FORTRAN Programming Example
  8924.      8     PROGRAM DEMO
  8925.      9     EXTERNAL PRINTF
  8926.     10     CALL PRINTF( 'Hello world' )
  8927.     11     END
  8928.  
  8929. In the above example, we skip the trace of the execution of the "printf"
  8930. routine by pressing the SPACE bar when the "printf" statement is about to be
  8931. executed.
  8932.  
  8933. If the "I" or "into" key is used to advance execution, the execution of
  8934. called routines is traced.
  8935.  
  8936. Example:
  8937.   main_     mov    AX,0002
  8938.   main_+03    push   AX
  8939.   main_+04    call   printf
  8940.   main_+07    add    SP,2
  8941.   main_+0A    xor    AX,AX
  8942.  
  8943. In the above example, we can trace the execution of the "printf" routine by
  8944. pressing the "I" key when the "call" instruction at "main_+04" is about to
  8945. be executed.
  8946.  
  8947. The "N" or "next" key may be used to advance tracing to the next sequential
  8948. statement or instruction immediately following the current statement or
  8949. instruction.  In situations where you are at the bottom of a loop, this
  8950. permits you to skip over the tracing of statements or instructions which
  8951. might be repeated many times.
  8952.  
  8953. Example:
  8954.   _CSTART_+66    sub    SI,SI
  8955.   _CSTART_+68    cmp    BYTE PTR [SI],00
  8956.   _CSTART_+6B    movsb
  8957.   _CSTART_+6C  *jne    _CSTART_+68
  8958.   _CSTART_+6E    cmp    BYTE PTR [SI],00
  8959.  
  8960. In the above example, we can skip tracing of the loop from "_CSTART_+68" to
  8961. "_CSTART_+6C" by pressing the "N" key when the "jne" instruction at
  8962. "_CSTART_+6C" is about to be executed.    The "*" preceding the "jne"
  8963. indicates that the branch to "_CSTART_+68" will be taken.  The next
  8964. instruction to be traced will be the "cmp" at "_CSTART_+6E".
  8965.  
  8966. When using the "N" key, care must be taken to ensure that the execution path
  8967. will eventually reach the next statement or instruction.  If execution fails
  8968. to reach this point then the program may continue to execute until
  8969. completion.  This situation is akin to setting a break point at a statement
  8970. or assembly instruction which will never be executed and then issuing a Go
  8971. command.  In this situation, the application would execute to completion.
  8972.  
  8973. Tracing can be discontinued by pressing any other key.
  8974.  
  8975. The /Over, /Into and /Next modifiers may be used to continue execution to
  8976. the "next" statement or instruction after which VIDEO will prompt for
  8977. another command.  This is often referred to as "single-step" mode.
  8978.  
  8979. /Over       This qualifier may be used to continue execution to the "next"
  8980.        statement or assembly instruction.  If the current statement or
  8981.        instruction invokes a routine then the "next" statement or
  8982.        instruction is the one which follows the invocation of the
  8983.        routine.
  8984.  
  8985. /Into       This qualifier may be used to continue execution to the "next"
  8986.        statement or assembly instruction.  If the current statement or
  8987.        instruction invokes a routine then the "next" statement or
  8988.        instruction is the first one in the called routine.
  8989.  
  8990. /Next       This qualifier may be used to continue execution to the "next"
  8991.        statement or assembly instruction which immediately follows the
  8992.        current statement or instruction in memory.    If the current
  8993.        statement or instruction is one that branches, care must be taken
  8994.        to ensure that the execution path will eventually reach the
  8995.        statement or instruction which follows.  If execution fails to
  8996.        reach this point then the program may continue to execute until
  8997.        completion.
  8998. ::::VIEW
  8999. ┌──────────────────────────────────────────────────────────────────────────┐
  9000. │ View[/Binary]  [module_or_file_spec]                       │
  9001. └──────────────────────────────────────────────────────────────────────────┘
  9002.  
  9003. The View command invokes a simple file browser (i.e., you cannot make
  9004. changes to the file, only look at it).    If module_or_file_spec is not
  9005. specified then the current module name is assumed.
  9006.  
  9007. The argument module_or_file_spec is treated first as a possible module name
  9008. and then as a file name.  The debugger attempts to locate the source file
  9009. that corresponds to the module in the same manner as that used when
  9010. displaying source lines in the Source window.  VIDEO searches for the file
  9011. in the devices and paths that you specify in the Set Source command.
  9012.  
  9013. In cases where there is a conflict between a module name and a file name, a
  9014. drive (DOS, MS Windows, OS/2), path or file extension can be specified to
  9015. resolve the ambiguity.    For example, suppose that you had a data file called
  9016. "printf".  If you entered the command view printf then VIDEO would attempt
  9017. to locate the file "printf.c".    On the other hand, if you entered the
  9018. command view printf.  then VIDEO would attempt to locate the file "printf"
  9019. under DOS, MS Windows or OS/2.    Under QNX, you would enter the command view
  9020. ./printf to view the file "printf".
  9021.  
  9022. If /Binary is specified then the file contents are displayed in hexadecimal
  9023. notation.  A file name must be specified when this qualifier is used.
  9024.  
  9025. The manipulation of the View window with keys and a mouse is described under
  9026. the topic entitled "WINDOWS".
  9027.  
  9028. Under QNX, a path specification that begins with a "/" could be interpreted
  9029. as a qualifier.
  9030.  
  9031. Example:
  9032.   DBG>view /users/fred/test.dat
  9033.  
  9034. In the above example, the "/users" qualifier is not supported and an error
  9035. will result.  To resolve this conflict, the local file specifier prefix "@l"
  9036. can be used.
  9037.  
  9038. Example:
  9039.   DBG>view @l/users/fred/test.dat
  9040.  
  9041. Local and remote file specifier prefixes are described under the topic
  9042. entitled "REMOTE_DEBUGGING".
  9043. ::::WATCH
  9044. ┌──────────────────────────────────────────────────────────────────────────┐
  9045. │ Watch                                    │
  9046. │     [/Set]       addr_expr [ cmd_list ]                   │
  9047. │     /Byte       addr_expr [ cmd_list ]                   │
  9048. │     /Word       addr_expr [ cmd_list ]                   │
  9049. │     /DWord       addr_expr [ cmd_list ]                   │
  9050. │     /Activate    "*" | index_expr | "/" addr_expr               │
  9051. │     /Deactivate  "*" | index_expr | "/" addr_expr               │
  9052. │     /Clear       "*" | index_expr | "/" addr_expr               │
  9053. └──────────────────────────────────────────────────────────────────────────┘
  9054.  
  9055. A watch point defines a memory location which, if modified, causes execution
  9056. of the application to suspend.    A watch point may be defined for:
  9057.  
  9058. /Byte       a byte (8 bits)
  9059.  
  9060. /Word       a word (16 bits), and
  9061.  
  9062. /DWord       a doubleword (32 bits)
  9063.  
  9064. /Set is implied when no other qualifier is specified.  If /Set or no
  9065. qualifier is specified, a watchpoint is set for a word or doubleword
  9066. depending on whether you are debugging a 16-bit or 32-bit application.    A
  9067. watchpoint may be removed with the /Clear qualifier.  Watchpoints may be
  9068. enabled with the /Activate qualifier or disabled with the /Deactivate
  9069. qualifier.  Up to 7 watch points may be defined.  When an instruction
  9070. modifies a location guarded by an active watch point, application execution
  9071. is suspended and the debugger is entered.
  9072.  
  9073. Example:
  9074.   DBG>watch/set _listhead
  9075.   DBG>watch _listhead
  9076.  
  9077. In the above example, two equivalent commands are shown.  A watch point is
  9078. defined and automatically activated for the 16-bit memory location defined
  9079. by the global symbol _listhead.  Only one watch point may be specified for a
  9080. particular location in memory.
  9081.  
  9082. A watch point may be specified in terms of a module name and symbol name.
  9083.  
  9084. Example:
  9085.   DBG>watch sort@_listhead
  9086.  
  9087. When the executing application modifies a memory location guarded by an
  9088. active watch point, application execution is suspended and the debugger is
  9089. entered.  If one or more debugger commands were specified when the watch
  9090. point was defined, the debugger commands are executed first.  The command
  9091. list that follows the address expression in the /Set, /Byte, /Word, or
  9092. /DWord qualifiers is defined as follows:
  9093.  
  9094.   cmd_list ::= "{" [cmd] { ";" [cmd] } "}"
  9095.  
  9096. This is simply a VIDEO command line placed inside of braces.
  9097.  
  9098. Notes:
  9099.  
  9100.   1. For a complete description of valid address expressions, see the
  9101.     chapter entitled "VIDEO Expression Handling".
  9102.  
  9103.   2. Execution of the application may be resumed if one of the commands was
  9104.     a Go command; otherwise the debugger prompts the user for a new command.
  9105.  
  9106.     Example:
  9107.       DBG>watch _listhead {if _listhead != 0 {go/keep}}
  9108.  
  9109.     Each time the "listhead" variable is modified, its value is compared
  9110.     with zero and execution is resumed only if the value is not zero.
  9111.  
  9112.   3. If no arguments are specified to the "Watch" command, the currently
  9113.     defined watch points will be displayed.  The first one shown is watch
  9114.     point number 1, the second one shown is watch point number 2, and so on.
  9115.     These are called the watch point indices.  Active watch points are shown
  9116.     in "active" attributes, inactive ones are shown in "plain" attributes.
  9117.     See the description of the Paint command for a discussion of attributes.
  9118.  
  9119.   4. When activating, deactivating or clearing a watch point, either the
  9120.     watch point index or the address must be specified.  If "*" is specified
  9121.     as the watch point index then all watch points are affected.
  9122.  
  9123.     Example:
  9124.       DBG>watch/set _listhead; watch/deac 1
  9125.       DBG>watch/set _listhead; watch/deac /_listhead
  9126.  
  9127.     In both examples, a watch point is set and then a watch point is
  9128.     deactivated.  In the first example, the watch point set for _listhead is
  9129.     deactivated only if no other watch points have been set (since it will
  9130.     then be watch point number 1).  The second example illustrates how the
  9131.     watch point for _listhead will be deactivated under any circumstances.
  9132.  
  9133.     Example:
  9134.       DBG>watch/activate 2; watch/deactivate 1
  9135.  
  9136.     Watch point number 2 is activated and 1 is deactivated.
  9137.  
  9138.   5. The specified address need not be the name of a symbol.
  9139.  
  9140.     Example:
  9141.       DBG>watch/byte es:di
  9142.  
  9143.     A watch point is set for the 8-bit location specified by the contents of
  9144.     the ES:DI register pair.
  9145.  
  9146.     Example:
  9147.       DBG>watch/deactivate /bx
  9148.  
  9149.     The watch point whose address is specified by the contents of the DS:BX
  9150.     register pair is deactivated.
  9151.  
  9152.   6. All watch points may be removed in a single command.
  9153.  
  9154.     Example:
  9155.       DBG>watch/clear *
  9156.  
  9157.     The asterisk refers to all watch points.
  9158. ::::WHILE
  9159. ┌──────────────────────────────────────────────────────────────────────────┐
  9160. │ WHile <expr> cmd_list                            │
  9161. └──────────────────────────────────────────────────────────────────────────┘
  9162.  
  9163. The WHile command permits execution of a list of commands while the
  9164. specified expression is true (i.e., evaluates to a non-zero result).  The
  9165. command list that follows the command is defined as follows:
  9166.  
  9167.   cmd_list ::= "{" [cmd] { ";" [cmd] } "}"
  9168.  
  9169. Example:
  9170.   DBG>/ax=0; while ax!=25 {/ax++;print ax}
  9171.  
  9172. The above example prints the numbers from 1 to 25 in the Dialogue window.
  9173. It first sets the AX register to 0.  While the content of the AX register is
  9174. not equal to 25, the debugger will increment the value in the AX register
  9175. and print the new value.
  9176.  
  9177. There are more complex scenarios in which the WHile command can be put to
  9178. good use.  For example, it could be used to follow a linked list which is
  9179. terminated by a NULL pointer.
  9180. ::::WIN3_STARTUP
  9181. Debugging an application that is to run under Microsoft Windows can be done
  9182. in either of two ways.    You can run VIDEO on the same computer system that
  9183. will be used to run the application or you can use a second computer system.
  9184. This latter choice uses the "remote debugging" feature of VIDEO.  This is
  9185. described under the topic entitled "REMOTE_WIN3".
  9186.  
  9187.  
  9188.  
  9189. Installing the Windows Version of VIDEO
  9190. ═══════════════════════════════════════
  9191. To use VIDEO, Microsoft Windows must be started in standard or enhanced mode.
  9192. When debugging 32-bit applications, you must include the "device"
  9193. specification listed below in the [386Enh] section of your Windows
  9194. "SYSTEM.INI" file.
  9195.  
  9196.   DEVICE=[d:]\WATCOM\BINW\WDEBUG.386
  9197.  
  9198. This device driver supports debugging of both 16-bit and 32-bit
  9199. applications.
  9200.  
  9201. You must include the Windows SDK file "WINDEBUG.DLL" in your path.  This
  9202. file is included in the WATCOM software package.
  9203.  
  9204. The following procedures will install VIDEO and the remote debugging servers
  9205. in the currently selected program group.  If you wish, you can create a new
  9206. program group for VIDEO and the remote debugging servers.
  9207.  
  9208. To install the Windows version of VIDEO, select the "New" entry of the
  9209. "File" menu of the Windows "Program Manager".  Select the "Program Item"
  9210. option.  For the "Description" field of the "Properties" window, enter the
  9211. name "VIDEO".  For the "Command Line" field, enter the full path
  9212. specification for "WVIDEOW.EXE".  Sample entries for the "Description" and
  9213. "Command Line" fields of the "Properties" window are shown in the following
  9214. illustration.
  9215.  
  9216. ┌────────────────────────────────────────────────────────────────────────────┐
  9217. │ Description:      VIDEO                              │
  9218. │ Command Line:   E:\WATCOM\BINW\WVIDEOW.EXE                     │
  9219. └────────────────────────────────────────────────────────────────────────────┘
  9220.  
  9221. A lightning bolt icon for VIDEO will appear in the currently selected
  9222. program group.
  9223.  
  9224. The remote debugging servers, "PARSERVW.EXE" and "NETSERVW.EXE", can also be
  9225. installed at this time.
  9226.  
  9227. To install the parallel remote debugging server, select the "New" entry of
  9228. the "File" menu of the Windows "Program Manager".  Select the "Program Item"
  9229. option.  Sample entries for the "Description" and "Command Line" fields of
  9230. the "Properties" window are shown in the following illustration.
  9231.  
  9232. ┌────────────────────────────────────────────────────────────────────────────┐
  9233. │ Description:      ParServer                             │
  9234. │ Command Line:   E:\WATCOM\BINW\PARSERVW.EXE                     │
  9235. └────────────────────────────────────────────────────────────────────────────┘
  9236.  
  9237. A lightning bolt icon for the parallel debugging server will appear in the
  9238. currently selected program group.
  9239.  
  9240. To install the NetBIOS remote debugging server, select the "New" entry of
  9241. the "File" menu of the Windows "Program Manager".  Select the "Program Item"
  9242. option.  Sample entries for the "Description" and "Command Line" fields of
  9243. the "Properties" window are shown in the following illustration.
  9244.  
  9245. ┌────────────────────────────────────────────────────────────────────────────┐
  9246. │ Description:      NetServer                             │
  9247. │ Command Line:   E:\WATCOM\BINW\NETSERVW.EXE                     │
  9248. └────────────────────────────────────────────────────────────────────────────┘
  9249.  
  9250. A lightning bolt icon for the NetBIOS debugging server will appear in the
  9251. currently selected program group.
  9252.  
  9253.  
  9254. Local Debugging of Windows Applications
  9255. ═══════════════════════════════════════
  9256. To start VIDEO, select the window in which you have installed VIDEO.  One of
  9257. the icons presented is used to start the debugger.  Double-click on the
  9258. VIDEO icon.
  9259.  
  9260. A prompt window will appear in which you will be required to enter a command
  9261. line that will be used to start the application.  The format of the command
  9262. line is described under the topic entitled "DOS_STARTUP".
  9263.  
  9264. You can make special versions of the VIDEO icon using the "Copy" and
  9265. "Properties" entries of the "File" menu of the Windows "Program Manager".
  9266. For example, you can add any options you wish to the "Command Line" field of
  9267. the "Properties" window.  Sample entries for the "Description" and "Command
  9268. Line" fields of the "Properties" window are shown in the following
  9269. illustration.
  9270.  
  9271. ┌────────────────────────────────────────────────────────────────────────────┐
  9272. │ Description:      VIDEO/Custom                             │
  9273. │ Command Line:   E:\WATCOM\BINW\WVIDEOW.EXE /swap /reg=4             │
  9274. └────────────────────────────────────────────────────────────────────────────┘
  9275.  
  9276. When you click on the newly created icon, the options specified in the
  9277. "Command Line" field will be taken as defaults.  As long as no executable
  9278. file name was specified in the "Command Line" field, VIDEO will present its
  9279. prompt window.    In the prompt window, you can specify more options and an
  9280. executable file name.
  9281.  
  9282. If you are debugging the same program over and over again, you might wish to
  9283. create an icon that includes the name of the file you wish to debug in the
  9284. "Command Line" field.  Each time you click on that icon, VIDEO is started
  9285. and it automatically loads the program you wish to debug.
  9286. ::::WIN3_WVIDEOW_ENVIRONMENT_VARIABLE
  9287. The WVIDEOW environment variable can be used to specify commonly used VIDEO
  9288. options.  If the specification of an option involves the use of an "="
  9289. character then the "#" character may be used in its place (this is required
  9290. by the syntax of the "SET" command).  These options are processed before
  9291. options specified on the command line.
  9292.  
  9293. Example:
  9294.   C>set wvideow=/swap/vga50/reg#4
  9295.  
  9296. The above examples illustrate how to define default options for the
  9297. debugger.
  9298.  
  9299. Once the WVIDEOW environment variable has been defined, those options listed
  9300. become the default each time VIDEO is invoked.
  9301. ::::WINDOWS
  9302. Types of Windows
  9303. ════════════════
  9304. Windows are rectangular areas on the screen which are devoted to displaying
  9305. a particular type of debugging information such as source lines, machine
  9306. language instructions, and register contents.  Not all windows need be
  9307. present on the screen.    Windows are placed on the screen with the VIDEO
  9308. Display command.  The same command can be used to remove windows from the
  9309. screen.  The attributes of lines displayed in a window are defined with the
  9310. VIDEO Paint command.
  9311.  
  9312. In the preceding illustration only the Source, Dialogue and Prompt windows
  9313. are shown.  The top line is the menu line.  The various types of windows are
  9314. described later under this topic.
  9315.  
  9316.  
  9317.  
  9318. Window Manipulation with Keys
  9319. ═════════════════════════════
  9320. The window which contains the text cursor is called the "active" window.
  9321. The active window is the window that will respond to keystrokes.  In
  9322. general, keys such as the Cursor Up and Down keys perform similar functions
  9323. in all windows.  The following keys perform identical functions in all
  9324. windows.
  9325.  
  9326. Ctrl/Enter may be used to start a text selection process which will be
  9327.        concluded by the appearance of the Action window.  When text
  9328.        selection is started, a block cursor will appear on the screen.
  9329.        The cursor keys may be used to stretch the block cursor to the
  9330.        left, right, up and down, thereby highlighting a portion of the
  9331.        text visible on the screen.    The Ctrl/Cursor Left and Ctrl/Cursor
  9332.        Right keys extend the block cursor to the left or right by a
  9333.        token at a time.  A second press of the Ctrl/Enter key causes the
  9334.        Action window to pop up on the screen.
  9335.  
  9336. The following keys perform identical functions in all windows except the
  9337. View and Error windows.
  9338.  
  9339. Tab       may be used to move the text cursor to the next window on the
  9340.        screen.
  9341.  
  9342. Shift/Tab  (Backtab) may be used to move the text cursor to the previous
  9343.        window on the screen.
  9344.  
  9345. Escape       may be used to move directly to the Prompt window.
  9346.  
  9347. Ctrl/D       may be used to shift the entire active window down on the screen.
  9348.  
  9349. Ctrl/U       combination may be used to shift the entire active window up on
  9350.        the screen.
  9351.  
  9352. Ctrl/P       may be used to invoke the Paint menu for the active window.
  9353.  
  9354. Ctrl/Q       may be used to update the contents of the active window.
  9355.  
  9356. The following keys perform identical functions in all windows except the
  9357. Prompt, View and Error windows.
  9358.  
  9359. Ctrl/L       may be used to move the active window to the left.
  9360.  
  9361. Ctrl/R       may be used to move the active window to the right.
  9362.  
  9363. Ctrl/G       may be used to grow the size of the active window.
  9364.  
  9365. Ctrl/S       may be used to shrink the size of the active window.
  9366.  
  9367. Ctrl/N       may be used to narrow the size of the active window.
  9368.  
  9369. Ctrl/W       may be used to widen the size of the active window.
  9370.  
  9371. Ctrl/E       may be used to erase the active window from the display.
  9372.  
  9373. Ctrl/Z       may be used to zoom the active window between its normal size and
  9374.        the size of the entire screen.
  9375.  
  9376. Later sections describe in detail the responses to various keys when a
  9377. particular window is active.
  9378.  
  9379.  
  9380.  
  9381. Window Manipulation with a Mouse
  9382. ════════════════════════════════
  9383. In order to use a mouse with VIDEO, you must install a mouse driver program.
  9384.  
  9385. Under DOS, you must install the IBM Mouse Driver program that is supplied
  9386. with the IBM Mouse.  Alternatively, you may use a mouse and mouse driver
  9387. that are compatible with the IBM Mouse and IBM Mouse Driver.  The IBM Mouse
  9388. Driver is installed by running the "MOUSE.COM" program.
  9389.  
  9390. Example:
  9391.   C>\dos\mouse
  9392.  
  9393. See your QNX manuals for further information on mouse installation.
  9394.  
  9395. VIDEO supports the use of a mouse in many ways.  Most actions are selected
  9396. by "clicking" the mouse at the desired location.  This is done by moving the
  9397. mouse cursor, the solid rectangle on the screen, to a place on the screen
  9398. and then pressing the left button on the mouse.
  9399.  
  9400. The mouse cursor can be positioned to any window.  In some windows, such as
  9401. the "Source" and "Assembly" windows, text may be scrolled up or down, left
  9402. or right, by "dragging" the mouse.  This is done by moving the mouse cursor
  9403. to a line in the window and, while pressing down the left button on the
  9404. mouse, repositioning the mouse cursor to another place in the window.
  9405.  
  9406. To scroll text up or down by dragging the mouse, vertical scrolling must be
  9407. enabled.  This is done by clicking the mouse on the scroll bar at the right
  9408. side of the window where the word "Locked" appears.  If the word "Locked"
  9409. does not appear then vertical scrolling is already enabled.  Vertical
  9410. scrolling can be enabled/disabled by clicking on the scroll bar again.
  9411.  
  9412. To scroll text left or right by dragging the mouse, horizontal scrolling
  9413. must be enabled.  This is done by clicking the mouse on the scroll bar at
  9414. the bottom of the window where the word "Locked" appears.  If the word
  9415. "Locked" does not appear then horizontal scrolling is already enabled.
  9416. Horizontal scrolling can be enabled/disabled by clicking on the scroll bar
  9417. again.
  9418.  
  9419. The entire window can be repositioned on the screen by dragging the window's
  9420. title line to a new place on the screen.
  9421.  
  9422. Some actions are accomplished by "double-clicking" the left mouse button.
  9423. Double-clicking is done by rapidly pressing the left mouse button twice at
  9424. the same location without moving the mouse cursor.  These actions are
  9425. described in subsequent sections.
  9426.  
  9427. Text selection may be started by pressing the right-hand mouse button.
  9428. Without releasing the button, the mouse cursor may be moved about the screen
  9429. to highlight a sequence of text (characters, words, expressions, etc.).
  9430. When the right-hand mouse button is released, the Action window appears on
  9431. the screen.  If the right-hand mouse button is pressed and released without
  9432. moving the mouse, the "item" under the mouse cursor is selected in its
  9433. entirety and the Action window appears on the screen.
  9434.  
  9435. When using a mouse, many windows have "gadgets".
  9436.  
  9437.   1. The "scroll up" () and "scroll down" () gadgets may be used to scroll
  9438.     text vertically.
  9439.  
  9440.   2. The "scroll left" () and "scroll right" () gadgets may be used to
  9441.     scroll text horizontally.
  9442.  
  9443.   3. The "page up" and "page down" gadgets (small triangle shapes at the
  9444.     right of the window) perform different actions depending on the window.
  9445.  
  9446.   4. The "page left" and "page right" gadgets (small triangle shapes at the
  9447.     bottom of the window) perform different actions depending on the window.
  9448.  
  9449.   5. The "window zoom" gadget (the  symbol, in the top, right corner
  9450.     of the window) may be used to zoom the active window between its normal
  9451.     size and the size of entire screen.
  9452.  
  9453.     If you place the mouse cursor on the "zoom" gadget and press the
  9454.     right-hand mouse button, the window will temporarily zoom to full size.
  9455.     When you release the button, the window will return to its normal size.
  9456.  
  9457.   6. The "window resize" gadget (double arrow, in the bottom, right corner)
  9458.     may be used to enlarge or shrink a window.
  9459.  
  9460.   7. The "window close" gadget (triple bar, in the top, left corner) may be
  9461.     used to remove a window from the screen.
  9462.  
  9463. If you click on a "scroll" or "page" gadget, the associated action is
  9464. performed once.  If you hold the left mouse button down while positioned on
  9465. one of these gadgets, the associated action is performed repeatedly.  If you
  9466. drag the "window resize" gadget, the window to which it belongs is grown or
  9467. shrunk.
  9468.  
  9469. Double-clicking on the title bar will cause the contents of the window to be
  9470. updated.
  9471.  
  9472.  
  9473.  
  9474. Action Window
  9475. ═════════════
  9476. The debugger places this window on the screen after a text selection
  9477. sequence has been completed.  Using the keyboard, text selection is started
  9478. using the Ctrl/Enter key.  When the Ctrl/Enter key is pressed a second time,
  9479. the Action window appears on the screen.
  9480.  
  9481. Using the mouse, text selection is started when the right-hand mouse button
  9482. is pressed.  When the right-hand mouse button is released, the Action window
  9483. appears on the screen.
  9484.  
  9485. The entries in the Action window allow you to
  9486.  
  9487.   1. show the source code pertaining to the selected text,
  9488.   2. display the contents of the variable represented by the selected text,
  9489.   3. evaluate the selected text as an expression,
  9490.   4. examine the memory location represented by the selected text,
  9491.   5. set a break point at the location represented by the selected text,
  9492.   6. set a watch point on the location represented by the selected text, or
  9493.   7. copy the selected text to the Prompt window where it can be manipulated
  9494.     as part of some command.
  9495.  
  9496. When the "Show source" entry is selected, the source/assembly code
  9497. corresponding to the selected text is displayed in the Source and Assembly
  9498. windows (if present on the screen).
  9499.  
  9500. A line appears in the Dialogue window that indicates the address of the
  9501. previous source/assembly code and the new source/assembly code under
  9502. examination.
  9503.  
  9504. Example:
  9505.   0x65CB:0x0012 => ClearScreen
  9506.  
  9507. You can use this entry to return to the previous location by moving the text
  9508. cursor to the Dialogue window using the Tab keys and highlighting the
  9509. address that is displayed on the left of the "=>" using the Ctrl/Enter and
  9510. cursor keys.  You can also do this by pressing the right-hand mouse button,
  9511. highlighting the address that is displayed on the left of the "=>", and then
  9512. releasing the right-hand mouse button.    In the above example, this would be
  9513. the entry "0x65CB:0x0012" (the segment and offset of the previous location
  9514. under examination).
  9515.  
  9516.  
  9517.  
  9518. Assembly Window
  9519. ═══════════════
  9520. The debugger displays assembly instructions for the current code location in
  9521. this window.  If the Code Segment and Instruction Pointer registers (CS:IP,
  9522. CS:EIP) point to an instruction visible in the Assembly window then the line
  9523. containing that instruction is displayed in "active" attributes.  When
  9524. examining assembly instructions, one line is designated as the current line
  9525. and is displayed in "standout" attributes.  The Source window, if present,
  9526. is kept synchronized with the Assembly window provided that source
  9527. information is available.
  9528.  
  9529.  
  9530.  
  9531. Manipulating the Assembly Window with Keys
  9532. ──────────────────────────────────────────
  9533. When the text cursor is positioned in the Assembly window, the Cursor
  9534. Left/Right, Cursor Up/Down, Page Up/Down, Home, End, and Enter keys may be
  9535. used to move about.
  9536.  
  9537. Cursor Left/Right
  9538.        may be used to scroll the text in the window left or right when
  9539.        the cursor moves to the left or right edge of the window.
  9540.  
  9541. Ctrl/Cursor Left/Right
  9542.        may be used to scroll the text in the window left or right
  9543.        without moving the cursor.
  9544.  
  9545. Cursor Up/Down
  9546.        may be used to scroll up and down through assembly instructions.
  9547.  
  9548. Page Up/Down
  9549.        may be used to scroll up and down through assembly instructions
  9550.        in increments of the number of lines in the window minus two.
  9551.  
  9552. Home       may be used to move to the beginning of the current compilation
  9553.        unit.
  9554.  
  9555. End       may be used to move to the end of the current module (compilation
  9556.        unit).
  9557.  
  9558. Enter       may be used to move directly to the assembly instruction
  9559.        referenced by the CS:IP (16-bit mode) or CS:EIP (32-bit mode)
  9560.        register pair.
  9561.  
  9562.  
  9563.  
  9564. Manipulating the Assembly Window with a Mouse
  9565. ─────────────────────────────────────────────
  9566.   1. Clicking in the Assembly window causes the text cursor to move to this
  9567.     window.  It becomes the "active" window.
  9568.  
  9569.   2. Assembly instructions may be scrolled up or down by dragging the mouse.
  9570.     To do this, the right-side scrolling bar must be unlocked.
  9571.  
  9572.   3. Assembly instructions may be scrolled left or right by dragging the
  9573.     mouse.  To do this, the bottom scrolling bar must be unlocked.
  9574.  
  9575.   4. Gadgets are provided for scrolling, resizing, zooming and closing the
  9576.     Assembly window.
  9577.  
  9578.   5. The "scroll up" and "scroll down" gadgets may be used to move up and
  9579.     down through text lines.  When the text cursor moves to the top or
  9580.     bottom of the window, text will be scrolled down or up.
  9581.  
  9582.   6. The "scroll left" and "scroll right" gadgets move the cursor one
  9583.     character left or right.  When the text cursor moves to the left or
  9584.     right edge of the window, text will be scrolled to the right or left.
  9585.  
  9586.   7. The "page up" and "page down" gadgets may be used to scroll up and down
  9587.     through assembly instructions in increments of the number of lines in
  9588.     the window minus two.
  9589.  
  9590.   8. Clicking on an assembly instruction in the Assembly window makes it the
  9591.     current assembly instruction.  This line is displayed in "standout"
  9592.     attributes.  The value of the VIDEO variable dbg$code changes to reflect
  9593.     the change in the current assembly instruction.  This variable reflects
  9594.     the segment:offset of the most recent code location to be examined.  In
  9595.     addition, the "." address is changed to point to the assembly
  9596.     instruction.  The "." address is used in many VIDEO commands.
  9597.  
  9598.     Example:
  9599.       do [CS IP] = .
  9600.       or
  9601.       do [CS EIP] = .
  9602.  
  9603.     In the above example, the contents of the CS:IP or CS:EIP register pair
  9604.     are modified to point to the current assembly instruction.
  9605.  
  9606.   9. Double-clicking on a line will set or clear a breakpoint at the
  9607.     assembly instruction.
  9608.  
  9609.  
  9610.  
  9611. Command Window
  9612. ══════════════
  9613. The debugger will display output from one or more commands that can be bound
  9614. to this window.  In the illustration above, the sample command window is
  9615. titled "date/time structure".
  9616.  
  9617.  
  9618. Manipulating the Command Window with Keys
  9619. ─────────────────────────────────────────
  9620. When the text cursor is positioned in the Command window, the Enter key may
  9621. be used to refresh the window.
  9622.  
  9623.  
  9624.  
  9625. Manipulating the Command Window with a Mouse
  9626. ────────────────────────────────────────────
  9627. Clicking in the Command window causes the text cursor to move to the window
  9628. and the window to be refreshed.  It becomes the "active" window.
  9629.  
  9630.  
  9631.  
  9632. Dialogue Window
  9633. ═══════════════
  9634. By default, the debugger displays responses to commands in this window.
  9635. When one of the other windows is not present on the screen, the output
  9636. normally destined for that window is displayed in the Dialogue window.
  9637.  
  9638.  
  9639.  
  9640. Manipulating the Dialogue Window with Keys
  9641. ──────────────────────────────────────────
  9642. When the text cursor is positioned in the Dialogue window, the Cursor
  9643. Up/Down, Page Up/Down, Home, End, and Enter keys may be used to move about.
  9644.  
  9645. Cursor Left/Right
  9646.        may be used to scroll the text in the window left or right when
  9647.        the cursor moves to the left or right edge of the window.
  9648.  
  9649. Ctrl/Cursor Left/Right
  9650.        may be used to scroll the text in the window left or right
  9651.        without moving the cursor.
  9652.  
  9653. Cursor Up/Down
  9654.        may be used to scroll up and down through Dialogue window output,
  9655.        one line at a time.
  9656.  
  9657. Page Up/Down
  9658.        may be used to scroll up and down through Dialogue window output
  9659.        in increments of the number of lines in the window minus two.
  9660.  
  9661. Home       may be used to move to the beginning of Dialogue window output.
  9662.  
  9663. End       may be used to move to the end of Dialogue window output.
  9664.  
  9665. Enter       may be used to move to the end of Dialogue window output.
  9666.  
  9667. When the text cursor is positioned in the Prompt window, the Page Up, Page
  9668. Down, Ctrl/Page Up and Ctrl/Page Down keys may be used to scroll the
  9669. Dialogue window.
  9670.  
  9671.  
  9672. Page Up/Down
  9673.        may be used to scroll up and down through Dialogue window output,
  9674.        one line at a time.
  9675.  
  9676. Ctrl/Page Up and Ctrl/Page Down
  9677.        may be used to scroll up and down through Dialogue window output
  9678.        in increments of the number of lines in the window minus two.
  9679.  
  9680.  
  9681.  
  9682. Manipulating the Dialogue Window with a Mouse
  9683. ─────────────────────────────────────────────
  9684.   1. Clicking in the Dialogue window causes the text cursor to move to this
  9685.     window.  It becomes the "active" window.
  9686.  
  9687.   2. Text may be scrolled up or down by dragging the mouse.  To do this, the
  9688.     right-side scrolling bar must be unlocked.
  9689.  
  9690.   3. Text may be scrolled left or right by dragging the mouse.    To do this,
  9691.     the bottom scrolling bar must be unlocked.
  9692.  
  9693.   4. Gadgets are provided for scrolling, resizing, and zooming the Dialogue
  9694.     window.
  9695.  
  9696.   5. The "scroll up" and "scroll down" gadgets may be used to move up and
  9697.     down through text lines.  When the text cursor moves to the top or
  9698.     bottom of the window, text will be scrolled down or up.
  9699.  
  9700.   6. The "scroll left" and "scroll right" gadgets move the cursor one
  9701.     character left or right.  When the text cursor moves to the left or
  9702.     right edge of the window, text will be scrolled to the right or left.
  9703.  
  9704.   7. The "page up" and "page down" gadgets may be used to scroll up and down
  9705.     through Dialogue window output in increments of the number of lines in
  9706.     the window minus two.
  9707.  
  9708.  
  9709.  
  9710. FPU Window
  9711. ══════════
  9712. The contents of the 80x87 numeric data processor (math coprocessor)
  9713. registers and status flags are displayed in this window.  When the FPU
  9714. window is active, the currently selected item is displayed in "active"
  9715. attributes.  When the contents of a register have changed from the last time
  9716. that the debugger was entered, it is displayed in "standout" attributes.
  9717.  
  9718.  
  9719.  
  9720. Manipulating the FPU Window with Keys
  9721. ─────────────────────────────────────
  9722. When the text cursor is positioned in the FPU window, the cursor and Enter
  9723. keys may be used to position to register (ST(0), ST(1), etc.) or flag
  9724. displays and modify register or flag contents.    The Home, End, Page Up, and
  9725. Page Down keys may be used to display register sets.  See the description of
  9726. the Register command for more information on register sets.
  9727.  
  9728. Cursor Up, Down, Left and Right
  9729.        keys may be used to move the text cursor to register/flag content
  9730.        displays.
  9731.  
  9732. Enter       may used to modify register contents.  If the text cursor is
  9733.        positioned on a register when the Enter key is pressed, a
  9734.        register modification window is displayed on the screen and a new
  9735.        value may be entered.  The register may be left unmodified by
  9736.        just pressing the Enter key in response to the prompt for a new
  9737.        value.
  9738.  
  9739.        If the text cursor is positioned on a flag when the Enter key is
  9740.        pressed then its value is complemented.
  9741.  
  9742. Home       may be used to move to the oldest register set.
  9743.  
  9744. End       may be used to move to the most recent register set.
  9745.  
  9746. Page Up    may be used to move backwards through register sets to the oldest
  9747.        register set.
  9748.  
  9749. Page Down  may be used to move forwards through register sets to the most
  9750.        recent register set.
  9751.  
  9752. Insert       may be used to switch between binary and decimal display formats.
  9753.  
  9754.  
  9755.  
  9756. Manipulating the FPU Window with a Mouse
  9757. ────────────────────────────────────────
  9758.   1. Clicking in the FPU window causes the text cursor to move to this
  9759.     window.  It becomes the "active" window.  The text cursor may be
  9760.     positioned to any register contents or flag bits display.
  9761.  
  9762.   2. Double-clicking on a register display (ST(0), ST(1), etc.) will cause a
  9763.     register modification window to be displayed on the screen.  A new value
  9764.     may be entered or the register may be left unmodified by just pressing
  9765.     the Enter key in response to the prompt.
  9766.  
  9767.     Double clicking on a flag causes its value to be complemented.
  9768.  
  9769.   3. The "scroll up" gadget may be used to move backwards through register
  9770.     sets to the oldest register set.
  9771.  
  9772.   4. The "scroll down" gadget may be used to move forwards through register
  9773.     sets to the most recent register set.
  9774.  
  9775.   5. The "page up" gadget may be used to move backwards through register
  9776.     sets to the oldest register set.
  9777.  
  9778.   6. The "page down" gadget may be used to move forwards through register
  9779.     sets to the most recent register set.
  9780.  
  9781.  
  9782.  
  9783. Memory Window
  9784. ═════════════
  9785. A portion of memory is displayed in this window.  When the Memory window is
  9786. active, the currently selected memory location is displayed in "active"
  9787. attributes.  Memory window "hot spots" (e.g., BYTE ) are displayed in
  9788. "standout" attributes.    All other items are displayed in "plain" attributes.
  9789.  
  9790.  
  9791.  
  9792. Manipulating the Memory Window with Keys
  9793. ────────────────────────────────────────
  9794. When the text cursor is positioned in the Memory window, the cursor, Home,
  9795. Page Up, Page Down and Enter keys may be used to position to memory entries
  9796. and modify their contents.
  9797.  
  9798. Cursor Up, Down, Left and Right
  9799.        may be used to move the text cursor to individual memory
  9800.        locations.
  9801.  
  9802. Insert       may be used to modify the way in which memory locations are
  9803.        displayed.  Each subsequent press of the Insert key cycles the
  9804.        display through 8-bit bytes, 16-bit words, and 32-bit
  9805.        doublewords.  When 8-bit bytes are displayed, their ASCII
  9806.        equivalents are also displayed on the right-hand side of the
  9807.        window.
  9808.  
  9809. Delete       may be used to select a new memory location to be displayed.  A
  9810.        prompt window appears for the new memory location.
  9811.  
  9812. Home       may be used to move directly to the original location of memory
  9813.        that was requested to be displayed.
  9814.  
  9815. Page Up/Down
  9816.        may be used to scroll up and down through the memory window in
  9817.        increments of the number of lines in the window minus two.
  9818.  
  9819. Enter       may used to modify the contents of the memory location upon which
  9820.        the text cursor is positioned.  When pressed, a memory
  9821.        modification window is displayed on the screen and a new value
  9822.        may be entered.  The entry may be left unmodified by just
  9823.        pressing the Enter key in response to the prompt for a new value.
  9824.        Bytes, words or doublewords may be entered, depending on the way
  9825.        in which memory is being displayed.
  9826.  
  9827.  
  9828.  
  9829. Manipulating the Memory Window with a Mouse
  9830. ───────────────────────────────────────────
  9831.   1. Clicking in the Memory window causes the text cursor to move to this
  9832.     window.  It becomes the "active" window.  The text cursor may be
  9833.     positioned to any memory entry shown in the window.
  9834.  
  9835.   2. Memory entries may be scrolled up or down by dragging the mouse.  To do
  9836.     this, the right-side scrolling bar must be unlocked.
  9837.  
  9838.   3. The "scroll up" and "scroll down" gadgets may be used to scroll up and
  9839.     down through memory.
  9840.  
  9841.   4. The "page up" and "page down" gadgets may be used to scroll up and down
  9842.     through memory in increments of the number of lines in the window minus
  9843.     two.
  9844.  
  9845.   5. Clicking on the "(Ins)" entry will cause the display to change between
  9846.     8-bit bytes, 16-bit words, and 32-bit doublewords.    When 8-bit bytes are
  9847.     displayed, their ASCII equivalents are also displayed on the right-hand
  9848.     side of the window.
  9849.  
  9850.   6. Clicking on the "(Del)" entry may be used to select a new memory
  9851.     location to be displayed.  A prompt window appears for the new memory
  9852.     location.  A new value may be entered or the memory address may be left
  9853.     unmodified by just pressing the Enter key in response to the prompt.
  9854.  
  9855.   7. Clicking on the "HOME" entry may be used to move directly to the
  9856.     original location of memory that was requested to be displayed.
  9857.  
  9858.   8. Double-clicking on a memory location will cause a memory modification
  9859.     window to be displayed on the screen.  A new value may be entered or the
  9860.     memory location may be left unmodified by just pressing the Enter key in
  9861.     response to the prompt.
  9862.  
  9863.  
  9864.  
  9865. Prompt Window
  9866. ═════════════
  9867. The debugger command input prompt "DBG>" is displayed in a window that is
  9868. one line high.    The prompt window is used to enter command lines.
  9869.  
  9870. In multiple execution thread applications, the "DBG>" prompt is replaced by
  9871. a prompt that indicates the current thread.  The form of the prompt is
  9872. "ddddd>" where "ddddd" is the thread identification number.
  9873.  
  9874. Example:
  9875.   00002>
  9876.  
  9877.  
  9878.  
  9879. Manipulating the Prompt Window with Keys
  9880. ────────────────────────────────────────
  9881. VIDEO commands are entered at the "DBG>" input prompt.
  9882.  
  9883.   DBG>
  9884.  
  9885. In multiple execution thread applications, the "DBG>" prompt is replaced by
  9886. a prompt that indicates the current thread.  The form of the prompt is
  9887. "ddddd>" where "ddddd" is the thread identification number.
  9888.  
  9889. Example:
  9890.   00002>
  9891.  
  9892. When the text cursor is positioned in the Prompt window, the cursor, Home,
  9893. End, Ins, Del, Backspace and Enter keys may be used to recall, edit and
  9894. submit commands.
  9895.  
  9896. Cursor Up/Down
  9897.        may be used to scroll through previously entered commands.
  9898.  
  9899. Cursor Left/Right
  9900.        may be used to move the cursor left or right through a command
  9901.        line to make changes.
  9902.  
  9903. Ctrl/Cursor Left and Right
  9904.        keys may be used to move the cursor left or right one word at a
  9905.        time.
  9906.  
  9907. Home       may be used to move to the beginning of the command line.
  9908.  
  9909. End       may be used to move to the end of the command line.
  9910.  
  9911. Insert       key may be used to flip between character insertion and
  9912.        overtyping modes.
  9913.  
  9914. Delete       may be used to remove the character under the cursor.
  9915.  
  9916. Backspace  (or Rubout) may be used to erase the character to the left of the
  9917.        cursor.
  9918.  
  9919. Enter       may be used to submit the command.
  9920.  
  9921. Ctrl/F       may be used to finish a partially entered symbol name.  Pressing
  9922.        Ctrl/F again will find the next symbol name that has the same
  9923.        initial sequence.
  9924.  
  9925. Ctrl/B       may be used to backup to the previous symbol name found with the
  9926.        Ctrl/F keys.
  9927.  
  9928. Command lines that exceed the screen width may be entered.  The command line
  9929. will scroll left or right depending on the cursor placement and direction.
  9930.  
  9931. When the text cursor is positioned in the Prompt window, the Page Up, Page
  9932. Down, Ctrl/Page Up and Ctrl/Page Down keys may be used to scroll the
  9933. Dialogue window (see the earlier section describing Dialogue window
  9934. manipulation).
  9935.  
  9936.  
  9937.  
  9938. Manipulating the Prompt Window with a Mouse
  9939. ───────────────────────────────────────────
  9940. Clicking in the Prompt window causes the text cursor to move to this window.
  9941. It becomes the "active" window and VIDEO commands may be entered.
  9942.  
  9943.  
  9944.  
  9945. Register Window
  9946. ════════════════
  9947. In 16-bit mode, the current contents of the 8086 registers are displayed in
  9948. the Register window.
  9949.  
  9950. In 32-bit mode, the current contents of the 32-bit registers are displayed
  9951. in the Register window.
  9952.  
  9953. When the Register window is active, the currently selected item is displayed
  9954. in "active" attributes.  When the contents of a register have changed from
  9955. the last time that the debugger was entered, it is displayed in "standout"
  9956. attributes.  An exception to this rule is the Instruction Pointer (IP, EIP)
  9957. register which is only displayed in "standout" attributes when its value
  9958. changes because some type of branch or call instruction was executed.
  9959.  
  9960. If a register set other than register set 0 is displayed, then the register
  9961. set number is displayed in brackets (e.g., [1]) with "active" attributes
  9962. (see the description of the Register command).
  9963.  
  9964.  
  9965.  
  9966. Manipulating the Register Window with Keys
  9967. ──────────────────────────────────────────
  9968. When the text cursor is positioned in the Register window, the cursor and
  9969. Enter keys may be used to position to register displays and modify register
  9970. contents.  The Home, End, Page Up, and Page Down keys may be used to display
  9971. register sets.    See the description of the Register command for more
  9972. information on register sets.
  9973.  
  9974. Cursor Up, Down, Left and Right
  9975.        may be used to move the text cursor to register/flag content
  9976.        displays.
  9977.  
  9978. Enter       may used to modify register contents.  If the text cursor is
  9979.        positioned on a register when the Enter key is pressed, a
  9980.        register modification window is displayed on the screen and a new
  9981.        value may be entered.  The register may be left unmodified by
  9982.        just pressing the Enter key in response to the prompt for a new
  9983.        value.
  9984.  
  9985.        If the text cursor is positioned on a flag when the Enter key is
  9986.        pressed then its value is complemented.
  9987.  
  9988. Home       may be used to move to the oldest register set.
  9989.  
  9990. End       may be used to move to the most recent register set.
  9991.  
  9992. Page Up    may be used to move backwards through register sets to the oldest
  9993.        register set.
  9994.  
  9995. Page Down  may be used to move forwards through register sets to the most
  9996.        recent register set.
  9997.  
  9998.  
  9999.  
  10000. Manipulating the Register Window with a Mouse
  10001. ─────────────────────────────────────────────
  10002.   1. Clicking in the Register window causes the text cursor to move to this
  10003.     window.  It becomes the "active" window.  The text cursor may be
  10004.     positioned to any register contents or flag bits display.
  10005.  
  10006.   2. Double-clicking on a register display will cause a register
  10007.     modification window to be displayed on the screen.    A new value may be
  10008.     entered or the register may be left unmodified by just pressing the
  10009.     Enter key in response to the prompt.
  10010.  
  10011.     Double clicking on a flag causes its value to be complemented.
  10012.  
  10013.   3. The "scroll up" gadget may be used to move backwards through register
  10014.     sets to the oldest register set.
  10015.  
  10016.   4. The "scroll down" gadget may be used to move forwards through register
  10017.     sets to the most recent register set.
  10018.  
  10019.   5. The "page up" gadget may be used to move backwards through register
  10020.     sets to the oldest register set (same as "scroll up").
  10021.  
  10022.   6. The "page down" gadget may be used to move forwards through register
  10023.     sets to the most recent register set (same as "scroll down").
  10024.  
  10025.  
  10026.  
  10027. Source Window
  10028. ═════════════
  10029. If program source code information is available for the current code
  10030. location then it will be displayed in this window.  If the Code Segment and
  10031. Instruction Pointer registers (CS:IP, CS:EIP) point to a source line visible
  10032. in the Source window then the line is displayed in "active" attributes.
  10033. When examining source code, one line is designated as the current line and
  10034. is displayed in "standout" attributes.    The Assembly window, if present, is
  10035. kept synchronized with the Source window.
  10036.  
  10037.  
  10038.  
  10039. Manipulating the Source Window with Keys
  10040. ────────────────────────────────────────
  10041. When the text cursor is positioned in the Source window, the Cursor Up/Down,
  10042. Page Up/Down, Home, End, and Enter keys may be used to move about.
  10043.  
  10044. Cursor Left/Right
  10045.        may be used to scroll the text in the window left or right when
  10046.        the cursor moves to the left or right edge of the window.
  10047.  
  10048. Ctrl/Cursor Left/Right
  10049.        may be used to scroll the text in the window left or right
  10050.        without moving the cursor.
  10051.  
  10052. Cursor Up/Down
  10053.        may be used to scroll up and down through source lines.
  10054.  
  10055. Page Up/Down
  10056.        may be used to scroll up and down through source lines in
  10057.        increments of the number of lines in the window minus two.
  10058.  
  10059. Home       may be used to move to the beginning of the current module
  10060.        (compilation unit).
  10061.  
  10062. End       may be used to move to the end of the current module (compilation
  10063.        unit).
  10064.  
  10065. Enter       may be used to move directly to the source line referenced by the
  10066.        CS:IP (16-bit mode) or CS:EIP (32-bit mode) register pair.
  10067.  
  10068.  
  10069.  
  10070. Manipulating the Source Window with a Mouse
  10071. ───────────────────────────────────────────
  10072.   1. Clicking in the Source window causes the text cursor to move to this
  10073.     window.  It becomes the "active" window.
  10074.  
  10075.   2. Source lines may be scrolled up or down by dragging the mouse.  To do
  10076.     this, the right-side scrolling bar must be unlocked.
  10077.  
  10078.   3. Source lines may be scrolled left or right by dragging the mouse.    To
  10079.     do this, the bottom scrolling bar must be unlocked.
  10080.  
  10081.   4. Gadgets are provided for scrolling, resizing, zooming and closing the
  10082.     Source window.
  10083.  
  10084.   5. The "scroll up" and "scroll down" gadgets may be used to move up and
  10085.     down through text lines.  When the text cursor moves to the top or
  10086.     bottom of the window, text will be scrolled down or up.
  10087.  
  10088.   6. The "scroll left" and "scroll right" gadgets move the scroll one
  10089.     character left or right.  When the text cursor moves to the left or
  10090.     right edge of the window, text will be scrolled to the right or left.
  10091.  
  10092.   7. The "page up" and "page down" gadgets may be used to scroll up and down
  10093.     through source lines in increments of the number of lines in the window
  10094.     minus two.
  10095.  
  10096.   8. Clicking on a source line in the Source window makes it the current
  10097.     line.  This line is displayed in "standout" attributes.  The value of
  10098.     the VIDEO variable dbg$code changes to reflect the change in the current
  10099.     line.  This variable reflects the segment:offset of the most recent code
  10100.     location to be examined.  In addition, the "." address is changed to
  10101.     point to the first assembly instruction for the source line.  If there
  10102.     are no assembly instructions for the source line (as in lines or
  10103.     declarative lines) then the "." address is positioned to an earlier line
  10104.     (or the first line) in the module which has assembly instructions.    The
  10105.     "." address is used in many VIDEO commands.
  10106.  
  10107.     Example:
  10108.       do [CS IP] = .
  10109.       or
  10110.       do [CS EIP] = .
  10111.  
  10112.     In the above example, the contents of the CS:IP or CS:EIP register pair
  10113.     are modified to point to the current source line.
  10114.  
  10115.   9. Double-clicking on a line will set or clear a breakpoint at the first
  10116.     assembly instruction for the source line.
  10117.  
  10118.  
  10119.  
  10120. Stack Window
  10121. ════════════
  10122. A portion of the execution stack is displayed in this window.  If the Base
  10123. Pointer (BP, EBP) register points to a visible byte, word or doubleword on
  10124. the stack, that item is displayed in "standout" attributes.  When the Stack
  10125. window is active, the currently selected stack location is displayed in
  10126. "active" attributes.  All other items are displayed in "plain" attributes.
  10127.  
  10128.  
  10129.  
  10130. Manipulating the Stack Window with Keys
  10131. ───────────────────────────────────────
  10132. When the text cursor is positioned in the Stack window, the cursor, Home,
  10133. End, Page Up, Page Down and Enter keys may be used to position to stack
  10134. entries and modify their contents.
  10135.  
  10136. Cursor Up, Down, Left and Right
  10137.        may be used to move the text cursor to individual stack entries.
  10138.  
  10139. Insert       may be used to modify the way in which stack entries are
  10140.        displayed.  Each subsequent press of the Insert key cycles the
  10141.        display through 8-bit bytes, 16-bit words, and 32-bit
  10142.        doublewords.  When 8-bit bytes are displayed, their ASCII
  10143.        equivalents are also displayed on the right-hand side of the
  10144.        window.
  10145.  
  10146. Home       may be used to move directly to the stack entry referenced by
  10147.        SS:SP (16-bit mode) or SS:ESP (32-bit mode).
  10148.  
  10149. End       may be used to move directly to the stack entry referenced by
  10150.        SS:BP (16-bit mode) or SS:EBP (32-bit mode).
  10151.  
  10152. Page Up/Down
  10153.        may be used to scroll up and down through the stack in increments
  10154.        of the number of lines in the window minus two.
  10155.  
  10156. Enter       may used to modify the contents of the stack entry upon which the
  10157.        text cursor is positioned.  When pressed, a stack modification
  10158.        window is displayed on the screen and a new value may be entered.
  10159.        The entry may be left unmodified by just pressing the Enter key
  10160.        in response to the prompt for a new value.
  10161.  
  10162.  
  10163.  
  10164. Manipulating the Stack Window with a Mouse
  10165. ──────────────────────────────────────────
  10166.   1. Clicking in the Stack window causes the text cursor to move to this
  10167.     window.  It becomes the "active" window.  The text cursor may be
  10168.     positioned to any stack entry.
  10169.  
  10170.   2. Stack entries may be scrolled up or down by dragging the mouse.  To do
  10171.     this, the right-side scrolling bar must be unlocked.
  10172.  
  10173.   3. The "scroll up" and "scroll down" gadgets may be used to scroll up and
  10174.     down through the stack.
  10175.  
  10176.   4. The "page up" and "page down" gadgets may be used to scroll up and down
  10177.     through the stack in increments of the number of lines in the window
  10178.     minus two.
  10179.  
  10180.   5. Clicking on the "(Ins)" entry will cause the display to change between
  10181.     8-bit bytes, 16-bit words, and 32-bit doublewords.    When 8-bit bytes are
  10182.     displayed, their ASCII equivalents are also displayed on the right-hand
  10183.     side of the window.
  10184.  
  10185.   6. Clicking on the "HOME" entry may be used to move directly to the stack
  10186.     entry referenced by SS:SP (16-bit mode) or SS:ESP (32-bit mode).
  10187.  
  10188.   7. Double-clicking on a stack entry will cause a stack modification window
  10189.     to be displayed on the screen.  A new value may be entered or the stack
  10190.     entry may be left unmodified by just pressing the Enter key in response
  10191.     to the prompt.
  10192.  
  10193.  
  10194.  
  10195. Thread Window
  10196. ═════════════
  10197. The Thread window is used to display the identification number, state and
  10198. any additional pertinent information of all program execution threads.
  10199. Whenever the debugger is entered, the currently executing thread is
  10200. displayed in "active" attributes.  When a new thread entry has been
  10201. selected, it is displayed in "active" attributes.
  10202.  
  10203. Each entry in the Thread window has a number of fields.  The first field is
  10204. the thread identification number or thread ID.    The second field is the
  10205. thread state which may be one of "runnable" or "frozen".  Under NetWare, the
  10206. third field will contain the thread name which is applicable to NetWare 386
  10207. server tasks only.  The currently selected field is displayed in "standout"
  10208. attributes.  All other items are displayed in "plain" attributes.
  10209.  
  10210. Under DOS and QNX, there is only one execution thread so there is only one
  10211. entry in the Thread window.  Under OS/2 and NetWare 386, there may be
  10212. several execution threads so there may be be several entries in the Thread
  10213. window.
  10214.  
  10215.  
  10216.  
  10217. Manipulating the Thread Window with Keys
  10218. ────────────────────────────────────────
  10219. When the text cursor is positioned in the Thread window, the cursor, Page
  10220. Up, Page Down and Enter keys may be used to position to thread entries and
  10221. modify their contents.
  10222.  
  10223. Cursor Up, Down, Left and Right
  10224.        may be used to move the text cursor to thread fields.
  10225.  
  10226. Page Up/Down
  10227.        may be used to scroll up and down through the thread window in
  10228.        increments of the number of lines in the window minus two.
  10229.  
  10230. Enter       may be used to modify the contents of the thread field upon which
  10231.        the text cursor is positioned.  When pressed on an "id" field,
  10232.        the selected thread becomes the current thread.  The other
  10233.        windows on the screen will change to reflect the selection of
  10234.        another execution thread.
  10235.  
  10236.        When pressed on a "state" field, the selected thread's state is
  10237.        changed to either "frozen" or "runnable".
  10238.  
  10239.  
  10240.  
  10241. Manipulating the Thread Window with a Mouse
  10242. ───────────────────────────────────────────
  10243.   1. Clicking in the Thread window causes the text cursor to move to this
  10244.     window.  It becomes the "active" window.  The text cursor may be
  10245.     positioned to any thread entry.
  10246.  
  10247.   2. The "scroll up" and "scroll down" gadgets may be used to scroll up and
  10248.     down through thread entries.
  10249.  
  10250.   3. The "page up" and "page down" gadgets may be used to scroll up and down
  10251.     through thread entries in increments of the number of lines in the
  10252.     window minus two.
  10253.  
  10254.   4. Double-clicking on a thread "id" field will cause that thread to become
  10255.     the current thread.  The other windows on the screen will change to
  10256.     reflect the selection of another execution thread.
  10257.  
  10258.     Double-clicking on a "state" field will cause that thread's state to
  10259.     become either "frozen" or "runnable".
  10260.  
  10261.  
  10262.  
  10263. Variable Window
  10264. ═══════════════
  10265. This window is created by the Print /Window command.  The debugger will
  10266. display output from a Print command in this window.  The window is updated
  10267. each time the debugger is entered or a VIDEO command is executed.  In the
  10268. illustration above, the sample Variable window is titled "Variable Display".
  10269.  
  10270.  
  10271.  
  10272. Manipulating the Variable Window with Keys
  10273. ──────────────────────────────────────────
  10274. When the text cursor is positioned in the Variable window, the Cursor
  10275. Up/Down, Enter, Backspace and "S" keys may be used.
  10276.  
  10277. Cursor Up/Down
  10278.        may be used to move up and down through the fields of a
  10279.        structure.  Entries that represent structures are displayed by
  10280.        using "{...}".  Entries that represent arrays are displayed by
  10281.        using "(...)".
  10282.  
  10283. Page Up/Down
  10284.        may be used to scroll up and down through the Variable window in
  10285.        increments of the number of lines in the window.
  10286.  
  10287. Enter       can be used to display the contents of a field.
  10288.  
  10289. Backspace  can be used to return to the previous level.
  10290.  
  10291. "S"       can be used to display an entry as a string.  The Backspace key
  10292.        can be used to return to the original display format.
  10293.  
  10294.  
  10295.  
  10296. Manipulating the Variable Window with a Mouse
  10297. ─────────────────────────────────────────────
  10298.   1. Clicking in the Variable window causes the text cursor to move to this
  10299.     window.  It becomes the "active" window.
  10300.  
  10301.   2. Fields can be selected and viewed by clicking on them.
  10302.  
  10303.   3. If you click on the line of dashes in the window, you will ascend to
  10304.     previous levels.
  10305.  
  10306.   4. Gadgets are provided for scrolling, resizing, zooming and closing the
  10307.     Variable window.
  10308.  
  10309.   5. The "scroll up" and "scroll down" gadgets may be used to move up and
  10310.     down through the fields of a structure.  Entries that represent
  10311.     structures are displayed by using "{...}".    Entries that represent
  10312.     arrays are displayed by using "(...)".
  10313.  
  10314.   6. The "page up" and "page down" gadgets may be used to scroll up and down
  10315.     through the Variable window in increments of the number of lines in the
  10316.     window.
  10317.  
  10318.  
  10319.  
  10320. View Window
  10321. ═══════════
  10322. This window is created by the Help and View commands.  The View window
  10323. occupies the entire display area when it is active.  When the command
  10324. completes, the View window is removed and other windows are redisplayed.
  10325.  
  10326.  
  10327.  
  10328. Manipulating the View Window with Keys
  10329. ──────────────────────────────────────
  10330. When the text cursor is positioned in the View window, the cursor, Page
  10331. Up/Down, Home, End, and Enter keys may be used to move about.  The /, ?, ',
  10332. and " keys may be used to search for text.
  10333.  
  10334. Cursor Up/Down
  10335.        may be used to move up and down through text lines.    Text lines
  10336.        will scroll when the text cursor is moved into the top or bottom
  10337.        areas of the window.
  10338.  
  10339. Cursor Left/Right
  10340.        move the cursor one character left or right.  When the cursor
  10341.        moves to the left or right edge of the window, text will be
  10342.        scrolled to the right or left.
  10343.  
  10344. Ctrl/Cursor Left/Right
  10345.        may be used to scroll the text in the window left or right
  10346.        without moving the cursor.
  10347.  
  10348. Page Up/Down
  10349.        may be used to scroll up and down through source lines in
  10350.        increments of the number of lines in the window minus two.
  10351.  
  10352. Home       may be used to move to the first line of the text being viewed.
  10353.  
  10354. Ctrl/Home  (Help window only) may be used to return to the main help index.
  10355.  
  10356. End       may be used to move to the last line of the text being viewed.
  10357.  
  10358. Enter       may be used to move the text cursor to the start of the next line
  10359.        of text.
  10360.  
  10361.        (Help window only) If you position the text cursor on a word in
  10362.        the window and press the Enter key, VIDEO will search for a topic
  10363.        by that name.
  10364.  
  10365. "/"       may be used to search forwards for a string of text.  A prompt is
  10366.        displayed for the string to search.    The Cursor Up key may be
  10367.        used to fill in the previous search string.
  10368.  
  10369. "?"       may be used to search backwards for a string of text.  A prompt
  10370.        is displayed for the string to search.  The Cursor Up key may be
  10371.        used to fill in the previous search string.
  10372.  
  10373. "'"       (apostrophe) may be used to search forwards for the previously
  10374.        specified search string.
  10375.  
  10376. "          (quote) may be used to search backwards for the previously
  10377.        specified search string.
  10378.  
  10379. "."       (period) may be used to repeat the last action.
  10380.  
  10381. Escape       may be used to terminate the viewing function.
  10382.  
  10383. "0" through "9"
  10384.        may be used to enter a number.  This number is used to repeat the
  10385.        next action the specified number of times.  For example, entering
  10386.        the number 20 followed by Cursor Down moves the cursor down 20
  10387.        lines rather than one.  For the Home and End keys, the number
  10388.        moves to "number" lines from the beginning of file and end of
  10389.        file, respectively.    To cancel a number without executing a
  10390.        command, press the Delete key.
  10391.  
  10392. Pressing one of the search keys causes a prompt for a search string to
  10393. appear.  If a previous string had been entered, this string may be recalled
  10394. using the Cursor Up key.  The recalled string will appear in the prompt
  10395. area.  Pressing the Escape key at this point will cancel the search command.
  10396. The Cursor Left and Right keys and the Home, End, Delete and Backspace keys
  10397. may be used to edit the search string.    After the search string has been
  10398. entered, pressing the Enter key will begin the search.    The search is done
  10399. case insensitively, with the file considered as a ring of text (e.g., if
  10400. searching forwards and the end of the file is reached without finding the
  10401. text, the search continues from the beginning of the file).  If the string
  10402. is found, the cursor is placed under the first matched character and the
  10403. matched string is highlighted.
  10404.  
  10405.  
  10406.  
  10407. Manipulating the View Window with a Mouse
  10408. ─────────────────────────────────────────
  10409.   1. Clicking in the View window causes the text cursor to move to the mouse
  10410.     cursor.
  10411.  
  10412.   2. (Help window only) If you position the text cursor on a word in the
  10413.     window and double-click on it with a mouse, VIDEO will search for a
  10414.     topic by that name.  If you double-click on the title line, VIDEO will
  10415.     return to the main help index.
  10416.  
  10417.   3. Text lines may be scrolled up or down by dragging the mouse.  To do
  10418.     this, the right-side scrolling bar must be unlocked.
  10419.  
  10420.   4. Text lines may be scrolled left or right by dragging the mouse.  To do
  10421.     this, the bottom scrolling bar must be unlocked.
  10422.  
  10423.   5. Gadgets are provided for scrolling and closing the View window.
  10424.  
  10425.   6. The "scroll up" and "scroll down" gadgets may be used to move up and
  10426.     down through text lines.  When the text cursor moves to the top or
  10427.     bottom of the window, text will be scrolled down or up.
  10428.  
  10429.   7. The "scroll left" and "scroll right" gadgets move the scroll one
  10430.     character left or right.  When the text cursor moves to the left or
  10431.     right edge of the window, text will be scrolled to the right or left.
  10432.  
  10433.   8. The "page up" and "page down" gadgets may be used to scroll up and down
  10434.     through source lines in increments of the number of lines in the window
  10435.     minus two.
  10436.  
  10437.  
  10438.  
  10439. Error Window
  10440. ════════════
  10441. In addition to the windows described in earlier sections, an "error" window
  10442. may appear in the middle of the screen when VIDEO wishes to issue an error
  10443. message.  This window will disappear when any key is pressed.
  10444. ::::WIRING
  10445. Serial Port Wiring Considerations
  10446. ═════════════════════════════════
  10447. If you plan to use the serial port Debug Server "SERSERV", a cable must
  10448. connect the serial ports of the two computer systems.  The following diagram
  10449. illustrates the wiring between the two serial ports.  If your computer
  10450. systems have more than one serial port, any serial port may be used.
  10451.  
  10452.       Task Machine        Debugger Machine
  10453.     Serial            Serial
  10454.        Connector           Connector
  10455.  
  10456.        Pin #          Pin #
  10457.        1 (PG) <──────────>1 (PG)
  10458.  
  10459.        2 (TxD)<──────────>3 (RxD)
  10460.  
  10461.        3 (RxD)<──────────>2 (TxD)
  10462.  
  10463.   ┌─────── 4 (RTS)          4 (RTS) ───────┐
  10464.   │                         │
  10465.   └──────> 5 (CTS)          5 (CTS) <──────┘
  10466.  
  10467.   ┌──────> 6 (DSR)          6 (DSR) <──────┐
  10468.   │                         │
  10469.   │       7 (SG) <──────────>7 (SG)         │
  10470.   │                         │
  10471.   ├──────> 8 (DCD)          8 (DCD) <──────┤
  10472.   │                         │
  10473.   └──────>20 (DTR)         20 (DTR) ───────┘
  10474.  
  10475. Figure 76. Serial Port Wiring Scheme
  10476.  
  10477. Note that the wiring is symmetrical (i.e., either end of the cable can be
  10478. plugged into either PC).  This particular arrangement of the wiring is
  10479. sometimes called a "null modem" (since pins 2 and 3 are crossed and no modem
  10480. is involved).
  10481.  
  10482.  
  10483.  
  10484. Parallel Port Wiring Considerations
  10485. ═══════════════════════════════════
  10486. If you plan to use the parallel port Debug Server "PARSERV" or "PARSERVW", a
  10487. cable must connect the parallel ports of the two computer systems.  Three
  10488. cabling methods are supported - the LapLink cable, the Flying Dutchman
  10489. cable, and WATCOM's own design.  There are two advantages to using the
  10490. LapLink or Flying Dutchman cable:
  10491.  
  10492.   1. They are commercially available (you may already own one).
  10493.  
  10494.   2. They may work with more PC "compatibles" than WATCOM's cable.  WATCOM's
  10495.     cabling requires 8 bi-directional data lines in the parallel port and
  10496.     some PC "compatibles" do not support this.
  10497.  
  10498. The disadvantage with the LapLink and Flying Dutchman cables is that they
  10499. are slower than WATCOM's cable since only 4 bits are transmitted in parallel
  10500. versus 8 bits for WATCOM's.  Thus WATCOM's cable is faster but it will have
  10501. to be custom made.
  10502.  
  10503. The LapLink cable is available from:
  10504.  
  10505.   Travelling Software, Inc.
  10506.   18702 North Creek Parkway
  10507.   Bothell, Washington,
  10508.   U.S.A. 98011
  10509.   Telephone: (206) 483-8088
  10510.  
  10511. The Flying Dutchman cable is available from:
  10512.  
  10513.   Cyco,
  10514.   Adm. Banckertweg 2a,
  10515.   2315 SR Leiden,
  10516.   The Netherlands.
  10517.  
  10518. The following diagram illustrates WATCOM's cable wiring between the two
  10519. parallel ports.
  10520.  
  10521.      Task Machine       Debugger Machine
  10522.       Parallel              Parallel
  10523.       Connector           Connector
  10524.  
  10525.        Pin #          Pin #
  10526.        1 <──────────────> 2
  10527.        2 <──────────────> 1
  10528.        3 <──────────────> 14
  10529.        4 <──────────────> 16
  10530.        5 <──────────────> 15
  10531.        6 <──────────────> 13
  10532.        7 <──────────────> 12
  10533.        8 <──────────────> 10
  10534.        9 <──────────────> 11
  10535.       10 <──────────────> 8
  10536.       11 <──────────────> 9
  10537.       12 <──────────────> 7
  10538.       13 <──────────────> 6
  10539.       14 <──────────────> 3
  10540.       15 <──────────────> 5
  10541.       16 <──────────────> 4
  10542.       17 <──────────────> 17
  10543.       18 <──────────────> 18
  10544.  
  10545. Figure 77. Parallel Port Wiring Scheme
  10546.  
  10547. For the IBM PC and PS/2, the connectors are standard "male" DB-25
  10548. connectors.  Note that the wiring is symmetrical (i.e., either end of the
  10549. cable can be plugged into either PC).
  10550.  
  10551. ┌────────────────────────────────────────────────────────────────────────────┐
  10552. │ Note:  Although the wiring is different for all three cables, WATCOM's     │
  10553. │ parallel communications software can determine which one is in use.         │
  10554. └────────────────────────────────────────────────────────────────────────────┘
  10555. ::::~~~DEFAULT
  10556.       ┌──────────────────────────────────────────────────────────┐
  10557.       │              W V I D E O             │
  10558.       │  WATCOM Visual Interactive Debugging Execution Overseer  │
  10559.       └──────────────────────────────────────────────────────────┘
  10560.  
  10561. To obtain help on the desired <topic>, position the cursor on it using the
  10562. cursor keys and press Enter or double-click on it with a mouse.  For more
  10563. topics, scroll this window using the cursor or PgUp/PgDn keys or the mouse.
  10564. Use Ctrl/Home or double-click on the title line to return to this index.
  10565.  
  10566. Help is available on the following topics.
  10567.  
  10568. Commands & General Information:
  10569.  
  10570. <BREAK>         <CALL>        <COMMAND_FILES>     <C_OPERATORS>
  10571. <DISPLAY>        <DO>        <ERROR>         <EXAMINE>
  10572. <F77_OPERATORS>     <FLIP>        <GO>            <HELP>
  10573. <IF>            <INVOKE>        <LOG>            <MENUS>
  10574. <MODIFY>        <NEW>        <NOTATION>        <PAINT>
  10575. <PRINT>         <PRINT_WINDOW>    <QUIT>            <REGISTER>
  10576. <REMARK>        <REMOTE_DEBUGGING>    <REMOTE_WIN3>        <RFX>
  10577. <SET>            <SHOW>        <SUMMARY>        <SYMBOLS>
  10578. <SYSTEM>        <THREAD>        <TRACE>         <VIEW>
  10579. <WATCH>         <WHILE>        <WINDOWS>        <WIRING>
  10580.  
  10581. Systems:
  10582.  
  10583. <AUTOCAD>
  10584.  
  10585. <DOS_STARTUP>                <DOS_EXTENDER>
  10586. <DOS_GRAPHICS_APPLICATIONS>        <DOS_INTERRUPTING_A_PROGRAM>
  10587. <DOS_REMOTE_DEBUGGING>            <DOS_WVIDEO_ENVIRONMENT_VARIABLE>
  10588.  
  10589. <WIN3_STARTUP>                <WIN3_WVIDEOW_ENVIRONMENT_VARIABLE>
  10590.  
  10591. <OS2_STARTUP>                <OS2_INTERRUPTING_A_PROGRAM>
  10592. <OS2_REMOTE_DEBUGGING>            <OS2_WVIDEO_ENVIRONMENT_VARIABLE>
  10593.  
  10594. <QNX_STARTUP>                <QNX_DEBUGGING_USING_POSTMORTEM_DUMP>
  10595. <QNX_INTERRUPTING_A_PROGRAM>        <QNX_REMOTE_DEBUGGING>
  10596. <QNX_SEARCH_ORDER>            <QNX_WVIDEO_ENVIRONMENT_VARIABLE>
  10597.  
  10598. Short forms for the topic name may be specified.
  10599.