home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c495 / watcm953.arj / VID_HELP.WPK / WVIDEO.HLP
Encoding:
Text File  |  1993-05-05  |  432.1 KB  |  11,205 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. ::::C++_OPERATORS
  213. VIDEO support for the C++ grammar includes all of the C operators
  214. described in the section entitled "Operators for the C Grammar".
  215. In addition to this, VIDEO supports a variety of C++ operators which are
  216. described in the C++ Programming Language manual.
  217.  
  218. Perhaps the best way to illustrate the additional capabilities of VIDEO's
  219. support for the C++ grammar is by way of example.  The following C++
  220. program encompasses the features of C++ that we will use in our debugging
  221. example.
  222.  
  223. Example:
  224.   // DBG_EXAM.C: C++ debugging example program
  225.  
  226.   struct BASE {
  227.       int a;
  228.       BASE() : a(0) {}
  229.       ~BASE(){}
  230.       BASE & operator =( BASE const &s )
  231.       {
  232.       a = s.a;
  233.       return *this;
  234.       }
  235.       virtual void foo()
  236.       {
  237.       a = 1;
  238.       }
  239.   };
  240.  
  241.   struct DERIVED : BASE {
  242.       int b;
  243.       DERIVED() : b(0) {}
  244.       ~DERIVED() {}
  245.       DERIVED & operator =( DERIVED const &s )
  246.       {
  247.       a = s.a;
  248.       b = s.b;
  249.       return *this;
  250.       }
  251.       virtual void foo()
  252.       {
  253.       a = 2;
  254.       b = 3;
  255.       }
  256.       virtual void foo( int )
  257.       {
  258.       }
  259.   };
  260.  
  261.   void use( BASE *p )
  262.   {
  263.       p->foo();
  264.   }
  265.  
  266.   void main()
  267.   {
  268.       DERIVED x;
  269.       DERIVED y;
  270.  
  271.       use( &x );
  272.       y = x;
  273.   }
  274.  
  275. Compile and link this program so that the most comprehensive debugging
  276. information is included in the executable file.
  277.  
  278.  
  279. Expression Support for the C++ Grammar
  280. ══════════════════════════════════════
  281. If we trace one statement at a time up to the use( &x ) function call in
  282. main, we can begin to demonstrate some of the C++ support.  We can display
  283. the variable x using the PRINT statement.
  284.  
  285. Example:
  286.   DBG>print x
  287.   {__ctor_DERIVED=0x01D8:0x0046FC18,
  288.    __vfptr=0x01D8:0x0046E448,
  289.    b=0,
  290.    __ctor_DERIVED=0x01D0:0x0046B1C1,
  291.    __dtor_DERIVED=0x01D0:0x0046B14A,
  292.    __operator_EQUAL=0x01D0:0x0046B106,
  293.    foo=0x01D0:0x0046B0CF,
  294.    foo=0x01D0:0x0046B0AA,
  295.    a=0,
  296.    __operator_EQUAL=0x01D8:0x0046FC18,
  297.    __ctor_BASE=0x01D8:0x0046FC18,
  298.    __vfptr=0x01D8:0x0046E448,
  299.    __ctor_BASE=0x01D0:0x0046B29B,
  300.    __dtor_BASE=0x01D0:0x0046B23A,
  301.    foo=0x01D0:0x0046B0CF
  302.   }
  303.  
  304. Many of the fields displayed are a result of the constructors,
  305. destructors, virtual functions and operators contained in the derived
  306. class DERIVED (the output here is from the 32-bit C++ compiler).  The
  307. DERIVED class contains many names "manufactured" by the C++ compiler.
  308.  
  309. We can also display fields in x.
  310.  
  311. Example:
  312.   DBG>print x.a
  313.  
  314. The value of a should be 0 as a result of the C++ constructor statement:
  315.  
  316.       BASE() : a(0) {}
  317.  
  318. We can also display the structure of the variable x in its own window
  319. using the PRINT /WINDOW command.
  320.  
  321. Example:
  322.   DBG>print/win x
  323.  
  324. There is not much surprising here since the same operations are available
  325. when debugging C applications.
  326.  
  327.  
  328. Ambiguity Resolution in the C++ Grammar
  329. ═══════════════════════════════════════
  330. Continuing with the example of the previous section, we can step into the
  331. call to use and up to the p->foo() function call.  Enter the command:
  332.  
  333. Example:
  334.   DBG>examine/source foo
  335.  
  336. You will be presented with a window containing a list of "foo" functions
  337. to choose from since the reference to foo at this point is ambiguous.
  338. Select the one in which you are interested.
  339.  
  340. You may also have observed that, in this instance, p is really a pointer
  341. to the variable x which is a DERIVED type.  To display all the fields of
  342. x, you can type cast it as follows.
  343.  
  344. Example:
  345.   DBG>print/win *(DERIVED *)p
  346.  
  347.  
  348. The "this" Operator for the C++ Grammar
  349. ═══════════════════════════════════════
  350. Continuing with the example of the previous sections, we can step into the
  351. call to f->foo() and up to the b=3 statement.  You can use the "this"
  352. operator as illustrated in the following example.
  353.  
  354. Example:
  355.   DBG>print this->a
  356.   DBG>print/win *this
  357.  
  358.  
  359. "operator" Functions in the C++ Grammar
  360. ═══════════════════════════════════════
  361. Continuing with the example of the previous sections, we can examine the
  362. source code for C++ operators using commands similar to the following:
  363.  
  364. Example:
  365.   DBG>ex/s operator =
  366.  
  367. The example above permits us to examine the source code for the operator =
  368. function in the DERIVED class.
  369.  
  370.       DERIVED & operator =( DERIVED const &s )
  371.       {
  372.       a = s.a;
  373.       b = s.b;
  374.       return *this;
  375.       }
  376.  
  377.  
  378. Scope Operator "::" for the C++ Grammar
  379. ═══════════════════════════════════════
  380. We can use the scope operator "::" to identify what it is that we wish to
  381. examine.  Continuing with the example of the previous sections, we can
  382. enter a command like:
  383.  
  384. Example:
  385.   DBG>ex/s base::foo
  386.  
  387. In some cases, this also helps to resolve any ambiguity.  The example
  388. above permits us to examine the source code for the function foo in the
  389. class BASE.
  390.  
  391.       virtual void foo()
  392.       {
  393.       a = 1;
  394.       }
  395.  
  396. Here are some more interesting examples:
  397.  
  398. Example:
  399.   DBG>ex/s derived::foo
  400.   DBG>ex/s derived::operator =
  401.  
  402. The first of these two examples contains an ambiguous reference so a
  403. prompt window is displayed to resolve the ambiguity.
  404.  
  405.  
  406. Constructor/Destructor Functions in the C++ Grammar
  407. ═══════════════════════════════════════════════════
  408. We can also examine the constructor/destructor functions of an object or
  409. class.    Continuing with the example of the previous sections, we can enter
  410. commands like:
  411.  
  412. Example:
  413.   DBG>ex/s base::base
  414.   DBG>ex/s base::~base
  415.  
  416. The examples above permit us to examine the source code for the
  417. constructor and destructor functions in the class BASE.
  418. ::::CALL
  419. ┌──────────────────────────────────────────────────────────────────────────┐
  420. │ Call [/Far | /Interrupt | /Near]                       │
  421. │      start_addr_expr [ "(" [arg_list] ")" [ "/" | print_list ] ]       │
  422. └──────────────────────────────────────────────────────────────────────────┘
  423.  
  424. The Call command may be used to call any routine present in the system.  The
  425. user specifies a starting address expression for the routine that is to be
  426. called.  The expression must evaluate to the segment and offset of the
  427. routine to be called.  The routine may be one of three types:
  428.  
  429.   /Far start_addr_expr ["(" [arg_list] ")" [ "/" | print_list ]]
  430.  
  431.        A "far" routine is one that eventually returns to its caller by
  432.        using a "far return" instruction (RETF).  In 16-bit mode, a
  433.        32-bit return address (segment and offset) is placed on the stack
  434.        by the debugger so that the routine will return to the debugger.
  435.        In 32-bit mode, a 64-bit return address (segment and offset) is
  436.        placed on the stack by the debugger so that the routine will
  437.        return to the debugger.  The "far" call and return mechanism is
  438.        used in the big code models (medium, large, and huge).
  439.  
  440.   /Interrupt start_addr_expr ["(" [arg_list] ")" [ "/" | print_list ]]
  441.  
  442.        An "interrupt" routine is one that eventually returns to its
  443.        caller by using an interrupt return instruction (IRET, IRETD).
  444.        In 16-bit mode, a 32-bit return address (segment and offset) and
  445.        the current contents of the flags register are placed on the
  446.        stack by the debugger so that the interrupt routine will return
  447.        to the debugger.  In 32-bit mode, a 64-bit return address
  448.        (segment and offset) and the current contents of the flags
  449.        register are placed on the stack by the debugger so that the
  450.        interrupt routine will return to the debugger.  Note that an
  451.        interrupt routine is called by its address, not an interrupt
  452.        number.
  453.  
  454.   /Near start_addr_expr ["(" [arg_list] ")" [ "/" | print_list ]]
  455.  
  456.        A "near" routine is one that eventually returns to its caller by
  457.        using a "near return" instruction (RET).  In 16-bit mode, a
  458.        16-bit return address (offset) is placed on the stack by the
  459.        debugger so that the routine will return to the debugger.  In
  460.        32-bit mode, a 32-bit return address (offset) is placed on the
  461.        stack by the debugger so that the routine will return to the
  462.        debugger.  The "near" call and return mechanism is used in the
  463.        small code models (small, compact, flat).
  464.  
  465.  
  466. Call Argument List
  467. ══════════════════
  468. An argument list may be specified for the routine to be invoked.  If one is
  469. specified, it takes the following form:
  470.  
  471.   arg_list ::= [ arg_expr { "," arg_expr } ]
  472.   arg_expr ::= [ "/"reg_name | "/"reg_aggregate | "//" ] expr
  473.  
  474. Example:
  475.   DBG>call rtn0( )
  476.   DBG>call rtn1( arg1 )
  477.   DBG>call rtn5( arg1, arg2, arg3, arg4, arg5 )
  478.  
  479. The above examples illustrate how arguments may be specified.  By default,
  480. arguments are passed to the routine using the standard argument passing
  481. convention.  In 16-bit mode, the standard argument passing convention for
  482. 16-bit quantities is:
  483.  
  484.     argument 1 passed in register AX
  485.  
  486.     argument 2 passed in register DX
  487.  
  488.     argument 3 passed in register BX
  489.  
  490.     argument 4 passed in register CX
  491.  
  492.     argument N passed on the stack (N >= 5).
  493.  
  494. In 32-bit mode, the standard argument passing convention for 32-bit
  495. quantities is:
  496.  
  497.     argument 1 passed in register EAX
  498.  
  499.     argument 2 passed in register EDX
  500.  
  501.     argument 3 passed in register EBX
  502.  
  503.     argument 4 passed in register ECX
  504.  
  505.     argument N passed on the stack (N >= 5).
  506.  
  507. These defaults may be changed by using the Set Call command.  Alternatively,
  508. if you wish to specify a different argument passing convention then the
  509. "/reg_name" (register), "/reg_aggregate" (group of registers) or "//"
  510. (stack) modifiers may be used.
  511.  
  512. Example:
  513.   DBG>call stdrtn(/ax p1,/dx p2,/bx p3,/cx p4,// p5)
  514.       or
  515.   DBG>call stdrtn(/eax p1,/edx p2,/ebx p3,/ecx p4,// p5)
  516.  
  517. The above examples, in effect, illustrate the placement of arguments in
  518. registers and on the stack according to the standard argument passing
  519. conventions for 16-bit and 32-bit modes.
  520.  
  521. Example:
  522.   DBG>call longtostr( /[dx ax] long_arg )
  523.  
  524. The above 16-bit example illustrates that a 32-bit argument can be passed in
  525. a register aggregate.  Register aggregates are described in the chapter
  526. entitled "VIDEO Expression Handling".
  527.  
  528. Example:
  529.   DBG>call printf( //arg1, //arg2, //arg3 )
  530.  
  531. The above example illustrates how to pass all arguments on the stack.  The
  532. arguments are pushed onto the stack in a right to left order so that
  533. (preceding the actual call) "arg1" will be on the top of the stack, "arg2"
  534. will be next, and so on.
  535.  
  536. The arguments can be expressions and all expressions are evaluated before
  537. the arguments are assigned to registers or placed on the stack.
  538.  
  539. Example:
  540.   DBG>call rtn( /ax dx+1, /bx ax-cx, /cx 123)
  541.  
  542. The expressions "dx+1", "ax-cx" and "123" are evaluated.  The results of
  543. these expressions are then assigned to the AX, BX and CX registers
  544. respectively.  Note that the results would have been quite different if 123
  545. had been assigned to the CX register before the expression "ax-cx" was
  546. evaluated.
  547.  
  548. All register contents are preserved by the debugger.  Therefore, neither the
  549. choice of argument passing convention nor the called routine can permanently
  550. change the register contents.  The called routine could, however, have side
  551. effects such as modifying memory locations, performing input/output, etc.
  552.  
  553. Disposition of the Return Value
  554. ═══════════════════════════════
  555. One of three possible actions can occur after the called routine returns to
  556. the debugger.
  557.  
  558.   1. By default, the contents of the AX register (16-bit mode) or EAX
  559.     register (32-bit mode), which is returned by the routine, are printed in
  560.     the Dialogue window.  This default may be changed by using the Set Call
  561.     command.
  562.   2. A "/" may be used to indicate that the routine does not return any
  563.     value in which case nothing is printed.
  564.   3. A formatting string and list of expressions may be specified.  The
  565.     syntax of print_list is similar to that of the Print command.  The
  566.     expressions are evaluated and the results printed in the Dialogue
  567.     window.
  568.  
  569. Example:
  570.   DBG>call test1() /
  571.   DBG>call test2( s, t ) ax, bx, cx
  572.   DBG>call test3( a,b,c ){Results were %i,%i,%u}dx,ax,tag
  573.  
  574. In the first line of the above example, the routine does not return any
  575. useful information in the AX register so we suppress the printing of this
  576. register.  In the second line, the contents of the AX, BX and CX registers
  577. are displayed with default formatting.    In the third line, the contents of
  578. the DX and AX registers and the variable "tag" are displayed using the
  579. specified formatting string.  See the description of the Print command for
  580. more information on formatting strings.
  581.  
  582. Suppose that we want to update some of the registers in our current register
  583. set with values returned by the routine that we call.
  584.  
  585. Example:
  586.   DBG>call/far test() _ax=ax, _bx=bx;/ax=_ax;/bx=_bx
  587.  
  588. In the above example, we call the routine "test" using a "far" call.  Since
  589. register contents are unaffected by the call, we assign the values returned
  590. in the AX and BX registers to the variables _ax and _bx.  Subsequent
  591. debugger commands assign these saved values to the AX and BX registers in
  592. our current register set.  VIDEO allows us to define new variables simply by
  593. specifying a unique name and then assigning a value to it.
  594.  
  595. In the next example, we illustrate how to call a BIOS routine in 16-bit
  596. "real" mode.
  597.  
  598. Example:
  599.   DBG>c/int %0:(4*0x10) (/ah 3, /bh 0) {ct=%x,rc=%x}cx,dx
  600.  
  601. In the above example, we call the IBM BIOS "Video I/O" interrupt routine
  602. (INT 0x10) to obtain the current cursor type and position (AH=3) for video
  603. page 0 (BH=0).    The % operator yields the segment:offset pair stored at
  604. locations 0:40 through 0:43.  The cursor type is returned in the "CX"
  605. register and the cursor row and column are returned in the "DX" register;
  606. hence we ask the debugger to display the contents of both registers in
  607. hexadecimal format.
  608. ::::COMMAND_FILES
  609. The following sections describe the command files that are provided with
  610. VIDEO.
  611.  
  612. Under DOS, OS/2 or Windows NT systems, you should ensure that the "BINB"
  613. directory of the WATCOM compiler package is included in the PATH environment
  614. variable.  This directory contains the command files provided with VIDEO.
  615. VIDEO uses the PATH environment variable to locate command files.
  616.  
  617. Under QNX, the command files provided with VIDEO are usually located in the
  618. "/etc/wvideo" directory.  The search order for command files is as follows:
  619.  
  620.   1. the current directory,
  621.   2. the paths listed in the WVIDEO_PATH environment variable,
  622.   3. the path listed in the HOME environment variable, and, finally,
  623.   4. the "/etc/wvideo" directory.
  624.  
  625. The INvoke or < command is used to execute the commands within a command
  626. file.  The Set Implicit command can be used to turn automatic command file
  627. invocation "on" or "off".  When it is "on", VIDEO will attempt to invoke a
  628. command file when the command that is entered does not match one of those in
  629. its command set.  For more information on command file processing, see the
  630. "INVOKE" topic.
  631.  
  632.  
  633. Add Paths to the Source File Search Paths (addsrc.dbg)
  634. ══════════════════════════════════════════════════════
  635. Syntax:    [INvoke | <] addsrc <path1> <path2> ...
  636.  
  637. Synopsis:  This command file adds the specified source path(s) (including
  638.        wild cards) to the existing source file search paths.
  639.  
  640. Example:   addsrc \lib\c\*.c \ui\c\*.c
  641.  
  642.        Two more paths are added to the list of paths to search for
  643.        source files.
  644.  
  645.  
  646. Setup for an AutoCAD ADS (or ADI) Application (ads.dbg)
  647. ═══════════════════════════════════════════════════════
  648. Syntax:    [INvoke | <] ads <symbol_file_name>
  649.  
  650. Synopsis:  This command file sets up a debugging session for an AutoCAD ADS
  651.        (or ADI) application.  The symbolic information is stored in
  652.        "symbol_file_name".
  653.  
  654.        Consult the AutoCAD Development System - Programmer's Reference
  655.        for more information on creating ADS applications.  See also
  656.        the chapter in your WATCOM C/C++(32) or WATCOM FORTRAN
  657.        77(32) User's Guide entitled "Creating AutoCAD Applications".
  658.        See the chapter in the WATCOM VIDEO User's Guide entitled
  659.        "Debugging AutoCAD Applications" for more information.
  660.  
  661.  
  662. Code Animation (animate.dbg)
  663. ════════════════════════════
  664. Syntax:    [INvoke | <] animate
  665.  
  666. Synopsis:  This command file can be used to perform a slow-motion
  667.        animation of a program.  Animation may be interrupted with the
  668.        Ctrl/C key combination.
  669.  
  670.  
  671. Create Large Assembly Window (asm.dbg)
  672. ══════════════════════════════════════
  673. Syntax:    [INvoke | <] asm
  674.  
  675. Synopsis:  This command file creates an Assembly window that uses most of
  676.        the screen.    The Register window is placed on the right side of
  677.        the screen.    A Stack window is defined but not placed on the
  678.        screen.  A Dialogue window is created.  The Source window is
  679.        hidden behind the Assembly window.  The debugging level is set
  680.        to "assembly".
  681.  
  682.  
  683. Break on Count (bcnt.dbg)
  684. ═════════════════════════
  685. Syntax:    [INvoke | <] bcnt <count> <address>
  686.  
  687. Synopsis:  This command file is used to break execution after "count"
  688.        iterations at the specified "address".  The break point is
  689.        cleared afterwards.
  690.  
  691. Example:   bcnt 1000 StageD
  692.  
  693.        Execution is halted after the routine "StageD" has been called
  694.        1000 times.
  695.  
  696.  
  697. Break If (bif.dbg)
  698. ══════════════════
  699. Syntax:    [INvoke | <] bif <expr> <address>
  700.  
  701. Synopsis:  This command file is used to break execution at the specified
  702.        "address" when "expr" is true (non-zero result).
  703.  
  704. Example:   bif {ax == 0} malloc
  705.  
  706.        bif {eax == 0} malloc
  707.  
  708.        Execution is halted whenever the "malloc" routine is called with
  709.        a request for 0 bytes of storage.  Note that the argument is
  710.        passed in register AX in 16-bit mode or EAX in 32-bit mode.
  711.  
  712.  
  713. Set a Break Point (bp.dbg)
  714. ══════════════════════════
  715. Syntax:    [INvoke | <] bp <address>
  716.  
  717. Synopsis:  This command file is used to break execution at the specified
  718.        "address".
  719.  
  720. Example:   bp fact
  721.  
  722.        Execution is halted whenever the "fact" routine is called.
  723.        This command file is provided for compatibility with the
  724.        Codeview "bp" command.  See the description of the Break
  725.        command in the section entitled "BREAK" for more information.
  726.  
  727.  
  728. Set a Break Point at the Last Viewed Line (bv.dbg)
  729. ══════════════════════════════════════════════════
  730. Syntax:    [INvoke | <] bv
  731.  
  732. Synopsis:  This command file is used to break execution at the last line
  733.        that was viewed.  It uses the dbg$view variable.  This debugger
  734.        symbol is set by the View command.  It represents the segment
  735.        and offset of the code corresponding to the line where the
  736.        cursor was last positioned when viewing a module of the current
  737.        application.  See the description of the Break command in the
  738.        section entitled "BREAK" and the View command in the section
  739.        entitled "VIEW" for more information.
  740.  
  741.  
  742. Count Breaks (cntbrks.dbg)
  743. ══════════════════════════
  744. Syntax:    [INvoke | <] cntbrks <address>
  745.  
  746. Synopsis:  Count the number of times <address> is executed.
  747.  
  748. Example:   cntbrks StageD
  749.  
  750.        The name of the variable that is created to tabulate the number
  751.        of iterations is displayed on the screen.  This variable can be
  752.        queried at any time with the VIDEO Print command.  When program
  753.        execution is started with the Go command, each break results in
  754.        the message "cnt$xxxx = n" being printed on the program screen.
  755.  
  756.  
  757. Setup Window Colours (colours.dbg)
  758. ══════════════════════════════════
  759. Syntax:    [INvoke | <] colours
  760.  
  761. Synopsis:  This command file sets the colours for the various debugger
  762.        windows.  The selection can be tailored to your own needs.  The
  763.        command file is invoked by the start-up "profile.dbg" command
  764.        file whenever the debugger is run on a colour monitor.
  765.  
  766. See Also:  grays.dbg
  767.  
  768.  
  769.  
  770. Codeview-like VIDEO Initialization File (cv.dbg)
  771. ════════════════════════════════════════════════
  772. Syntax:    [INvoke | <] cv
  773.  
  774. Synopsis:  This is a substitute for the default VIDEO initialization file,
  775.        PROFILE.DBG.  It sets up function keys similar to the Microsoft
  776.        Codeview function keys.  It can be invoked from the command
  777.        line using the debugger's "invoke" option.  For more
  778.        information on debugger initialization files, see the
  779.        description in the section entitled "VIDEO Initialization File
  780.        (profile.dbg)".
  781.  
  782.  
  783. Fill Memory (fill.dbg)
  784. ══════════════════════
  785. Syntax:    [INvoke | <] fill <address> <value> <length>
  786.  
  787. Synopsis:  This command file may be used to fill a region of memory with a
  788.        specific value.  The starting address to fill is specified by
  789.        <address>.  The byte value to fill with is specified by <value>.
  790.        The number of bytes to fill is specified by <length>.
  791.  
  792. Example:   fill es:0 ff 100
  793.        Fill 256 bytes of memory starting at ES:0 with the value 0xFF.  A
  794.        radix of 16 is assumed in this example.
  795.  
  796.  
  797. Setup for a FoxPro External Routine (fox.dbg)
  798. ═════════════════════════════════════════════
  799. Syntax:    [INvoke | <] fox <symbol_file_name>
  800.  
  801. Synopsis:  This command file sets up a debugging session for a FoxPro
  802.        External Routine.  The symbolic information is stored in
  803.        "symbol_file_name".
  804.  
  805.        Make sure that you have coded a call to BreakPoint() in your
  806.        external routine.  This call should be in the first segment.
  807.  
  808. Example:   Start the external routine (e.g.,?  hello()).  The call to
  809.        BreakPoint() causes entry into debugger.  To start symbolic
  810.        debugging, enter a command similar to the following:
  811.  
  812.        Example:
  813.          DBG>fox hello.plb
  814.  
  815.        Consult the FoxPro External Routine API document for more
  816.        information on creating FoxPro External Routines.
  817.  
  818.  
  819. Setup Window Colours for a Gray-Scale Monitor
  820. ═════════════════════════════════════════════
  821. Syntax:    [INvoke | <] grays
  822.  
  823. Synopsis:  This command file sets the "colours" for the various debugger
  824.        windows on a gray-scale monitor.  The selection can be tailored
  825.        to your own needs.  The command file should be invoked if you
  826.        have a gray-scale monitor.
  827.  
  828. See Also:  colours.dbg
  829.  
  830.  
  831. Create Assembly and Source Windows (mix.dbg)
  832. ════════════════════════════════════════════
  833. Syntax:    [INvoke | <] mix
  834.  
  835. Synopsis:  This command file creates two evenly-sized Source and Assembly
  836.        windows that use up most of the screen.  The Register window is
  837.        placed on the right side of the screen.  A Stack window is
  838.        defined but not placed on the screen.  A small Dialogue window is
  839.        also created.  The debugging level is set to "mix".
  840.  
  841.  
  842. VIDEO Initialization File (profile.dbg)
  843. ═══════════════════════════════════════
  844. Syntax:    [INvoke | <] profile
  845.  
  846. Synopsis:  This is the VIDEO initialization file.  It can be customized
  847.        for your own needs.    As distributed, it performs the following
  848.        initialization.
  849.  
  850.          1. The menu bar is turned on.
  851.  
  852.          2. The debugging level is set to "mix" which is source level
  853.            debugging whenever possible and assembly level debugging
  854.            when no source line information is available.
  855.  
  856.          3. The symbol name matching patterns are set to "*", "*_" and
  857.            "_*".
  858.  
  859.          4. Automatic command file invocation is enabled.  Any time an
  860.            unrecognized command is entered, the debugger will try to
  861.            execute a command file with the same name and extension
  862.            "DBG".
  863.  
  864.          5. Radix specifiers for decimal (0n), hexadecimal (0x) and
  865.            octal (0) numbers are defined.
  866.  
  867.          6. Default colours for various windows are set up.
  868.  
  869.          7. Command, Register, Stack, Fpu, Dialogue, Memory and Thread
  870.            window sizes are defined.  Window sizes are based upon the
  871.            number of screen lines that are available on the screen.
  872.            The "SRC" command file is invoked to place Source and
  873.            Dialogue windows on the screen.
  874.  
  875.          8. "Restart", "animate", "view", "src", "mix", "asm", and
  876.            "flip" commands are added to the user-definable "User"
  877.            pop-down menu.  Note that "restart", "animate", "src",
  878.            "mix" and "asm" are the names of VIDEO command files.
  879.  
  880.          9. Function key "F1" is defined such that a press will cause
  881.            the "help" system to be invoked.
  882.  
  883.            Function key "F2" is defined to add and remove the REGISTER
  884.            window from the screen when the just the source and
  885.            dialogue windows are displayed.
  886.  
  887.            Function key "F4" is defined to add and remove the FPU
  888.            window to and from the screen with alternate presses.
  889.  
  890.            Function key "F5" is set to issue a "register -1" command
  891.            when pressed.
  892.  
  893.            Function key "F6" is set to issue a "register +1" command
  894.            when pressed.
  895.  
  896.            Function key "F7" is defined such that a press will cause
  897.            an invocation of the "WIND" command file.  This key cycles
  898.            through different sizes for the Source and Assembly windows
  899.            by using the "SRC", "MIX" and "ASM" command files.
  900.  
  901.            Function key "F8" is defined such that alternate presses
  902.            turn the menu bar on and off.
  903.  
  904.            Function key "F10" is defined to activate menu selection in
  905.            the same way that pressing and releasing the Alt key would.
  906.  
  907.            Function key "Alt/F9" is defined such that a press will
  908.            move the cursor to the Source window.
  909.  
  910.            Function key "Alt/F10" is defined such that a press will
  911.            move the cursor to the Assembly window.
  912.  
  913.          10. Macro hot keys are defined for the Assembly window.  The
  914.            following keys are defined:
  915.  
  916.            'G'      {g} Resume execution
  917.            'g'      {g dbg$code} Continue execution to the currently
  918.               highlighted line
  919.            'i'      {t/a/i} Single-shot trace "into"
  920.            'n'      {t/a/n} Single-shot trace "next"
  921.            ' '      {t/a/o} Single-shot trace "over"
  922.            'b'      {b dbg$code} Set a break point at the currently
  923.               highlighted line
  924.            'c'      {b/c/dbg$code} Remove a break point at the
  925.               currently highlighted line
  926.  
  927.          11. Macro hot keys are defined for the Source window.  The
  928.            following keys are defined:
  929.  
  930.            'v'      {view} View the source code for the current
  931.               module
  932.            'G'      {g} Resume execution
  933.            'g'      {g dbg$code} Continue execution to the currently
  934.               highlighted line
  935.            'i'      {t/s/i} Single-shot trace "into"
  936.            'n'      {t/s/n} Single-shot trace "next"
  937.            ' '      {t/s/o} Single-shot trace "over"
  938.            'b'      {b dbg$code} Set a break point at the currently
  939.               highlighted line
  940.            'c'      {b/c/dbg$code} Remove a break point at the
  941.               currently highlighted line
  942.  
  943.          12. Macro hot keys are defined for the FPU window.  The
  944.            following keys are defined:
  945.  
  946.            'b'      {set fpu binary} Set the display mode to
  947.               hexadecimal
  948.            'd'      {set fpu decimal} Set the display mode to
  949.               decimal
  950.  
  951.          13. For MS Windows applications, VIDEO will issue a "go
  952.            WinMain" (C) or "go FWinMain" (FORTRAN) command if one of
  953.            these entry points is defined.
  954.  
  955.          14. For FORTRAN applications, VIDEO will issue a "go fmain"
  956.            command.  Otherwise, if the "main" entry point is defined
  957.            then VIDEO will issue a "go main" command.
  958.  
  959.  
  960. Set DOS Memory Control Block (resize.dbg)
  961. ═════════════════════════════════════════
  962. Syntax:    [INvoke | <] resize <new_size>
  963.  
  964. Synopsis:  (DOS only) This command file sets the DOS memory control block
  965.        containing the PSP to a new size.  The PSP value is recorded in
  966.        the debugger variable _dbg@dbg$psp.    Before an application
  967.        starts, DOS gives it all of the remaining memory.  Normally, the
  968.        application should return to DOS that portion of memory which it
  969.        does not use.  This command file can be used in the event that
  970.        the application does not return unused memory to DOS and you wish
  971.        to start up a subprocess by using the VIDEO SYSTEM command.    In
  972.        this case, memory must be returned to DOS before a subprocess can
  973.        be started.
  974.  
  975. Example:   resize 0x1000
  976.  
  977.        Reset the memory control block containing the current PSP to 64K
  978.        bytes.
  979.  
  980. ┌────────────────────────────────────────────────────────────────────────────┐
  981. │ WARNING!  If an incorrect or inappropriate size is specified, the computer │
  982. │ system could hang.  Too small values will cause erratic operation.         │
  983. └────────────────────────────────────────────────────────────────────────────┘
  984.  
  985.  
  986. Restart Execution (restart.dbg)
  987. ═══════════════════════════════
  988. Syntax:    [INvoke | <] restart
  989.  
  990. Synopsis:  This command file may be used to restart execution of the
  991.        application.
  992.  
  993.  
  994. Return from Current Routine (return.dbg)
  995. ════════════════════════════════════════
  996. Syntax:    [INvoke | <] return
  997.  
  998. Synopsis:  This command file may be used to return from the current routine.
  999.        Execution of the application is advanced until a RETURN
  1000.        instruction is encountered.    Execution is then advanced by an
  1001.        additional instruction in order to return to the calling routine.
  1002.  
  1003.  
  1004. Slow Motion Code Animation (slow.dbg)
  1005. ═════════════════════════════════════
  1006. Syntax:    [INvoke | <] slow <delay>
  1007.  
  1008. Synopsis:  This command file can be used to perform slow motion execution of
  1009.        a program.  The <delay> value must be specified.  The larger the
  1010.        value for <delay>, the slower the program will execute.
  1011.  
  1012.  
  1013. Save Current Setup (save.dbg)
  1014. ═════════════════════════════
  1015. Syntax:    [INvoke | <] save
  1016.  
  1017. Synopsis:  Creates a file called setup.dbg which contains the debugger
  1018.        commands required to recreate the current debugger configuration.
  1019.  
  1020.  
  1021. Create Large Source Window (src.dbg)
  1022. ════════════════════════════════════
  1023. Syntax:    [INvoke | <] src
  1024.  
  1025. Synopsis:  This command file creates a Source window that uses most of the
  1026.        screen.  A small Dialogue window is also created.  Any Register
  1027.        or Stack windows are removed from the screen.  The Assembly
  1028.        window is hidden under the Dialogue window.    The debugging
  1029.        level is set to "source".  The command file is invoked by the
  1030.        start-up "profile.dbg" command file.
  1031.  
  1032.  
  1033. Define Function Key Toggle (toggle.dbg)
  1034. ═══════════════════════════════════════
  1035. Syntax:    [INvoke | <] toggle <pfkey_number> <command_string_1>
  1036.        <command_string_2>
  1037.  
  1038. Synopsis:  This command file sets up a PF key to alternate between two
  1039.        commands.
  1040.  
  1041. Example:   toggle 10 {set menu on} {set menu off}
  1042.  
  1043.        Function key "F10" is defined to toggle the menu bar on and off.
  1044.  
  1045.  
  1046. View Output from CALL Command (vc.dbg)
  1047. ══════════════════════════════════════
  1048. Syntax:    [INvoke | <] vc <call_address_and_arguments>
  1049.  
  1050. Synopsis:  This command file uses the View command to examine the standard
  1051.        output from a routine called by the Call command.  The file
  1052.        "stdout.tmp" is created.
  1053.  
  1054. Example:   vc DumpTree( HeadNode )
  1055.  
  1056.  
  1057. View Source Code for Routine (vr.dbg)
  1058. ═════════════════════════════════════
  1059. Syntax:    [INvoke | <] vr <routine_name>
  1060.  
  1061. Synopsis:  This command file examines the source code for a given routine by
  1062.        using the View command.
  1063.  
  1064. Example:   vr main
  1065.  
  1066.  
  1067. Window Management Utility Function (wind.dbg)
  1068. ═════════════════════════════════════════════
  1069. Syntax:    [INvoke | <] wind
  1070.  
  1071. Synopsis:  This command file invokes one of the "SRC", "ASM", or "MIX"
  1072.        command files depending on the state of the _dbg@dbg$wind_split
  1073.        variable.  It is primarily a utility command file that is invoked
  1074.        by other command files or function keys.
  1075. ::::C_OPERATORS
  1076. VIDEO supports most C operators and includes an additional set of operators
  1077. for convenience.  The WATCOM C Language Reference manual describes many of
  1078. these operators.
  1079.  
  1080. The syntax for VIDEO expressions is similar to that of the C programming
  1081. language.  Operators are presented in order of precedence, from lowest to
  1082. highest.  Operators on the same line have the same priority.
  1083.  
  1084.                       Lowest Priority
  1085.   Assignment Operators
  1086.       =  +=  -=  *=  /=  %=  &=  |=  ^=  <<=  >>=
  1087.   Logical Operators
  1088.       ||
  1089.       &&
  1090.   Bit Operators
  1091.       |
  1092.       ^
  1093.       &
  1094.   Relational Operators
  1095.       ==  !=
  1096.       <   <=   <   >=
  1097.   Shift Operators
  1098.       <<  >>
  1099.   Arithmetic Operators
  1100.       +  -
  1101.       *  /  %
  1102.   Unary Operators
  1103.       +  -  ~  !  ++  --  &  *    %
  1104.       sizeof unary_expr
  1105.       sizeof(type_name)
  1106.       (type_name) unary_expr
  1107.       [type_name] unary_expr
  1108.       ?
  1109.   Binary Address Operator
  1110.       :
  1111.                       Highest Priority
  1112.  
  1113. Parentheses can be used to order the evaluation of an expression.
  1114.  
  1115. In addition to the operators listed above, a number of primary expression
  1116. operators are supported.  These operators are used in identifying the object
  1117. to be operated upon.
  1118.  
  1119. []       subscripting, substringing
  1120.  
  1121. ()       function call
  1122.  
  1123. .       field selection
  1124.  
  1125. ->       field selection using a pointer
  1126.  
  1127. The following sections describe the operators presented above.
  1128.  
  1129.  
  1130.  
  1131. Assignment Operators for the C Grammar
  1132. ══════════════════════════════════════
  1133. =       Assignment:    The value on the right is assigned to the object on
  1134.        the left.
  1135.  
  1136. +=       Additive assignment:  The value of the object on the left is
  1137.        augmented by the value on the right.
  1138.  
  1139. -=       Subtractive assignment:  The value of the object on the left is
  1140.        reduced by the value on the right.
  1141.  
  1142. *=       Multiplicative assignment:  The value of the object on the left
  1143.        is multiplied by the value on the right.
  1144.  
  1145. /=       Division assignment:  The value of the object on the left is
  1146.        divided by the value on the right.
  1147.  
  1148. %=       Modulus assignment:    The object on the left is updated with
  1149.        MOD(left,right).  The result is the remainder when the value of
  1150.        the object on the left is divided by the value on the right.
  1151.  
  1152. &=       Bit-wise AND:  The bits in the object on the left are ANDed with
  1153.        the bits of the value on the right.
  1154.  
  1155. |=       Bit-wise inclusive OR:  The bits in the object on the left are
  1156.        ORed with the bits of the value on the right.
  1157.  
  1158. ^=       Bit-wise exclusive OR:  The bits in the object on the left are
  1159.        exclusively ORed with the bits of the value on the right.
  1160.  
  1161. <<=       Left shift:    The bits in the object on the left are shifted to
  1162.        the left by the amount of the value on the right.
  1163.  
  1164. >>=       Right shift:  The bits in the object on the left are shifted to
  1165.        the right by the amount of the value on the right.  If the object
  1166.        on the left is described as unsigned, the vacated high-order bits
  1167.        are zeroed.    If the object on the left is described as signed,
  1168.        the sign bit is propagated through the vacated high-order bits.
  1169.        VIDEO treats registers as unsigned items.
  1170.  
  1171.  
  1172.  
  1173. Logical Operators for the C Grammar
  1174. ═══════════════════════════════════
  1175. &&       Logical conjunction:  The logical AND of the value on the left
  1176.        and the value on the right is produced.  If either of the values
  1177.        on the left or right is equal to 0 then the result is 0;
  1178.        otherwise the result is 1.
  1179.  
  1180. ||       Logical inclusive disjunction:  The logical OR of the value on
  1181.        the left and the value on the right is produced.  If either of
  1182.        the values on the left or right is not equal to 0 then the result
  1183.        is 1; otherwise the result is 0.  If the value on the left is not
  1184.        equal to 0 then the expression on the right is not evaluated
  1185.        (this is known as short-circuit expression evaluation).
  1186.  
  1187.  
  1188.  
  1189. Bit Operators for the C Grammar
  1190. ═══════════════════════════════
  1191. &       Bit-wise AND:  The bits of the value on the left and the value on
  1192.        the right are ANDed.
  1193.  
  1194. |       Bit-wise OR:  The bits of the value on the left and the value on
  1195.        the right are ORed.
  1196.  
  1197. ^       Bit-wise exclusive OR:  The bits of the value on the left and the
  1198.        value on the right are exclusively ORed.
  1199.  
  1200.  
  1201.  
  1202. Relational Operators for the C Grammar
  1203. ══════════════════════════════════════
  1204. ==       Equal:  If the value on the left is equal to the value on the
  1205.        right then the result is 1; otherwise the result is 0.
  1206.  
  1207. !=       Not equal:  If the value on the left is not equal to the value on
  1208.        the right then the result is 1; otherwise the result is 0.
  1209.  
  1210. <       Less than:  If the value on the left is less than the value on
  1211.        the right then the result is 1; otherwise the result is 0.
  1212.  
  1213. <=       Less than or equal:    If the value on the left is less than or
  1214.        equal to the value on the right then the result is 1; otherwise
  1215.        the result is 0.
  1216.  
  1217. >       Greater than:  If the value on the left is greater than the value
  1218.        on the right then the result is 1; otherwise the result is 0.
  1219.  
  1220. >=       Greater than or equal:  If the value on the left is greater than
  1221.        or equal to the value on the right then the result is 1;
  1222.        otherwise the result is 0.
  1223.  
  1224.  
  1225. Arithmetic/Logical Shift Operators for the C Grammar
  1226. ════════════════════════════════════════════════════
  1227. <<       Left shift:    The bits of the value on the left are shifted to the
  1228.        left by the amount described by the value on the right.
  1229.  
  1230. >>       Right shift:  The bits of the value on the left are shifted to
  1231.        the right by the amount described by the value on the right.  If
  1232.        the object on the left is described as unsigned, the vacated
  1233.        high-order bits are zeroed.    If the object on the left is
  1234.        described as signed, the sign bit is propagated through the
  1235.        vacated high-order bits.  VIDEO treats registers as unsigned
  1236.        items.
  1237.  
  1238.  
  1239.  
  1240. Binary Arithmetic Operators for the C Grammar
  1241. ═════════════════════════════════════════════
  1242. +       Addition:  The value on the right is added to the value on the
  1243.        left.
  1244.  
  1245. _       Subtraction:  The value on the right is subtracted from the value
  1246.        on the left.
  1247.  
  1248. *       Multiplication:  The value on the left is multiplied by the value
  1249.        on the right.
  1250.  
  1251. /       Division:  The value on the left is divided by the value on the
  1252.        right.
  1253.  
  1254. %       Modulus:  The modulus of the value on the left with respect to
  1255.        the value on the right is produced.    The result is the remainder
  1256.        when the value on the left is divided by the value on the right.
  1257.  
  1258.  
  1259.  
  1260. Unary Arithmetic Operators for the C Grammar
  1261. ════════════════════════════════════════════
  1262. +       Plus:  The result is the value on the right.
  1263.  
  1264. _       Minus:  The result is the negation of the value on the right.
  1265.  
  1266. ~       Bit-wise complement:  The result is the bit-wise complement of
  1267.        the value on the right.
  1268.  
  1269. !       Logical complement:    If the value on the right is equal to 0 then
  1270.        the result is 1; otherwise it is 0.
  1271.  
  1272. ++       Increment:  Both prefix and postfix operators are supported.  If
  1273.        the object is on the right, it is pre-incremented by 1 (e.g.,
  1274.        ++x).  If the object is on the left, it is post-incremented by 1
  1275.        (e.g., x++).
  1276.  
  1277. _ _       Decrement:  Both prefix and postfix operators are supported.  If
  1278.        the object is on the right, it is pre-decremented by 1 (e.g.,
  1279.        --x).  If the object is on the left, it is post-decremented by 1
  1280.        (e.g., x--).
  1281.  
  1282. &       Address of:    The result is the address (segment:offset) of the
  1283.        object on the right (e.g., &main).
  1284.  
  1285. *       Points:  The result is the value stored at the location addressed
  1286.        by the value on the right (e.g., *(ds:100), *string.loc).  In the
  1287.        absence of typing information, a near pointer is produced.  If
  1288.        the operand does not have a segment specified, the stack segment
  1289.        is assumed.
  1290.  
  1291.            (SS:00FE) = FFFF
  1292.          var:  (SS:0100) = 0152
  1293.            (SS:0102) = 1240
  1294.            (SS:0104) = EEEE
  1295.  
  1296.        In the following example, memory locations are displayed starting
  1297.        at DS:152 for 16-bit mode and at DS:12400152 for 32-bit mode.
  1298.  
  1299.        Example:
  1300.          DBG>examine/byte *100
  1301.  
  1302. %       Value at address:  The result is the value stored at the location
  1303.        addressed by the value on the right (e.g., %(ds:100),
  1304.        %string.loc).  In the absence of typing information, a far
  1305.        pointer is produced.  If the operand does not have a segment
  1306.        specified, the stack segment is assumed.
  1307.  
  1308.            (SS:00FE) = FFFF
  1309.          var:  (SS:0100) = 0152
  1310.            (SS:0102) = 1240
  1311.            (SS:0104) = EEEE
  1312.  
  1313.        In the following example, memory locations are displayed starting
  1314.        at 1240:1052 for 16-bit mode and at EEEE:12400152 for 32-bit
  1315.        mode.
  1316.  
  1317.        Example:
  1318.          DBG>examine/byte %100
  1319.  
  1320.        Note that this operator is not found in the C or C++
  1321.        programming languages.
  1322.  
  1323.  
  1324.  
  1325. Special Unary Operators for the C Grammar
  1326. ═════════════════════════════════════════
  1327. sizeof unary_expression
  1328.  
  1329.        Example:
  1330.          DBG>print sizeof tyme
  1331.          2 (or 4 in 32-bit mode)
  1332.          DBG>print sizeof *tyme
  1333.          18
  1334.  
  1335. sizeof(type_name)
  1336.  
  1337.        Example:
  1338.          DBG>print sizeof( struct tm )
  1339.          18
  1340.  
  1341. (type_name) unary_expression The type conversion operator (type_name) is
  1342.        used to convert an item from one type to another.  The following
  1343.        describes the syntax of "type_name".
  1344.  
  1345.          type_name ::= type_spec { [ "near" | "far" | "huge" ] "*" }
  1346.          type_spec ::= typedef_name
  1347.                  |     "struct" structure_tag
  1348.                  |     "union"  union_tag
  1349.                  |     "enum"   enum_tag
  1350.                  |     scalar_type { scalar_type }
  1351.          scalar_type ::= "char" | "int" | "float" | "double"
  1352.                  |     "short" | "long" | "signed" | "unsigned"
  1353.  
  1354.        Example:
  1355.          DBG>print (float) 4
  1356.          4.
  1357.  
  1358.          DBG>print (int) 3.1415926
  1359.          3
  1360.  
  1361. [type_name] unary_expression You can force the debugger to treat a memory
  1362.        reference as a particular type of value by using a type coercion
  1363.        operator.  A type specification is placed inside brackets as
  1364.        shown above.  The basic types are char (character, 8 bits), short
  1365.        (short integer, 16 bits), long (long integer, 32 bits), float
  1366.        (single-precision floating-point, 32 bits), and double
  1367.        (double-precision floating-point, 64 bits).    Unless qualified by
  1368.        the short or long keyword, the int type will be 16 bits in 16-bit
  1369.        applications and 32 bits in 32-bit applications (386, 486 and
  1370.        Pentium systems).  The character, short integer and long integer
  1371.        types may be treated as signed or unsigned items.  The default for
  1372.        the character type is unsigned.  The default for the integer types
  1373.        is signed.
  1374.  
  1375.        Example:
  1376.          [char]             (default unsigned)
  1377.          [signed char]
  1378.          [unsigned char]
  1379.          [int]             (default is signed)
  1380.          [short]             (default is signed)
  1381.          [short int]         (default is signed)
  1382.          [signed short int]
  1383.          [long]             (default is signed)
  1384.          [long int]          (default is signed)
  1385.          [signed long]
  1386.          [unsigned long int]
  1387.          [float]
  1388.          [double]
  1389.  
  1390.        Note that it is unnecessary to specify the int keyword when short
  1391.        or long are specified.
  1392.  
  1393. ?       Existence test:  The "?" unary operator may be used to test for
  1394.        the existence of a symbol.
  1395.  
  1396.        Example:
  1397.          DBG>print ?id
  1398.  
  1399.        The result of this expression is 1 if "id" is a symbol known to
  1400.        VIDEO and 0 otherwise.  If the symbol does not exist in the
  1401.        current scope then it must be qualified with its module name.
  1402.        Automatic symbols exist only in the current function.
  1403.  
  1404.  
  1405.  
  1406. Binary Address Operator for the C Grammar
  1407. ═════════════════════════════════════════
  1408. :       Memory locations can be referenced by using the binary ":"
  1409.        operator and a combination of constants, register names, and
  1410.        symbol names.  In the Intel 80x86 architecture, a memory
  1411.        reference requires a segment and offset specification.  A memory
  1412.        reference using the ":" operator takes the following form:
  1413.  
  1414.          segment:offset
  1415.  
  1416.        The elements segment and offset can be expressions.
  1417.  
  1418.        Example:
  1419.          (ES):(DI+100)
  1420.          (SS):(SP-20)
  1421.  
  1422.  
  1423.  
  1424. Primary Expression Operators for the C Grammar
  1425. ══════════════════════════════════════════════
  1426. []       Elements of an array can be identified using subscript
  1427.        expressions.  Consider the following 3-dimensional array defined
  1428.        in the "C" language.
  1429.  
  1430.        Example:
  1431.          char *ProcessorType[2][4][2] =
  1432.          { { { "Intel 8086",   "Intel 8088"  },
  1433.              { "Intel 80186",  "Intel 80188" },
  1434.              { "Intel 80286",  "unknown" },
  1435.              { "Intel 80386",  "unknown" } },
  1436.  
  1437.            { { "NEC V30",      "NEC V20" },
  1438.              { "unknown",      "unknown" },
  1439.              { "unknown",      "unknown" },
  1440.              { "unknown",      "unknown" } } };
  1441.  
  1442.        This array can be viewed as two layers of rectangular matrices of
  1443.        4 rows by 2 columns.  The array elements are all pointers to
  1444.        string values.
  1445.  
  1446.        By using a subscript expression, specific slices of an array can
  1447.        be displayed.  To see only the values of the first layer, the
  1448.        following command can be issued.
  1449.  
  1450.        Example:
  1451.          DBG>print processortype[0]
  1452.          {[0]={[0]=0x0024, [1]=0x002F},
  1453.           [1]={[0]=0x003A, [1]=0x0046},
  1454.           [2]={[0]=0x0052, [1]=0x005E},
  1455.           [3]={[0]=0x0066, [1]=0x005E}}
  1456.  
  1457.        The values shown are the addresses of the string values.
  1458.  
  1459.        To see only the first row of the first layer, the following
  1460.        command can be issued.
  1461.  
  1462.        Example:
  1463.          DBG>print processortype[0][0]
  1464.          {[0]=0x0024, [1]=0x002F}
  1465.  
  1466.        To see the second row of the first layer, the following command
  1467.        can be issued.
  1468.  
  1469.        Example:
  1470.          DBG>print processortype[0][1]
  1471.          {[0]=0x003A, [1]=0x0046}
  1472.  
  1473.        To see the value of a specific entry in a matrix, all the indices
  1474.        can be specified.
  1475.  
  1476.        Example:
  1477.          DBG>print {%s} processortype[0][0][0]
  1478.          Intel 8086
  1479.          DBG>print {%s} processortype[0][0][1]
  1480.          Intel 8088
  1481.          DBG>print {%s} processortype[0][1][0]
  1482.          Intel 80186
  1483.  
  1484.        In the above examples, we use the "%s" format specifier to
  1485.        display the string values.
  1486.  
  1487. ()       The function call operators appear to the right of a symbol name
  1488.        and identify a function call in an expression.  The parentheses
  1489.        can contain arguments.
  1490.  
  1491.        Example:
  1492.          DBG>print ClearScreen()
  1493.          DBG>print PosCursor( 10, 20 )
  1494.          DBG>print Line( 15, 1, 30, '-', '+', '-' )
  1495.  
  1496. .       The "." operator indicates field selection in a structure.  In
  1497.        the following example, tyme2 is a structure and tm_year is a
  1498.        field in the structure.
  1499.  
  1500.        Example:
  1501.          DBG>print tyme2.tm_year
  1502.  
  1503. ->       The "->" operator indicates field selection when using a pointer
  1504.        to a structure.  In the following example, tyme is the pointer
  1505.        and tm_year is a field in the structure to which it points.
  1506.  
  1507.        Example:
  1508.          DBG>print tyme->tm_year
  1509. ::::DISPLAY
  1510. ┌──────────────────────────────────────────────────────────────────────────┐
  1511. │ Display                                   │
  1512. │     Assembly [status] [title] [window_coord]                   │
  1513. │     Command  [status] [title] [window_coord] [cmd_list]           │
  1514. │     Dialogue [status] [title] [window_coord]                   │
  1515. │     Fpu      [status] [title] [window_coord]                   │
  1516. │     Memory   [status] [title] [window_coord] [mem_loc]           │
  1517. │     Prompt   [status] [title] [line_number]                   │
  1518. │     Register [status] [title] [window_coord]                   │
  1519. │     SOurce   [status] [title] [window_coord]                   │
  1520. │     STack    [status] [title] [window_coord]                   │
  1521. │     Thread   [status] [title] [window_coord]                   │
  1522. └──────────────────────────────────────────────────────────────────────────┘
  1523.  
  1524. The Display command is used to create or remove output windows for various
  1525. displays that the debugger can provide.  For each window, you may specify a
  1526. window status, a title, the starting line number of the window and, for
  1527. those windows which may vary in size, the ending line number.  VIDEO windows
  1528. are described in the "WINDOWS" topic.
  1529.  
  1530. When no window name is specified then all windows are updated.    This command
  1531. may be used to recreate window displays if the user's application has
  1532. overwritten them.  It may also be used in command lists to update the
  1533. display.
  1534.  
  1535.  
  1536.  
  1537. Window Titles
  1538. ═════════════
  1539. Each window that is created with the Display command may have a title.    The
  1540. title is specified by placing a string of characters inside curly braces and
  1541. is formally described as follows:
  1542.  
  1543.   title ::= "{" text "}"
  1544.  
  1545. An asterisk (*) may be specified as part of the string and represents a
  1546. place holder for the current module name.
  1547.  
  1548. Example:
  1549.   DBG>display assembly {Assembly: *}
  1550.  
  1551. In the above example, the Assembly window is given the title "Assembly:  *".
  1552. If the current module name was "hello" then the title would appear at the
  1553. top of the Assembly window as follows:
  1554.  
  1555.   ==| Assembly: hello |======================
  1556.  
  1557. To remove the title from a window, simply specify a pair of empty braces.
  1558.  
  1559. Example:
  1560.   DBG>display assembly {}
  1561.  
  1562.  
  1563.  
  1564. Window Placement
  1565. ════════════════
  1566. Starting at the top of the screen, output lines are numbered consecutively
  1567. starting with 1.  Columns are numbered from left to right starting with 1.
  1568. It is possible to define windows that overlap other windows thereby
  1569. partially obscuring the contents of the overlapped window.
  1570.  
  1571. Window coordinates are specified in terms of a top row, a bottom row, a left
  1572. column, and a right column.
  1573.  
  1574.   window_coord ::= [top][","[bottom][","[left][","right]]]
  1575.  
  1576. The top, bottom, left and right items are expressions which are always
  1577. evaluated with a radix of 10, regardless of the current default radix for
  1578. numbers.
  1579.  
  1580. Example:
  1581.   DBG>display assembly 3,20,1,80
  1582.  
  1583. In the above example, the Assembly window is defined to occupy lines 3
  1584. through 20 and columns 1 through 80.
  1585.  
  1586. Example:
  1587.   DBG>display assembly {Assembly: *} 3,20,1,80
  1588.  
  1589. This example is similar to the previous one but a window title is also
  1590. specified.
  1591.  
  1592. Example:
  1593.   DBG>display assembly ,,8,60
  1594.  
  1595. In this example, we redefine the starting and ending columns for the
  1596. Assembly window to be 8 and 60.
  1597.  
  1598.  
  1599.  
  1600. Window Disposition
  1601. ══════════════════
  1602. The disposition of each window that is created with the Display command may
  1603. be specified using one of the following status qualifiers.
  1604.  
  1605. /Open       The window is created and placed on the screen.
  1606.  
  1607.        Example:
  1608.          DBG>dis assembly /open {Asm: *} 13,19,1,71
  1609.  
  1610.        This is the default action when creating a window hence it is not
  1611.        necessary to specify this qualifier.
  1612.  
  1613. /Close       A window that is currently on the screen can be removed by
  1614.        specifying the /Close qualifier.  The debugger will not let you
  1615.        remove the Dialogue and Prompt windows but they can be moved to
  1616.        different positions on the screen.
  1617.  
  1618.        Example:
  1619.          DBG>display assembly /close
  1620.  
  1621.        In the above example, the Assembly window is removed from the
  1622.        screen.
  1623.  
  1624.        A window can be created but not placed on the screen.
  1625.  
  1626.        Example:
  1627.          DBG>display fpu /close {FPU} 3,13,1,64
  1628.  
  1629.        It may be placed on the screen at a later time using the Display
  1630.        command and it will not be necessary to respecify the window
  1631.        title or coordinates.
  1632.  
  1633. /Zoom       The window is created and immediately displayed on the screen
  1634.        using the full dimensions of the screen.
  1635.  
  1636.        Example:
  1637.          DBG>display source /zoom
  1638.  
  1639.        If the window is already on the screen then its size will
  1640.        alternate between its defined size and the full dimensions of the
  1641.        screen.
  1642.  
  1643.  
  1644.  
  1645. Window Attributes
  1646. ═════════════════
  1647. Various items in the window are displayed with special attributes.  See the
  1648. description of the Paint command for a discussion of "plain", "active",
  1649. "standout", "title" and "gadget" attributes.
  1650.  
  1651.  
  1652.  
  1653. The Assembly Window
  1654. ═══════════════════
  1655. ┌──────────────────────────────────────────────────────────────────────────┐
  1656. │ Display Assembly [status] [title] [window_coord]               │
  1657. └──────────────────────────────────────────────────────────────────────────┘
  1658.  
  1659. The debugger displays assembly instructions for the current code location in
  1660. this window.  If the Code Segment and Instruction Pointer registers (CS:IP
  1661. or CS:EIP) point to an instruction visible in the Assembly window then the
  1662. line containing that instruction is displayed in "active" attributes.  When
  1663. examining assembly instructions, one line is designated as the current line
  1664. and is displayed in "standout" attributes.  The Source window, if present,
  1665. is kept synchronized with the Assembly window provided that source
  1666. information is available.
  1667.  
  1668.  
  1669.  
  1670. The Command Window
  1671. ══════════════════
  1672. ┌──────────────────────────────────────────────────────────────────────────┐
  1673. │ Display Command [status] [title] [window_coord] [cmd_list]           │
  1674. └──────────────────────────────────────────────────────────────────────────┘
  1675.  
  1676. The Command window can be used to display the results of one or more
  1677. commands which you wish to have evaluated each time control returns to the
  1678. debugger.
  1679.  
  1680. The command list that follows the command is defined as follows:
  1681.  
  1682.   cmd_list ::= "{" [cmd] { ";" [cmd] } "}"
  1683.  
  1684. Example:
  1685.   DBG>display command 3, 8 {e es:bx,.+10,10,4; reg}
  1686.  
  1687. The output from commands such as:
  1688.  
  1689. Example:
  1690.   DBG>e es:bx,.+10,10,4
  1691.   DBG>reg
  1692.  
  1693. are normally displayed in other windows.  The list of commands that are
  1694. specified when the Command window is created is executed and the results are
  1695. displayed in the command window.  The commands are re-executed and the
  1696. results are displayed in the Command window whenever:
  1697.  
  1698.   1. the debugger is entered,
  1699.   2. one of the commands Display or Display Command is issued, or
  1700.   3. the Command window is selected (by using the mouse or tab keys).
  1701.  
  1702. This facility provides a mechanism for watching the values of one or more
  1703. variables change (see also the Print /Window command).
  1704.  
  1705.  
  1706.  
  1707. The Dialogue Window
  1708. ═══════════════════
  1709. ┌──────────────────────────────────────────────────────────────────────────┐
  1710. │ Display Dialogue [status] [title] [window_coord]               │
  1711. └──────────────────────────────────────────────────────────────────────────┘
  1712.  
  1713. By default, the debugger displays responses to commands in this window.
  1714. When one of the other windows is not present on the screen, the output
  1715. normally destined for that window is displayed in the Dialogue window.
  1716.  
  1717.  
  1718.  
  1719. The FPU Window
  1720. ══════════════
  1721. ┌──────────────────────────────────────────────────────────────────────────┐
  1722. │ Display Fpu [status] [title] [window_coord]                   │
  1723. └──────────────────────────────────────────────────────────────────────────┘
  1724.  
  1725. The contents of the 80x87 numeric data processor (math coprocessor)
  1726. registers and status flags are displayed in this window.  When the contents
  1727. of a register have changed from the last time that the debugger was entered,
  1728. it is displayed in "standout" attributes.
  1729.  
  1730.  
  1731.  
  1732. The Memory Window
  1733. ═════════════════
  1734. ┌──────────────────────────────────────────────────────────────────────────┐
  1735. │ Display Memory [status] [title] [window_coord] [mem_loc]           │
  1736. └──────────────────────────────────────────────────────────────────────────┘
  1737.  
  1738. A portion of memory is displayed in this window.  When the Memory window is
  1739. active, the currently selected memory location is displayed in "active"
  1740. attributes.  Memory window "hot spots" (e.g., BYTE ) are displayed in
  1741. "standout" attributes.    All other items are displayed in "plain" attributes.
  1742.  
  1743. Example:
  1744.   DBG>display memory /open {Low Mem} 3,9,,,ds:36
  1745.  
  1746. In the above example, memory starting at location DS:36 is displayed in a
  1747. Memory window that runs from lines 3 through 9 and columns 1 through 80.
  1748.  
  1749. Example:
  1750.   DBG>display memory /close
  1751.  
  1752. In the above example, the Memory window is removed from the screen.
  1753.  
  1754.  
  1755.  
  1756. The Prompt Window
  1757. ═════════════════
  1758. ┌──────────────────────────────────────────────────────────────────────────┐
  1759. │ Display Prompt [status] [title] [line_number]                │
  1760. └──────────────────────────────────────────────────────────────────────────┘
  1761.  
  1762. The debugger command input prompt "DBG>" is displayed in a window that is
  1763. one line high.    The prompt window is used to enter command lines.
  1764.  
  1765. In multiple execution thread applications, the "DBG>" prompt is replaced by
  1766. a prompt that indicates the current thread.  The form of the prompt is
  1767. "ddddd>" where "ddddd" is the thread identification number.
  1768.  
  1769. Example:
  1770.   00002>
  1771.  
  1772.  
  1773.  
  1774. The Register Window
  1775. ═══════════════════
  1776. ┌──────────────────────────────────────────────────────────────────────────┐
  1777. │ Display Register [status] [title] [window_coord]               │
  1778. └──────────────────────────────────────────────────────────────────────────┘
  1779.  
  1780. The current contents of the 80x86 registers are displayed in a window.    When
  1781. the contents of a register have changed from the last time that the debugger
  1782. was entered, it is displayed in "standout" attributes.    An exception to this
  1783. rule is the Instruction Pointer (IP, EIP) register which is only displayed
  1784. in "standout" attributes when its value changes because some type of branch
  1785. or call instruction was executed.
  1786.  
  1787. If a register set other than register set 0 is displayed, then the register
  1788. set number is displayed in brackets (e.g., [1]) with "active" attributes
  1789. (see the description of the Register command).
  1790.  
  1791.  
  1792.  
  1793. The Source Window
  1794. ═════════════════
  1795. ┌──────────────────────────────────────────────────────────────────────────┐
  1796. │ Display SOurce [status] [title] [window_coord]               │
  1797. └──────────────────────────────────────────────────────────────────────────┘
  1798.  
  1799. If program source code information is available for the current code
  1800. location then it will be displayed in this window.  If the Code Segment and
  1801. Instruction Pointer registers (CS:IP or CS:EIP) point to a source line
  1802. visible in the Source window then the line is displayed in "active"
  1803. attributes.  When examining source code, one line is designated as the
  1804. current line and is displayed in "standout" attributes.  The Assembly
  1805. window, if present, is kept synchronized with the Source window.
  1806.  
  1807.  
  1808.  
  1809. The Stack Window
  1810. ════════════════
  1811. ┌──────────────────────────────────────────────────────────────────────────┐
  1812. │ Display STack [status] [title] [window_coord]                │
  1813. └──────────────────────────────────────────────────────────────────────────┘
  1814.  
  1815. A portion of the execution stack is displayed in this window.  If the Base
  1816. Pointer (BP or EBP) register points to a visible byte, word, or doubleword
  1817. on the stack, the byte, word, or doubleword is displayed in "standout"
  1818. attributes.  All other words are displayed in "plain" attributes.
  1819.  
  1820.  
  1821.  
  1822. The Thread Window
  1823. ═════════════════
  1824. ┌──────────────────────────────────────────────────────────────────────────┐
  1825. │ Display Thread [status] [title] [window_coord]               │
  1826. └──────────────────────────────────────────────────────────────────────────┘
  1827.  
  1828. The Thread window is used to display the identification number, state and
  1829. name of all program execution threads.    Whenever the debugger is entered,
  1830. the currently executing thread is displayed in "active" attributes.  The
  1831. currently selected thread is displayed in "standout" attributes.  All other
  1832. items are displayed in "plain" attributes.
  1833.  
  1834. There are 3 entries in the Thread window.  The first entry is the thread
  1835. identification number or thread ID.  The second entry is the thread state
  1836. which may be one of "runnable" or "frozen".  The third entry is the thread
  1837. name which is applicable to NetWare 386 server tasks only.
  1838.  
  1839. Under DOS, MS Windows or QNX, there is only one execution thread so there is
  1840. only one entry in the Thread window.  Under OS/2 or NetWare 386, there may
  1841. be several execution threads so there may be be several entries in the
  1842. Thread window.
  1843.  
  1844. Example:
  1845.   DBG>display thread /open {Threads} 14,19,20,50
  1846.  
  1847. In the above example, execution thread information is displayed in a Thread
  1848. window that runs from lines 14 through 19 and columns 20 through 50.
  1849.  
  1850. Example:
  1851.   DBG>display thread /close
  1852.  
  1853. In the above example, the Thread window is removed from the screen.
  1854. ::::DO
  1855. ┌──────────────────────────────────────────────────────────────────────────┐
  1856. │ DO      expr                                   │
  1857. │ /                                       │
  1858. └──────────────────────────────────────────────────────────────────────────┘
  1859.  
  1860. The DO or / command evaluates an expression and discards the result.  It is
  1861. useful for assigning new values to registers and variables.  The expression
  1862. expr can involve registers, application variables and user-defined
  1863. variables.  The operations possible are patterned after those available in
  1864. the C and FORTRAN 77 programming languages.  Expressions are fully discussed
  1865. in the chapter entitled "VIDEO Expression Handling".
  1866.  
  1867. Example:
  1868.   DBG>do ax=1
  1869.   DBG>/ax=1
  1870.  
  1871. The above example illustrates two identical ways to set the contents of the
  1872. AX register to 1.
  1873.  
  1874. Example:
  1875.   DBG>/myvar=di-bx+1
  1876.  
  1877. The variable myvar is defined with the value resulting from subtracting the
  1878. contents of the BX register from the contents of the DI register and then
  1879. adding 1.
  1880.  
  1881. Example:
  1882.   DBG>/oldsi=si++
  1883.  
  1884. The variable oldsi is defined with the current contents of the SI register.
  1885. The current contents of the SI register are then incremented by 1 (the
  1886. C-like "++" operator increments the value of the variable).  Variables such
  1887. as oldsi need not be defined within the application.  VIDEO permits the
  1888. dynamic creation of new variables which will only exist for the duration of
  1889. the debug session.  These user-defined variables can be used to retain
  1890. information as we have shown in the above example.
  1891. ::::DOS_EXTENDER
  1892. Debugging 32-bit DOS Extender Applications
  1893. ══════════════════════════════════════════
  1894.  
  1895. Introduction
  1896. ════════════
  1897. Before reading this help text, you should be familiar with the material
  1898. presented in the "DOS_STARTUP" topic.  The general command line format
  1899. and options for DOS extender systems are presented under that topic.
  1900.  
  1901. VIDEO supports debugging of 32-bit applications developed with WATCOM
  1902. C/C++(32), WATCOM FORTRAN 77(32), and assembly language. A DOS extender must
  1903. be used to run the application. The following DOS extenders are supported.
  1904.  
  1905. DOS/4GW    a DOS extender from Rational Systems, Inc.  DOS/4GW is a subset
  1906.        of Rational Systems' DOS/4G product.  DOS/4GW is customized for
  1907.        use with WATCOM C/C++(32) and WATCOM FORTRAN 77(32) and is
  1908.        included in these packages.
  1909.  
  1910. OS/386       (version 2.1 or later) a DOS extender from ERGO Computing, Inc.
  1911.  
  1912. 386|DOS-Extender
  1913.        (version 2.2d or later) a DOS extender from Phar Lap Software,
  1914.        Inc.
  1915.  
  1916.  
  1917.  
  1918. VIDEO Command Line Format for DOS Extenders
  1919. ═══════════════════════════════════════════
  1920. The interface between VIDEO and the operating system/DOS extender is
  1921. contained in a special "trap" file.  The trap file is specified to VIDEO
  1922. using the "TRAP" option.
  1923.  
  1924. ┌──────────────────────────────────────────────────────────────────────────┐
  1925. │ WVIDEO /TRap=trap_file[;trap_parm] [:sym_file] file_spec [cmd_line]       │
  1926. └──────────────────────────────────────────────────────────────────────────┘
  1927.  
  1928. The TRap option must be specified when debugging applications that require a
  1929. 32-bit DOS extender.  For convenience, this option can be specified through
  1930. use of the WVIDEO environment variable.
  1931.  
  1932. ┌──────────────────────────────────────────────────────────────────────────┐
  1933. │ SET WVIDEO=/TRap#trap_file[;trap_parm]                   │
  1934. └──────────────────────────────────────────────────────────────────────────┘
  1935.  
  1936. When trap_parm is specified and it contains blank characters, the entire
  1937. parameter must be placed within braces (e.g., /trap=pls;{-minr 128}).
  1938.  
  1939. You must specify the name of one of the DOS extender "trap" files provided
  1940. with VIDEO.  The file extension defaults to ".TRP".
  1941.  
  1942. RSI.TRP    This interface module supports debugging on the local computer
  1943.        system running the Rational Systems "DOS/4GW" DOS extender (which
  1944.        is included in the WATCOM C/C++(32) and WATCOM FORTRAN 77(32)
  1945.        packages).  The optional "trap_parm" is ignored.
  1946.  
  1947. ECS.TRP    This interface module supports debugging on the local computer
  1948.        system running the ERGO Computing, Inc.  "OS/386" DOS extender.
  1949.        The optional "trap_parm" is ignored.
  1950.  
  1951. PLS.TRP    This interface module supports debugging on the local computer
  1952.        system running the Phar Lap Software, Inc.  386|DOS-Extender.
  1953.        The optional "trap_parm" is passed on to the DOS extender
  1954.        "RUN386" as command line switches.
  1955.  
  1956. ┌────────────────────────────────────────────────────────────────────────────┐
  1957. │ Note:  If you do not specify a trap file, the default trap file "STD.TRP"  │
  1958. │ will be loaded.  This interface module supports debugging on the local     │
  1959. │ computer system running DOS.    No 32-bit DOS extender debugging is         │
  1960. │ possible.                                     │
  1961. └────────────────────────────────────────────────────────────────────────────┘
  1962.  
  1963. The following diagram illustrates how memory might be organized when
  1964. debugging a 32-bit DOS extender application.
  1965.  
  1966.       │           │
  1967.       │           │
  1968.       ├────────────────┤
  1969.       │           │
  1970.       │     32─bit    │
  1971.       │   Application  │
  1972.   109C4   ├────────────────┤
  1973.       │           │
  1974.       │           │
  1975.       │           │
  1976.    7E6E   ├────────────────┤
  1977.       │  trap handler  │
  1978.       │    ECS.TRP<────│──┐
  1979.    7B27   ├───────│────────┤  │
  1980.       │      │       │  │
  1981.       │    WVIDEO       │  │
  1982.       │           │  │
  1983.    47A4   ├────────────────┤  │
  1984.       │           │  │
  1985.       │    OS/386       │  │
  1986.       │  DOS Extender<─│──┘
  1987.       │           │
  1988.    262C   │────────────────┤
  1989.       │           │
  1990.       │           │
  1991.       │           │
  1992.       │           │
  1993.    0000   └────────────────┘
  1994.  
  1995. Using the Rational Systems 32-bit DOS Extender
  1996. ══════════════════════════════════════════════
  1997. When using the Rational Systems DOS extender, the "DOS4GW.EXE" or
  1998. "DOS4G.EXE" file must be located in one of the directories listed in the DOS
  1999. PATH environment variable.  The "DOS4GW.EXE" file will usually be stored in
  2000. the "BIN" directory of the WATCOM compiler package.
  2001.  
  2002. ┌──────────────────────────────────────────────────────────────────────────┐
  2003. │ C>WVIDEO/TRap=RSI [:sym_file] file_spec [cmd_line]               │
  2004. └──────────────────────────────────────────────────────────────────────────┘
  2005.  
  2006. The /TRap=RSI option must be specified when debugging applications that are
  2007. to be run under the "DOS/4GW" DOS extender.  The "RSI.TRP" file will usually
  2008. be stored in the "BIN" directory of the WATCOM compiler package.  You should
  2009. ensure that this "BIN" directory is included in the DOS PATH environment
  2010. variable.  Otherwise, you must specify the full path name for the trap file.
  2011.  
  2012. The help file "RSIHELP.EXP" must also be located in one of the directories
  2013. listed in the DOS PATH environment variable.  It will usually be stored in
  2014. the "BIN" directory of the WATCOM compiler package.
  2015.  
  2016. Example:
  2017.   C>wvideo /trap=rsi hello
  2018.     or
  2019.   C>set wvideo=/trap#rsi
  2020.   C>wvideo hello
  2021.  
  2022.  
  2023.  
  2024. Using the ERGO 32-bit DOS Extender
  2025. ══════════════════════════════════
  2026. When using the ERGO Computing, Inc.  DOS extender, the "OS386" program must
  2027. be run first.
  2028.  
  2029. ┌──────────────────────────────────────────────────────────────────────────┐
  2030. │ C>OS386                                   │
  2031. │ C>WVIDEO/TRap=ECS [:sym_file] file_spec [cmd_line]               │
  2032. └──────────────────────────────────────────────────────────────────────────┘
  2033.  
  2034. The /TRap=ECS option must be specified when debugging applications that are
  2035. to be run under the "OS386" DOS extender.  The "ECS.TRP" file will usually
  2036. be stored in the "BIN" directory of the WATCOM compiler package.  You should
  2037. ensure that this "BIN" directory is included in the DOS PATH environment
  2038. variable.  Otherwise, you must specify the full path name for the trap file.
  2039.  
  2040. Example:
  2041.   C>wvideo /trap=ecs hello
  2042.     or
  2043.   C>set wvideo=/trap#ecs
  2044.   C>wvideo hello
  2045.  
  2046.  
  2047.  
  2048. Using the Phar Lap 32-bit DOS Extender
  2049. ══════════════════════════════════════
  2050. When using the Phar Lap Software, Inc.    DOS extender, the "RUN386.EXE",
  2051. "DBGLIB.REX" and "PLSHELP.EXP" files must be located in one of the
  2052. directories listed in the DOS PATH environment variable.
  2053.  
  2054. ┌──────────────────────────────────────────────────────────────────────────┐
  2055. │ C>WVIDEO/TRap=PLS[;trap_parm] [:sym_file] file_spec [cmd_line]       │
  2056. └──────────────────────────────────────────────────────────────────────────┘
  2057.  
  2058. The /TRap=PLS option must be specified when debugging applications that are
  2059. to be run under the Phar Lap DOS extender.  The "PLS.TRP" and "PLSHELP.EXP"
  2060. files will usually be stored in the "BIN" directory of the WATCOM compiler
  2061. package.  You should ensure that this "BIN" directory is included in the DOS
  2062. PATH environment variable.  Otherwise, you must specify the full path name
  2063. for the trap file.
  2064.  
  2065. The optional "trap_parm" is passed on to the DOS extender "RUN386" as
  2066. command line switches.    When trap_parm is specified and it contains blank
  2067. characters, the entire parameter must be placed within braces (e.g.,
  2068. /trap=pls;{-minr 128}).
  2069.  
  2070. Example:
  2071.   C>wvideo /trap=pls;{-maxreal 512} hello
  2072.     or
  2073.   C>set wvideo=/trap#pls;{-maxreal 512}
  2074.   C>wvideo hello
  2075. ::::DOS_GRAPHICS_APPLICATIONS
  2076. When debugging a graphics application, there are a number of VIDEO options
  2077. that could be specified depending on your situation.
  2078.  
  2079.   1. If you are debugging the graphics application on the same machine on
  2080.     which you start VIDEO and you have only one monitor attached to your
  2081.     system then the "Swap" option should be used.  The "Swap" option
  2082.     specifies that the application's screen memory and the debugger's screen
  2083.     memory are to be swapped back and forth using a single page.
  2084.  
  2085.   2. If you are debugging the graphics application on the same machine on
  2086.     which you start VIDEO and you have two monitors attached to your system
  2087.     then the "Two" and "Monochrome" options should be used.  The "Two"
  2088.     option specifies that a second monitor is connected to the system.    Note
  2089.     that if the monitor type (Monochrome, Color, Colour, Ega43, Vga50) is
  2090.     not specified then the monitor that is not currently being used is
  2091.     selected for the debugger's screen.  If you specify "Monochrome" then
  2092.     the monochrome monitor will be used for the debugger's screen.
  2093.  
  2094.   3. If you are debugging the graphics application using a second personal
  2095.     computer and the remote debugging feature of VIDEO then the choice of
  2096.     display and operation mode for VIDEO is somewhat irrelevant.  If one
  2097.     system is equipped with a graphics display and the other with a
  2098.     monochrome display then you will undoubtedly use the system equipped
  2099.     with the monochrome display to run VIDEO.
  2100. ::::DOS_INTERRUPTING_A_PROGRAM
  2101. Once a program has been loaded by VIDEO, its execution can be started by the
  2102. Go command (this command is described in the "GO" topic).
  2103.  
  2104. Example:
  2105.   C>wvideo myapp
  2106.    .
  2107.    .
  2108.    .
  2109.   DBG>go
  2110.  
  2111. As is sometimes the case during the development phase, a program may execute
  2112. endlessly.
  2113.  
  2114. Under DOS, execution of an application may be interrupted by pressing one of
  2115. the Print Screen (PrtSc) or System Request (SysRq) keys.  On some keyboards,
  2116. the Shift key must also be pressed to obtain the Print Screen function.
  2117.  
  2118. VIDEO will print a message in the "Dialogue" window indicating that the
  2119. program's execution has been interrupted.  Execution can be resumed with the
  2120. Go command.
  2121.  
  2122. The Ctrl/Break key combination may be used to interrupt execution of VIDEO
  2123. commands.
  2124.  
  2125. It also may be used to interrupt an executing program provided that the
  2126. following conditions are met:
  2127.  
  2128.   1. The program must not be handling Ctrl/Break interrupts itself, and
  2129.   2. the program must issue a DOS request (interrupt 0x21) as it is
  2130.     executing.
  2131.  
  2132. For information on how to interrupt executing programs when using the remote
  2133. debugging facility, see the "REMOTE_DEBUGGING" topic.
  2134. ::::DOS_REMOTE_DEBUGGING
  2135. ┌──────────────────────────────────────────────────────────────────────────┐
  2136. │ WVIDEO /TRap=trap_file[;trap_parm] [:sym_file] file_spec [cmd_line]       │
  2137. └──────────────────────────────────────────────────────────────────────────┘
  2138.  
  2139. The VIDEO TRap option must be specified when debugging an application using
  2140. a second computer system.  The format of file_spec depends on the target
  2141. machine's operating system, be it DOS, OS/2, NetWare 386, or QNX.  Under
  2142. QNX, file paths contain slashes ("/") as directory separators.    This brings
  2143. up an interesting problem when the debug machine is running DOS or OS/2.
  2144. Option specifiers can start with slashes also.    When the task machine is
  2145. running QNX and you wish to specify a file path, you must use a pair of
  2146. slashes to stop VIDEO from continuing its option scan.
  2147.  
  2148. Example:
  2149.   C>wvideo /trap=par /reg=4 // /users/fred/fdapp
  2150.  
  2151. When trap_parm is specified and it contains blank characters, the entire
  2152. parameter must be placed within braces (e.g., /trap=dqv;{WATCOM Server}).
  2153.  
  2154. You must specify the name of the "trap" file that corresponds to the Debug
  2155. Server that was started on the first computer system (the "task machine").
  2156. These files handle the machine-to-machine communication required for remote
  2157. debugging of an application.  Servers are described under the topics
  2158. "REMOTE_DEBUGGING" and "REMOTE_WIN3".
  2159.  
  2160. For DOS, the file extension defaults to ".TRP".  The DOS PATH environment
  2161. variable must contain the path of the trap files.  Trap files are usually
  2162. located in the "BIN" sub-directory of the directory that VIDEO is installed
  2163. in.
  2164.  
  2165. STD.TRP    Under DOS, if you do not specify a trap file, the default trap
  2166.        file "STD.TRP" will be loaded.  This interface module supports
  2167.        debugging on the local computer system running DOS.    No remote
  2168.        debugging is possible.  The trap file parameter "d" may be
  2169.        specified to disable the use of Debug Registers.
  2170.  
  2171. SER.TRP    This communications driver file supports debugging of an
  2172.        application running on another computer system using the serial
  2173.        ports of the two machines.  It communicates with the "SERSERV"
  2174.        Debug Server.  The serial port of the debugger machine is
  2175.        connected to the serial port of the task machine.  The
  2176.        "trap_parm" value specifies the port number to use and an
  2177.        optional maximum BAUD rate (which is separated from the port
  2178.        number by a period).  The port number is 1, 2, 3 or 4 (default is
  2179.        1).    These numbers correspond to the device number used when
  2180.        specifying the serial device "COMx" (as in "COM1", "COM2", etc.).
  2181.  
  2182.        Under DOS, the maximum BAUD rate can be one of:
  2183.  
  2184.          115200
  2185.           57600
  2186.           38400
  2187.           19200
  2188.            9600
  2189.            4800
  2190.            2400
  2191.            1200
  2192.           0 (a special case)
  2193.  
  2194.        The default maximum BAUD rate is 115,200.
  2195.  
  2196.        Except for the special BAUD rate of 0, a minimum of two digits
  2197.        must be specified to identify the desired maximum BAUD rate.  The
  2198.        maximum BAUD rate is explained in the section "Remote Debugging
  2199.        Over the Serial Port" under the topic "REMOTE_DEBUGGING".
  2200.        In the following example, port 2 and a maximum BAUD rate of
  2201.        19,200 is specified.
  2202.  
  2203.        Example:
  2204.          /trap=ser;2.19
  2205.  
  2206. PAR.TRP    This communications driver file supports debugging of an
  2207.        application running on another computer system using the parallel
  2208.        ports of the two machines.  It communicates with one of the
  2209.        "PARSERV" or "PARSERVW" (Microsoft Windows) Debug Servers.  The
  2210.        parallel port of the debugger machine is connected to the
  2211.        parallel port of the task machine.  The port number to use is
  2212.        specified by "trap_parm".  The port number is 1, 2 or 3 (default
  2213.        is 1).  These numbers correspond to the device number used when
  2214.        specifying the printer device "LPTx" (as in "LPT1", "LPT2",
  2215.        etc.).
  2216.  
  2217. NOV.TRP    This communications driver file supports debugging of an
  2218.        application running on another computer system that is connected
  2219.        to the Novell "NetWare" network (NetWare and Novell are
  2220.        trademarks of Novell, Inc.).  It communicates with the "NOVSERV"
  2221.        Debug Server.  Version 2.0 or later of NetWare must be used.  The
  2222.        server name to use is specified by "trap_parm".  The server name
  2223.        must match the name that you specified when starting the server
  2224.        on the "task" machine.  The default "server_name" is "NovLink".
  2225.        The server name must consist of less than 48 characters.
  2226.  
  2227. NET.TRP    This communications driver file supports debugging of an
  2228.        application running on another computer system using the NetBIOS
  2229.        network programming interface.  It communicates with one of the
  2230.        "NETSERV" or "NETSERVW" (Microsoft Windows) Debug Servers.  The
  2231.        server name to use is specified by "trap_parm".  The server name
  2232.        must match the name that you specified when starting the server
  2233.        on the "task" machine.  The default "server_name" is "NetLink".
  2234.        The server name may consist of up to 15 alphanumeric characters.
  2235.  
  2236. DQV.TRP    This communications driver file supports debugging of an
  2237.        application that is run under DESQview on DOS.  It communicates
  2238.        with the "DQVSERV" Debug Server.  The server name to use is
  2239.        specified by "trap_parm".  The server name must match the name
  2240.        that you specified when starting the server in a DESQview window.
  2241.        The default "server_name" is "WATCOM Server".
  2242.  
  2243.        ┌─────────────────────────────────────────────────────────────────┐
  2244.        │  Note:  In order to interrupt the execution of an application   │
  2245.        │ using one of the Print Screen (PrtSc) or System Request (SysRq) │
  2246.        │ keys, you should have DESQview version 2.26 or later.  Pressing │
  2247.        │ one of these keys with earlier versions of DESQview will result │
  2248.        │ in the current CS:IP pointing into DESQview code.             │
  2249.        └─────────────────────────────────────────────────────────────────┘
  2250.  
  2251. WIN.TRP    This communications driver file supports debugging of an
  2252.        application that is run in a Microsoft Windows DOS box.  It
  2253.        communicates with the "WINSERV" Debug Server.  The server name to
  2254.        use is specified by "trap_parm".  The server name must match the
  2255.        name that you specified when starting the server in a Microsoft
  2256.        Windows DOS box.  The default "server_name" is "WinLink".
  2257.  
  2258.        Microsoft Windows must be started in standard or enhanced mode.
  2259.        When debugging 32-bit applications, you must include the "device"
  2260.        specification listed below in the [386Enh] section of your Windows
  2261.        "SYSTEM.INI" file.
  2262.  
  2263.          DEVICE=[d:]\WATCOM\BINW\WDEBUG.386
  2264.  
  2265.        This device driver can be used when debugging 16-bit applications
  2266.        also.
  2267. ::::DOS_STARTUP
  2268. ┌──────────────────────────────────────────────────────────────────────────┐
  2269. │ WVIDEO [options] [:sym_file] file_spec [cmd_line]               │
  2270. └──────────────────────────────────────────────────────────────────────────┘
  2271.  
  2272. The square brackets [ ] denote items which are optional.
  2273.  
  2274. WVIDEO       is the program name for VIDEO.
  2275.  
  2276. options    is a list of valid VIDEO options, each preceded by a dash ("-")
  2277.        or a slash ("/").  Options may be specified in any order.
  2278.  
  2279. sym_file   is an optional symbolic debugging information file specification.
  2280.        The specification must be preceded by a colon (":").  For DOS,
  2281.        the syntax of sym_file is:
  2282.  
  2283.        [d:][path]filename[.ext]
  2284.  
  2285.        The default file extension of the symbol file is ".SYM".
  2286.  
  2287.        The symbolic information file can be produced by the WATCOM
  2288.        Linker WLINK or by the WATCOM Strip Utility WSTRIP.
  2289.  
  2290. file_spec  is the file name of the file to be loaded into memory.  For DOS,
  2291.        the syntax of file_spec is:
  2292.  
  2293.        [d:][path]filename[.ext]
  2294.  
  2295.        d:          is an optional drive specification such as "A:", "B:",
  2296.               etc.  If not specified, the default drive is assumed.
  2297.  
  2298.        path       is an optional path specification such as
  2299.               "\UTILS\BIN\".
  2300.  
  2301.        filename   is the file name of the file to be loaded into memory.
  2302.  
  2303.        ext          is the file extension of the file to be loaded into
  2304.               memory.  A null file extension may be specified by
  2305.               typing the period "." but not the extension.  If no
  2306.               file extension is specified (i.e., both the period and
  2307.               extension are omitted) then VIDEO will attempt to load
  2308.               an executable image file using, in succession, the
  2309.               following extensions.
  2310.  
  2311.               For DOS, the search order is:  .COM, .EXE
  2312.  
  2313.               For the ERGO DOS extender, the search order is:  .EXP,
  2314.               .PLX, .EXE
  2315.  
  2316.               For the Phar Lap DOS extender, the search order is:
  2317.               .EXP, .EXE
  2318.  
  2319.               For the Rational DOS extender, the search order is:
  2320.               .EXE
  2321.  
  2322.               For NetWare 386, the search order is:  .NLM, .DSK,
  2323.               .LAN
  2324.  
  2325. cmd_line   is an optional command line which will be passed on to the
  2326.        application.
  2327.  
  2328. If both drive and path are omitted, VIDEO will first attempt to locate the
  2329. file in the current directory of the default drive.  If this fails, VIDEO
  2330. will search for the file in each path listed in the PATH environment string.
  2331.  
  2332.  
  2333. Command Line Options
  2334. ════════════════════
  2335. ┌──────────────────────────────────────────────────────────────────────────┐
  2336. │     /Monochrome | /Color | /Colour | /Ega43 | /Vga50               │
  2337. │     /Overwrite | /Page | /Swap | /Fastswap | /Two               │
  2338. │     /Checksize=space                               │
  2339. │     /Dynamic=space                               │
  2340. │     /Invoke=file_spec                            │
  2341. │     /NOAltsym                                │
  2342. │     /NOFpu                                   │
  2343. │     /NOInvoke                                │
  2344. │     /NOMouse                                   │
  2345. │     /NOSNow                                   │
  2346. │     /NOSymbols                               │
  2347. │     /Registers=number                            │
  2348. │     /REMotefiles                               │
  2349. │     /SIze=space                               │
  2350. │     /TRap=trap_file[;trap_parm]                       │
  2351. └──────────────────────────────────────────────────────────────────────────┘
  2352.  
  2353. Options may be specified in any order.    Short forms may be specified for
  2354. options and are shown above in capital letters.  If "space" is suffixed with
  2355. the letter "K" then "space" refers to multiples of 1K bytes (1024 bytes).
  2356. If "space" is suffixed with the letter "B" then "space" refers to the number
  2357. of bytes.  If no suffix is specified and "space" is a number less than 1000
  2358. then "space" is assumed to refer to multiples of 1K bytes (1024 bytes);
  2359. otherwise it refers to the number of bytes.
  2360.  
  2361. Display Selection
  2362.  
  2363. /Monochrome When two display devices are present in the system, this option
  2364.        indicates that the Monochrome display is to be used as the
  2365.        debugger's output device.  This option is used in conjunction
  2366.        with the Two option described below.
  2367.  
  2368. /Color, /Colour When two display devices are present in the system, this
  2369.        option indicates that the Colour display is to be used as the
  2370.        debugger's output device.  This option is used in conjunction
  2371.        with the Two option described below.
  2372.  
  2373. /Ega43       When an Enhanced Graphics Adapter (EGA) is present, 43 lines of
  2374.        output are displayed.
  2375.  
  2376. /Vga50       When an Video Graphics Array (VGA) is present, 50 lines of output
  2377.        are displayed.
  2378.  
  2379. Display Operation Modes
  2380.  
  2381. /Overwrite specifies that the debugger's output can overwrite program
  2382.        output.  In this mode, the application and the debugger are
  2383.        forced to share the same display area.
  2384.  
  2385.        This option may be used to conserve the amount of memory required
  2386.        to run VIDEO.  This option should not be used if you wish to
  2387.        debug a screen-oriented application (e.g., a graphics
  2388.        application) on the same machine.  See the topic entitled
  2389.        "DOS_GRAPHICS_APPLICATIONS".
  2390.  
  2391. /Page       specifies that page 0 of screen memory is to be used for the
  2392.        application's screen and that page 1 of screen memory should be
  2393.        used for the debugger's screen.  This option may be selected when
  2394.        using a graphics adapter such as the CGA, EGA or VGA.  Use of the
  2395.        Page option results in faster switching between the application
  2396.        and debugger screens and makes use of the extra screen memory
  2397.        available with the adapter.
  2398.  
  2399.        This option should not be used if you wish to debug a graphics
  2400.        application on the same machine.  See the topic entitled
  2401.        "DOS_GRAPHICS_APPLICATIONS".
  2402.  
  2403. /Swap       specifies that the application's screen memory and the debugger's
  2404.        screen memory are to be swapped back and forth using a single
  2405.        page.  The debugger allocates an area in its own data space for
  2406.        the inactive screen.  This reduces the amount of memory available
  2407.        to the application.    It also takes more time to switch between
  2408.        the application and debugger screens.
  2409.  
  2410.        This option MUST be used when debugging a graphics application on
  2411.        the same machine and a second monitor is not available.  See the
  2412.        topic entitled "DOS_GRAPHICS_APPLICATIONS".
  2413.  
  2414. /Fastswap  specifies that Windows 3.x screen memory and the debugger's
  2415.        screen memory are to be swapped back and forth using a
  2416.        technique that is faster than the default method of screen
  2417.        swapping but not guaranteed to work for all video adapters.
  2418.        This option applies to Windows 3.x only.  By default, the
  2419.        Windows 3.x version of the debugger uses a more conservative
  2420.        (and slower) method that works with all video adapters.
  2421.  
  2422. /Two       specifies that a second monitor is connected to the system.    If
  2423.        the monitor type (Monochrome, Color, Colour, Ega43, Vga50) is not
  2424.        specified then the monitor that is not currently being used is
  2425.        selected for the debugger's screen.  If the monitor type is
  2426.        specified then the monitor corresponding to that type is used for
  2427.        the debugger's screen.
  2428.  
  2429.        This option should be used when debugging a graphics application
  2430.        on the same machine and a second monitor is available.  See the
  2431.        topic entitled "DOS_GRAPHICS_APPLICATIONS".
  2432.  
  2433. The default display operation is as follows:
  2434.  
  2435.   1. If you have a two display system, VIDEO uses both displays with the
  2436.     program output appearing on the active monitor and the debugger output
  2437.     appearing on the alternate monitor.  In other words, the Two option is
  2438.     selected by default.
  2439.   2. If you have one of the CGA, EGA or VGA graphics adapters installed in
  2440.     your system then VIDEO will select the Page option by default.
  2441.   3. Under all other circumstances, VIDEO will select the Swap option by
  2442.     default.
  2443.  
  2444. /Checksize=space specifies the minimum amount of storage, in kilobytes, that
  2445.        VIDEO is to provide to DOS for the purpose of running a program
  2446.        via the debugger's SYstem command (this command is described
  2447.        under the topic "SYSTEM").  This option is useful when the
  2448.        application that is being debugged uses up most or all of
  2449.        available storage, leaving insufficient memory to spawn
  2450.        secondary programs.    In order to provide the requested amount of
  2451.        free memory to DOS, the debugger will checkpoint as much of the
  2452.        application as is required.
  2453.  
  2454.        Checkpointing involves temporarily storing a portion of the
  2455.        memory-resident application on disk and then reusing the part of
  2456.        memory that it occupied for the spawned program.  When the
  2457.        spawned program terminates, the checkpointed part of the
  2458.        application is restored to memory.
  2459.  
  2460.        The default amount is 0K bytes.  In this case, the spawned
  2461.        program may or may not be run depending on how much free storage
  2462.        is available to DOS to run the program.
  2463.  
  2464.        ┌─────────────────────────────────────────────────────────────────┐
  2465.        │  WARNING!    If the application being debugged installs one or    │
  2466.        │ more interrupt handlers, the use of this option could hang your │
  2467.        │ system.  Your system could lock up if the debugger checkpoints  │
  2468.        │ a portion of the application's code that contains an interrupt  │
  2469.        │ handler.                                 │
  2470.        └─────────────────────────────────────────────────────────────────┘
  2471.  
  2472. /Dynamic=space specifies the amount of dynamic storage that VIDEO is to
  2473.        reserve for items such as windows, user-defined symbols, etc.
  2474.        The default amount that is set aside is 40960 bytes (40K bytes).
  2475.        The amount, if specified, can exceed 64K bytes.  The larger the
  2476.        amount, the less memory will be available for the application to
  2477.        be debugged.  If you are using the remote debugging feature,
  2478.        VIDEO will utilize as much of available memory as it requires.
  2479.  
  2480. /Invoke=file_spec may be used to specify an alternate name for the debugger
  2481.        command file which is to be automatically invoked at start-up
  2482.        time.  The default file name is "PROFILE.DBG".  VIDEO command
  2483.        files are found in the current directory or one of the
  2484.        directories listed in the DOS PATH environment string.
  2485.  
  2486. /NOAltsym  disables debugger support for alternate symbolic information
  2487.        formats such as support for a susbset of CV4 (CodeView) and
  2488.        processing of export tables from NE (OS/2 1.x, Windows 3.x) and
  2489.        PE (Windows NT) executables.  This option reduces the time
  2490.        required by the debugger to load and process executables at
  2491.        startup.
  2492.  
  2493. /NOFpu       requests that the debugger ignore the presence of a math
  2494.        coprocessor.  No memory will be allocated by the debugger for
  2495.        saving the context of the 80x87 numeric data processor.  Use
  2496.        this option if your application will not use the math
  2497.        coprocessor and you wish to reduce the amount of memory
  2498.        required by the debugger.
  2499.  
  2500. /NOInvoke  specifies that the default debugger command file is not to be
  2501.        invoked.
  2502.  
  2503. /NOMouse   requests that the debugger ignore any attached mouse.  This may
  2504.        be necessary if the program being debugged also uses the mouse
  2505.        and the mouse driver installed on the system does not support
  2506.        two applications sharing the mouse at the same time.  The
  2507.        program "CHKMOUSE.COM" will inform you if the mouse driver
  2508.        supports this function.  To determine the capabilities of your
  2509.        mouse driver, run the CHKMOUSE program at the DOS command
  2510.        prompt.
  2511.  
  2512.        Example:
  2513.          C>chkmouse
  2514.  
  2515.        The program displays a single line telling you that either your
  2516.        mouse driver supports applications sharing the mouse, that it
  2517.        does not support applications sharing the mouse, or that there
  2518.        is no mouse driver installed.  This program is provided with
  2519.        VIDEO.
  2520.  
  2521.        In order to use a mouse, you must install the IBM Mouse Driver
  2522.        program that is supplied with the IBM Mouse.  Alternatively,
  2523.        you may use a mouse and mouse driver that are compatible with
  2524.        the IBM Mouse and IBM Mouse Driver.    The IBM Mouse Driver is
  2525.        installed by running the "MOUSE.COM" program.
  2526.  
  2527.        Example:
  2528.          C>\dos\mouse
  2529.  
  2530. /NOSNow    requests that VIDEO omit the vertical retrace delay on CGA
  2531.        adapters when writing to video memory directly.  The omission
  2532.        of this delay will speed up display output.
  2533.  
  2534. /NOSymbols requests that VIDEO omit all debugging information when loading
  2535.        an executable image.  Information regarding global and local
  2536.        symbol names, data types, and line numbers is not processed.
  2537.  
  2538. /Registers=number may be used to specify how many register sets to set aside
  2539.        for the recording of register contents.  The default number of
  2540.        register sets is 2.    See the description of the Register command
  2541.        for more information (this command is described under the topic
  2542.        "REGISTER").
  2543.  
  2544. /REMotefiles may be used in conjunction with the remote debugging
  2545.        capabilities of the debugger.  Remote debugging involves using
  2546.        two personal computers.  One, called the "task machine", is used
  2547.        to run the application; the other, called the "debugger machine",
  2548.        is used to run the debugger.  When REMotefiles is specified, all
  2549.        debugger files (except "trap" files) and application source files
  2550.        are opened on the task machine rather than the debugger machine
  2551.        (if you are doing local debugging, these two machines are
  2552.        actually the same).    The "trap" file must be located on the
  2553.        debugger machine because it contains the code to open files on
  2554.        the task machine.
  2555.  
  2556.        Note that the PATH environment variable on the task machine is
  2557.        always used in locating executable image files.  When REMotefiles
  2558.        is specified, the debugger also uses the task machine's PATH
  2559.        environment variable to locate debugger command files.
  2560.  
  2561. /SIze=space specifies the amount of additional overlay space that VIDEO may
  2562.        use for its overlay area.  The larger the area (up to a certain
  2563.        amount), the better the performance of VIDEO but less memory will
  2564.        be available for your application.  The default amount that is
  2565.        set aside is 70K bytes.
  2566.  
  2567. /TRap=trap_file[;trap_parm] must be specified when debugging an application
  2568.        on a remote machine or debugging an application running under a
  2569.        32-bit DOS extender.  It may also be used to disable the use of
  2570.        386/486 Debug Registers.  You must specify the name of one of the
  2571.        "trap" files provided with VIDEO.  Under DOS, the file extension
  2572.        defaults to ".TRP".    The "BIN" directory contains the trap files
  2573.        provided with VIDEO.
  2574.  
  2575.        Under DOS, if you do not specify the TRap option, the default
  2576.        trap file "STD.TRP" will be loaded.    This interface module
  2577.        supports debugging on the local computer system running DOS.
  2578.  
  2579.        Example:
  2580.          C>wvideo calendar
  2581.  
  2582.        Of course, you may also explicitly name the "standard" trap file
  2583.        that you wish VIDEO to use.
  2584.  
  2585.        Example:
  2586.          C>wvideo /trap=std calendar
  2587.  
  2588.        See the topic "REMOTE_DEBUGGING" for more information on the
  2589.        TRap option.
  2590. ::::DOS_WVIDEO_ENVIRONMENT_VARIABLE
  2591. The WVIDEO environment variable can be used to specify commonly used VIDEO
  2592. options.  If the specification of an option involves the use of an "="
  2593. character then the "#" character may be used in its place (this is required
  2594. by the syntax of the "SET" command).  These options are processed before
  2595. options specified on the command line.
  2596.  
  2597. Example:
  2598.   C>set wvideo=/swap/vga50/reg#4
  2599.  
  2600. The above examples illustrate how to define default options for the
  2601. debugger.
  2602.  
  2603. Once the WVIDEO environment variable has been defined, those options listed
  2604. become the default each time VIDEO is invoked.
  2605. ::::ERROR
  2606. ┌──────────────────────────────────────────────────────────────────────────┐
  2607. │ ERror  text_string | "{" text_string "}"                   │
  2608. └──────────────────────────────────────────────────────────────────────────┘
  2609.  
  2610. The Error command may be used to display an error message on the screen
  2611. which requires an acknowledgement.  This command can be used most
  2612. effectively in VIDEO command files.  Currently executing command files are
  2613. terminated when the ERror command is issued.
  2614.  
  2615. Example:
  2616.   DBG>if ~ dbg$fpu {error No 80x87 processor/emulator!}
  2617.  
  2618. The message text is displayed in an Error window.
  2619. ::::EXAMINE
  2620. ┌──────────────────────────────────────────────────────────────────────────┐
  2621. │ Examine                                   │
  2622. │     [/Byte]          exam_data                        │
  2623. │     /Word          exam_data                        │
  2624. │     /Dword          exam_data                        │
  2625. │     /Pointer          exam_data                        │
  2626. │     /Assembly       addr_data                        │
  2627. │     /Source          addr_data                        │
  2628. │     /IOByte          port_data                        │
  2629. │     /IOWord          port_data                        │
  2630. │     /IODword          port_data                        │
  2631. └──────────────────────────────────────────────────────────────────────────┘
  2632.  
  2633. The Examine command is used to display the contents of memory and I/O ports
  2634. in one of several different ways.
  2635.  
  2636.  
  2637. Examining Memory as Data
  2638. ════════════════════════
  2639. /Byte exam_data When this qualifier is used, the output from the Examine
  2640.        command is written to the Dialogue window.  The output is
  2641.        formatted into 8-bit values (bytes) using hexadecimal (base 16)
  2642.        notation.  The default qualifier is /Byte.
  2643.  
  2644. /Word exam_data When this qualifier is used, the output from the Examine
  2645.        command is written to the Dialogue window.  The output is
  2646.        formatted into 16-bit values (words) using hexadecimal (base 16)
  2647.        notation.  The most significant byte of each word is shown first.
  2648.  
  2649. /Dword exam_data When this qualifier is used, the output from the Examine
  2650.        command is written to the Dialogue window.  The output is
  2651.        formatted into 32-bit values (doublewords) using hexadecimal
  2652.        (base 16) notation.    The most significant byte of each doubleword
  2653.        is shown first.
  2654.  
  2655. /Pointer exam_data When this qualifier is used, the output from the Examine
  2656.        command is written to the Dialogue window.  The output is
  2657.        formatted into segment/offset pairs (segment:offset) using
  2658.        hexadecimal (base 16) notation.
  2659.  
  2660.   exam_data ::= [start_addr_expr]
  2661.               [ "," [next_addr_expr]
  2662.               [ "," [len_expr]
  2663.               [ "," rpt_expr ] ] ]
  2664.  
  2665. The starting address start_addr_expr is any expression that defines a
  2666. segment and offset of memory to be displayed.  The next address
  2667. next_addr_expr is any expression that defines the next segment and offset of
  2668. memory to be displayed.  The length value len_expr is any expression that
  2669. defines the amount of memory to be displayed.  The repetition count rpt_expr
  2670. may be any expression that defines the number of times the command is to be
  2671. repeated.
  2672.  
  2673. For a complete description of valid expressions, see the chapter entitled
  2674. "VIDEO Expression Handling".
  2675.  
  2676. Example:
  2677.   DBG>examine ds:0x0000
  2678.   DBG>examine ds:0x0000,.+0x10,0x10
  2679.  
  2680. The above two examples are equivalent.    Memory is displayed as a sequence of
  2681. bytes starting at the segment defined by the contents of the DS register and
  2682. an offset of 0.
  2683.  
  2684. The default next_addr_expr is defined as the current starting address (".")
  2685. plus 16 (decimal).  The default len_expr is 16 (decimal).
  2686.  
  2687. One of the features of the Examine command is its ability to follow linked
  2688. lists.    This can be illustrated with an example from the C programming
  2689. language.  Imagine that the following structure was defined.
  2690.  
  2691.   typedef struct list_entry
  2692.     {
  2693.       int        entry_number;
  2694.       struct list_entry *next;
  2695.       int        flags;
  2696.       char        *buff_addr;
  2697.     } LIST;
  2698.  
  2699.   extern LIST *listhead;  /* start of linked list */
  2700.  
  2701. The structure definition indicates that the second item in each entry points
  2702. to the next entry in the linked list.  To examine the entries in the linked
  2703. list (in 16-bit mode), the following command could be issued.
  2704.  
  2705. Example:
  2706.   DBG>ex/word *listhead,*(.+2),list_entry
  2707.   2134:0100 0001 013C 0774 8B55
  2708.   2134:013C 0002 011E 0770 8B97
  2709.   2134:011E 0003 0142 0074 8B34
  2710.   2134:0142 0004 0000 0070 8B55
  2711.  
  2712. We use the pointer operator * to indicate memory indirection.  After the
  2713. first line is displayed, the current memory location "." is defined to be
  2714. "2134:0100".  Hence, ".+2" is "2134:0102" and "*(2134:0102)" is "013C".
  2715. Therefore, the next memory location to be displayed is 2134:013C.  Each time
  2716. the space bar is pressed, the next memory location is displayed and the
  2717. value for "." is updated.
  2718.  
  2719.   1. In the above example, we are using type information when we refer to
  2720.     list_entry.  In order to specify a type name such as this, the "d2"
  2721.     compiler option must have been specified when the module was compiled.
  2722.   2. In addition, the "debug types" or "debug all" linker option must have
  2723.     preceded the name of the object file containing the module when the
  2724.     application was linked.
  2725.  
  2726.  
  2727. Examining Memory as Instructions
  2728. ════════════════════════════════
  2729. /Assembly addr_data When this qualifier is used, the output from the Examine
  2730.        command is written to the Assembly window if one is present on
  2731.        the screen; otherwise output is written to the Dialogue window.
  2732.        The output is formatted into Intel machine language instructions.
  2733.        Numeric values are displayed in hexadecimal (base 16) notation.
  2734.        For any locations that are displayed as "<symbol_name>+offset",
  2735.        the value for "offset" is displayed in the current numeric radix.
  2736.  
  2737. /Source addr_data When this qualifier is used, the output from the Examine
  2738.        command is written to the Source window if one is present on the
  2739.        screen; otherwise output is written to the Dialogue window.    If
  2740.        both line number information and the source file are available
  2741.        then the source lines are displayed.  If only line number
  2742.        information is available then only line numbers are displayed.
  2743.        If no information is available then no lines will be displayed in
  2744.        the Source window.
  2745.  
  2746.        If present, line number information is extracted from the
  2747.        executable image file.  Source lines are extracted from a source
  2748.        file provided that the file can be located.    For more
  2749.        information, see the description of the Set Source command.
  2750.  
  2751.   addr_data ::= [start_addr_expr] [ "," rpt_expr ]
  2752.  
  2753. The starting address start_addr_expr is any expression that defines a
  2754. segment and offset of memory to be displayed in the form of assembly
  2755. instructions and source lines.    The repetition count rpt_expr may be any
  2756. expression that defines the number of times the command is to be repeated.
  2757. A positive repetition count is equivalent to that many presses of the space
  2758. bar (next).  A negative repetition count is equivalent to that many presses
  2759. of the "P" key (previous).
  2760.  
  2761. Example:
  2762.   DBG>examine/source main_
  2763.   DBG>e/s main_
  2764.  
  2765. In the above example, two equivalent commands are shown.  The latter is
  2766. simply the short form for the former command.  Source lines corresponding to
  2767. the application entry point main_ are displayed.
  2768.  
  2769. A starting address may also be specified in terms of the module name and
  2770. line number.
  2771.  
  2772. Example:
  2773.   DBG>ex/source calendar@36
  2774.  
  2775. The module name need not be specified when it is the current module under
  2776. examination.
  2777.  
  2778. Example:
  2779.   DBG>ex/source @159
  2780.  
  2781. Line numbers are shown in the Source window.  Source line information must
  2782. be available in order to show source line numbers.
  2783.  
  2784.   1. Either compiler options "d1" or "d2" must have been specified when the
  2785.     module was compiled.
  2786.   2. The "debug lines" or "debug all" linker option must have preceded the
  2787.     name of the object file containing the module when the application was
  2788.     linked.
  2789.  
  2790.  
  2791. Examining Input/Output Ports
  2792. ════════════════════════════
  2793. /IOByte port_data When this qualifier is used, the specified port is read
  2794.        and output from the Examine command is written to the Dialogue
  2795.        window.  The output is formatted into an 8-bit value (byte) using
  2796.        hexadecimal (base 16) notation.
  2797.  
  2798. /IOWord port_data When this qualifier is used, the specified port is read
  2799.        and output from the Examine command is written to the Dialogue
  2800.        window.  The output is formatted into 16-bit values (words) using
  2801.        hexadecimal (base 16) notation.  The most significant byte of
  2802.        each word is shown first.
  2803.  
  2804. /IODword port_data The IODword qualifier is supported on 386 systems or
  2805.        higher.  When this qualifier is used, the specified port is read
  2806.        and output from the Examine command is written to the Dialogue
  2807.        window.  The output is formatted into 32-bit values (doublewords)
  2808.        using hexadecimal (base 16) notation.  The most significant byte
  2809.        of each doubleword is shown first.
  2810.  
  2811.   port_data ::= [start_addr_expr] [ "," rpt_expr ]
  2812.  
  2813. The starting address start_addr_expr is any expression that defines an
  2814. input/output port at which to begin reading data.  The repetition count
  2815. rpt_expr may be any expression that defines the number of times the command
  2816. is to be repeated.  A positive repetition count is equivalent to that many
  2817. presses of the space bar (next).
  2818. ::::F77_OPERATORS
  2819. VIDEO supports most FORTRAN 77 operators and includes an additional set of
  2820. operators for convenience.  The additional operators are patterned after
  2821. those available in the C programming language.
  2822.  
  2823. The grammar that VIDEO supports is close to that of the FORTRAN 77 language
  2824. but there are a few instances where space characters must be used to clear
  2825. up any ambiguities.  For example, the expression
  2826.  
  2827.   1.eq.x
  2828.  
  2829. will result in an error since VIDEO will form a floating-point constant from
  2830. the "1." leaving the string "eq.x".  If we introduce a space character after
  2831. the "1" then we clear up the ambiguity.
  2832.  
  2833.   1 .eq.x
  2834.  
  2835. Unlike FORTRAN, the parser in VIDEO treats spaces as significant characters.
  2836. Thus spaces must not be introduced in the middle of symbol names, constants,
  2837. multi-character operators like .EQ.  or //, etc.
  2838.  
  2839. Operators are presented in order of precedence, from lowest to highest.
  2840. Operators on the same line have the same priority.
  2841.  
  2842.                       Lowest Priority
  2843.   Assignment Operators
  2844.       =  +=  -=  *=  /=  %=  &=  |=  ^=  <<=  >>=
  2845.   Logical Operators
  2846.       .EQV.  .NEQV.
  2847.       .OR.
  2848.       .AND.
  2849.       .NOT.
  2850.   Bit Operators
  2851.       |
  2852.       ^
  2853.       &
  2854.   Relational Operators
  2855.       .EQ.  .NE.  .LT.    .LE.  .GT.  .GE.
  2856.   Shift and Concatenation Operators
  2857.       <<  >>  //
  2858.   Arithmetic Operators
  2859.       +  -
  2860.       *  /  %
  2861.       ** (unsupported)
  2862.   Unary Operators
  2863.       +  -
  2864.       ~  ++  --  &   *     %
  2865.       [type_name] unary_expr
  2866.       ?
  2867.   Binary Address Operator
  2868.       :
  2869.                       Highest Priority
  2870.  
  2871. Parentheses can be used to order the evaluation of an expression.
  2872.  
  2873. In addition to the operators listed above, a number of primary expression
  2874. operators are supported.  These operators are used in identifying the object
  2875. to be operated upon.
  2876.  
  2877. ()       subscripting, substringing, or function call
  2878.  
  2879. .       field selection
  2880.  
  2881. ->       field selection using a pointer
  2882.  
  2883. The following built-in functions may be used to convert the specified
  2884. argument to a particular type.
  2885.  
  2886.   INT( )      conversion to integer
  2887.   REAL( )     conversion to real
  2888.   DBLE( )     conversion to double-precision
  2889.   CMPLX( )    conversion to complex
  2890.   DCMPLX( )   conversion to double-precision complex
  2891.  
  2892. The following sections describe the operators presented above.
  2893.  
  2894.  
  2895. Assignment Operators for the FORTRAN Grammar
  2896. ════════════════════════════════════════════
  2897. =       Assignment:    The value on the right is assigned to the object on
  2898.        the left.
  2899.  
  2900. +=       Additive assignment:  The object on the left is augmented by the
  2901.        value on the right.
  2902.  
  2903. -=       Subtractive assignment:  The object on the left is reduced by the
  2904.        value on the right.
  2905.  
  2906. *=       Multiplicative assignment:  The object on the left is multiplied
  2907.        by the value on the right.
  2908.  
  2909. /=       Division assignment:  The object on the left is divided by the
  2910.        value on the right.
  2911.  
  2912. %=       Modulus assignment:    The object on the left is updated with
  2913.        MOD(left,right).  The result is the remainder when the value of
  2914.        the object on the left is divided by the value on the right.
  2915.  
  2916. &=       Bit-wise AND:  The bits in the object on the left are ANDed with
  2917.        the bits of the value on the right.
  2918.  
  2919. |=       Bit-wise inclusive OR:  The bits in the object on the left are
  2920.        ORed with the bits of the value on the right.
  2921.  
  2922. ^=       Bit-wise exclusive OR:  The bits in the object on the left are
  2923.        exclusively ORed with the bits of the value on the right.
  2924.  
  2925. <<=       Left shift:    The bits in the object on the left are shifted to
  2926.        the left by the amount of the value on the right.
  2927.  
  2928. >>=       Right shift:  The bits in the object on the left are shifted to
  2929.        the right by the amount of the value on the right.  If the object
  2930.        on the left is described as unsigned, the vacated high-order bits
  2931.        are zeroed.    If the object on the left is described as signed,
  2932.        the sign bit is propagated through the vacated high-order bits.
  2933.        VIDEO treats registers as unsigned items.
  2934.  
  2935.  
  2936. Logical Operators for the FORTRAN Grammar
  2937. ═════════════════════════════════════════
  2938. .EQV.       Logical equivalence:  The logical equivalence of the value on the
  2939.        left and the value on the right is produced.
  2940.  
  2941. .NEQV.       Logical non-equivalence:  The logical non-equivalence of the
  2942.        value on the left and the value on the right is produced.
  2943.  
  2944. .OR.       Logical inclusive disjunction:  The logical OR of the value on
  2945.        the left and the value on the right is produced.
  2946.  
  2947. .AND.       Logical conjunction:  The logical AND of the value on the left
  2948.        and the value on the right is produced.
  2949.  
  2950. .NOT.       Logical negation:  The logical complement of the value on the
  2951.        right is produced.
  2952.  
  2953.  
  2954. Bit Operators for the FORTRAN Grammar
  2955. ═════════════════════════════════════
  2956. |       Bit-wise OR:  The bits of the value on the left and the value on
  2957.        the right are ORed.
  2958.  
  2959. ^       Bit-wise exclusive OR:  The bits of the value on the left and the
  2960.        value on the right are exclusively ORed.
  2961.  
  2962. &       Bit-wise AND:  The bits of the value on the left and the value on
  2963.        the right are ANDed.
  2964.  
  2965.  
  2966. Relational Operators for the FORTRAN Grammar
  2967. ════════════════════════════════════════════
  2968. .EQ.       Equal:  If the value on the left is equal to the value on the
  2969.        right then the result is 1; otherwise the result is 0.
  2970.  
  2971. .NE.       Not equal:  If the value on the left is not equal to the value on
  2972.        the right then the result is 1; otherwise the result is 0.
  2973.  
  2974. .LT.       Less than:  If the value on the left is less than the value on
  2975.        the right then the result is 1; otherwise the result is 0.
  2976.  
  2977. .LE.       Less than or equal:    If the value on the left is less than or
  2978.        equal to the value on the right then the result is 1; otherwise
  2979.        the result is 0.
  2980.  
  2981. .GT.       Greater than:  If the value on the left is greater than the value
  2982.        on the right then the result is 1; otherwise the result is 0.
  2983.  
  2984. .GE.       Greater than or equal:  If the value on the left is greater than
  2985.        or equal to the value on the right then the result is 1;
  2986.        otherwise the result is 0.
  2987.  
  2988.  
  2989. Arithmetic/Logical Shift Operators for the FORTRAN Grammar
  2990. ══════════════════════════════════════════════════════════
  2991. <<       Left shift:    The bits of the value on the left are shifted to the
  2992.        left by the amount described by the value on the right.
  2993.  
  2994. >>       Right shift:  The bits of the value on the left are shifted to
  2995.        the right by the amount described by the value on the right.  If
  2996.        the object on the left is described as unsigned, the vacated
  2997.        high-order bits are zeroed.    If the object on the left is
  2998.        described as signed, the sign bit is propagated through the
  2999.        vacated high-order bits.  VIDEO treats registers as unsigned
  3000.        items.
  3001.  
  3002.  
  3003. Concatenation Operator for the FORTRAN Grammar
  3004. ══════════════════════════════════════════════
  3005. //       String concatenation:  The concatenation of the character string
  3006.        value on the left and right is formed.
  3007.  
  3008.  
  3009. Binary Arithmetic Operators for the FORTRAN Grammar
  3010. ═══════════════════════════════════════════════════
  3011. +       Addition:  The value on the right is added to the value on the
  3012.        left.
  3013.  
  3014. _       Subtraction:  The value on the right is subtracted from the value
  3015.        on the left.
  3016.  
  3017. *       Multiplication:  The value on the left is multiplied by the value
  3018.        on the right.
  3019.  
  3020. /       Division:  The value on the left is divided by the value on the
  3021.        right.
  3022.  
  3023. %       Modulus:  The modulus of the value on the left with respect to
  3024.        the value on the right is produced.    The result is the remainder
  3025.        when the value on the left is divided by the value on the right.
  3026.  
  3027. **       Exponentiation:  This operation is not supported by VIDEO.
  3028.  
  3029.  
  3030. Unary Arithmetic Operators for the FORTRAN Grammar
  3031. ══════════════════════════════════════════════════
  3032. +       Plus:  The result is the value on the right.
  3033.  
  3034. _       Minus:  The result is the negation of the value on the right.
  3035.  
  3036. ~       Bit-wise complement:  The result is the bit-wise complement of
  3037.        the value on the right.
  3038.  
  3039. ++       Increment:  Both prefix and postfix operators are supported.  If
  3040.        the object is on the right, it is pre-incremented by 1 (e.g.,
  3041.        ++x).  If the object is on the left, it is post-incremented by 1
  3042.        (e.g., x++).
  3043.  
  3044. _ _       Decrement:  Both prefix and postfix operators are supported.  If
  3045.        the object is on the right, it is pre-decremented by 1 (e.g.,
  3046.        --x).  If the object is on the left, it is post-decremented by 1
  3047.        (e.g., x--).
  3048.  
  3049. &       Address of:    The result is the address (segment:offset) of the
  3050.        object on the right (e.g., &main).
  3051.  
  3052. *       Points:  The result is the value stored at the location addressed
  3053.        by the value on the right (e.g., *(ds:100), *string.loc).  In the
  3054.        absence of typing information, the value on the right is treated
  3055.        as a pointer into the stack segment and a near pointer is
  3056.        produced.
  3057.  
  3058.            (SS:00FE) = FFFF
  3059.          var:  (SS:0100) = 0152
  3060.            (SS:0102) = 1240
  3061.            (SS:0104) = EEEE
  3062.  
  3063.        In the following example, memory locations are displayed starting
  3064.        at DS:152 for 16-bit mode and at DS:12400152 for 32-bit mode.
  3065.  
  3066.        Example:
  3067.          DBG>examine/byte *100
  3068.  
  3069. %       Value at address:  The result is the value stored at the location
  3070.        addressed by the value on the right (e.g., %(ds:100),
  3071.        %string.loc).  In the absence of typing information, the value on
  3072.        the right is treated as a pointer into the stack segment and a
  3073.        far pointer is produced.
  3074.  
  3075.            (SS:00FE) = FFFF
  3076.          var:  (SS:0100) = 0152
  3077.            (SS:0102) = 1240
  3078.            (SS:0104) = EEEE
  3079.  
  3080.        In the following example, memory locations are displayed starting
  3081.        at 1240:0152 for 16-bit mode and at EEEE:12400152 for 32-bit
  3082.        mode.
  3083.  
  3084.        Example:
  3085.          DBG>examine/byte %100
  3086.  
  3087.        Note that this operator is not found in the FORTRAN 77
  3088.        programming language.
  3089.  
  3090.  
  3091. Special Unary Operators for the FORTRAN Grammar
  3092. ═══════════════════════════════════════════════
  3093. ?       Existence test:  The "?" unary operator may be used to test for
  3094.        the existence of a symbol.
  3095.  
  3096.        Example:
  3097.          DBG>print ?id
  3098.  
  3099.        The result of this expression is 1 if "id" is a symbol known to
  3100.        VIDEO and 0 otherwise.  If the symbol does not exist in the
  3101.        current scope then it must be qualified with its module name.
  3102.        Automatic symbols exist only in the current subprogram.
  3103.  
  3104.  
  3105. Binary Address Operator for the FORTRAN Grammar
  3106. ═══════════════════════════════════════════════
  3107. :       Memory locations can be referenced by using the binary ":"
  3108.        operator and a combination of constants, register names, and
  3109.        symbol names.  In the Intel 80x86 architecture, a memory
  3110.        reference requires a segment and offset specification.  A memory
  3111.        reference using the ":" operator takes the following form:
  3112.  
  3113.          segment:offset
  3114.  
  3115.        The elements segment and offset can be expressions.
  3116.  
  3117.        Example:
  3118.          (ES):(DI+100)
  3119.          (SS):(SP-20)
  3120.  
  3121.  
  3122. Primary Expression Operators for the FORTRAN Grammar
  3123. ════════════════════════════════════════════════════
  3124. ()       Elements of an array can be identified using subscript
  3125.        expressions.
  3126.  
  3127. .       The "." operator indicates field selection in a structure.  This
  3128.        operator is useful in mixed language applications where part of
  3129.        the application is written in the C programming language.  In the
  3130.        following example, tyme2 is a structure and tm_year is a field in
  3131.        the structure.
  3132.  
  3133.        Example:
  3134.          DBG>print tyme2.tm_year
  3135.  
  3136. ->       The "->" operator indicates field selection when using a pointer
  3137.        to a structure.  This operator is useful in mixed language
  3138.        applications where part of the application is written in the C
  3139.        programming language.  In the following example, tyme is the
  3140.        pointer and tm_year is a field in the structure to which it
  3141.        points.
  3142.  
  3143.        Example:
  3144.          DBG>print tyme->tm_year
  3145. ::::FLIP
  3146. ┌──────────────────────────────────────────────────────────────────────────┐
  3147. │ Flip    [ ON | OFf | expr]                           │
  3148. └──────────────────────────────────────────────────────────────────────────┘
  3149.  
  3150. The Flip command is used to display the application's screen.  Under DOS,
  3151. the "Page" or "Swap" options must have been specified when the debugger was
  3152. invoked.  To return to the VIDEO display screen, any key may be pressed or
  3153. the left mouse button may be clicked.  If neither of these options were
  3154. specified then this form of the command will have no effect.
  3155.  
  3156. The "on" and "off" options are used to turn screen switching "on" or "off".
  3157. By default, VIDEO will switch between the application's screen and the
  3158. debugger's screen (flip on) unless the remote debugging feature is used.  To
  3159. prevent VIDEO from switching between screens, flipping may be turned "off".
  3160.  
  3161. If an expression is specified, VIDEO will automatically return to the
  3162. debugger screen after that number of seconds have passed.  If you press a
  3163. key before the time interval has expired, VIDEO will return to the debugger
  3164. screen.  If no expression is specifed, VIDEO will wait indefinitely for a
  3165. key to be pressed.
  3166. ::::GO
  3167. ┌──────────────────────────────────────────────────────────────────────────┐
  3168. │ Go        [ start_addr_expr "," ] [ tmp_brk_addr_expr ]           │
  3169. │ Go [/Keep] [ start_addr_expr "," ]                       │
  3170. └──────────────────────────────────────────────────────────────────────────┘
  3171.  
  3172. The Go command is used to start or continue program execution.    Execution
  3173. resumes at the specified starting address start_addr_expr or, in the absence
  3174. of one, the location defined by the current contents of the CS:IP or CS:EIP
  3175. register pair.
  3176.  
  3177. If a starting address is specified, it must be followed by a comma.  In the
  3178. following example, VIDEO is instructed to resume execution at the start of
  3179. "rtn1".
  3180.  
  3181. Example:
  3182.   DBG>go rtn1,
  3183.  
  3184. The following example instructs VIDEO to resume execution at the start of
  3185. "rtn1" and also sets a temporary break point at "rtn1+73" so that execution
  3186. is suspended before executing the instruction at "rtn1+73".
  3187.  
  3188. Example:
  3189.   DBG>go rtn1,rtn1+73
  3190.  
  3191. A temporary break point may be specified without a starting address.  A
  3192. temporary break point is similar to a normal break point except that only
  3193. one of them is permitted.  Every time you issue a new Go command, the
  3194. previous temporary break point (if it exists) is discarded unless the /Keep
  3195. sub-command is specified.  If you wish to retain the previous temporary
  3196. break point then you may not specify a new one (since you can have only
  3197. one).
  3198.  
  3199. Example:
  3200.   DBG>go rtn1
  3201.   DBG>go rtn2
  3202.  
  3203. In the above example, the temporary break point at "rtn1" is replaced by the
  3204. temporary break point at "rtn2" when the second Go command is issued.
  3205.  
  3206. Example:
  3207.   DBG>go rtn1
  3208.   DBG>go
  3209.  
  3210. In the above example, the temporary break point at "rtn1" is removed when
  3211. the second Go command is issued.
  3212.  
  3213. Example:
  3214.   DBG>go rtn1
  3215.   DBG>go/keep
  3216.  
  3217. In the above example, the temporary break point at "rtn1" is kept when the
  3218. second Go command is issued.
  3219.  
  3220. See the description of the Break command for more information on break
  3221. points.
  3222.  
  3223. ┌────────────────────────────────────────────────────────────────────────────┐
  3224. │ Note:  Execution of a program may be interrupted and control returned to   │
  3225. │ the debugger.  The techniques for interrupting program execution are         │
  3226. │ described in the topics entitled "..._INTERRUPTING_A_PROGRAM" in         │
  3227. │ the topics dealing with the use of VIDEO under a particular operating      │
  3228. │ system.  The techniques for interrupting program execution when using the  │
  3229. │ remote debugging feature are described under the topic entitled         │
  3230. │ "REMOTE_DEBUGGING".                                 │
  3231. └────────────────────────────────────────────────────────────────────────────┘
  3232. ::::HELP
  3233. ┌──────────────────────────────────────────────────────────────────────────┐
  3234. │ Help     [topic]                               │
  3235. └──────────────────────────────────────────────────────────────────────────┘
  3236.  
  3237. The Help command may be used to obtain help on a particular topic.  If no
  3238. topic is specified then a default topic is displayed.  The default topic
  3239. includes a list of topics for which help is available.
  3240.  
  3241. Unique short forms may be specified for the desired topic.
  3242.  
  3243. Example:
  3244.   DBG>help go
  3245.  
  3246. The above example requests help on the VIDEO Go command.
  3247.  
  3248. Help information is displayed in the View window.  If you position the text
  3249. cursor on a word in the window and press the Enter key or double-click on it
  3250. with a mouse, VIDEO will search for a topic by that name.  More information
  3251. on the manipulation of this window with keys or mouse is presented under the
  3252. topic entitled "WINDOWS".
  3253. ::::IF
  3254. ┌──────────────────────────────────────────────────────────────────────────┐
  3255. │ IF  expr  if_cmd_list  [ else_cmd_list ]                   │
  3256. └──────────────────────────────────────────────────────────────────────────┘
  3257.  
  3258. The specified expression expr is evaluated and if it results in a non-zero
  3259. value then the list of debugger commands contained in if_cmd_list is
  3260. executed; otherwise the list of commands contained in else_cmd_list is
  3261. executed.  The two command lists are separated from one another by the use
  3262. of curly braces ({}).
  3263.  
  3264. Example:
  3265.   DBG>break/set gorun { if x>100 {print{done}}{go/keep} }
  3266.  
  3267. In the above example, a break point will occur each time the "gorun" routine
  3268. is entered.  The IF command is evaluated by the debugger and if the result
  3269. is "true" (i.e., not zero) then the message "done" will be printed in the
  3270. Dialogue window and the debugger will prompt for another command; otherwise
  3271. execution is resumed (keeping any temporary break point that we may have
  3272. specified).
  3273.  
  3274. A command of the sort presented next is very useful in locating a problem in
  3275. an application.  Let us assume that we are trying to discover which routine
  3276. calls our "gorun" routine such that the variable "x" has a zero value after
  3277. the "gorun" routine has executed.  The example assumes a 16-bit application.
  3278.  
  3279. Example:
  3280.   DBG>br gorun {br %sp {if x==0 {} {br/cl /.;go/k}}; go/k}
  3281.  
  3282. In the above example, the commands
  3283.  
  3284.   br %sp {if x==0 {} {br/cl /.;go/k}}
  3285.   go/k
  3286.  
  3287. are executed each time the "gorun" routine is entered.    This first command
  3288. defines a break point at the return address of the calling routine.  We are
  3289. assuming that "gorun" was invoked by a "far" call; hence the stack top
  3290. contains a 32-bit segment:offset return address in our 16-bit example.    The
  3291. second command resumes execution of the application.  The command
  3292.  
  3293.   if x==0 {} {br/cl /.;go/k}
  3294.  
  3295. is executed each time a return is made to the calling routine.    If the value
  3296. of "x" is zero then no commands are executed and the debugger is entered
  3297. (this may be the error case for which we are searching).  Otherwise the
  3298. break point for this location is cleared and execution is resumed (keeping
  3299. any temporary break point that we may have specified).
  3300. ::::INVOKE
  3301. ┌──────────────────────────────────────────────────────────────────────────┐
  3302. │ INvoke  cmd_file { parm | "{" parm "}" }                   │
  3303. │ <                                       │
  3304. └──────────────────────────────────────────────────────────────────────────┘
  3305.  
  3306. The INvoke or < command is used to invoke a file containing a number of
  3307. VIDEO commands.  The file specification cmd_file has an operating system
  3308. dependent form.  For DOS, OS/2, NetWare 386, Windows 3.x and Windows NT
  3309. systems, the format is:
  3310.  
  3311.   [d:][path]filename[.ext]
  3312.  
  3313. For QNX, the format is:
  3314.  
  3315.   [//node][path]filename[.ext]
  3316.  
  3317. If no file suffix or extension is specified (i.e., both the period and
  3318. extension are omitted) then the default is ".dbg".
  3319.  
  3320. Under DOS, OS/2, Windows 3.x and Windows NT, the search order for
  3321. command files is as follows:
  3322.  
  3323.   1. If only filename or filename.ext are specified, VIDEO will first
  3324.     attempt to locate the file in the current working directory.
  3325.   2. It will then search the paths listed in the PATH environment variable.
  3326.     You should ensure that the "BINB" directory of the WATCOM compiler
  3327.     package is included in the PATH environment variable.  This directory
  3328.     contains the command files provided with VIDEO.
  3329.  
  3330. Under QNX, the search order for command files is as follows:
  3331.  
  3332.   1. If only filename or filename.ext are specified, VIDEO will first
  3333.     attempt to locate the file in the current working directory.
  3334.   2. the paths listed in the WVIDEO_PATH environment variable,
  3335.   3. the path listed in the HOME environment variable, and, finally,
  3336.   4. the "/etc/wvideo" directory.  The command files provided with VIDEO are
  3337.     usually located in the "/etc/wvideo" directory.
  3338.  
  3339. Parameters may be passed to the command file.  If any of the parameters
  3340. require the use of a semicolon (";") or a space then you should use "{" and
  3341. "}" since the semicolon is interpreted as a command separator and the space
  3342. is interpreted as a parameter separator by VIDEO.
  3343.  
  3344. The parameters are matched up with sequences of <#> in the command file,
  3345. where # is a number from 1 to 9.  The first parameter is substituted for
  3346. every occurrence of <1>, the second for every occurrence of <2>, and so on.
  3347. Any occurrences of <0> are replaced by a unique integer value which is
  3348. supplied by the debugger each time the file is invoked.  This feature
  3349. permits the creation of unique variables with each invocation of the command
  3350. file.
  3351.  
  3352. A number of command files are provided with VIDEO that provide excellent
  3353. examples of the power and flexibility of command files.
  3354.  
  3355. In the following example, assume that the file "count.dbg" contains the
  3356. following two lines:
  3357.  
  3358.   /cnt_<1>=0
  3359.   break/set <1> {/cnt_<1>++; go/keep}
  3360.  
  3361. If you enter one of the commands:
  3362.  
  3363.   invoke count printf
  3364.   <count printf
  3365.  
  3366. then each appearance of "<1>" is replaced by "printf" and the resultant
  3367. commands are executed.
  3368.  
  3369. Example:
  3370.   DBG>/cnt_printf=0
  3371.   DBG>break/set printf {/cnt_printf++; go/keep}
  3372.  
  3373. Each time the "printf" routine is entered, the debugger will increment the
  3374. user-defined variable cnt_printf and resume execution (keeping any temporary
  3375. break point that we may have specified).  When execution of the application
  3376. terminates, the current value of cnt_printf may be examined by using the
  3377. Print command to determine how many times the "printf" routine was executed.
  3378.  
  3379. Example:
  3380.   set pf <1> {
  3381.       if !?_dbg@pf_<1> {/_dbg@pf_<1>=0};
  3382.       if (++_dbg@pf_<1>)&1 {<2>} {<3>}
  3383.   }
  3384.  
  3385. In the above example, taken from "toggle.dbg", three parameters are
  3386. specified to the command file.
  3387.  
  3388. As shown in the previous example, one VIDEO command line may be split across
  3389. several lines of a command file.  A line can be split at an opening brace
  3390. ("{").    To construct the command line, VIDEO will continue to read in input
  3391. lines until the matching closing brace is found ("}").
  3392.  
  3393. For additional information on command files, see also the description of the
  3394. Set Implicit command.
  3395. ::::LOG
  3396. ┌──────────────────────────────────────────────────────────────────────────┐
  3397. │ Log      [/Start | /Append | >] file_name                   │
  3398. │ >                                       │
  3399. └──────────────────────────────────────────────────────────────────────────┘
  3400.  
  3401. The Log or > command may be used to log Dialogue window output to a
  3402. specified file.
  3403.  
  3404. /Start file_name This qualifier is used to start logging to the specified
  3405.        file.
  3406.  
  3407.        Example:
  3408.          DBG>log/start dbg.log
  3409.          DBG>>/start dbg.log
  3410.  
  3411.        The previous contents of the file are lost (overwritten).  When
  3412.        file_name is specified and no qualifier is specified then /Start
  3413.        is implied.
  3414.  
  3415.        Example:
  3416.          DBG>log dbg.log
  3417.  
  3418.        When neither the qualifier nor filename is specified then any
  3419.        currently opened log file is closed.
  3420.  
  3421.        Example:
  3422.          DBG>log
  3423.  
  3424. /Append file_name This qualifier is used to start logging and append logging
  3425.        records to the end of the specified file.
  3426.  
  3427.        Example:
  3428.          DBG>log/append dbg.log
  3429.          DBG>>/app dbg.log
  3430.  
  3431. > file_name This operator is a synonym for "/append".  Thus it behaves
  3432.        identically to the /Append qualifier
  3433.  
  3434.        Example:
  3435.          DBG>log > dbg.log
  3436.          DBG>>> dbg.log
  3437.  
  3438. If a log file is currently open, it must be closed before logging can be
  3439. done to a different file.  The current log file is closed if a Log command
  3440. is entered with no qualifier and filename.  The log file is automatically
  3441. closed when the debugger exits (see the description of the Quit command).
  3442.  
  3443. Example:
  3444.   DBG>log/start debug.log
  3445.  
  3446. Output to the Dialogue window is also written to the file "debug.log".
  3447.  
  3448. Example:
  3449.   DBG>log/append debug.log
  3450.   DBG>log> debug.log
  3451.   DBG>>>debug.log
  3452.   DBG>>/append debug.log
  3453.  
  3454. The above examples are all equivalent forms of the Log/Append command.
  3455.  
  3456. Under QNX, a path specification that begins with a "/" could be interpreted
  3457. as a qualifier.
  3458.  
  3459. Example:
  3460.   DBG>log /users/fred/debug.log
  3461.  
  3462. In the above example, the "/users" qualifier is not supported and an error
  3463. will result.  To resolve this conflict, the /Start or /Append qualifiers can
  3464. be used.
  3465.  
  3466. Example:
  3467.   DBG>log /start /users/fred/debug.log
  3468. ::::MENUS
  3469. VIDEO Menus
  3470. ═══════════
  3471. The Set menu on command may be used to cause a menu bar to appear at the top
  3472. of the screen.    Menus are provided as an alternative to some of the more
  3473. common VIDEO commands.    In the following sections, we explain how to use
  3474. menus and provide a brief synopsis of each menu.
  3475.  
  3476.  
  3477. Menu Selection
  3478. ══════════════
  3479. Under DOS and MS Windows, menu selection may be activated by pressing and
  3480. releasing the Alt key.    The first menu item name or title is highlighted as
  3481. shown in the following illustration.
  3482.  
  3483. Under other systems (as well as DOS and Windows), press Alt and the first
  3484. letter of one of the menu names to select that menu (e.g., Alt/C for
  3485. Control).
  3486.  
  3487. The cursor left and right keys may be used to highlight a particular menu
  3488. item.  The Enter key may be used to select the highlighted menu item.
  3489.  
  3490. In some cases, the menu item opens up and a list of choices is usually
  3491. displayed.  In others, the menu item invokes an immediate action.  The
  3492. action menu items are identified by the "!" which is appended to the menu
  3493. title (e.g., Go!).  When a list of menu entries is displayed, the list may
  3494. be closed up by pressing the Escape key.  A second press of the Escape key
  3495. will return you to the Prompt window.
  3496.  
  3497. Alternately, direct selection of a menu item is possible by pressing both
  3498. the Alt key and the first letter shown in the menu name or title.  For
  3499. example, the "Control" menu may be activated by pressing both the "Alt" and
  3500. "C" keys ("Alt" must already be depressed when you press the "C" key).    If
  3501. you have a mouse, you can do the same thing by moving the mouse cursor to
  3502. one of the menu items in the menu bar and depressing the left mouse button.
  3503. If you then release the button, the currently selected item will be
  3504. performed.
  3505.  
  3506. Menus to the left or right of the current menu may be selected by using the
  3507. cursor left and right keys.  As you move left or right, only one menu is
  3508. activated.  With a mouse, you can do the same thing by dragging the mouse
  3509. through the various menu items in the menu bar.
  3510.  
  3511. If a menu opens up, one of the choices is highlighted.    This indicates the
  3512. current choice for that menu.  The cursor up and down keys may be used to
  3513. select a different choice.  With a mouse, different choices may be selected
  3514. by dragging the mouse to the desired item.  When an item has been picked,
  3515. the "Enter" key may be used to select it.  When using a mouse, the left
  3516. mouse button may be released.
  3517.  
  3518. The "Esc" key may be used to quit from a menu.    To quit from a menu with a
  3519. mouse, you can either:
  3520.  
  3521.   1. release the left button in an area outside of the menu, or
  3522.   2. click in an area outside of the menu.
  3523.  
  3524. The choice depends on the type of menu presented.
  3525.  
  3526. Some selections result in yet other menus being displayed.  The process for
  3527. making selections is the same.    Use the cursor left and right keys to move
  3528. left and right to other menus that may be shown.  Use the cursor up and down
  3529. keys to make a selection in each menu.    To signal that you have made your
  3530. selection, press the "Enter" key.  With a mouse you can use the actions of
  3531. dragging and clicking to make your selections.
  3532.  
  3533.  
  3534. The Control Menu
  3535. ════════════════
  3536. Help       This entry is used to invoke VIDEO's "Help" system.
  3537.  
  3538. System       This entry is used to start the system's command interpreter or
  3539.        "shell".  If you are using DOS, for example, then the
  3540.        "COMMAND.COM" program is run.  Certain conditions must be met
  3541.        before the shell can be run and these are listed in the
  3542.        description of the System command.
  3543.  
  3544. Restart    This entry is used to restart the current application.  The
  3545.        application is reloaded into memory and execution is suspended at
  3546.        the program's entry point.  At this point, a VIDEO command such
  3547.        as "go main" may be entered.  See the description of the New
  3548.        /restart command for more information.
  3549.  
  3550. View       This entry is used to select a file for viewing.  See the
  3551.        description of the View command for more information.
  3552.  
  3553. Log       This entry is used to commence logging of VIDEO commands and
  3554.        responses to a file.  See the description of the Log command for
  3555.        more information.
  3556.  
  3557. Quit       This entry is used to quit from the debugger thereby terminating
  3558.        the current application.  See the description of the Quit command
  3559.        for more information.
  3560.  
  3561.  
  3562. The User Menu
  3563. ═════════════
  3564. This is a user-definable list of menu items.  Each entry is created with the
  3565. Set menu add command.  An entry is a list of one or more VIDEO commands.
  3566. Each new entry is labelled with a letter from the alphabet.  Thus a
  3567. particular entry may be selected quickly by pressing the Alt key and the
  3568. letter corresponding to the desired entry.  The mouse can also be used to
  3569. select an entry.
  3570.  
  3571. Up to 20 items can be added to the "User" menu.
  3572.  
  3573.  
  3574. The Display Menu
  3575. ════════════════
  3576. The text cursor can be moved directly to a particular window by using this
  3577. menu.  Select the window to which you wish to move the text cursor.  See the
  3578. description of the Display command for more information.
  3579.  
  3580.  
  3581. The Paint Menu
  3582. ══════════════
  3583. The colours for all windows or a particular window may be selected by using
  3584. menus.
  3585.  
  3586. When using a mouse, clicking on the "Sample" window is equivalent to
  3587. pressing the Enter key.
  3588.  
  3589. See the description of the Paint command for more information.
  3590.  
  3591.  
  3592. The Break! Menu
  3593. ═══════════════
  3594. Break points may be "set", "cleared", "activated" or "deactivated" when
  3595. "Break!" is chosen.  Two windows are displayed, one containing a set of
  3596. instructions and one containing a list of the break points currently set.
  3597.  
  3598. You may press one of the keys "S", "C", "A" or "D" to select the desired
  3599. action.  The cursor up and down keys may be used to highlight individual
  3600. break points.
  3601.  
  3602. A mouse can be used on the list with the usual actions, clicking or dragging
  3603. to select a break point.  Clicking on the instruction box areas acts as if
  3604. the appropriate key has been pressed.  For example, clicking on the quadrant
  3605. that contains "s = set" acts as if the "S" key had been pressed.  See the
  3606. description of the Break command for more information.
  3607.  
  3608.  
  3609. The Watch! Menu
  3610. ═══════════════
  3611. Watch points may be "set", "cleared", "activated" or "deactivated" when
  3612. "Watch!" is chosen.  Two windows are displayed, one containing a set of
  3613. instructions and one containing a list of the watch points currently set.
  3614. You may press one of the keys "S", "C", "A" or "D" to select the desired
  3615. action.  The cursor up and down keys may be used to highlight individual
  3616. watch points.
  3617.  
  3618. A mouse can be used on the list by the ordinary actions, clicking or
  3619. dragging to select a watch point.  Clicking on the instruction box areas
  3620. acts as if the appropriate key has been pressed.  For example, clicking on
  3621. the quadrant that contains "s = set" acts as if the "S" key had been
  3622. pressed.  See the description of the Watch command for more information.
  3623.  
  3624.  
  3625. The Trace! Menu
  3626. ═══════════════
  3627. Selecting the "Trace!" menu causes a Trace command (with default arguments)
  3628. to be executed.  Trace prompts appear in the prompt window.  Once the trace
  3629. prompts are present, you can leave the mouse cursor pointing at the "Trace!"
  3630. menu item and select "trace/over" by pressing the left mouse button, and
  3631. "trace/into" by pressing the right mouse button.
  3632.  
  3633. If you have a mouse, you can click on the "hot-spots" in this window instead
  3634. of pressing a key.  For example, clicking on the "<i>" hot-spot is
  3635. equivalent to pressing the "I" key when selecting the "into" option of
  3636. trace.    See the description of the Trace command for more information.
  3637.  
  3638.  
  3639. The Go! Menu
  3640. ════════════
  3641. Selecting the "Go!" menu causes a Go command to be executed.  Program
  3642. execution is resumed at the current CS:IP (16-bit mode) or CS:EIP (32-bit
  3643. mode) location.  See the description of the Go command for more information.
  3644. ::::MODIFY
  3645. ┌──────────────────────────────────────────────────────────────────────────┐
  3646. │ Modify                                   │
  3647. │     [/Byte]     [addr_expr] [ "," expr_list ]                   │
  3648. │     /Word     [addr_expr] [ "," expr_list ]                   │
  3649. │     /Dword     [addr_expr] [ "," expr_list ]                   │
  3650. │     /Pointer     [addr_expr] [ "," expr_list ]                   │
  3651. │     /IOByte     [port_expr] [ "," expr_list ]                   │
  3652. │     /IOWord     [port_expr] [ "," expr_list ]                   │
  3653. │     /IODword     [port_expr] [ "," expr_list ]                   │
  3654. └──────────────────────────────────────────────────────────────────────────┘
  3655.  
  3656. The Modify command is used to modify the contents of memory in one of
  3657. several different ways.
  3658.  
  3659. /Byte [addr_expr] [ "," expr_list ] The starting address addr_expr
  3660.        identifies the beginning of a sequence of 8-bit values (bytes).
  3661.        Each value that you specify is stored modulo 256 (0x100).
  3662.  
  3663. /Word [addr_expr] [ "," expr_list ] The starting address addr_expr
  3664.        identifies the beginning of a sequence of 16-bit values (words).
  3665.        Each value that you specify is stored modulo 65,536 (0x10000).
  3666.  
  3667. /Dword [addr_expr] [ "," expr_list ] The starting address addr_expr
  3668.        identifies the beginning of a sequence of 32-bit values
  3669.        (doublewords).  Each value that you specify is stored modulo
  3670.        4,294,967,296 (0x100000000).
  3671.  
  3672. /Pointer [addr_expr] [ "," expr_list ] The starting address addr_expr
  3673.        identifies the beginning of a sequence of segment/offset pairs
  3674.        (segment:offset).  In 16-bit mode, each value in the pair that
  3675.        you specify is stored modulo 65536 (0x10000).  In 32-bit mode,
  3676.        each value in the pair that you specify is stored modulo
  3677.        4,294,967,296 (0x100000000).  If you do not specify the segment
  3678.        value, the current contents of the DS register is used.
  3679.  
  3680. /IOByte [port_expr] [ "," expr_list ] The starting port address port_expr
  3681.        identifies the beginning of a sequence of 8-bit ports (bytes).
  3682.        Each value that you specify is written to the port modulo 256
  3683.        (0x100).
  3684.  
  3685. /IOWord [port_expr] [ "," expr_list ] The starting port address addr_expr
  3686.        identifies the beginning of a sequence of 16-bit ports (words).
  3687.        Each value that you specify is written to the port modulo 65,536
  3688.        (0x10000).
  3689.  
  3690. /IODword [port_expr] [ "," expr_list ] The IODword qualifier is supported on
  3691.        386 systems or higher.  The starting port address addr_expr
  3692.        identifies the beginning of a sequence of 32-bit ports
  3693.        (doublewords).  Each value that you specify is written to the
  3694.        port modulo 4,294,967,296 (0x100000000).
  3695.  
  3696. If you do not specify a qualifier, the default is /Byte.  If you do not
  3697. specify a list of values, VIDEO will prompt for values until an empty line
  3698. is entered.  If you do not want to modify a location but want VIDEO to
  3699. continue prompting, you can enter a slash ("/") to indicate that the current
  3700. value is to be retained.  When specifying a list of values, a location can
  3701. be skipped by omitting the value (i.e., a consecutive pair of commas is
  3702. entered).
  3703.  
  3704. Example:
  3705.   DBG>modify 0x200,1,2,3
  3706.   DBG>modify/byte 0x200,1,2,3
  3707.  
  3708. In the above equivalent examples, memory locations DS:200, DS:201 and DS:202
  3709. are modified with the values 1, 2 and 3.
  3710.  
  3711. Example:
  3712.   DBG>modify 0x200,1,,3
  3713.  
  3714. In the above example, memory locations DS:200 and DS:202 are modified with
  3715. the values 1 and 3.
  3716.  
  3717. Example:
  3718.   DBG>modify/word 304
  3719.   2335:0304= 0001 :- 0x100
  3720.   2335:0306= 1323 :- 0x101
  3721.   2335:0308= 8730 :- 0x102
  3722.   2335:030A= 0020 :-
  3723.  
  3724. In the above example, VIDEO prompts for new word values to replace memory
  3725. locations DS:304, DS:306, DS:308 and DS:30A.  Memory location DS:30A is left
  3726. unmodified by simply pressing the Enter key in response to the prompt.
  3727.  
  3728. Example:
  3729.   DBG>modify/word 0x304
  3730.   2335:0304= 0001 :- 0x100
  3731.   2335:0306= 1323 :- /
  3732.   2335:0308= 8730 :- 0x102
  3733.   2335:030A= 0020 :-
  3734.  
  3735. In the above example, VIDEO prompts for new word values to replace memory
  3736. locations DS:304, DS:306, DS:308 and DS:30A.  Memory location DS:306 is left
  3737. unmodified by simply entering a "/" in response to the prompt.
  3738.  
  3739. Example:
  3740.   DBG>modify/pointer _jmptable
  3741.   _jmptable= 2223:0602 :- &test1
  3742.   _jmptable+04 = 2223:06BE :- &test2
  3743.   _jmptable+08 = 2223:0743 :- &test3
  3744.   _jmptable+0A = 2223:07B7 :- &test4
  3745.   _CMAIN_ = 5756:5153 :-
  3746.  
  3747. In the above 16-bit example, VIDEO prompts for new segment:offset values to
  3748. replace consecutive memory locations identified by the label _jmptable.  The
  3749. values supplied are the addresses of four different routines (the & operator
  3750. yields the segment/offset values for the specified location).  The memory
  3751. location identified as _CMAIN_ is left unmodified by simply pressing the
  3752. Enter key in response to the prompt.
  3753.  
  3754. Example:
  3755.   DBG>modify/iobyte 0x3F9,0x0D,0x01,0x03,0x0B
  3756.  
  3757. In the above example, ports 3F9, 3FA, 3FB and 3FC are modified with the
  3758. hexadecimal values 0D, 01, 03 and 0B.
  3759.  
  3760. Example:
  3761.   DBG>modify/ioword 0x2f8
  3762.   02F8= 000D :- 0x000E
  3763.   02FA= 0301 :- 0x0302
  3764.   02FC= 630B :- 0x630A
  3765.   02FE= 0000 :-
  3766.  
  3767. In the above example, VIDEO prompts for new word values to store in ports
  3768. 2F8, 2FA, 2FC, and 2FE.  Port 2FE is left unmodified by simply pressing the
  3769. Enter key in response to the prompt.
  3770. ::::NEW
  3771. ┌──────────────────────────────────────────────────────────────────────────┐
  3772. │ NEW                                       │
  3773. │     [/Restart]      [prog_parms]                       │
  3774. │     /Program         [:sym_file] program_name [prog_parms]           │
  3775. │     /STDIn          [file_name]                       │
  3776. │     /STDOut         [file_name]                       │
  3777. │     /SYmbol         sym_file [expr_list]                   │
  3778. └──────────────────────────────────────────────────────────────────────────┘
  3779.  
  3780. The NEW command is used to initialize various items.
  3781.  
  3782. /Restart [prog_parms] This qualifier is used to reload the current
  3783.        application and place it into an initial state where execution
  3784.        may be started over again.  The application may have undergone
  3785.        partial or complete execution.  If desired, a new command line
  3786.        may be specified for the application.
  3787.  
  3788.          prog_parms ::= prog_cmd_line | "{"prog_cmd_line"}"
  3789.  
  3790.        You must use "{" and "}" when you have a ";" in the command line
  3791.        since VIDEO uses the semicolon as a command separator.
  3792.  
  3793.        Example:
  3794.          DBG>new {Today is Tuesday}
  3795.  
  3796.        The /Restart qualifier is implied when no other qualifier is
  3797.        specified.
  3798.  
  3799.        Under QNX, a path specification that begins with a "/" could be
  3800.        interpreted as a qualifier.
  3801.  
  3802.        Example:
  3803.          DBG>new /users/fred/test.dat
  3804.  
  3805.        In the above example, the "/users" qualifier is not supported and
  3806.        an error will result.  To resolve this conflict, the /Restart
  3807.        qualifier must be used.
  3808.  
  3809.        Example:
  3810.          DBG>new/restart /users/fred/test.dat
  3811.  
  3812. /Program [:sym_file] program_name [prog_parms] This qualifier is used to
  3813.        load a new application and place it into an initial state where
  3814.        execution may be started.
  3815.  
  3816.        If the symbolic debugging information for the program has been
  3817.        placed in a separate file, this file can be specified.  The
  3818.        specification must be preceded by a colon (":").  The default
  3819.        file extension or suffix of the symbol file is ".sym".  The
  3820.        symbolic information file can be produced by the WATCOM Linker or
  3821.        by the WATCOM Strip Utility.
  3822.  
  3823.        If desired, a command line may be specified for the new
  3824.        application.
  3825.  
  3826.          prog_parms ::= prog_cmd_line | "{"prog_cmd_line"}"
  3827.  
  3828.        You must use "{" and "}" when you have a ";" in the command line
  3829.        since VIDEO uses the ";" as a command separator.
  3830.  
  3831.        Example:
  3832.          DBG>new/prog echo {Today is Tuesday}
  3833.  
  3834.        Any break or watch points which may have been active are
  3835.        deactivated.
  3836.  
  3837.        The specification program_name has the same format as the VIDEO
  3838.        command line.  For DOS, OS/2, NetWare 386, Windows 3.x and
  3839.        Windows NT systems, the format is:
  3840.  
  3841.          [d:][path]filename[.ext]
  3842.  
  3843.        For QNX, the format is:
  3844.  
  3845.          [//nid] pid
  3846.         or
  3847.          [//nid] [//node][path]filename
  3848.  
  3849.        The semantics for locating and loading a program are identical to
  3850.        that described under the topics dealing with the use of VIDEO
  3851.        under a particular operating system.
  3852.  
  3853. /STDIn [file_spec] This qualifier can be used to associate the standard
  3854.        input file handle with a particular file or device.    This is
  3855.        similar to specifying <file_spec on the command line.  When
  3856.        file_spec is omitted, the standard input file handle is restored
  3857.        to its original state.
  3858.  
  3859.        Note that the following command does not produce the effect that
  3860.        might be anticipated.
  3861.  
  3862.        Example:
  3863.          DBG>new/prog testit <input.fil
  3864.  
  3865.        Instead, the string "<input.fil" will be passed as a parameter to
  3866.        the program.  To accomplish the desired effect, the following two
  3867.        commands must be issued.
  3868.  
  3869.        Example:
  3870.          DBG>new/prog testit
  3871.          DBG>new/stdin input.fil
  3872.  
  3873. /STDOut [file_spec] This qualifier can be used to associate the standard
  3874.        output file handle with a particular file or device.  This is
  3875.        similar to specifying >file_spec on the command line.  When
  3876.        file_spec is omitted, the standard output file handle is restored
  3877.        to its original state.
  3878.  
  3879.        Note that the following command does not produce the effect that
  3880.        might be anticipated.
  3881.  
  3882.        Example:
  3883.          DBG>new/prog hello >output.log
  3884.  
  3885.        Instead, the string ">output.log" will be passed as a parameter
  3886.        to the program.  To accomplish the desired effect, the following
  3887.        two commands must be issued.
  3888.  
  3889.        Example:
  3890.          DBG>new/prog hello
  3891.          DBG>new/stdout output.log
  3892.  
  3893. /SYmbol sym_file [expr_list] This qualifier is used to load additional
  3894.        symbolic debugging information and specify the mapping between
  3895.        the linker addresses and the actual execution addresses.  This
  3896.        feature is useful when debugging Terminate-and-Stay-Resident
  3897.        (TSR) programs under DOS, when debugging FoxPro External
  3898.        Routines, when debugging AutoCAD ADS/ADI programs, or other
  3899.        similar situations.
  3900.  
  3901.        The default file extension or suffix of the symbol file is
  3902.        ".sym".  The symbolic information file can be produced by the
  3903.        WATCOM Linker or by the WATCOM Strip Utility.
  3904.  
  3905.        The specification sym_file is system dependent.  For DOS, OS/2,
  3906.        NetWare 386, Windows 3.x and Windows NT systems, the format is:
  3907.  
  3908.          [d:][path]filename[.ext]
  3909.  
  3910.        For QNX, the format is:
  3911.  
  3912.          [//node][path]filename
  3913.  
  3914.        The optional expression list expr_list varies according to the
  3915.        type of application that you are debugging.    For 16-bit,
  3916.        real-mode applications (e.g., DOS):
  3917.  
  3918.          new/symbol sym_file seg1
  3919.  
  3920.        seg1 is the base address (segment:offset) of the program.
  3921.  
  3922.        For 32-bit, protect-mode "flat model" applications (e.g., DOS
  3923.        extenders, 32-bit Windows, 32-bit OS/2):
  3924.  
  3925.          new/symbol sym_file seg1, seg2
  3926.  
  3927.        seg1 is the loaded code segment:offset of the program.  seg2 is
  3928.        the data/extra/stack segment alias for the loaded code segment
  3929.        (in the "flat" model, segments CS, DS, ES, SS all map to the same
  3930.        linear address but will have different selector values).
  3931.  
  3932.        For 16- or 32-bit, protect-mode segmented applications (e.g.,
  3933.        16-bit Windows, 16-bit OS/2, QNX):
  3934.  
  3935.          new/symbol sym_file seg1, seg2, seg3, ...
  3936.  
  3937.        segN is the loaded segment:offset value for the N'th segment of
  3938.        the program.
  3939.  
  3940.        If segN is a simple integer (e.g., 5), it is assumed to represent
  3941.        a segment value and the offset portion is assumed to be 0.  If
  3942.        seg:off is specified (e.g., 5:100) then "seg" is the loaded
  3943.        segment value and "off" is added to all symbol address offsets.
  3944.  
  3945.        If you do not specify all the required loaded segment values then
  3946.        the debugger will begin prompting for the missing values.
  3947.  
  3948.        For examples of the NEW /SYmbol command, see the VIDEO command
  3949.        file ADS.DBG or FOX.DBG.
  3950.  
  3951.        When debugging DOS applications locally, it may be necessary to
  3952.        specify the VIDEO "Dynamic" option when starting up the debugger.
  3953.        For example, you may get the message "no memory for symbolic
  3954.        information".  This indicates that the option must be specified.
  3955. ::::NOTATION
  3956. The following notation is used to describe the syntax of VIDEO commands.
  3957.  
  3958. Abc       The short form for the item abc is a.  For example, if the item
  3959.        is "COMPute", the valid forms are "comp", "compu", "comput" and
  3960.        "compute".
  3961.  
  3962. [abc]       The item abc is optional.
  3963.  
  3964. {abc}       The item abc may be repeated zero or more times.
  3965.  
  3966. "abc"       The characters abc are required.
  3967.  
  3968. a|b|c       One of a, b or c may be specified.
  3969.  
  3970. a ::= b    The item a is defined in terms of b.
  3971.  
  3972. To test your understanding of the above notation, consider the following
  3973. example.
  3974.  
  3975.   dec_digit ::= "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"
  3976.  
  3977. In the above example, a decimal digit (dec_digit) is defined as one of the
  3978. characters "0" through "9" (a "0" or a "1" or a "2", etc.).  We could then
  3979. define a decimal number to be
  3980.  
  3981.   decimal_number ::= dec_digit {dec_digit}
  3982.  
  3983. This is read as "a decimal number is defined to be a decimal digit followed
  3984. by zero or more decimal digits".  Clearly, "12345" conforms to our rule
  3985. whereas "12ABC" and "Hello" do not.
  3986.  
  3987. We also use several abbreviated terms in the description of VIDEO commands.
  3988.  
  3989. Short Form Explanation
  3990.  
  3991. addr       "address"
  3992. arg       "argument"
  3993. brk       "break", "break point"
  3994. char       "character"
  3995. cmd       "command"
  3996. expr       "expression"
  3997. num       "number"
  3998. parm       "parameter"
  3999. prog       "program"
  4000. reg       "register"
  4001. spec       "specifier"
  4002. tmp       "temporary"
  4003.  
  4004. We also concatenate these abbreviations by using the underscore to define
  4005. new abbreviations.
  4006.  
  4007. Examples:
  4008.  
  4009. addr_expr  "address expression"
  4010.  
  4011. cmd_spec   "command specifier"
  4012.  
  4013. Several commands may be entered on one line by separating them with
  4014. semicolons.
  4015.  
  4016. Example:
  4017.   DBG>do myvar=var*2;print myvar
  4018.  
  4019. In the above example, the first command sets the variable myvar to twice the
  4020. value of var and the second command prints this new value.
  4021.  
  4022. Using our notation, we define a command line as follows:
  4023.  
  4024.   cmd_line ::= [cmd] { ";" [cmd] }
  4025.  
  4026. While such definitions may be quite precise, they often tend to be somewhat
  4027. more obscure.  If we analyze the definition carefully, we will discover that
  4028. an empty line qualifies as a command.  In the following sections, we will
  4029. first present the concise command syntax.  This is followed by an
  4030. explanation of both the syntax and semantics of the command.  A number of
  4031. examples are also presented so that you may get a "feel" for the command's
  4032. syntax.
  4033. ::::OS2_INTERRUPTING_A_PROGRAM
  4034. Once a program has been loaded by VIDEO, its execution can be started by the
  4035. Go command (this command is described under the topic entitled "GO").
  4036.  
  4037. Example:
  4038.   [C:\]wvideo myapp
  4039.    .
  4040.    .
  4041.    .
  4042.   DBG>go
  4043.  
  4044. As is sometimes the case during the development phase, a program may execute
  4045. endlessly.
  4046.  
  4047. Under OS/2, execution of an application may be interrupted by pressing the
  4048. Ctrl/Break key combination in the VIDEO session.
  4049.  
  4050. VIDEO will print a message in the "Dialogue" window indicating that the
  4051. program's execution has been interrupted.  Execution can be resumed with the
  4052. Go command.
  4053.  
  4054. Also, execution of VIDEO commands may be interrupted by pressing the
  4055. Ctrl/Break key combination in the VIDEO session.
  4056.  
  4057. For information on how to interrupt executing programs when using the remote
  4058. debugging facility, see the topic entitled "REMOTE_DEBUGGING".
  4059. ::::OS2_REMOTE_DEBUGGING
  4060. ┌──────────────────────────────────────────────────────────────────────────┐
  4061. │ WVIDEO /TRap=trap_file[;trap_parm] [:sym_file] file_spec [cmd_line]       │
  4062. └──────────────────────────────────────────────────────────────────────────┘
  4063.  
  4064. The VIDEO TRap option must be specified when debugging an application
  4065. using a second computer system or when using the Virtual DOS Machine (VDM)
  4066. debug server.  The format of file_spec depends on the target machine's
  4067. operating system, be it DOS, OS/2, NetWare 386, or QNX.  Under QNX, file
  4068. paths contain slashes ("/") as directory separators.  This brings up an
  4069. interesting problem when the debug machine is running OS/2.  Option
  4070. specifiers can start with slashes also.  When the task machine is running
  4071. QNX and you wish to specify a file path, you must use a pair of slashes to
  4072. stop VIDEO from continuing its option scan.
  4073.  
  4074. Example:
  4075.   [C:\]wvideo /trap=par /reg=4 // /users/fred/fdapp
  4076.  
  4077. When trap_parm is specified and it contains blank characters, the entire
  4078. parameter must be placed within braces ({}).
  4079.  
  4080. You must specify the name of the "trap" file that corresponds to the Debug
  4081. Server that was started on the first computer system (the "task machine").
  4082. These files handle the machine-to-machine communication required for remote
  4083. debugging of an application.  Servers are described under the topics entitled
  4084. "REMOTE_DEBUGGING" and "REMOTE_WIN3".
  4085.  
  4086. For OS/2, the file extension defaults to ".DLL".  The OS/2 LIBPATH directive
  4087. in the "CONFIG.SYS" file must be used to identify the location of the "DLL"
  4088. trap files.  Trap files are usually located in the "BINP\DLL" sub-directory
  4089. of the directory that VIDEO is installed in.
  4090.  
  4091. STD16.DLL  Under OS/2 version 1.x, if you do not specify a trap file, the
  4092.        default trap file "STD16.DLL" will be loaded.  These interface
  4093.        modules support debugging on the local computer system running
  4094.        OS/2 1.x.  No remote debugging is possible.
  4095.  
  4096.        Under OS/2 version 1.x, if you do specify the trap file name
  4097.        "STD" then "STD16.DLL" is selected.
  4098.  
  4099. STD32.DLL  Under OS/2 version 2.x, if you do not specify a trap file, the
  4100.        default trap file "STD32.DLL" will be loaded.  These interface
  4101.        modules support debugging on the local computer system running
  4102.        OS/2 2.x.  No remote debugging is possible.
  4103.  
  4104.        Under OS/2 version 2.x, if you do specify the trap file name
  4105.        "STD" then "STD32.DLL" is selected.
  4106.  
  4107. SER.DLL    This communications driver file supports debugging of an
  4108.        application running on another computer system using the serial
  4109.        ports of the two machines.  It communicates with the "SERSERV"
  4110.        Debug Server.  The serial port of the debugger machine is
  4111.        connected to the serial port of the task machine.  The
  4112.        "trap_parm" value specifies the port number to use and an
  4113.        optional maximum BAUD rate (which is separated from the port
  4114.        number by a period).  The port number is 1, 2, 3 or 4 (default is
  4115.        1).    These numbers correspond to the device number used when
  4116.        specifying the serial device "COMx" (as in "COM1", "COM2", etc.).
  4117.  
  4118.        Under OS/2, the maximum BAUD rate can be one of:
  4119.  
  4120.           19200
  4121.            9600
  4122.            4800
  4123.            2400
  4124.            1200
  4125.           0 (a special case)
  4126.  
  4127.        The default maximum BAUD rate is 19,200.
  4128.  
  4129.        Except for the special BAUD rate of 0, a minimum of two digits
  4130.        must be specified to identify the desired maximum BAUD rate.  The
  4131.        maximum BAUD rate is explained in the section "Remote Debugging
  4132.        Over the Serial Port" under the topic entitled "REMOTE_DEBUGGING".
  4133.        In the following example, port 2 and a maximum BAUD rate of
  4134.        19,200 is specified.
  4135.  
  4136.        Example:
  4137.          /trap=ser;2.19
  4138.  
  4139. PAR.DLL    This communications driver file supports debugging of an
  4140.        application running on another computer system using the parallel
  4141.        ports of the two machines.  It communicates with one of the
  4142.        "PARSERV" or "PARSERVW" (Microsoft Windows) Debug Servers.  The
  4143.        parallel port of the debugger machine is connected to the
  4144.        parallel port of the task machine.  The port number to use is
  4145.        specified by "trap_parm".  The port number is 1, 2 or 3 (default
  4146.        is 1).  These numbers correspond to the device number used when
  4147.        specifying the printer device "LPTx" (as in "LPT1", "LPT2",
  4148.        etc.).
  4149.  
  4150. NOV.DLL    This communications driver file supports debugging of an
  4151.        application running on another computer system that is connected
  4152.        to the Novell "NetWare" network (NetWare and Novell are
  4153.        trademarks of Novell, Inc.).  It communicates with the "NOVSERV"
  4154.        Debug Server.  Version 2.0 or later of NetWare must be used.
  4155.        Version 1.3 or later of the NetWare requestor is also required
  4156.        and, in turn, this requires OS/2 version 1.2 or later.
  4157.  
  4158.        The server name to use is specified by "trap_parm".    The server
  4159.        name must match the name that you specified when starting the
  4160.        server on the "task" machine.
  4161.  
  4162. NET.DLL    This communications driver file supports debugging of an
  4163.        application running on another computer system using the NetBIOS
  4164.        network programming interface.  It communicates with one of the
  4165.        "NETSERV" or "NETSERVW" (Microsoft Windows) Debug Servers.  The
  4166.        server name to use is specified by "trap_parm".  The server name
  4167.        must match the name that you specified when starting the server
  4168.        on the "task" machine.  The server name may consist of up to 15
  4169.        alphanumeric characters.
  4170.  
  4171. VDM.DLL    This communications driver file supports debugging of an
  4172.        application running in an OS/2 DOS box or a WIN-OS/2 session.
  4173.        It communicates with one of the "VDMSERV" (OS/2 DOS box) or
  4174.        "VDMSERVW" (WIN-OS/2) Debug Servers.  The server name to use is
  4175.        specified by "trap_parm".  The server name must match the name
  4176.        that you specified when starting the server on the "task"
  4177.        machine.  The server name may consist of up to 15 alphanumeric
  4178.        characters.
  4179. ::::OS2_STARTUP
  4180. ┌──────────────────────────────────────────────────────────────────────────┐
  4181. │ WVIDEO [options] [:sym_file] file_spec [cmd_line]               │
  4182. └──────────────────────────────────────────────────────────────────────────┘
  4183.  
  4184. The square brackets [ ] denote items which are optional.
  4185.  
  4186. WVIDEO       is the program name for VIDEO.
  4187.  
  4188. options    is a list of valid VIDEO options, each preceded by a dash ("-")
  4189.        or a slash ("/").  Options may be specified in any order.
  4190.  
  4191. sym_file   is an optional symbolic debugging information file specification.
  4192.        The specification must be preceded by a colon (":").  For OS/2,
  4193.        the syntax of sym_file is:
  4194.  
  4195.        [d:][path]filename[.ext]
  4196.  
  4197.        The default file extension of the symbol file is ".SYM".
  4198.  
  4199.        The symbolic information file can be produced by the WATCOM
  4200.        Linker WLINK or by the WATCOM Strip Utility WSTRIP.
  4201.  
  4202. file_spec  is the file name of the file to be loaded into memory.  For OS/2,
  4203.        the syntax of file_spec is:
  4204.  
  4205.        [d:][path]filename[.ext]
  4206.  
  4207.        d:          is an optional drive specification such as "A:", "B:",
  4208.               etc.  If not specified, the default drive is assumed.
  4209.  
  4210.        path       is an optional path specification such as
  4211.               "\UTILS\BIN\".
  4212.  
  4213.        filename   is the file name of the file to be loaded into memory.
  4214.  
  4215.        ext          is the file extension of the file to be loaded into
  4216.               memory.  A null file extension may be specified by
  4217.               typing the period "." but not the extension.  If no
  4218.               file extension is specified (i.e., both the period and
  4219.               extension are omitted), the default is ".EXE".
  4220.  
  4221. cmd_line   is an optional command line which will be passed on to the
  4222.        application.
  4223.  
  4224. If both drive and path are omitted, VIDEO will first attempt to locate the
  4225. file in the current directory of the default drive.  If this fails, VIDEO
  4226. will search for the file in each path listed in the PATH environment string.
  4227.  
  4228.  
  4229. Command Line Options
  4230. ════════════════════
  4231. ┌──────────────────────────────────────────────────────────────────────────┐
  4232. │     /Dynamic=space                               │
  4233. │     /Invoke=file_spec                            │
  4234. │     /Lines=number                               │
  4235. │     /NOAltsym                                │
  4236. │     /NOFpu                                   │
  4237. │     /NOInvoke                                │
  4238. │     /NOMouse                                   │
  4239. │     /NOSymbols                               │
  4240. │     /Registers=number                            │
  4241. │     /REMotefiles                               │
  4242. │     /TRap=trap_file[;trap_parm]                       │
  4243. └──────────────────────────────────────────────────────────────────────────┘
  4244.  
  4245. Options may be specified in any order.    Short forms may be specified for
  4246. options and are shown above in capital letters.  If "space" is suffixed with
  4247. the letter "K" then "space" refers to multiples of 1K bytes (1024 bytes).
  4248. If "space" is suffixed with the letter "B" then "space" refers to the number
  4249. of bytes.  If no suffix is specified and "space" is a number less than 1000
  4250. then "space" is assumed to refer to multiples of 1K bytes (1024 bytes);
  4251. otherwise it refers to the number of bytes.
  4252.  
  4253. /Dynamic=space specifies the initial amount of dynamic storage that VIDEO is
  4254.        to reserve for items such as windows, user-defined symbols, etc.
  4255.        The default amount that is set aside is 40960 bytes (40K bytes).
  4256.        As additional storage is required, VIDEO will allocate it.
  4257.  
  4258. /Invoke=file_spec may be used to specify an alternate name for the debugger
  4259.        command file which is to be automatically invoked at start-up
  4260.        time.  The default file name is "PROFILE.DBG".  VIDEO command
  4261.        files are found in the current directory or one of the
  4262.        directories listed in the OS/2 PATH environment string.
  4263.  
  4264. /Lines=number may be used to specify the number of display lines that VIDEO
  4265.        is to use.  If this option is not specified, the default number
  4266.        of output lines is selected.  When an Enhanced Graphics Adapter
  4267.        (EGA) is present, 43 lines of output may be requested.  When an
  4268.        Video Graphics Array (VGA) is present, 28 or 50 lines of output
  4269.        may be requested.
  4270.  
  4271. /NOAltsym  disables debugger support for alternate symbolic information
  4272.        formats such as support for a susbset of CV4 (CodeView) and
  4273.        processing of export tables from NE (OS/2 1.x, Windows 3.x) and
  4274.        PE (Windows NT) executables.  This option reduces the time
  4275.        required by the debugger to load and process executables at
  4276.        startup.
  4277.  
  4278. /NOFpu       requests that the debugger ignore the presence of a math
  4279.        coprocessor.  No memory will be allocated by the debugger for
  4280.        saving the context of the 80x87 numeric data processor.  Use this
  4281.        option if your application will not use the math coprocessor and
  4282.        you wish to reduce the amount of memory required by the debugger.
  4283.  
  4284. /NOInvoke  specifies that the default debugger command file is not to be
  4285.        invoked.
  4286.  
  4287. /NOMouse   requests that the debugger ignore any attached mouse.
  4288.  
  4289. /NOSymbols requests that VIDEO omit all debugging information when loading
  4290.        an executable image.  Information regarding global and local
  4291.        symbol names, data types, and line numbers is not processed.
  4292.  
  4293. /Registers=number may be used to specify how many register sets to set aside
  4294.        for the recording of register contents.  The default number of
  4295.        register sets is 2.    See the description of the Register command
  4296.        for more information (this command is described under the topic
  4297.        entitled "REGISTER").
  4298.  
  4299. /REMotefiles may be used in conjunction with the remote debugging
  4300.        capabilities of the debugger.  Remote debugging involves using
  4301.        two personal computers.  One, called the "task machine", is used
  4302.        to run the application; the other, called the "debugger machine",
  4303.        is used to run the debugger.  When REMotefiles is specified, all
  4304.        debugger files (except "trap" files) and application source files
  4305.        are opened on the task machine rather than the debugger machine
  4306.        (if you are doing local debugging, these two machines are
  4307.        actually the same).    The "trap" file must be located on the
  4308.        debugger machine because it contains the code to open files on
  4309.        the task machine.
  4310.  
  4311.        Note that the PATH environment variable on the task machine is
  4312.        always used in locating executable image files.  When REMotefiles
  4313.        is specified, the debugger also uses the task machine's PATH
  4314.        environment variable to locate debugger command files.
  4315.  
  4316. /TRap=trap_file[;trap_parm] must be specified when debugging an application
  4317.        on a remote machine.  You must specify the name of one of the
  4318.        "trap" files provided with VIDEO.  Under OS/2, the file extension
  4319.        defaults to ".DLL".    The "BINP\DLL" directory contains the
  4320.        dynamic link libraries (DLL) provided with VIDEO.  The OS/2
  4321.        LIBPATH directive in the "CONFIG.SYS" file must be used to
  4322.        identify the location of the "DLL" trap files.
  4323.  
  4324.        If you do not specify the TRap option then VIDEO assumes that the
  4325.        application is to be run on the same computer system and it uses
  4326.        one of the default trap files described next.
  4327.  
  4328.        Example:
  4329.          [C:\]wvideo calendar
  4330.  
  4331.        Under OS/2 version 1.x, if you do not specify a trap file, the
  4332.        default trap file "STD16.DLL" will be loaded.  This interface
  4333.        module supports debugging on the local computer system running
  4334.        OS/2 1.x.
  4335.  
  4336.        Under OS/2 version 2.x, if you do not specify a trap file, the
  4337.        default trap file "STD32.DLL" will be loaded.  This interface
  4338.        module supports debugging on the local computer system running
  4339.        OS/2 2.x.
  4340.  
  4341.        If you do specify the trap file name "STD" then "STD16.DLL" is
  4342.        selected for OS/2 version 1.x systems and "STD32.DLL" is selected
  4343.        for OS/2 version 2.x systems.
  4344.  
  4345.        Example:
  4346.          [C:\]wvideo /trap=std calendar
  4347.  
  4348.        Of course, you may also explicitly name the "standard" trap file
  4349.        that you wish VIDEO to use.
  4350.  
  4351.        Example:
  4352.          [C:\]wvideo /trap=std16 calendar
  4353.  
  4354.        See the topic entitled "REMOTE_DEBUGGING" for more
  4355.        information on the TRap option.
  4356. ::::OS2_WVIDEO_ENVIRONMENT_VARIABLE
  4357. The WVIDEO environment variable can be used to specify commonly used VIDEO
  4358. options.  If the specification of an option involves the use of an "="
  4359. character then the "#" character may be used in its place (this is required
  4360. by the syntax of the "SET" command).  These options are processed before
  4361. options specified on the command line.
  4362.  
  4363. Example:
  4364.   [C:\]set wvideo=/lines#50/reg#4
  4365.  
  4366. The above examples illustrate how to define default options for the
  4367. debugger.
  4368.  
  4369. Once the WVIDEO environment variable has been defined, those options listed
  4370. become the default each time VIDEO is invoked.
  4371. ::::PAINT
  4372. ┌──────────────────────────────────────────────────────────────────────────┐
  4373. │ PAint (window_name | ["*"]) attr_name [ fg_col ["," bg_col] ]        │
  4374. └──────────────────────────────────────────────────────────────────────────┘
  4375.  
  4376. The PAint command is used to define the colour composition of windows.    The
  4377. valid window names are:
  4378.  
  4379.   Assembly
  4380.   Command
  4381.   Dialogue
  4382.   Fpu
  4383.   Memory
  4384.   Prompt
  4385.   Register
  4386.   SOurce
  4387.   STack
  4388.   Thread
  4389.  
  4390. An asterisk ("*") may be used to denote all of them.  If a window name is
  4391. omitted then "*" is assumed.
  4392.  
  4393. Five different attributes of a window may be individually coloured.  The
  4394. attribute attr_name may be one of:
  4395.  
  4396.   Plain
  4397.   Active
  4398.   Standout
  4399.   Title
  4400.   Gadget
  4401.  
  4402. Foreground (fg_col) and background (bg_col) colours may be selected from the
  4403. following:
  4404.  
  4405.   BLAck
  4406.   BLUe
  4407.   GREEn
  4408.   Cyan
  4409.   Red
  4410.   Magenta
  4411.   BROwn
  4412.   White
  4413.  
  4414. In addition, the following foreground colour variations may be selected:
  4415.  
  4416.   BRIght BLAck
  4417.   BRIght BLUe
  4418.   BRIght GREEn
  4419.   BRIght Cyan
  4420.   BRIght Red
  4421.   BRIght Magenta
  4422.   BRIght BROwn
  4423.   BRIght White
  4424.   GRAy
  4425.   GREY
  4426.   Yellow
  4427.  
  4428. "GRAy" and "GREY" are synonyms for "BRIght BLAck".  "Yellow" is a synonym
  4429. for "BRIght BROwn".  The "BLINking" keyword may be also precede a foreground
  4430. colour to specify that the item should also blink when it is displayed.
  4431. Please note that colour attributes on the IBM Monochrome Display and Printer
  4432. Adapter will behave as described in the following table.
  4433.  
  4434. Colour       Monochrome
  4435.  
  4436. black       (invisible)
  4437. blue       underlined white
  4438. green       white
  4439. cyan       white
  4440. red       white
  4441. magenta    white
  4442. brown       white
  4443. white       white
  4444. bright black (invisible)
  4445. bright blue bright white
  4446. bright green white
  4447. bright cyan white
  4448. bright red white
  4449. bright magenta white
  4450. bright brown white
  4451. bright white white
  4452.  
  4453. When specifying colour attributes for a window item, the foreground colour
  4454. is specified first and the background colour last.  If one of the foreground
  4455. or background colours is omitted, it will remain unchanged.  Note that the
  4456. background colour specification is always preceded by a comma.
  4457.  
  4458. Attributes: Description:
  4459.  
  4460. Plain       Each window displays "plain" text.  This text usually forms the
  4461.        greater part of a window.
  4462.  
  4463.        Example:
  4464.          DBG>paint * plain white,blue
  4465.  
  4466.        In the above example, the plain text of all windows is set to
  4467.        white characters on a blue background.
  4468.  
  4469.        Example:
  4470.          DBG>paint assembly plain bright green,red
  4471.  
  4472.        In the above example, the plain text of the Assembly window only
  4473.        is set to bright green characters on a red background.
  4474.  
  4475. Active       Some items in a window may be highlighted in the "active" colour
  4476.        combination.  For example, the source line or assembler
  4477.        instruction that is about to be executed is displayed in the
  4478.        "active" colour attributes.
  4479.  
  4480.        Example:
  4481.          DBG>paint * active bright white,blue
  4482.  
  4483.        In the above example, the "active" text of all windows is set to
  4484.        bright white characters on a blue background.
  4485.  
  4486.        Example:
  4487.          DBG>paint source active cyan,brown
  4488.  
  4489.        In the above example, the "active" text of the Source window only
  4490.        is set to cyan characters on a brown background.
  4491.  
  4492. Standout   Some items in a window may be highlighted with the "standout"
  4493.        colour combination.    For example, the source line or assembler
  4494.        instruction that is displayed by using the Examine /Source
  4495.        command is displayed in the "standout" colour attributes.
  4496.  
  4497.        Example:
  4498.          DBG>paint * standout red,white
  4499.  
  4500.        In the above example, the "standout" text for all windows is set
  4501.        to red characters on a white background.
  4502.  
  4503.        Example:
  4504.          DBG>paint source standout brown,cyan
  4505.  
  4506.        In the above example, the "standout" text of the Source window
  4507.        only is set to brown characters on a cyan background.
  4508.  
  4509. Title       Each window may be titled and the colours for the title line may
  4510.        be selected.
  4511.  
  4512.        Example:
  4513.          DBG>paint * title yellow,magenta
  4514.  
  4515.        In the above example, the title lines for all windows bearing
  4516.        titles are displayed with yellow characters on a magenta
  4517.        background.
  4518.  
  4519.        Example:
  4520.          DBG>paint assembly title magenta,green
  4521.  
  4522.        In the above example, if there is a title line for the Assembly
  4523.        window then it will be displayed with magenta characters on a
  4524.        green background.
  4525.  
  4526. Gadget       Mouse window gadgets are displayed in the "gadget" colour
  4527.        combination.
  4528.  
  4529.        Example:
  4530.          DBG>paint * gadget black, cyan
  4531.  
  4532.        In the above example, the "gadget" colours for all windows is set
  4533.        to black characters on a cyan background.
  4534. ::::PRINT
  4535. ┌──────────────────────────────────────────────────────────────────────────┐
  4536. │ Print [/Program] { "{"format_spec"}" expr_list }               │
  4537. │ ?                                       │
  4538. └──────────────────────────────────────────────────────────────────────────┘
  4539.  
  4540. The Print or ?    command evaluates one or more expressions and prints the
  4541. results in the Dialogue window, or the application's standard error area
  4542. (usually the screen of the task machine) if the /Program qualifier is
  4543. specified.  The Print command is useful for examining the values of
  4544. variables and expressions.  The expressions can involve registers,
  4545. application variables and user-defined debugger variables.  The operations
  4546. possible are patterned after those available in the WATCOM C/C++ and WATCOM
  4547. FORTRAN 77 compilers.  Expressions are fully discussed in the chapter
  4548. entitled "VIDEO Expression Handling".
  4549.  
  4550. By default, integer values are printed in the current default numeric radix,
  4551. pointer values are printed in hexadecimal notation, and floating-point
  4552. values are printed in floating-point notation.    In addition, if the
  4553. expression is an enumerated type, the name of the enumeration constant
  4554. corresponding to the numeric value of the expression is printed.  If the
  4555. numeric value does not have a corresponding enumeration constant, the value
  4556. is printed in the current default numeric radix.
  4557.  
  4558. To print out the value in some other representation, a format string may
  4559. also be specified.  Formally, the format specification is defined as
  4560. follows:
  4561.  
  4562.   format_spec ::= { char | "%"specifier }
  4563.   specifier   ::= "i" | "d" | "u" | "x" | "X"
  4564.               | "o" | "p" | "c" | "s" | "%"
  4565.               | "f" | "g" | "G" | "e" | "E"
  4566.               | "r" | "a" | "l"
  4567.  
  4568. Text may be included to annotate the output.
  4569.  
  4570. Specifiers: Description:
  4571.  
  4572. "i"       The corresponding argument is printed out as a signed decimal
  4573.        integer value.
  4574.  
  4575. "d"       The corresponding argument is printed out as a signed decimal
  4576.        integer value.
  4577.  
  4578. "u"       The corresponding argument is printed out as an unsigned decimal
  4579.        integer value.
  4580.  
  4581. "x"       The corresponding argument is printed out as an unsigned
  4582.        hexadecimal integer value.  Letter digits are printed in lower
  4583.        case (a-f).
  4584.  
  4585. "X"       The corresponding argument is printed out as an unsigned
  4586.        hexadecimal integer value.  Letter digits are printed in upper
  4587.        case (A-F).
  4588.  
  4589. "o"       The corresponding argument is printed out as an unsigned octal
  4590.        integer value.
  4591.  
  4592. "p"       The corresponding argument is printed out as a pointer
  4593.        (segment:offset) value in hexadecimal notation.
  4594.  
  4595. "c"       The corresponding argument is printed out as a single character
  4596.        value.
  4597.  
  4598. "s"       The corresponding argument is printed out as a C string value.
  4599.        The argument must point to a string of characters terminated by a
  4600.        byte whose value is zero.
  4601.  
  4602. "%"       To print out a percentage symbol, the "%" must be doubled up
  4603.        (i.e.  %%).
  4604.  
  4605. "f"       The corresponding argument is printed out in floating-point
  4606.        representation.  If the floating-point value has a very large or
  4607.        small magnitude, you should use one of "g", "G", "e" or "E"
  4608.        formatting.
  4609.  
  4610. "g"       The corresponding argument is printed out in floating-point
  4611.        representation.  Numbers of very large or small magnitude are
  4612.        printed out in scientific "E" notation (e.g., 1.54352e+16).    The
  4613.        exponent letter is printed in lower case.
  4614.  
  4615. "G"       The corresponding argument is printed out in floating-point
  4616.        representation.  Numbers of very large or small magnitude are
  4617.        printed out in scientific "E" notation (e.g., 1.54352E+16).    The
  4618.        exponent letter is printed in upper case.
  4619.  
  4620. "e"       The corresponding argument is printed out in scientific "E"
  4621.        notation (e.g., 1.23456e+02).  The exponent letter is printed in
  4622.        lower case.
  4623.  
  4624. "E"       The corresponding argument is printed out in scientific "E"
  4625.        notation (e.g., 1.23456E+02).  The exponent letter is printed in
  4626.        upper case.
  4627.  
  4628. "r"       The corresponding argument is printed out in the current default
  4629.        numeric radix.
  4630.  
  4631. "a"       The corresponding argument is printed out as a symbol reference
  4632.        (symbol_name+offset) when possible; otherwise it is printed out
  4633.        as a pointer (segment:offset) value in hexadecimal notation.
  4634.  
  4635. "l"       The corresponding argument is printed out as a line number
  4636.        reference (module_name@line_number+offset) when possible;
  4637.        otherwise it is printed out as a pointer (segment:offset) value
  4638.        in hexadecimal notation.
  4639.  
  4640. Example:
  4641.   DBG>print ax
  4642.   DBG>? ax
  4643.  
  4644. The value of the AX register is displayed in hexadecimal format (assuming a
  4645. default numeric radix of 16) in the Dialogue window.
  4646.  
  4647. Example:
  4648.   DBG>? [dx ax]
  4649.  
  4650. The contents of the DX and AX registers are treated as a single 32-bit long
  4651. integer and displayed in hexadecimal format (assuming a default numeric
  4652. radix of 16).  This grouping of registers is called an aggregate.
  4653.  
  4654. Example:
  4655.   DBG>? {%i} [cx bx]
  4656.  
  4657. The aggregate formed by concatenating the CX and BX registers is treated as
  4658. a 32-bit long integer and displayed in decimal integer format.
  4659.  
  4660. Example:
  4661.   DBG>? (float) [ax bx]
  4662.  
  4663. By employing type casting, the long integer value in this register aggregate
  4664. is converted to a floating-point value and displayed in floating-point
  4665. format.
  4666.  
  4667. Example:
  4668.   DBG>? [float] [ax bx]
  4669.  
  4670. By employing the type "pun" operator, the 32-bit value in this register
  4671. aggregate is treated as a floating-point value and displayed in
  4672. floating-point format.    By default, the 32-bit quantity would have been
  4673. treated as a long integer.
  4674.  
  4675. Example:
  4676.   DBG>? [ax bx cx dx]
  4677.  
  4678. The aggregate formed from the AX, BX, CX and DX registers is treated as a
  4679. 64-bit floating-point entity and displayed in floating-point format.  By
  4680. default, 64-bit register aggregates are treated as double precision
  4681. floating-point values.
  4682.  
  4683. Example:
  4684.   DBG>print {The answer is %d (0x%x)} ans=foo/2, ans
  4685.  
  4686. The result of dividing the value of foo by 2 is displayed in the Dialogue
  4687. window in both decimal and hexadecimal format.
  4688.  
  4689. Example:
  4690.   DBG>? &main_
  4691.  
  4692. The address of main_ (segment:offset) is displayed in the Dialogue window.
  4693.  
  4694. Example:
  4695.   DBG>? {The address of "main" is %p} &main_
  4696.  
  4697. The address of main_ (segment:offset) is displayed as part of a string of
  4698. text in the Dialogue window.
  4699.  
  4700. Example:
  4701.   DBG>? ax=dx
  4702.  
  4703. The contents of the DX register are assigned to the AX register and the
  4704. result is displayed in the Dialogue window.
  4705.  
  4706. Example:
  4707.   DBG>print {%c-%c-%c-%c}3,4,5,6
  4708.  
  4709. The "heart", "diamond", "club" and "spade" characters are displayed in the
  4710. Dialogue window separated by hyphens.
  4711.  
  4712. Example:
  4713.   DBG>print {%f} flt_val1
  4714.  
  4715. The variable flt_val1 is displayed in floating-point notation.
  4716.  
  4717. Example:
  4718.   DBG>? {%i} (int) 3.1415926
  4719.  
  4720. The argument is displayed as the decimal integer value 3.
  4721.  
  4722. Example:
  4723.   DBG>? (char *) 256
  4724.  
  4725. The argument (a pointer) is displayed as a pointer value in hexadecimal
  4726. notation (e.g., "0100").  This is the default formatting for pointers.
  4727.  
  4728. Example:
  4729.   DBG>? {%r} (char *) 256
  4730.  
  4731. The argument (a pointer) is displayed in the current default radix ("0256"
  4732. if the current default radix is decimal).
  4733.  
  4734. Consider the following 16-bit example.
  4735.  
  4736. Example:
  4737.   DBG>? {%x,%x} 65536, (int) 65536
  4738.  
  4739. The first argument, the long integer 65536, is displayed as "10000".  The
  4740. second argument is converted to a short integer and is displayed as "0"
  4741. since 65536 exceeds the range of 16-bit unsigned values by 1.
  4742.  
  4743.  
  4744. Printing Array Slices
  4745. ═════════════════════
  4746. When the appropriate type information is available, VIDEO can print out the
  4747. contents of an array.  By default, the debugger will print out the contents
  4748. of the entire array.  Consider the following 3-dimensional array defined in
  4749. the C programming language.
  4750.  
  4751. Example:
  4752.   char *ProcessorType[2][4][2] =
  4753.       { { { "Intel 8086",   "Intel 8088"  },
  4754.       { "Intel 80186",  "Intel 80188" },
  4755.       { "Intel 80286",  "unknown" },
  4756.       { "Intel 80386",  "unknown" } },
  4757.  
  4758.     { { "NEC V30",        "NEC V20" },
  4759.       { "unknown",        "unknown" },
  4760.       { "unknown",        "unknown" },
  4761.       { "unknown",        "unknown" } } };
  4762.  
  4763. This array can be viewed as two layers of rectangular matrices of 4 rows by
  4764. 2 columns.  The array elements are all pointers to string values.
  4765.  
  4766. To examine the contents of the array, the following command can be issued.
  4767. The response to the command is also shown.
  4768.  
  4769. Example:
  4770.   DBG>?processortype
  4771.   {[0]={[0]={[0]=0x0024, [1]=0x002F},
  4772.     [1]={[0]=0x003A, [1]=0x0046},
  4773.     [2]={[0]=0x0052, [1]=0x005E},
  4774.     [3]={[0]=0x0066, [1]=0x005E}},
  4775.    [1]={[0]={[0]=0x0072, [1]= 0x007A},
  4776.     [1]={[0]=0x005E, [1]=0x005E},
  4777.     [2]={[0]=0x005E, [1]=0x005E},
  4778.     [3]={[0]=0x005E, [1]=0x005E}}}
  4779.  
  4780. The values shown are the addresses of the string values.
  4781.  
  4782. By using dimension specifiers, specific slices of an array can be displayed.
  4783. To see only the values of the first layer, the following command can be
  4784. issued.
  4785.  
  4786. Example:
  4787.   DBG>?processortype[0]
  4788.   {[0]={[0]=0x0024, [1]=0x002F},
  4789.    [1]={[0]=0x003A, [1]=0x0046},
  4790.    [2]={[0]=0x0052, [1]=0x005E},
  4791.    [3]={[0]=0x0066, [1]=0x005E}}
  4792.  
  4793. Note that this corresponds to the first half of the addresses displayed in
  4794. the previous example.
  4795.  
  4796. To see only the first row of the first layer, the following command can be
  4797. issued.
  4798.  
  4799. Example:
  4800.   DBG>?processortype[0][0]
  4801.   {[0]=0x0024, [1]=0x002F}
  4802.  
  4803. To see the second row of the first layer, the following command can be
  4804. issued.
  4805.  
  4806. Example:
  4807.   DBG>?processortype[0][1]
  4808.   {[0]=0x003A, [1]=0x0046}
  4809.  
  4810. To see the value of a specific entry in a matrix, all the indices can be
  4811. specified.
  4812.  
  4813. Example:
  4814.   DBG>?{%s} processortype[0][0][0]
  4815.   Intel 8086
  4816.   DBG>?{%s} processortype[0][0][1]
  4817.   Intel 8088
  4818.   DBG>?{%s} processortype[0][1][0]
  4819.   Intel 80186
  4820.  
  4821. In the above examples, we use the "%s" format specifier to display the
  4822. string values.
  4823. ::::PRINT_WINDOW
  4824. ┌──────────────────────────────────────────────────────────────────────────┐
  4825. │ Print /Window expr                               │
  4826. │ ?                                       │
  4827. └──────────────────────────────────────────────────────────────────────────┘
  4828.  
  4829. The Print /Window command may be used to display the results of a Print
  4830. command in a Variable Display window that is created dynamically.
  4831.  
  4832. A Variable Display window is placed on the screen showing the variable
  4833. including fields if it is a structure.    The window is updated each time the
  4834. debugger is entered.  The window may be manipulated in the same manner as
  4835. other windows.    When the Variable Display window is created, it inherits the
  4836. colour attributes of the Dialogue window.  The Ctrl/P (paint) key may be
  4837. used to redefine the window's colour attributes.  It may be resized using
  4838. the Ctrl/N (narrow), Ctrl/W (widen), Ctrl/S (shrink), and Ctrl/G (grow) keys
  4839. or by manipulating the "resizer" gadget with a mouse.  It may be moved using
  4840. the Ctrl/U (up), Ctrl/D (down), Ctrl/L (left) and Ctrl/R (right) keys or by
  4841. dragging the title line with a mouse.  The window may be removed using the
  4842. Ctrl/E (erase) key or by clicking on the "close" gadget.
  4843.  
  4844. If a structure is displayed, the cursor up and down keys may be used to move
  4845. up and down through fields.  To display the contents of a field, the Enter
  4846. key can be pressed.  To return to the previous level, the Backspace key can
  4847. be pressed.  Entries that represent structures are displayed by using
  4848. "{...}" and entries that represent arrays are displayed by using "(...)"
  4849. Essentially, the Enter key permits you to "descend" to nested structures and
  4850. the Backspace key permits you to "ascend" to a previous level.
  4851.  
  4852. If an entry represents a string, the "S" key can be used to display the
  4853. entry as a string.  The Backspace key can be used to return to the original
  4854. display format.
  4855.  
  4856. The top entry in the window displays the current structure nesting level.
  4857. You can move the cursor to this entry and edit it.  If the entry represents
  4858. a field in a structure, you can ascend to the previous level by removing the
  4859. trailing field.  By adding new fields, you can descend to nested levels.
  4860.  
  4861. A mouse can be used to select and view fields by clicking on them.  If you
  4862. click on the line of dashes in the window, you will ascend to previous
  4863. levels.
  4864.  
  4865. The Escape key or the mouse can be used to move to the Prompt window.
  4866. ::::QNX_DEBUGGING_USING_POSTMORTEM_DUMP
  4867. A limited form of debugging of an application that has terminated and
  4868. produced a postmortem dump can be done under QNX.  In order to use this
  4869. feature, the QNX "dumper" program must be started.
  4870.  
  4871. ┌──────────────────────────────────────────────────────────────────────────┐
  4872. │ dumper [-d path] &                               │
  4873. └──────────────────────────────────────────────────────────────────────────┘
  4874.  
  4875. dumper       is the program name for the QNX postmortem dump program.
  4876.  
  4877. -d path    is an option to specify the directory in which postmortem dumps
  4878.        should be written.  If the -d option is not specified, the
  4879.        default directory is /usr/dumps.
  4880.  
  4881. &       must be specified so that the shell is rejoined.
  4882.  
  4883. Example:
  4884.   $ dumper &
  4885.   $ dumper -d /usr/fred/dump_area &
  4886.  
  4887. Whenever a program terminates abnormally, a dump of the current state of the
  4888. program in memory is written to disk.  The dump file name is the same as the
  4889. program name.  For example, if the program name is a.out then the dump will
  4890. be written to /usr/dumps/a.out (provided that the default dump directory was
  4891. selected when the dumper program was started).    If VIDEO was being used to
  4892. debug the program at the time that it abnormally terminated then the dump is
  4893. written to /usr/dumps/wvideo (provided that the default dump directory was
  4894. selected when the dumper program was started).
  4895.  
  4896. To examine the contents of the postmortem dump, VIDEO may be used.  The
  4897. interface between VIDEO and the postmortem dump is contained in a special
  4898. "trap" file.  The trap file is specified to VIDEO using the "TRAP" option.
  4899.  
  4900. ┌──────────────────────────────────────────────────────────────────────────┐
  4901. │ wvideo -TRap=pmd[;i] [:sym_file] file_spec                   │
  4902. └──────────────────────────────────────────────────────────────────────────┘
  4903.  
  4904. wvideo       is the program name for VIDEO.
  4905.  
  4906. -TRap=pmd[ ;i] must be specified when debugging an application that has
  4907.        terminated and produced a postmortem dump.  The optional ";i" is
  4908.        specified when the modification date of the original program file
  4909.        does not match the information contained in the dumper file.  It
  4910.        indicates that the symbolic debugging information in the program
  4911.        file may be out-of-date.  It instructs VIDEO to ignore the date
  4912.        mismatch.
  4913.  
  4914. sym_file   is an optional symbolic information file specification.  The
  4915.        specification must be preceded by a colon (":").  When specifying
  4916.        a symbol file name, a path such as "//5/etc/" may be included.
  4917.        For QNX, the default file suffix of the symbol file is ".sym".
  4918.  
  4919. file_spec  is the file name of the dumper file to be loaded into memory.
  4920.        When specifying a file name, a path such as "//5/etc/" may be
  4921.        included.  If a path is omitted, VIDEO will first attempt to
  4922.        locate the file in the current directory and, if not successful,
  4923.        attempt to locate the file in the default dumper directory:
  4924.        /usr/dumps.
  4925.  
  4926. Basically, VIDEO is fully functional when a postmortem dump is examined.
  4927. However, there are some operations which are not allowed.  Among these are:
  4928.  
  4929.   1. Task execution cannot be restarted using the "GO" command.
  4930.  
  4931.   2. A register can be modified for the purposes of expression evaluation.
  4932.     The "GO" command can be used to restore the register contents to their
  4933.     original postmortem state.
  4934.  
  4935.   3. Memory cannot be modified.
  4936.  
  4937.   4. Memory outside of regions owned by the program cannot be examined.
  4938.  
  4939.   5. I/O ports cannot be examined.
  4940. ::::QNX_INTERRUPTING_A_PROGRAM
  4941. Once a program has been loaded by VIDEO, its execution can be started by the
  4942. Go command (this command is described under the topic entitled "GO").
  4943.  
  4944. Example:
  4945.   $ wvideo myapp
  4946.    .
  4947.    .
  4948.    .
  4949.   DBG>go
  4950.  
  4951. As is sometimes the case during the development phase, a program may execute
  4952. endlessly.
  4953.  
  4954. Under QNX, execution of an application may be interrupted in a number of
  4955. ways.
  4956.  
  4957.   1. If the application program has not taken over the SIGINT signal then
  4958.     execution may be interrupted by pressing Ctrl/Break or Ctrl/C (settable
  4959.     by "stty") at the virtual console of the application program.
  4960.  
  4961.   2. When debugging locally, execution may be interrupted by pressing
  4962.     Ctrl/Break at the virtual console of the debugger.
  4963.  
  4964.   3. Any signal that will kill the executing application program (e.g.,
  4965.     SIGSEGV, SIGTERM) may be issued at another virtual console.  You must
  4966.     obtain the process-id of the application program and then issue a QNX
  4967.     "kill" command.
  4968.  
  4969.     Example:
  4970.       $ kill -term 1423
  4971.  
  4972.     You should not use the "SIGKILL" signal if you wish to be able to resume
  4973.     execution of the application with the debugger.
  4974.  
  4975.     An alternative to the "kill" command is the QNX "slay" command which
  4976.     requires a process name.
  4977.  
  4978.     Example:
  4979.       $ slay myapp
  4980.  
  4981.     By default, the "slay" command issues the "SIGTERM" signal.
  4982.  
  4983. VIDEO will print a message in the "Dialogue" window indicating that the
  4984. program's execution has been interrupted.  Execution can be resumed with the
  4985. Go command.
  4986.  
  4987. Also, execution of VIDEO commands may be interrupted by pressing Ctrl/Break
  4988. at the virtual console of the debugger.
  4989.  
  4990. For information on how to interrupt executing programs when using the remote
  4991. debugging facility, see the topic entitled "REMOTE_DEBUGGING".
  4992. ::::QNX_REMOTE_DEBUGGING
  4993. ┌──────────────────────────────────────────────────────────────────────────┐
  4994. │ wvideo -TRap=trap_file[;trap_parm] [:sym_file] file_spec [cmd_line]       │
  4995. └──────────────────────────────────────────────────────────────────────────┘
  4996.  
  4997. The VIDEO TRap option must be specified when debugging an application using
  4998. a second computer system.  The format of file_spec depends on the target
  4999. machine's operating system, be it DOS, OS/2, NetWare 386, or QNX.  You can
  5000. use a pair of dashes to stop VIDEO from continuing its option scan.
  5001.  
  5002. Example:
  5003.   C>wvideo -trap=par -reg=4 -- --fdap--
  5004.  
  5005. When trap_parm is specified and it contains blank characters, the entire
  5006. parameter must be placed within braces ({}).
  5007.  
  5008. You must specify the name of the "trap" file that corresponds to the Debug
  5009. Server that was started on the first computer system (the "task machine").
  5010. These files handle the machine-to-machine communication required for remote
  5011. debugging of an application.  Servers are described under the topics entitled
  5012. "REMOTE_DEBUGGING" and "REMOTE_WIN3".
  5013.  
  5014. For QNX, the default file suffix of the trap file is ".trp".  Trap files are
  5015. usually located in the "/etc/wvideo" directory.
  5016.  
  5017. std.trp    Under QNX, if you do not specify a trap file, the default trap
  5018.        file "std.trp" will be loaded.  This interface module supports
  5019.        debugging on the local computer system running QNX.    No remote
  5020.        debugging is possible.
  5021.  
  5022. ser.trp    This communications driver file supports debugging of an
  5023.        application running on another computer system using the serial
  5024.        ports of the two machines.  It communicates with the "SERSERV"
  5025.        Debug Server.  The serial port of the debugger machine is usually
  5026.        connected to the serial port of the task machine.  However, the
  5027.        serial port of another node can be used by the debugger.  The
  5028.        "trap_parm" value specifies the port number to use and an
  5029.        optional maximum BAUD rate (which is separated from the port
  5030.        number by a period).  The port number is 1, 2, 3, etc.  (default
  5031.        is 1).  These numbers correspond to the serial port number used
  5032.        when specifying a serial device (as in "/dev/ser1", "/dev/ser2",
  5033.        etc.).  When the serial port is on another node, the node id and
  5034.        port must be specified.
  5035.  
  5036.          [nid,][port_number][.max_baud]
  5037.  
  5038.        The node number is specified first, then a comma, and then the
  5039.        port number.
  5040.  
  5041.        Example:
  5042.          -tr=ser;7,2.9600
  5043.  
  5044.        Under QNX, the maximum BAUD rate can be one of:
  5045.  
  5046.           38400
  5047.           19200
  5048.            9600
  5049.            4800
  5050.            2400
  5051.            1200
  5052.           0 (a special case)
  5053.  
  5054.        The default maximum BAUD rate is 38,400.
  5055.  
  5056.        Except for the special BAUD rate of 0, a minimum of two digits
  5057.        must be specified to identify the desired maximum BAUD rate.  The
  5058.        maximum BAUD rate is explained in the section "Remote Debugging
  5059.        Over the Serial Port" under the topic entitled "REMOTE_DEBUGGING".
  5060.        In the following example, port 2 and a maximum BAUD rate of
  5061.        19,200 is specified.
  5062.  
  5063.        Example:
  5064.          -trap=ser;2.19
  5065.  
  5066. par.trp    This communications driver file supports debugging of an
  5067.        application running on another computer system using the parallel
  5068.        ports of the two machines.  It communicates with one of the
  5069.        "PARSERV" or "PARSERVW" (Microsoft Windows) Debug Servers.  The
  5070.        parallel port of the debugger machine is connected to the
  5071.        parallel port of the task machine.  The port number to use is
  5072.        specified by "trap_parm".  The port number is 1, 2 or 3 (default
  5073.        is 1).  These numbers correspond to the device number used when
  5074.        specifying the parallel port (as in "/dev/par1", "/dev/par2",
  5075.        etc.).  Unlike the serial port, the parallel port cannot be on
  5076.        another node.
  5077. ::::QNX_SEARCH_ORDER
  5078. There are several supporting files provided with VIDEO.  These files fall
  5079. into five categories.
  5080.  
  5081.   1. VIDEO command files (files with the ".dbg" suffix).
  5082.  
  5083.   2. VIDEO trap files (files with the ".trp" suffix).
  5084.  
  5085.   3. VIDEO parser files (files with the ".prs" suffix).
  5086.  
  5087.   4. VIDEO help files (files with the ".hlp" suffix).
  5088.  
  5089.   5. VIDEO symbolic debugging information files (files with the ".sym"
  5090.     suffix).
  5091.  
  5092. The search order for VIDEO support files is as follows:
  5093.  
  5094.   1. the current directory,
  5095.   2. the paths listed in the WVIDEO_PATH environment variable,
  5096.   3. the path listed in the HOME environment variable, and, finally,
  5097.   4. the "/etc/wvideo" directory.
  5098.  
  5099. You should note the following when using the remote debugging feature of
  5100. VIDEO.    When the REMotefiles option is specified, the debugger also attempts
  5101. to locate VIDEO's support files (command files, trap files, etc.) on the
  5102. task machine.
  5103. ::::QNX_STARTUP
  5104. ┌──────────────────────────────────────────────────────────────────────────┐
  5105. │ wvideo [options] [:sym_file] [//nid] pid                   │
  5106. │    or                                    │
  5107. │ wvideo [options] [:sym_file] [//nid] file_spec [cmd_line]           │
  5108. └──────────────────────────────────────────────────────────────────────────┘
  5109.  
  5110. The square brackets [ ] denote items which are optional.
  5111.  
  5112. wvideo       is the program name for VIDEO.
  5113.  
  5114. options    is a list of valid VIDEO options, each preceded by a dash ("-").
  5115.        Options may be specified in any order.
  5116.  
  5117. sym_file   is an optional symbolic debugging information file specification.
  5118.        The specification must be preceded by a colon (":").  When
  5119.        specifying a symbol file name, a path such as "//5/etc/" may be
  5120.        included.  For QNX, the default file suffix of the symbol file is
  5121.        ".sym".
  5122.  
  5123.        The symbolic information file can be produced by the WATCOM
  5124.        Linker wlink or by the WATCOM Strip Utility wstrip.
  5125.  
  5126. nid       is an optional network node identification (nid) on which to
  5127.        locate or run the process.  If omitted, the process will be
  5128.        located or run on the current node.
  5129.  
  5130. pid       is a process identification number of a currently executing
  5131.        process.  If a process id is given then VIDEO will attempt to
  5132.        attach the specified process.  If a "nid" was also given then
  5133.        VIDEO will attempt to attach the specified process on the
  5134.        specified node.
  5135.  
  5136. file_spec  is the file name of the file to be loaded into memory.  When
  5137.        specifying a file name, a path such as "//5/etc/" may be
  5138.        included.  If a path is omitted, VIDEO will first attempt to
  5139.        locate the file in the current directory.  If this fails, VIDEO
  5140.        will search for the file in each path listed in the PATH
  5141.        environment string.
  5142.  
  5143. cmd_line   is an optional command line which will be passed on to the
  5144.        application.
  5145.  
  5146. Example 1:
  5147.   $ wvideo -reg=4 myapp
  5148.  
  5149. VIDEO is invoked with 4 register sets and loads the application called
  5150. "myapp".
  5151.  
  5152. Example 2:
  5153.   $ wvideo -reg=4 //5 //7/usr/fred/myapp -x test.dat
  5154.  
  5155. VIDEO is invoked with 4 register sets and loads the application called
  5156. "myapp", located on node 7 of the network, onto node 5 of the network.    The
  5157. command line "-x test.dat" is passed to "myapp".
  5158.  
  5159. Example 3:
  5160.   $ wvideo //5 0342
  5161.  
  5162. VIDEO is invoked to attach a process identified by pid "0342" running on
  5163. node 5.
  5164.  
  5165.  
  5166. Command Line Options
  5167. ════════════════════
  5168. ┌──────────────────────────────────────────────────────────────────────────┐
  5169. │     -Console=number                               │
  5170. │     -Dynamic=space                               │
  5171. │     -Invoke=file_spec                            │
  5172. │     -Lines=number                               │
  5173. │     -NOAltsym                                │
  5174. │     -NOFpu                                   │
  5175. │     -NOInvoke                                │
  5176. │     -NOMouse                                   │
  5177. │     -NOSymbols                               │
  5178. │     -Registers=number                            │
  5179. │     -REMotefiles                               │
  5180. │     -TRap=trap_file[;trap_parm]                       │
  5181. └──────────────────────────────────────────────────────────────────────────┘
  5182.  
  5183. Options may be specified in any order.    Short forms may be specified for
  5184. options and are shown above in capital letters.  If "space" is suffixed with
  5185. the letter "K" then "space" refers to multiples of 1K bytes (1024 bytes).
  5186. If "space" is suffixed with the letter "B" then "space" refers to the number
  5187. of bytes.  If no suffix is specified and "space" is a number less than 1000
  5188. then "space" is assumed to refer to multiples of 1K bytes (1024 bytes);
  5189. otherwise it refers to the number of bytes.
  5190.  
  5191. -Console=number specifies the virtual console number to use for debugger
  5192.        windows.  By default, VIDEO will use the first "free" virtual
  5193.        console.
  5194.  
  5195. -Dynamic=space specifies the initial amount of dynamic storage that VIDEO is
  5196.        to reserve for items such as windows, user-defined symbols, etc.
  5197.        The default amount that is set aside is 40960 bytes (40K bytes).
  5198.        As additional storage is required, VIDEO will allocate it.
  5199.  
  5200. -Invoke=file_spec may be used to specify an alternate name for the debugger
  5201.        command file which is to be automatically invoked at start-up
  5202.        time.  The default file name is "profile.dbg".  See the topic
  5203.        entitled "QNX_SEARCH_ORDER" for information on how command files
  5204.        are located.
  5205.  
  5206. -Lines=number may be used to specify the number of display lines that VIDEO
  5207.        is to use.  If this option is not specified, the default number
  5208.        of output lines is selected.  When an Enhanced Graphics Adapter
  5209.        (EGA) is present, 43 lines of output may be requested.  When an
  5210.        Video Graphics Array (VGA) is present, 50 lines of output may be
  5211.        requested.
  5212.  
  5213. -NOAltsym  disables debugger support for alternate symbolic information
  5214.        formats such as support for a susbset of CV4 (CodeView) and
  5215.        processing of export tables from NE (OS/2 1.x, Windows 3.x) and
  5216.        PE (Windows NT) executables.  This option reduces the time
  5217.        required by the debugger to load and process executables at
  5218.        startup.
  5219.  
  5220. -NOFpu       requests that the debugger ignore the presence of a math
  5221.        coprocessor or emulator.  No memory will be allocated by the
  5222.        debugger for saving the context of the 80x87 numeric data
  5223.        processor.  Use this option if your application will not use the
  5224.        math coprocessor and you wish to reduce the amount of memory
  5225.        required by the debugger.
  5226.  
  5227. -NOInvoke  specifies that the default debugger command file is not to be
  5228.        invoked.
  5229.  
  5230. -NOMouse   requests that the debugger ignore any attached mouse.
  5231.  
  5232. -NOSymbols requests that VIDEO omit all debugging information when loading
  5233.        an executable image.  Information regarding global and local
  5234.        symbol names, data types, and line numbers is not processed.
  5235.  
  5236. -Registers=number may be used to specify how many register sets to set aside
  5237.        for the recording of register contents.  The default number of
  5238.        register sets is 2.    See the description of the Register command
  5239.        for more information (this command is described under the topic
  5240.        entitled "REGISTER").
  5241.  
  5242. -REMotefiles may be used in conjunction with the remote debugging
  5243.        capabilities of the debugger.  Remote debugging involves using
  5244.        two personal computers that are connected by means other than the
  5245.        network.  One, called the "task machine", is used to run the
  5246.        application; the other, called the "debugger machine", is used to
  5247.        run the debugger.  When REMotefiles is specified, all debugger
  5248.        files (except "trap" files) and application source files are
  5249.        opened on the task machine rather than the debugger machine (if
  5250.        you are doing local debugging, these two machines are actually
  5251.        the same).  The "trap" file must be located on the debugger
  5252.        machine because it contains the code to open files on the task
  5253.        machine.
  5254.  
  5255.        Note that the PATH environment variable on the task machine is
  5256.        always used in locating executable image files.  When REMotefiles
  5257.        is specified, the debugger also attempts to locate VIDEO's
  5258.        support files (command files, trap files, etc.) on the task
  5259.        machine.
  5260.  
  5261. -TRap=trap_file[;trap_parm] must be specified when debugging an application
  5262.        on a remote machine.  You must specify the name of one of the
  5263.        "trap" files provided with VIDEO.  For QNX, the default file
  5264.        suffix of the trap file is ".trp".  Trap files are usually
  5265.        located in the "/etc/wvideo" directory.  See the topic entitled
  5266.        "QNX_SEARCH_ORDER" for information on how trap files are located.
  5267.  
  5268.        Under QNX, if you do not specify the TRap option, the default
  5269.        trap file "std.trp" will be loaded.    This interface module
  5270.        supports debugging on the local computer system running QNX.
  5271.  
  5272.        Example:
  5273.          $ wvideo calendar
  5274.  
  5275.        Of course, you may also explicitly name the "standard" trap file
  5276.        that you wish VIDEO to use.
  5277.  
  5278.        Example:
  5279.          $ wvideo -trap=std calendar
  5280.  
  5281.        If trap_parm is specified, it may be necessary to escape the ";"
  5282.        depending on the command shell in use.
  5283.  
  5284.        See the topic entitled "REMOTE_DEBUGGING" for more information
  5285.        on the TRap option.
  5286. ::::QNX_WVIDEO_ENVIRONMENT_VARIABLE
  5287. The WVIDEO environment variable can be used to specify commonly used VIDEO
  5288. options.  These options are processed before options specified on the
  5289. command line.
  5290.  
  5291. Example:
  5292.   $ export "WVIDEO=-nofpu -reg=4"
  5293.  
  5294. The above examples illustrate how to define default options for the
  5295. debugger.  Under QNX, care must be taken to specify the environment variable
  5296. name entirely in uppercase letters.
  5297.  
  5298. Once the WVIDEO environment variable has been defined, those options listed
  5299. become the default each time VIDEO is invoked.
  5300. ::::QUIT
  5301. ┌──────────────────────────────────────────────────────────────────────────┐
  5302. │ QUIT                                       │
  5303. └──────────────────────────────────────────────────────────────────────────┘
  5304.  
  5305. The QUIT command is used to terminate VIDEO and return to the operating
  5306. system.  Any application which may have partially executed is also
  5307. terminated.
  5308. ::::REGISTER
  5309. ┌──────────────────────────────────────────────────────────────────────────┐
  5310. │ Register [expr]                               │
  5311. └──────────────────────────────────────────────────────────────────────────┘
  5312.  
  5313. The Register command is used to select a VIDEO register set.
  5314.  
  5315. Whenever VIDEO is entered, it saves the current register values in a ring of
  5316. register sets.    The size of this ring is determined at start-up time with
  5317. the Registers option (the default is 2, the maximum is 100).  When the
  5318. expression result is negative, a previous register set is selected.  When
  5319. the expression result is positive, a more recent register set is selected.
  5320. When the expression is omitted, the current register set is selected.
  5321.  
  5322. If the Register window is not present on the screen, the register display is
  5323. written to the Dialogue window.  A Register window is created by using the
  5324. Display Register command.  If you are not at the most recent register set, a
  5325. number will appear in square brackets somewhere in the Register window.
  5326. This number represents the number of register sets that are more recent than
  5327. the one that is currently being displayed.  When you issue a Go or Trace
  5328. command, the currently displayed register set becomes the "current" register
  5329. values.  This feature provides the user with a "checkpoint/restart"
  5330. capability.
  5331.  
  5332. Example:
  5333.   DBG>register -1
  5334.  
  5335. In the above example, we back up to the previous register set.
  5336. ::::REMARK
  5337. ┌──────────────────────────────────────────────────────────────────────────┐
  5338. │ REMark   comment_line                            │
  5339. │ *                                       │
  5340. └──────────────────────────────────────────────────────────────────────────┘
  5341.  
  5342. The REMark or * command provides a means for documenting VIDEO command
  5343. files.
  5344.  
  5345. Example:
  5346.   * Count the number of times a routine is executed
  5347.     /cnt_<1>=0
  5348.   * Remove the break point definition
  5349.   * just in case one already exists
  5350.     break/clear /<1>
  5351.   * Set the new break point
  5352.     break/set <1> {/cnt_<1>++; go/keep}
  5353. ::::REMOTE_DEBUGGING
  5354. Remote Debugging Concepts
  5355. ═════════════════════════
  5356. We describe the use of two computers, one to run the application and one
  5357. to run the debugger, as "remote debugging".  We also would like to include
  5358. the use of multiple sessions such as you could get with a
  5359. multi-programming operating system like Windows or OS/2.  You can think of
  5360. it as running multiple "virtual" computers.  For our purposes, the
  5361. concepts of remote debugging are essentially the same for both cases.
  5362.  
  5363. Remote debugging involves using two computer systems to debug your
  5364. application.  One PC, called the "task machine", is used to run the
  5365. application; the other PC, called the "debugger machine", is used to run
  5366. the debugger.  Remote debugging can be used when there is not enough
  5367. memory on one computer system to run both the application and the
  5368. debugger.
  5369.  
  5370. When using the remote debugging feature, the application that is to be
  5371. debugged must reside on the task machine so that the operating system can
  5372. load it.  The application's source files should be accessible from the
  5373. debugger machine so that VIDEO can display source lines for a particular
  5374. module.
  5375.  
  5376. Remote Debugging Using Two Computers
  5377. ════════════════════════════════════
  5378. Let us assume that PC #1 is your primary development machine.  It contains
  5379. your application, its data files, its source files, and the programs that
  5380. you have been using to develop your application (editor, compiler, linker,
  5381. debugger, etc.).
  5382.  
  5383. Let us assume that PC #2 is a spare machine that is available for your
  5384. use.  Since two computer systems are involved, there are two possible
  5385. scenarios.
  5386.  
  5387. 1.  You could copy the application and any required data files to PC #2.
  5388.     In this scenario, your primary development machine (PC #1) will be
  5389.     used to run the debugger.  Thus, the source files for your application
  5390.     are present on the debugger machine.
  5391.  
  5392. 2.  You could copy the debugger over to PC #2.    In this scenario, your
  5393.     primary development machine (PC #1) will be used to run the
  5394.     application.  Unless you copy all of the application's source files to
  5395.     PC #2, the debugger will not have access to them.  In this case, you
  5396.     can use the VIDEO "REMotefiles" option to inform the debugger that
  5397.     source files are to be obtained over the communications link from the
  5398.     task machine (PC #1).  Another advantage to the "REMotefiles" option
  5399.     is that the debugger will also locate debugger command files, by
  5400.     default, on the task machine.  If this option is not specified then
  5401.     the debugger command files must also be copied over to the debugger
  5402.     machine (PC #2).
  5403.  
  5404. The decision as to which machine you should be using for the task and
  5405. which for the debugger is up to you.  In certain cases, it may depend on
  5406. the amount of available memory on each machine or the speed of their
  5407. respective processors.    If a large amount of memory is required for your
  5408. application then it makes sense that the task machine be the one with the
  5409. most memory.  If application execution speed is important then it makes
  5410. sense that the task machine be the faster of the two.
  5411.  
  5412. ┌────────────────────────────────────────────────────────────────────────────┐
  5413. │ Note:  Under QNX, it is possible to debug a task running on another QNX    │
  5414. │ node.  This is an inherent feature of the QNX system and should not be     │
  5415. │ considered "remote" debugging.  Remote debugging is most effectively used  │
  5416. │ when the computers are on two separate QNX networks, or one computer is    │
  5417. │ running QNX and the other is running one of the other operating systems    │
  5418. │ supported by VIDEO.                                 │
  5419. │                                         │
  5420. │ See the topic entitled "QNX_STARTUP".                      │
  5421. └────────────────────────────────────────────────────────────────────────────┘
  5422.  
  5423. Notes:
  5424.  
  5425.   1. Version 2.0 or later of DOS is required to support remote debugging of
  5426.     applications.
  5427.  
  5428.   2. Version 3.0 or later of Microsoft Windows is required to support remote
  5429.     debugging of applications.
  5430.  
  5431.   3. Version 1.2 or later of OS/2 is required to support remote debugging of
  5432.     applications.
  5433.  
  5434.   4. Version 3.1 or later of NetWare 386 is required to support debugging of
  5435.     applications running on the NetWare server.  The remote debugging
  5436.     facility requires that a server task be run on the task machine (the
  5437.     NetWare server) before VIDEO is started on the debugger machine.
  5438.  
  5439.   5. Version 4.0 or later of QNX is required to support remote debugging of
  5440.     applications.
  5441.  
  5442.  
  5443. Communications Servers For DOS and OS/2
  5444. ═══════════════════════════════════════
  5445. There are several servers provided for use with VIDEO under DOS and OS/2.
  5446.  
  5447. SERSERV.EXE This program supports remote debugging over the serial port.
  5448.  
  5449. PARSERV.EXE This program supports remote debugging over the parallel port.
  5450.  
  5451. NOVSERV.EXE This program supports remote debugging over the Novell "NetWare"
  5452.         network.
  5453.  
  5454. NETSERV.EXE This program supports remote debugging using NetBIOS support.
  5455.  
  5456. DQVSERV.EXE (DOS Only) This program supports remote debugging using DESQview.
  5457.         In the following discussion, the "task machine" is the DESQview
  5458.         window in which the server is started and the "debugger machine"
  5459.         is the DESQview window in which the debugger is started.
  5460.  
  5461. VDMSERV.EXE (OS/2 Only) This program supports remote debugging of
  5462.         applications running in OS/2 DOS boxes or sessions.  In the
  5463.         following discussion, the "task machine" is the OS/2 DOS
  5464.         session in which the server is started and the "debugger
  5465.         machine" is the OS/2 session in which the debugger is started.
  5466.  
  5467. WINSERV.EXE (Microsoft Windows 3.x Only) This program supports remote
  5468.         debugging using Windows DOS boxes.    In the following discussion,
  5469.         the "task machine" is the Windows DOS box in which the server is
  5470.         started and the "debugger machine" is the Windows DOS box in
  5471.         which the debugger is started.
  5472.  
  5473. These programs are described in subsequent sections.  The general syntax of
  5474. the command line is shown below.
  5475.  
  5476. ┌──────────────────────────────────────────────────────────────────────────┐
  5477. │ server_name [/TRap=trap_file[;trap_parm]] server_specs           │
  5478. └──────────────────────────────────────────────────────────────────────────┘
  5479.  
  5480. The /TRap option is only specified in three situations:
  5481.  
  5482.   1. under DOS, in order to prevent the server task from using the
  5483.      386/486/Pentium Debug Registers (a hardware feature used to assist
  5484.      debugging),
  5485.  
  5486.   2. for 32-bit applications that require the services of a DOS extender, and
  5487.  
  5488.   3. in special applications where more than two computer systems are
  5489.     chained together in series.
  5490.  
  5491.  
  5492. In general, the server program receives requests from another computer
  5493. system (the debugger machine).    It can process these requests locally or
  5494. pass them on to a server running on another computer system.
  5495.  
  5496. STD.TRP, STD16.DLL, STD32.DLL
  5497.        By default, requests will be handled locally by the "STD.TRP"
  5498.        file when DOS is running, the "STD16.DLL" file when OS/2 1.x is
  5499.        running, or the "STD32.DLL" file when OS/2 2.x is running,
  5500.  
  5501.        Under DOS, it may be necessary to prevent the server task from
  5502.        using the 386/486/Pentium Debug Registers (a hardware feature used
  5503.        to assist debugging).  This situation arises with certain DOS
  5504.        control programs that do not properly manage Debug Registers.  If
  5505.        the server task fails upon startup on a 386/486/Pentium system,
  5506.        it is a good indication that use of the Debug Registers must be
  5507.        disabled.  With "STD.TRP", the trap file parameter "d" may be
  5508.        specified to disable the use of Debug Registers.  The following
  5509.        example illustrates the specification of the "d" trap file
  5510.        parameter.
  5511.  
  5512.        Example:
  5513.          C>serserv /trap=std;d
  5514.          or
  5515.          C>parserv /trap=std;d
  5516.          etc.
  5517.  
  5518. ECS.TRP    When the application is to be run with the ERGO Computing, Inc.
  5519.        "OS/386" DOS extender on the task machine, the "ECS.TRP"
  5520.        interface module can be used with a communications server.  The
  5521.        optional "trap_parm" is ignored.
  5522.  
  5523.        Example:
  5524.          C>serserv /trap=ecs
  5525.          or
  5526.          C>parserv /trap=ecs
  5527.          etc.
  5528.  
  5529. PLS.TRP    When the application is to be run with the Phar Lap Software,
  5530.        Inc.  386|DOS-Extender on the task machine, the "PLS.TRP"
  5531.        interface module can be used with a communications server.  The
  5532.        optional "trap_parm" is passed on to the DOS extender "RUN386" as
  5533.        command line switches.
  5534.  
  5535.        Example:
  5536.          C>serserv /trap=pls
  5537.          or
  5538.          C>parserv /trap=pls
  5539.          etc.
  5540.  
  5541. RSI.TRP    When the application is to be run with the Rational Systems, Inc.
  5542.        "DOS/4GW" DOS extender on the task machine, the "RSI.TRP"
  5543.        interface module can be used with a communications server.  This
  5544.        DOS extender is included in the WATCOM C/C++(32) and WATCOM
  5545.        FORTRAN 77(32) packages.  The optional "trap_parm" is ignored.
  5546.  
  5547.        Example:
  5548.          C>serserv /trap=rsi
  5549.          or
  5550.          C>parserv /trap=rsi
  5551.          etc.
  5552.  
  5553.  
  5554. Communications Servers for Windows and WIN-OS/2
  5555. ═══════════════════════════════════════════════
  5556. The topic entitled "REMOTE_WIN3" describes debugging of Windows 3.x
  5557. applications in detail.  Please refer to this topic for more
  5558. information.
  5559.  
  5560.  
  5561. Communications Servers for Novell NetWare 386
  5562. ═════════════════════════════════════════════
  5563. There are three servers provided for use with VIDEO under Novell NetWare
  5564. 386.
  5565.  
  5566. SERSERV.NLM This program supports remote debugging over the serial port.
  5567.  
  5568. PARSERV.NLM This program supports remote debugging over the parallel port.
  5569.  
  5570. NOVSERV.NLM This program supports remote debugging over the Novell "NetWare"
  5571.         network.
  5572.  
  5573. These programs are described in the following sections.  The general syntax
  5574. of the command line is shown below.
  5575.  
  5576. ┌──────────────────────────────────────────────────────────────────────────┐
  5577. │ LOAD server_name server_specs                        │
  5578. └──────────────────────────────────────────────────────────────────────────┘
  5579.  
  5580. Example:
  5581.   : LOAD PARSERV 2
  5582.  
  5583. The above example loads the parallel port server which will use parallel
  5584. port 2 of the NetWare server for communication.
  5585.  
  5586.  
  5587. Communications Servers for QNX
  5588. ══════════════════════════════
  5589. There are two servers provided for use with VIDEO under QNX.
  5590.  
  5591. serserv    This program supports remote debugging over the serial port.
  5592.  
  5593. parserv    This program supports remote debugging over the parallel port.
  5594.  
  5595. These programs are described in the following sections.  The general syntax
  5596. of the command line is shown below.
  5597.  
  5598. ┌──────────────────────────────────────────────────────────────────────────┐
  5599. │ server_name [-TRap=trap_file[;trap_parm]] server_specs           │
  5600. └──────────────────────────────────────────────────────────────────────────┘
  5601.  
  5602. The -TRap option can be specified.  In general, the server program receives
  5603. requests from another computer system (the debugger machine).  It can
  5604. process these requests locally or pass them on to a server running on
  5605. another computer system.  By default, requests will be handled locally by
  5606. the "std.trp" file.
  5607.  
  5608.  
  5609. Examples of PC to PC Communication Links
  5610. ════════════════════════════════════════
  5611. In the following diagram, we illustrate the use of VIDEO running under DOS
  5612. to debug an application running under DOS on another computer system.  In
  5613. the example, parallel communications are used.
  5614.  
  5615.     PC #1              PC #2
  5616.   ┌────────────────┐        ┌────────────────┐
  5617.   │Debugger Machine│        │  Task Machine  │
  5618.   │     DOS       │        │       DOS         │
  5619.   │           │        │             │
  5620.   │    WVIDEO       │    ┌───│────>PARSERV    │
  5621.   │      │       │    │   │        │         │
  5622.   │      V       │    │   │        V         │
  5623.   │ trap handler<──│────┘   │  trap handler  │
  5624.   │    PAR.TRP       │        │     STD.TRP     │
  5625.   └────────────────┘        └────────────────┘
  5626.  
  5627.  
  5628. Figure 21. Remote Debugging from DOS to DOS
  5629.  
  5630. In the following diagram, we illustrate the use of VIDEO running under DOS
  5631. to debug an application running under OS/2 on another computer system.    In
  5632. the example, serial communications are used.
  5633.  
  5634.     PC #1              PC #2
  5635.   ┌────────────────┐        ┌────────────────┐
  5636.   │Debugger Machine│        │  Task Machine  │
  5637.   │     DOS       │        │     OS/2 1.x    │
  5638.   │           │        │             │
  5639.   │    WVIDEO       │    ┌───│────>SERSERV    │
  5640.   │      │       │    │   │        │         │
  5641.   │      V       │    │   │        V         │
  5642.   │ trap handler<──│────┘   │  trap handler  │
  5643.   │    SER.TRP       │        │     STD16.DLL   │
  5644.   └────────────────┘        └────────────────┘
  5645.  
  5646. Figure 22. Remote Debugging from DOS to OS/2
  5647.  
  5648. In the following diagram, we illustrate the use of VIDEO running under OS/2
  5649. to debug an application running under a DOS extender on another computer
  5650. system.  In the example, serial communications are used.
  5651.  
  5652.     PC #1              PC #2
  5653.   ┌────────────────┐        ┌────────────────┐
  5654.   │Debugger Machine│        │  Task Machine  │
  5655.   │     OS/2       │        │386│DOS─Extender│
  5656.   │           │        │             │
  5657.   │    WVIDEO       │    ┌───│────>SERSERV    │
  5658.   │      │       │    │   │        │         │
  5659.   │      V       │    │   │        V         │
  5660.   │ trap handler<──│────┘   │  trap handler  │
  5661.   │    SER.DLL       │        │     PLS.TRP     │
  5662.   └────────────────┘        └────────────────┘
  5663.  
  5664. Figure 23. Remote Debugging from OS/2 to DOS Extender
  5665.  
  5666. In the following diagram, we illustrate the use of VIDEO running under QNX
  5667. to debug an application running under QNX on another computer system.  In
  5668. the example, parallel communications are used.
  5669.  
  5670.     PC #1              PC #2
  5671.   ┌────────────────┐        ┌────────────────┐
  5672.   │Debugger Machine│        │  Task Machine  │
  5673.   │     QNX       │        │       QNX         │
  5674.   │           │        │             │
  5675.   │    wvideo       │    ┌───│────>parserv    │
  5676.   │      │       │    │   │        │         │
  5677.   │      V       │    │   │        V         │
  5678.   │ trap handler<──│────┘   │  trap handler  │
  5679.   │    par.trp       │        │     std.trp     │
  5680.   └────────────────┘        └────────────────┘
  5681.  
  5682. Figure 24. Remote Debugging from QNX to QNX
  5683.  
  5684. In the following diagram, we illustrate the use of VIDEO running under DOS
  5685. to debug an application running under QNX on another computer system.  In
  5686. the example, serial communications are used.
  5687.  
  5688.     PC #1              PC #2
  5689.   ┌────────────────┐        ┌────────────────┐
  5690.   │Debugger Machine│        │  Task Machine  │
  5691.   │     DOS       │        │       QNX         │
  5692.   │           │        │             │
  5693.   │    WVIDEO       │    ┌───│────>serserv    │
  5694.   │      │       │    │   │        │         │
  5695.   │      V       │    │   │        V         │
  5696.   │ trap handler<──│────┘   │  trap handler  │
  5697.   │    SER.TRP       │        │     std.trp     │
  5698.   └────────────────┘        └────────────────┘
  5699.  
  5700. Figure 25. Remote Debugging from DOS to QNX
  5701.  
  5702. In the following diagram, we illustrate the use of VIDEO running under QNX
  5703. to debug an application running under a DOS extender on another computer
  5704. system.  In the example, serial communications are used.
  5705.  
  5706.  
  5707.     PC #1              PC #2
  5708.   ┌────────────────┐        ┌────────────────┐
  5709.   │Debugger Machine│        │  Task Machine  │
  5710.   │     QNX       │        │386│DOS─Extender│
  5711.   │           │        │             │
  5712.   │    wvideo       │    ┌───│────>SERSERV    │
  5713.   │      │       │    │   │        │         │
  5714.   │      V       │    │   │        V         │
  5715.   │ trap handler<──│────┘   │  trap handler  │
  5716.   │    ser.trp       │        │     PLS.TRP     │
  5717.   └────────────────┘        └────────────────┘
  5718.  
  5719. Figure 26. Remote Debugging from QNX to DOS Extender
  5720.  
  5721. Many other combinations are possible.  In the following diagram, we
  5722. illustrate the use of VIDEO running under DOS to debug an application
  5723. running under DOS on a third computer system which is connected indirectly
  5724. to the first system.  In the example, parallel communications are used to
  5725. get from PC #1 to PC #2 and NetWare network communications are used to get
  5726. from PC #2 to PC #3.
  5727.  
  5728.     PC #1              PC #2             PC #3
  5729.   ┌────────────────┐        ┌────────────────┐          ┌────────────────┐
  5730.   │Debugger Machine│        │    Go─Between   │          │  Task Machine  │
  5731.   │     DOS       │        │       DOS         │          │      DOS       │
  5732.   │           │        │             │          │            │
  5733.   │    WVIDEO       │    ┌───│────>PARSERV    │      ┌───│────>NOVSERV    │
  5734.   │      │       │    │   │        │         │      │   │       │        │
  5735.   │      V       │    │   │        V         │      │   │       V        │
  5736.   │ trap handler<──│────┘   │ trap handler<──│────┘   │  trap handler  │
  5737.   │    PAR.TRP       │        │     NOV.TRP     │          │    STD.TRP     │
  5738.   └────────────────┘        └────────────────┘          └────────────────┘
  5739.  
  5740. Figure 27. Remote Debugging via an Intermediate
  5741.  
  5742. Notes:
  5743.  
  5744.   1. You should note the following regarding keyboard input.  Anything that
  5745.     is typed to the debugger itself must be typed on the debugger machine.
  5746.     As well, anything that is typed to the application being debugged must
  5747.     be typed on the task machine.
  5748.  
  5749.   2. The same is true of screen output.  All debugger output comes out on
  5750.     the debugger machine, while all program output occurs on the task
  5751.     machine.
  5752.  
  5753. The wiring required for serial and parallel communications is described under
  5754. the topic entitled "WIRING".
  5755.  
  5756.  
  5757. Remote Debugging Over the Serial Port
  5758. ═════════════════════════════════════
  5759. Remote debugging over the serial port requires that a server task be run on
  5760. the task machine before VIDEO is started on the debugger machine.  This is
  5761. required since VIDEO will begin to communicate immediately with the task
  5762. machine via this special server program.
  5763.  
  5764. The wiring required for serial communications is described under the topic
  5765. entitled "WIRING" in the section entitled "Serial Port Wiring Considerations".
  5766.  
  5767. The debugger and server will automatically synchronize on a communications
  5768. speed.    They may communicate at rates as high as 115,200 BAUD.    Since the
  5769. BAUD rate, parity, number of data bits and stop bits is automatically
  5770. chosen, the DOS or OS/2 "MODE" command or the QNX "stty" command need not be
  5771. used.
  5772.  
  5773. For DOS and OS/2, the formal serial port debug server command line syntax is
  5774. shown below.
  5775.  
  5776. ┌──────────────────────────────────────────────────────────────────────────┐
  5777. │ SERSERV [/TRap=trap_file[;trap_parm]] [port_number][.max_baud]       │
  5778. └──────────────────────────────────────────────────────────────────────────┘
  5779.  
  5780. For NetWare 386, the formal serial port debug server command line syntax is
  5781. shown below.
  5782.  
  5783. ┌──────────────────────────────────────────────────────────────────────────┐
  5784. │ LOAD SERSERV [port_number][.max_baud]                    │
  5785. └──────────────────────────────────────────────────────────────────────────┘
  5786.  
  5787. For QNX, the formal serial port debug server command line syntax is shown
  5788. below.
  5789.  
  5790. ┌──────────────────────────────────────────────────────────────────────────┐
  5791. │ serserv [-TRap=trap_file[;trap_parm]] [nid,][port_number][.max_baud]       │
  5792. └──────────────────────────────────────────────────────────────────────────┘
  5793.  
  5794. The "port_number" for the serial server is the serial port number (1, 2, 3,
  5795. etc.) that the server should use to communicate with VIDEO running on the
  5796. debugger machine.  The default port number is 1.
  5797.  
  5798. Under DOS, OS/2 and NetWare 386, these numbers correspond to the device
  5799. number used when specifying the serial device "COMx" (as in "COM1", "COM2",
  5800. etc.).
  5801.  
  5802. Under QNX, these numbers correspond to the serial port number used when
  5803. specifying a serial device (as in "/dev/ser1", "/dev/ser2", etc.).  When the
  5804. serial port is on another node, the node id must be specified.    If a node id
  5805. is specified and the port number is not specified, it defaults to 1.
  5806.  
  5807.   [nid,][port_number][.max_baud]
  5808.  
  5809. The node number is specified first, then a comma, and then the port number.
  5810.  
  5811. Example:
  5812.   serserv 7,2.9600
  5813.  
  5814. The optional "max_baud" value specifies the maximum BAUD rate.    It is
  5815. separated from the port number by a period.
  5816.  
  5817. Under DOS, the maximum BAUD rate can be one of:
  5818.  
  5819.   115200
  5820.    57600
  5821.    38400
  5822.    19200
  5823.     9600
  5824.     4800
  5825.     2400
  5826.     1200
  5827.        0 (a special case)
  5828.  
  5829. The default maximum BAUD rate is 115,200.
  5830.  
  5831. Under OS/2, the maximum BAUD rate can be one of:
  5832.  
  5833.    19200
  5834.     9600
  5835.     4800
  5836.     2400
  5837.     1200
  5838.        0 (a special case)
  5839.  
  5840. The default maximum BAUD rate is 19,200.
  5841.  
  5842. Under QNX, the maximum BAUD rate can be one of:
  5843.  
  5844.    38400
  5845.    19200
  5846.     9600
  5847.     4800
  5848.     2400
  5849.     1200
  5850.        0 (a special case)
  5851.  
  5852. The default maximum BAUD rate is 38,400.
  5853.  
  5854. Except for the special BAUD rate of 0, a minimum of two digits must be
  5855. specified to identify the desired maximum BAUD rate.  Specification of a
  5856. maximum BAUD rate is useful when the maximum rate at which the two machines
  5857. can communicate effectively is known.  The server and debugger normally
  5858. start at the fastest possible speed and work downwards until an effective
  5859. (error-free) rate is established.  If the maximum rate is specified ahead of
  5860. time, this will help reduce the startup time.  The BAUD rate actually
  5861. selected will be the minimum of the maximum rates specified when both the
  5862. server and debugger are started and the rate at which the two can
  5863. effectively communicate.  An example may help to explain this.
  5864.  
  5865. Example:
  5866.   Task    machine: serserv 2.38400
  5867.   Debug machine: wvideo -trap=ser;1.57600 hello
  5868.  
  5869. In the above example, the maximum rate at which the two machines could
  5870. communicate is 38,400 BAUD (since it is the minimum of 38,400 and 57,600).
  5871. However, the actual rate selected for effective communications may be less
  5872. than this.
  5873.  
  5874. If 0 is specified for the maximum BAUD rate when both the server and
  5875. debugger are started, the process of searching for the maximum rate at which
  5876. the two machines can communicate is eliminated.  The BAUD rate for each side
  5877. must be established through other means (such as the DOS or OS/2 "MODE"
  5878. command or the QNX "stty" command) and the rates must be identical.  The
  5879. parity, word length and number of stop bits are selected by the server and
  5880. the debugger so you need not specify these parameters.    The BAUD rate value
  5881. 0 should be specified when modems are employed between the two machines
  5882. (yes, you can debug applications over the phone).  The following example
  5883. sets the BAUD rate to 2400 using the DOS or OS/2 "MODE" command.  For QNX,
  5884. use the appropriate "stty" command.
  5885.  
  5886. Example:
  5887.   Task    machine: mode com2:2400
  5888.   Task    machine: serserv 2.0
  5889.   Debug machine: mode com1:2400
  5890.   Debug machine: wvideo -trap=ser;1.0 hello
  5891.  
  5892. In the above example, the rate at which the two machines can communicate is
  5893. 2400 BAUD (since it is the specified externally using the DOS or OS/2 "MODE"
  5894. command).
  5895.  
  5896. If you want to debug 32-bit DOS extended applications with the serial
  5897. link, you can also specify a trap file to SERSERV.
  5898.  
  5899. Example:
  5900.   SERSERV /TRap=RSI (to debug a DOS/4G program)
  5901.   SERSERV /TRap=PLS (to debug a 386|DOS-Extender program)
  5902.   SERSERV /TRap=ECS (to debug an OS/386 program)
  5903.  
  5904. When debugging over the serial port, the following files are required on the
  5905. task machine:
  5906.  
  5907.   1. one of the following serial servers:
  5908.  
  5909.     DOS, OS/2  SERSERV.EXE
  5910.     NetWare    SERSERV.NLM
  5911.     QNX        serserv
  5912.  
  5913.   2. one of the following sets of files:
  5914.  
  5915.     DOS        STD.TRP
  5916.     OS/2 1.x   STD16.DLL
  5917.     OS/2 2.x   STD32.DLL and OS2V2HLP.EXE
  5918.     QNX        std.trp
  5919.     ERGO       ECS.TRP and OS386.EXE
  5920.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  5921.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  5922.  
  5923.   3. the executable file to be debugged, and
  5924.  
  5925.   4. any data files required by the executable.
  5926.  
  5927. The following files are required on the debugger machine:
  5928.  
  5929.   1. the WATCOM debugger
  5930.  
  5931.     DOS, OS/2  WVIDEO.EXE
  5932.     QNX        wvideo
  5933.  
  5934.   2. one of the following trap files:
  5935.  
  5936.     DOS        SER.TRP
  5937.     OS/2       SER.DLL
  5938.     QNX        ser.trp
  5939.  
  5940. The following is a sequence of commands that one might issue to debug an
  5941. application remotely over the serial port:
  5942.  
  5943.   Task    machine: serserv 2
  5944.   Debug machine: wvideo -trap=ser;1 bug
  5945.   Debug machine: VIDEO commands such as "go".
  5946.   Task    machine: Type any keyboard input that is required
  5947.   Debug machine: quit
  5948.   Task    machine: q
  5949.  
  5950. In the example, serial port 2 is used on the task machine and serial port 1
  5951. is used on the debugger machine.  An appropriately-wired cable must run
  5952. between serial port 2 of the task machine and serial port 1 of the debugger
  5953. machine.  Messages will appear on both the task and debugger machines
  5954. indicating the BAUD rate at which the two machines are communicating.
  5955.  
  5956. The final "q" typed on the keyboard of the task machine is used to terminate
  5957. the server.  If this is not done, the server returns to its start-up state
  5958. and you could rerun VIDEO again for further debugging.
  5959.  
  5960.  
  5961. Remote Debugging Over the Parallel Port
  5962. ═══════════════════════════════════════
  5963. Debugging over the parallel port is significantly faster than the serial
  5964. port.  Remote debugging over the parallel port requires that a server task
  5965. be run on the task machine before VIDEO is started on the debugger machine.
  5966. This is required since VIDEO will begin to communicate immediately with the
  5967. task machine via this special server program.
  5968.  
  5969. The wiring required for parallel communications is described under the topic
  5970. entitled "WIRING" in the section entitled "Parallel Port Wiring
  5971. Considerations".
  5972.  
  5973. For DOS and OS/2, the formal parallel port debug server command line syntax
  5974. is shown below.
  5975.  
  5976. ┌──────────────────────────────────────────────────────────────────────────┐
  5977. │ PARSERV [/TRap=trap_file[;trap_parm]] [port_number]               │
  5978. └──────────────────────────────────────────────────────────────────────────┘
  5979.  
  5980. For Microsoft Windows, the formal parallel port debug server command line
  5981. syntax is shown below.
  5982.  
  5983. ┌──────────────────────────────────────────────────────────────────────────┐
  5984. │ PARSERVW [port_number]                           │
  5985. └──────────────────────────────────────────────────────────────────────────┘
  5986.  
  5987. For NetWare 386, the formal parallel port debug server command line syntax
  5988. is shown below.
  5989.  
  5990. ┌──────────────────────────────────────────────────────────────────────────┐
  5991. │ LOAD PARSERV [port_number]                           │
  5992. └──────────────────────────────────────────────────────────────────────────┘
  5993.  
  5994. For QNX, the formal parallel port debug server command line syntax is shown
  5995. below.
  5996.  
  5997. ┌──────────────────────────────────────────────────────────────────────────┐
  5998. │ parserv [-TRap=trap_file[;trap_parm]] [port_number]               │
  5999. └──────────────────────────────────────────────────────────────────────────┘
  6000.  
  6001. The "port_number" for the parallel server is the parallel port number
  6002. (between 1 and 3) that the server should use to communicate with VIDEO
  6003. running on the debugger machine.  The default port number is 1.
  6004.  
  6005. Under DOS, MS Windows, OS/2 and NetWare 386, these numbers correspond to the
  6006. device number used when specifying the parallel printer device "LPTx" (as in
  6007. "LPT1", "LPT2", etc.).
  6008.  
  6009. Under QNX, these numbers correspond to the parallel port number used when
  6010. specifying the parallel port (as in "/dev/par1", "/dev/par2", etc.).
  6011.  
  6012. If you want to debug 32-bit DOS extended applications with the parallel
  6013. link, you can also specify a trap file to PARSERV.
  6014.  
  6015. Example:
  6016.   PARSERV /TRap=RSI (to debug a DOS/4G program)
  6017.   PARSERV /TRap=PLS (to debug a 386|DOS-Extender program)
  6018.   PARSERV /TRap=ECS (to debug an OS/386 program)
  6019.  
  6020. When debugging over the parallel port, the following files are required on
  6021. the task machine:
  6022.  
  6023.   1. one of the following parallel servers:
  6024.  
  6025.     DOS, OS/2  PARSERV.EXE
  6026.     MS Windows PARSERVW.EXE
  6027.     NetWare    PARSERV.NLM
  6028.     QNX        parserv
  6029.  
  6030.   2. one of the following sets of files:
  6031.  
  6032.     DOS        STD.TRP
  6033.     MS Windows STD.DLL and TOOLHELP.DLL
  6034.     OS/2 1.x   STD16.DLL
  6035.     OS/2 2.x   STD32.DLL and OS2V2HLP.EXE
  6036.     QNX        std.trp
  6037.     ERGO       ECS.TRP and OS386.EXE
  6038.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  6039.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  6040.  
  6041.   3. the executable file to be debugged, and
  6042.  
  6043.   4. any data files required by the executable.
  6044.  
  6045. The following files are required on the debugger machine:
  6046.  
  6047.   1. the WATCOM debugger
  6048.  
  6049.     DOS, OS/2  WVIDEO.EXE
  6050.     QNX        wvideo
  6051.  
  6052.   2. one of the following trap files:
  6053.  
  6054.     DOS        PAR.TRP
  6055.     OS/2       PAR.DLL
  6056.     QNX        par.trp
  6057.  
  6058. The following is a sequence of commands that one might issue to debug an
  6059. application remotely over the parallel port:
  6060.  
  6061.   Task    machine: parserv 1
  6062.   Debug machine: wvideo -trap=par;2 bug
  6063.   Debug machine: VIDEO commands such as "go".
  6064.   Task    machine: Type any keyboard input that is required
  6065.   Debug machine: quit
  6066.   Task    machine: q
  6067.  
  6068. In the example, parallel port 1 is used on the task machine and parallel
  6069. port 2 is used on the debugger machine.  An appropriately-wired cable must
  6070. run between parallel port 1 of the task machine and parallel port 2 of the
  6071. debugger machine.
  6072.  
  6073. The final "q" typed on the keyboard of the task machine is used to terminate
  6074. the server.  If this is not done, the server returns to its start-up state
  6075. and you could rerun VIDEO again for further debugging.
  6076.  
  6077.  
  6078. Remote Debugging Over the Novell "NetWare" Network (DOS, OS/2 Only)
  6079. ═══════════════════════════════════════════════════════════════════
  6080. Remote debugging over the Novell "NetWare" network requires the NetWare
  6081. shell.    The Sequenced Packet Exchange (SPX) must be loaded first and the
  6082. server task must be run on the task machine before VIDEO is started on the
  6083. debugger machine.  This is required since VIDEO will begin to communicate
  6084. immediately with the task machine via this special server program.
  6085.  
  6086. For DOS and OS/2, the formal NetWare debug server command line syntax is
  6087. shown below.
  6088.  
  6089. ┌──────────────────────────────────────────────────────────────────────────┐
  6090. │ NOVSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  6091. └──────────────────────────────────────────────────────────────────────────┘
  6092.  
  6093. For NetWare 386, the formal NetWare debug server command line syntax is
  6094. shown below.
  6095.  
  6096. ┌──────────────────────────────────────────────────────────────────────────┐
  6097. │ LOAD NOVSERV [server_name]                           │
  6098. └──────────────────────────────────────────────────────────────────────────┘
  6099.  
  6100. The "server_name" is case insensitive and it must be unique (you will be
  6101. notified if it is not unique).    The name is restricted to less than 48
  6102. characters.  It cannot contain the following special characters:
  6103.  
  6104.   / \ : ; . , * ? + -
  6105.  
  6106. Any invalid characters are removed and any excess characters are dropped
  6107. from the name.    The "server_name" uniquely identifies the server to VIDEO
  6108. running on the debugger machine.  The default "server_name" is "NovLink".
  6109.  
  6110. If you want to debug 32-bit DOS extended applications with the NetWare
  6111. link, you can also specify a trap file to NOVSERV.
  6112.  
  6113. Example:
  6114.   NOVSERV /TRap=RSI (to debug a DOS/4G program)
  6115.   NOVSERV /TRap=PLS (to debug a 386|DOS-Extender program)
  6116.   NOVSERV /TRap=ECS (to debug an OS/386 program)
  6117.  
  6118. When debugging over the "NetWare" network, the following files are required
  6119. on the task machine:
  6120.  
  6121.   1. one of the following NetWare servers:
  6122.  
  6123.     DOS, OS/2  NOVSERV.EXE
  6124.     NetWare    NOVSERV.NLM
  6125.  
  6126.   2. one of the following sets of files:
  6127.  
  6128.     DOS        STD.TRP
  6129.     OS/2 1.x   STD16.DLL
  6130.     OS/2 2.x   STD32.DLL and OS2V2HLP.EXE
  6131.     ERGO       ECS.TRP and OS386.EXE
  6132.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  6133.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  6134.  
  6135.   3. the executable file to be debugged, and
  6136.  
  6137.   4. any data files required by the executable.
  6138.  
  6139. The following files are required on the debugger machine:
  6140.  
  6141.   1. the WATCOM debugger
  6142.  
  6143.     DOS, OS/2  WVIDEO.EXE
  6144.  
  6145.   2. one of the following trap files:
  6146.  
  6147.     DOS        NOV.TRP
  6148.     OS/2       NOV.DLL
  6149.  
  6150. The following is a sequence of commands that one might issue to debug an
  6151. application remotely over the "NetWare" network:
  6152.  
  6153.   Task    machine: novserv rmt_dbg
  6154.   Debug machine: wvideo -trap=nov;rmt_dbg bug
  6155.   Debug machine: VIDEO commands such as "go".
  6156.   Task    machine: Type any keyboard input that is required
  6157.   Debug machine: quit
  6158.   Task    machine: q
  6159.  
  6160. In the example, server name "RMT_DBG" is used on the task machine so server
  6161. name "RMT_DBG" is also used on the debugger machine.
  6162.  
  6163. The final "q" typed on the keyboard of the task machine is used to terminate
  6164. the server.  If this is not done, the server returns to its start-up state
  6165. and you could rerun VIDEO again for further debugging.
  6166.  
  6167.  
  6168. Remote Debugging Using NetBIOS Support (DOS, OS/2 Only)
  6169. ═══════════════════════════════════════════════════════
  6170. Debugging with the NetBIOS network programming interface can also be done.
  6171. Remote debugging with this network protocol requires that a server task be
  6172. run on the task machine before VIDEO is started on the debugger machine.
  6173. This is required since VIDEO will begin to communicate immediately with the
  6174. task machine via this special server program.
  6175.  
  6176. For DOS and OS/2, the formal NetBIOS debug server command line syntax is
  6177. shown below.
  6178.  
  6179. ┌──────────────────────────────────────────────────────────────────────────┐
  6180. │ NETSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  6181. └──────────────────────────────────────────────────────────────────────────┘
  6182.  
  6183. For Microsoft Windows, the formal NetBIOS debug server command line syntax
  6184. is shown below.
  6185.  
  6186. ┌──────────────────────────────────────────────────────────────────────────┐
  6187. │ NETSERVW [server_name]                           │
  6188. └──────────────────────────────────────────────────────────────────────────┘
  6189.  
  6190. The "server_name" is case sensitive and it must be unique (you will be
  6191. notified if it is not unique).    The name may be up to 15 alphanumeric
  6192. characters.  The "server_name" uniquely identifies the server to VIDEO
  6193. running on the debugger machine.  The default "server_name" is "NetLink".
  6194.  
  6195. If you want to debug 32-bit DOS extended applications with the NetBIOS
  6196. link, you can also specify a trap file to NETSERV.
  6197.  
  6198. Example:
  6199.   NETSERV /TRap=RSI (to debug a DOS/4G program)
  6200.   NETSERV /TRap=PLS (to debug a 386|DOS-Extender program)
  6201.   NETSERV /TRap=ECS (to debug an OS/386 program)
  6202.  
  6203. When debugging with the NetBIOS network programming interface, the following
  6204. files are required on the task machine:
  6205.  
  6206.   1. the NetBIOS server:
  6207.  
  6208.     DOS, OS/2  NETSERV.EXE
  6209.     MS Windows NETSERVW.EXE
  6210.  
  6211.   2. one of the following sets of files:
  6212.  
  6213.     DOS        STD.TRP
  6214.     MS Windows STD.DLL
  6215.     OS/2 1.x   STD16.DLL
  6216.     OS/2 2.x   STD32.DLL and OS2V2HLP.EXE
  6217.     ERGO       ECS.TRP and OS386.EXE
  6218.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  6219.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  6220.  
  6221.   3. the executable file to be debugged, and
  6222.  
  6223.   4. any data files required by the executable.
  6224.  
  6225. The following files are required on the debugger machine:
  6226.  
  6227.   1. the WATCOM debugger
  6228.  
  6229.     DOS, OS/2  WVIDEO.EXE
  6230.  
  6231.   2. one of the following trap files:
  6232.  
  6233.     DOS        NET.TRP
  6234.     OS/2       NET.DLL
  6235.  
  6236. The following is a sequence of commands that one might issue to debug an
  6237. application remotely with the NetBIOS network programming interface:
  6238.  
  6239.   Task    machine: netserv rmt_dbg
  6240.   Debug machine: wvideo -trap=net;rmt_dbg bug
  6241.   Debug machine: VIDEO commands such as "go".
  6242.   Task    machine: Type any keyboard input that is required
  6243.   Debug machine: quit
  6244.   Task    machine: q
  6245.  
  6246. In the example, server name "rmt_dbg" is used on the task machine so server
  6247. name "rmt_dbg" is also used on the debugger machine.
  6248.  
  6249. The final "q" typed on the keyboard of the task machine is used to terminate
  6250. the server.  If this is not done, the server returns to its start-up state
  6251. and you could rerun VIDEO again for further debugging.
  6252.  
  6253.  
  6254. Remote Debugging Using DESQview (DOS Only)
  6255. ══════════════════════════════════════════
  6256. Debugging with DESQview windows can also be done.  Remote debugging with
  6257. DESQview requires that a server task be run in a window (the "task" window)
  6258. before VIDEO is started in another window (the "debugger" window).  This is
  6259. required since VIDEO will begin to communicate immediately with the task
  6260. window via this special server program.
  6261.  
  6262. For DOS, the formal DESQview debug server command line syntax is shown
  6263. below.
  6264.  
  6265. ┌──────────────────────────────────────────────────────────────────────────┐
  6266. │ DQVSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  6267. └──────────────────────────────────────────────────────────────────────────┘
  6268.  
  6269. The "server_name" is case insensitive and it must be unique (you will be
  6270. notified if it is not unique).    The name may be any string of alphanumeric
  6271. characters.  The "server_name" uniquely identifies the server to VIDEO
  6272. running in the debugger window.  The default "server_name" is "WATCOM
  6273. Server".
  6274.  
  6275. If you want to debug 32-bit DOS extended applications with the DESQview
  6276. link, you can also specify a trap file to DQVSERV.
  6277.  
  6278. Example:
  6279.   DQVSERV /TRap=RSI (to debug a DOS/4G program)
  6280.   DQVSERV /TRap=PLS (to debug a 386|DOS-Extender program)
  6281.   DQVSERV /TRap=ECS (to debug an OS/386 program)
  6282.  
  6283. When debugging with DESQview windows, the following files are required for
  6284. the task window:
  6285.  
  6286.   1. the DESQview server, DQVSERV.EXE,
  6287.  
  6288.   2. one of the following sets of files:
  6289.  
  6290.     DOS        STD.TRP
  6291.     ERGO       ECS.TRP and OS386.EXE
  6292.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  6293.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  6294.  
  6295.   3. the executable file to be debugged, and
  6296.  
  6297.   4. any data files required by the executable.
  6298.  
  6299. The following files are required for the debugger window:
  6300.  
  6301.   1. the WATCOM debugger, WVIDEO.EXE, and
  6302.  
  6303.   2. the trap file, DQV.TRP.
  6304.  
  6305. The following is a sequence of commands that one might issue to debug an
  6306. application with DESQview windows:
  6307.  
  6308.   Task    window: dqvserv rmt_dbg
  6309.   Debug window: wvideo -trap=dqv;rmt_dbg bug
  6310.   Debug window: VIDEO commands such as "go".
  6311.   Task    window: Type any keyboard input that is required
  6312.   Debug window: quit
  6313.   Task    window: q
  6314.  
  6315. In the example, server name "rmt_dbg" is used in the task window so server
  6316. name "rmt_dbg" is also used in the debugger window.
  6317.  
  6318. The final "q" typed on the keyboard when the task window is active
  6319. terminates the server.    If this is not done, the server returns to its
  6320. start-up state and you could rerun VIDEO again for further debugging.
  6321.  
  6322.  
  6323. Remote Debugging Using OS/2 Virtual DOS Machine Links
  6324. ═════════════════════════════════════════════════════
  6325. Debugging of an application running in an OS/2 DOS box or session can also
  6326. be done.  Remote debugging under OS/2 requires that a server task be run
  6327. in a DOS session (the "task" window) before VIDEO is started in an OS/2
  6328. session (the "debugger" window).  This is required since VIDEO will begin
  6329. to communicate immediately with the task window via this special server
  6330. program.
  6331.  
  6332. The formal OS/2 DOS session debug server command line syntax is shown
  6333. below.
  6334.  
  6335. ┌──────────────────────────────────────────────────────────────────────────┐
  6336. │                                       │
  6337. │ VDMSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  6338. └──────────────────────────────────────────────────────────────────────────┘
  6339.  
  6340. The "server_name" is case insensitive and it must be unique (you will be
  6341. notified if it is not unique).    The name may be any string of alphanumeric
  6342. characters.  The "server_name" uniquely identifies the server to VIDEO
  6343. running in the debugger window.  The default "server_name" is "VDMLink".
  6344.  
  6345. If you want to debug 32-bit DOS extended applications with the VDM link,
  6346. you can also specify a trap file to VDMSERV.
  6347.  
  6348. Example:
  6349.   VDMSERV /TRap=RSI (to debug a DOS/4G program)
  6350.   VDMSERV /TRap=PLS (to debug a 386|DOS-Extender program)
  6351.  
  6352. When debugging applications running in OS/2 DOS boxes, the following files
  6353. are required for the task window:
  6354.  
  6355.   1. the OS/2 VDM server, VDMSERV.EXE,
  6356.  
  6357.   2. one of the following sets of files:
  6358.  
  6359.     DOS        STD.TRP
  6360.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  6361.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  6362.  
  6363.   3. the executable file to be debugged, and
  6364.  
  6365.   4. any data files required by the executable.
  6366.  
  6367. The following files are required for the debugger window:
  6368.  
  6369.   1. the WATCOM debugger, WVIDEO.EXE, and
  6370.  
  6371.   2. the trap file, VDM.DLL.
  6372.  
  6373. The following is a sequence of commands that one might issue to debug an
  6374. application running in an OS/2 DOS box:
  6375.  
  6376.   Task    window: vdmserv rmt_dbg
  6377.   Debug window: wvideo -trap=vdm;rmt_dbg bug
  6378.   Debug window: VIDEO commands such as "go".
  6379.   Task    window: Type any keyboard input that is required
  6380.   Debug window: quit
  6381.   Task    window: q
  6382.  
  6383. In the example, server name "rmt_dbg" is used in the task window so server
  6384. name "rmt_dbg" is also used in the debugger window.
  6385.  
  6386. The final "q" typed on the keyboard when the task window is active
  6387. terminates the server.    If this is not done, the server returns to its
  6388. start-up state and you could rerun VIDEO again for further debugging.
  6389.  
  6390.  
  6391. Remote Debugging Using Microsoft Windows 3.x DOS Boxes
  6392. ══════════════════════════════════════════════════════
  6393. Debugging with a Microsoft Windows 3.x DOS box can also be done.  Remote
  6394. debugging with Windows 3.x requires that a server task be run in a DOS box
  6395. (the "task" window) before VIDEO is started in another DOS box (the
  6396. "debugger" window).  This is required since VIDEO will begin to
  6397. communicate immediately with the task window via this special server
  6398. program.
  6399.  
  6400. Microsoft Windows 3.x must be started in enhanced mode.  You must include
  6401. the "device" specification listed below in the [386Enh] section of your
  6402. Windows 3.x "SYSTEM.INI" file.
  6403.  
  6404.   DEVICE=[d:]\WATCOM\BINW\WDEBUG.386
  6405.  
  6406. This device driver supports debugging of both 16-bit and 32-bit
  6407. applications.
  6408.  
  6409. The formal Microsoft Windows 3.x DOS box debug server command line syntax
  6410. is shown below.
  6411.  
  6412. ┌──────────────────────────────────────────────────────────────────────────┐
  6413. │ WINSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  6414. └──────────────────────────────────────────────────────────────────────────┘
  6415.  
  6416. The "server_name" is case insensitive and it must be unique (you will be
  6417. notified if it is not unique).    The name may be any string of alphanumeric
  6418. characters.  The "server_name" uniquely identifies the server to VIDEO
  6419. running in the debugger window.  The default "server_name" is "WinLink".
  6420.  
  6421. If you want to debug 32-bit DOS extended applications with the Windows 3.x
  6422. DOS box link, you can also specify a trap file to WINSERV.
  6423.  
  6424. Example:
  6425.   WINSERV /TRap=RSI (to debug a DOS/4G program)
  6426.   WINSERV /TRap=PLS (to debug a 386|DOS-Extender program)
  6427.  
  6428. When debugging with Windows DOS boxes, the following files are required for
  6429. the task window:
  6430.  
  6431.   1. the Windows server, WINSERV.EXE,
  6432.  
  6433.   2. one of the following sets of files:
  6434.  
  6435.     DOS        STD.TRP
  6436.     ERGO       ECS.TRP and OS386.EXE
  6437.     Phar Lap   PLS.TRP, PLSHELP.EXP, DBGLIB.REX and RUN386.EXE
  6438.     Rational Systems RSI.TRP, RSIHELP.EXP and DOS4G[W].EXE
  6439.  
  6440.   3. the executable file to be debugged, and
  6441.  
  6442.   4. any data files required by the executable.
  6443.  
  6444.  
  6445. The following files are required for the debugger window:
  6446.  
  6447.   1. the WATCOM debugger, WVIDEO.EXE, and
  6448.  
  6449.   2. the trap file, WIN.TRP.
  6450.  
  6451. The following is a sequence of commands that one might issue to debug an
  6452. application with Windows DOS boxes:
  6453.  
  6454.   Task    window: winserv rmt_dbg
  6455.   Debug window: wvideo -trap=win;rmt_dbg bug
  6456.   Debug window: VIDEO commands such as "go".
  6457.   Task    window: Type any keyboard input that is required
  6458.   Debug window: quit
  6459.   Task    window: q
  6460.  
  6461. In the example, server name "rmt_dbg" is used in the task window so server
  6462. name "rmt_dbg" is also used in the debugger window.
  6463.  
  6464. The final "q" typed on the keyboard when the task window is active
  6465. terminates the server.    If this is not done, the server returns to its
  6466. start-up state and you could rerun VIDEO again for further debugging.
  6467.  
  6468.  
  6469. Specifying Files on Task and Debugger Machines
  6470. ══════════════════════════════════════════════
  6471. When debugging an application with the remote debugging facility, a method
  6472. for identifying files on either of the task and debugger machines is
  6473. required.  In order to identify files on either the task or debugger
  6474. machine, two special prefixes are supported by the debugger:  "@L" and "@R".
  6475.  
  6476. The "@L" or "@l" prefix is used to indicate that the file resides on the
  6477. local debugger machine.
  6478.  
  6479. DOS, OS/2, NetWare
  6480.        @L[d:][path]filename[.ext]
  6481.  
  6482.        When "[path]" is not specified, the current directory of the
  6483.        specified drive of the local machine is assumed.  When "[d:]" is
  6484.        not specified, the current drive of the local machine is assumed.
  6485.  
  6486.        Example:
  6487.          view @loutput.log
  6488.          invoke @l\cmds\setup.dbg
  6489.          invoke @ld:\cmds\setup.dbg
  6490.          log @llpt2
  6491.  
  6492. QNX       @L[path]filename
  6493.  
  6494.        When "[path]" is not specified, the current working directory of
  6495.        the local machine is assumed.
  6496.  
  6497.        Example:
  6498.          view @loutput.log
  6499.          invoke @l/usr/fred/setup.dbg
  6500.          invoke @//7/usr/fred/setup.dbg
  6501.          log @l/dev/par2
  6502.  
  6503. The "@R" or "@r" prefix is used to indicate that the file resides on the
  6504. remote task machine.
  6505.  
  6506. DOS, OS/2, NetWare
  6507.        @R[d:][path]filename[.ext]
  6508.  
  6509.        When "[path]" is not specified, the current directory of the
  6510.        specified drive of the remote machine is assumed.  When "[d:]" is
  6511.        not specified, the current drive of the remote machine is
  6512.        assumed.
  6513.  
  6514.        Example:
  6515.          view @rmyappl.dat
  6516.          view @r\programs\src\uilib.c
  6517.          view @rd:\programs\exe\myappl.lnk
  6518.          log @rlpt1
  6519.  
  6520. QNX       @R[path]filename
  6521.  
  6522.        When "[path]" is not specified, the current working directory of
  6523.        the remote machine is assumed.
  6524.  
  6525.        Example:
  6526.          view @rmyappl.dat
  6527.          view @r/programs/src/uilib.c
  6528.          view @r//7/programs/exe/myappl.lnk
  6529.          log @r/dev/par1
  6530.  
  6531. Thus a file may be identified to the debugger in three different ways:
  6532.  
  6533. DOS, OS/2, NetWare
  6534.        [d:][path]filename[.ext]
  6535.  
  6536.        @L[d:][path]filename[.ext]
  6537.  
  6538.        @R[d:][path]filename[.ext]
  6539.  
  6540. QNX       [path]filename
  6541.  
  6542.        @L[path]filename
  6543.  
  6544.        @R[path]filename
  6545.  
  6546. A file of the first form resides on the debugger machine unless the
  6547. "REMotefiles" option has been specified, in which case, it resides on the
  6548. task machine.  A file of the second form always resides on the debugger
  6549. machine.  A file of the third form always resides on the task machine.
  6550.  
  6551. ┌────────────────────────────────────────────────────────────────────────────┐
  6552. │ Note:  The special drive prefixes "@L" and "@R" cannot be used in your own │
  6553. │ application to reference files on two different machines.  These prefixes  │
  6554. │ are recognized by VIDEO and the RFX utility only.  Should the situation    │
  6555. │ arise where one of your filenames begins with the same prefix ("@L", "@l", │
  6556. │ "@R" or "@r") then "@@" can be used.    For example, if your wish to refer   │
  6557. │ to the file on disk called "@link@" then you could specify "@@link@".      │
  6558. │ Note that ".\@link@" (DOS, OS/2, NetWare) or "./@link@" (QNX) would also   │
  6559. │ suffice.                                     │
  6560. └────────────────────────────────────────────────────────────────────────────┘
  6561.  
  6562.  
  6563. Interrupting an Executing Program on the Task Machine
  6564. ═════════════════════════════════════════════════════
  6565. Once a program has been loaded by VIDEO, its execution can be started by the
  6566. Go command (this command is described under the topic entitled "GO").  As is
  6567. sometimes the case during the development phase, a program may execute
  6568. endlessly.
  6569.  
  6570.  
  6571. Interrupting an Executing Program Under DOS
  6572. ───────────────────────────────────────────
  6573. When an application is executing under DOS on the task machine, it may be
  6574. interrupted by pressing one of the Print Screen (PrtSc) or System Request
  6575. (SysRq) keys on the task machine (the PC that is running the application).
  6576. On some keyboards, the Shift key must also be pressed to obtain the Print
  6577. Screen function.
  6578.  
  6579. The Ctrl/Break key combination may be pressed on the keyboard of the
  6580. debugger machine to interrupt execution of VIDEO commands.
  6581.  
  6582.  
  6583. Interrupting an Executing Program Under OS/2
  6584. ────────────────────────────────────────────
  6585. When an application is executing under OS/2 on the task machine, it may be
  6586. interrupted by pressing the Ctrl/Break key combination in the remote server
  6587. session (the session that is running the server program).
  6588.  
  6589. The Ctrl/Break key combination may be pressed in the VIDEO session of the
  6590. debugger machine to interrupt execution of VIDEO commands.
  6591.  
  6592.  
  6593. Interrupting an Executing Program Under QNX
  6594. ───────────────────────────────────────────
  6595. When an application is executing under QNX on the task machine, it may be
  6596. interrupted by pressing Ctrl/Break at the application's virtual console
  6597. (provided that the application has not taken over the SIGINT signal).  If
  6598. the application has taken over the SIGINT signal then the following
  6599. technique for interrupting program execution may be used.  Any signal that
  6600. will kill the executing application program (e.g., SIGKILL, SIGSEGV) may be
  6601. issued at another virtual console.  You must obtain the process-id of the
  6602. application program and then issue a "kill" command.
  6603.  
  6604. Example:
  6605.   $ kill -kill 1423
  6606.  
  6607. VIDEO will print a message in the "Dialogue" window indicating that the
  6608. program's execution has been interrupted.  Execution can be resumed with the
  6609. Go command.
  6610.  
  6611. The Ctrl/Break key combination may be pressed at the debugger's virtual
  6612. console to interrupt execution of VIDEO commands.
  6613. ::::REMOTE_WIN3
  6614. Remote Debugging of MS Windows Applications
  6615. ═══════════════════════════════════════════
  6616. We describe the use of two computers, one to run the application and one
  6617. to run the debugger, as "remote debugging".  We also would like to include
  6618. the use of multiple sessions such as you could get with a
  6619. multi-programming operating system like Windows or OS/2.  You can think of
  6620. it as running multiple "virtual" computers.  For our purposes, the
  6621. concepts of remote debugging are essentially the same for both cases.
  6622.  
  6623. We call the personal computer or session that is used to run the Windows
  6624. application the "task machine".  Microsoft Windows 3.x or IBM WIN-OS/2
  6625. must be installed on this system.  One of the VIDEO server tasks,
  6626. described below, must be present on the task machine so that it can be
  6627. started from Windows.  The application that is to be debugged must be
  6628. accessible from the task machine so that it can be loaded by the server
  6629. task running under Windows.
  6630.  
  6631. The other personal computer or session, called the "debugger machine", is
  6632. used to run the debugger.  When a separate computer is used, it is not
  6633. necessary for Windows to be installed on the system.  This system could be
  6634. running DOS, OS/2 or QNX.  The application's source files should be
  6635. accessible from the debugger machine so that VIDEO can display source
  6636. lines for a particular module.
  6637.  
  6638.  
  6639. Remote Debugging Using Two Computers
  6640. ════════════════════════════════════
  6641. Let us assume that PC #1 is your primary development machine.  It contains
  6642. your application, its data files, its source files, and the programs that
  6643. you have been using to develop your application (editor, compiler, linker,
  6644. debugger, etc.).  It also contains an installed copy of Microsoft Windows.
  6645.  
  6646. Let us assume that PC #2 is a spare machine that is available for your
  6647. use.  Since two computer systems are involved, there are two possible
  6648. scenarios.
  6649.  
  6650.   1. You could copy the application and any required data files to PC #2.
  6651.     You would also have to make sure that Microsoft Windows is installed
  6652.     on this machine.  In this scenario, your primary development machine
  6653.     (PC #1) will be used to run the debugger and your spare machine will
  6654.     be used to run your Windows application.  Thus, the source files for
  6655.     your application are present on the debugger machine.
  6656.  
  6657.   2. You could copy the debugger over to PC #2.  In this scenario, your
  6658.     primary development machine (PC #1) will be used to run your Windows
  6659.     application.  Unless you copy all of the application's source files to
  6660.     PC #2, the debugger will not have access to them.  In this case, you
  6661.     can use the VIDEO "REMotefiles" option to inform the debugger that
  6662.     source files are to be obtained over the communications link from the
  6663.     task machine (PC #1).  Another advantage to the "REMotefiles" option
  6664.     is that the debugger will also locate debugger command files, by
  6665.     default, on the task machine.  If this option is not specified then
  6666.     the debugger command files must also be copied over to the debugger
  6667.     machine (PC #2).
  6668.  
  6669. The decision as to which machine you should be using for the task and
  6670. which for the debugger is up to you.  In certain cases, it may depend on
  6671. the amount of available memory on each machine or the speed of their
  6672. respective processors.    If a large amount of memory is required for your
  6673. application then it makes sense that the task machine be the one with the
  6674. most memory.  If application execution speed is important then it makes
  6675. sense that the task machine be the faster of the two.
  6676.  
  6677. Remote Debugging of Microsoft Windows 3.x Applications
  6678. ══════════════════════════════════════════════════════
  6679. To use the remote debugging capabilities of VIDEO, Microsoft Windows 3.x
  6680. must be started in enhanced mode.  When debugging 32-bit applications, you
  6681. must include the "device" specification listed below in the [386Enh]
  6682. section of your Windows 3.x "SYSTEM.INI" file.
  6683.  
  6684.   DEVICE=[d:]\WATCOM\BINW\WDEBUG.386
  6685.  
  6686. This device driver supports debugging of both 16-bit and 32-bit
  6687. applications.
  6688.  
  6689. You must include the Windows 3.x SDK file "TOOLHELP.DLL" in your path.
  6690. This file is included in the WATCOM software package.
  6691.  
  6692.  
  6693. Debugging of 16-bit Windows Applications with IBM OS/2
  6694. ══════════════════════════════════════════════════════
  6695. The WIN-OS/2 and Virtual DOS Machine (VDM) features of OS/2 are used to
  6696. support debugging of 16-bit Windows applications.  The debugger is started
  6697. in an OS/2 session and it communicates, using the VDM interface, to a
  6698. server program running in a WIN-OS/2 session.
  6699.  
  6700. The following sections describe the different debug servers available for
  6701. remote debugging of Windows applications.
  6702.  
  6703.  
  6704. Communications Servers for Windows and WIN-OS/2
  6705. ═══════════════════════════════════════════════
  6706. A server task must be run on the task machine before VIDEO is started on
  6707. the debugger machine.  There are three servers provided for use with VIDEO
  6708. under MS Windows 3.x and IBM WIN-OS/2.
  6709.  
  6710. PARSERVW.EXE This program supports remote debugging of Windows applications
  6711.          over the parallel port.
  6712.  
  6713. NETSERVW.EXE This program supports remote debugging of Windows applications
  6714.          using NetBIOS support.
  6715.  
  6716. VDMSERVW.EXE (OS/2 Only) This program supports remote debugging of Windows
  6717.          applications running under IBM WIN-OS/2 using a Virtual DOS
  6718.          Machine link.  In the following discussion, the "task machine"
  6719.          is the WIN-OS/2 session in which the server is started and the
  6720.          "debugger machine" is the OS/2 session in which the debugger
  6721.          is started.
  6722.  
  6723. These programs are described in subsequent sections.
  6724.  
  6725.  
  6726. An Example of a PC to PC Communication Link
  6727. ═══════════════════════════════════════════
  6728. In the following diagram, we illustrate the use of VIDEO running on a second
  6729. computer system to debug an application running under Windows on the first
  6730. computer system.  In the example, parallel communications are used.
  6731.  
  6732.     PC #1              PC #2
  6733.   ┌────────────────┐        ┌────────────────┐
  6734.   │  Task Machine  │        │Debugger Machine│
  6735.   │    Windows       │        │       DOS         │
  6736.   │           │        │             │
  6737.   │    PARSERVW<───│────┐   │      WVIDEO     │
  6738.   │      │       │    │   │        │         │
  6739.   │      V       │    │   │        V         │
  6740.   │  trap handler  │    └───│──>trap handler │
  6741.   │    STD.DLL       │        │     PAR.TRP     │
  6742.   └────────────────┘        └────────────────┘
  6743.  
  6744. Figure 29. MS Windows Debugging using Two Computer Systems
  6745.  
  6746. Notes:
  6747.  
  6748.   1. You should note the following regarding keyboard input.  Anything that
  6749.     is typed to the debugger itself must be typed on the debugger machine.
  6750.     As well, anything that is typed to the application being debugged must
  6751.     be typed on the task machine.
  6752.  
  6753.   2. The same is true of screen output.  All debugger output comes out on
  6754.     the debugger machine, while all program output occurs on the task
  6755.     machine.
  6756.  
  6757.  
  6758. Starting the Windows Debug Communications Servers
  6759. ═════════════════════════════════════════════════
  6760. Select the window in which you have installed the VIDEO Debug Server
  6761. programs.  Icons are presented for each of the debug servers.
  6762. Double-click on the one that you wish to use.
  6763.  
  6764.  
  6765. Remote Debugging Over the Parallel Port
  6766. ═══════════════════════════════════════
  6767. The parallel port server task must be started on the task machine before
  6768. VIDEO is started on the debugger machine.  This is required since VIDEO will
  6769. begin to communicate immediately with the task machine via this special
  6770. server program.
  6771.  
  6772. The wiring required for parallel communications is described under the topic
  6773. entitled "WIRING" in the section entitled "Parallel Port Wiring
  6774. Considerations".
  6775.  
  6776. For Microsoft Windows, the formal parallel port debug server command line
  6777. syntax is shown below.
  6778.  
  6779. ┌──────────────────────────────────────────────────────────────────────────┐
  6780. │ PARSERVW [port_number]                           │
  6781. └──────────────────────────────────────────────────────────────────────────┘
  6782.  
  6783. The parallel port server task can also be started by clicking on its icon
  6784. in the program group in which it is installed.
  6785.  
  6786. The parallel server task can be told the number (1, 2, 3) of the parallel
  6787. port to use.  The default port number is 1.
  6788.  
  6789. These numbers correspond to the device number used when specifying the
  6790. parallel printer device "LPTx" (as in "LPT1", "LPT2", etc.).
  6791.  
  6792. When debugging over the parallel port, the following files are required on
  6793. the task machine:
  6794.  
  6795.   1. the parallel port server task, "PARSERVW.EXE",
  6796.  
  6797.   2. the interface to Microsoft Windows, "STD.DLL",
  6798.  
  6799.   3. the Microsoft SDK file, "TOOLHELP.DLL",
  6800.  
  6801.   4. the device driver, "WDEBUG.386",
  6802.  
  6803.   5. the executable file to be debugged, and
  6804.  
  6805.   6. any data files required by the executable.
  6806.  
  6807. The following files are required on the debugger machine:
  6808.  
  6809.   1. the WATCOM debugger
  6810.  
  6811.     DOS, OS/2  WVIDEO.EXE
  6812.     QNX        wvideo
  6813.  
  6814.   2. one of the following trap files:
  6815.  
  6816.     DOS        PAR.TRP
  6817.     OS/2       PAR.DLL
  6818.     QNX        par.trp
  6819.  
  6820.  
  6821. Remote Debugging Using NetBIOS Support (DOS, OS/2 Only)
  6822. ═══════════════════════════════════════════════════════
  6823. Debugging with the NetBIOS network programming interface can also be done.
  6824. Remote debugging with this network protocol requires that the NetBIOS server
  6825. task be run on the task machine before VIDEO is started on the debugger
  6826. machine.  This is required since VIDEO will begin to communicate immediately
  6827. with the task machine via this special server program.
  6828.  
  6829. For Microsoft Windows, the formal NetBIOS debug server command line syntax
  6830. is shown below.
  6831.  
  6832. ┌──────────────────────────────────────────────────────────────────────────┐
  6833. │ NETSERVW [server_name]                           │
  6834. └──────────────────────────────────────────────────────────────────────────┘
  6835.  
  6836. The NetBIOS server task can also be started by clicking on its icon in the
  6837. program group in which it is installed.
  6838.  
  6839. A "server name" can be specified.  The server name is case sensitive and it
  6840. must be unique (you will be notified if it is not unique).  The name may be
  6841. up to 15 alphanumeric characters.  The server name uniquely identifies the
  6842. server to VIDEO running on the debugger machine.  The default server name is
  6843. "NetLink".
  6844.  
  6845. When debugging with the NetBIOS network programming interface, the following
  6846. files are required on the task machine:
  6847.  
  6848.   1. the NetBIOS server task, "NETSERVW.EXE",
  6849.  
  6850.   2. the interface to Microsoft Windows, "STD.DLL",
  6851.  
  6852.   3. the Microsoft SDK file, "TOOLHELP.DLL",
  6853.  
  6854.   4. the device driver, "WDEBUG.386",
  6855.  
  6856.   5. the executable file to be debugged, and
  6857.  
  6858.   6. any data files required by the executable.
  6859.  
  6860. The following files are required on the debugger machine:
  6861.  
  6862.   1. the WATCOM debugger
  6863.  
  6864.     DOS, OS/2  WVIDEO.EXE
  6865.  
  6866.   2. one of the following trap files:
  6867.  
  6868.     DOS        NET.TRP
  6869.     OS/2       NET.DLL
  6870.  
  6871.  
  6872. Debugging Using OS/2 Virtual DOS Machine Links
  6873. ══════════════════════════════════════════════
  6874. Debugging of a Windows application running under WIN-OS/2 can also be
  6875. done.  Remote debugging under OS/2 requires that a server task be run
  6876. under WIN-OS/2 (the "task" window) before VIDEO is started in an OS/2
  6877. session (the "debugger" window).  This is required since VIDEO will begin
  6878. to communicate immediately with the task window via this special server
  6879. program.
  6880.  
  6881. For WIN-OS/2, the formal Virtual DOS Machine (VDM) debug server command
  6882. line syntax is shown below.
  6883.  
  6884. ┌──────────────────────────────────────────────────────────────────────────┐
  6885. │ VDMSERVW [server_name]                           │
  6886. └──────────────────────────────────────────────────────────────────────────┘
  6887.  
  6888. The VDM server task can also be started by clicking on its icon in the
  6889. program group in which it is installed.
  6890.  
  6891. The server name is case insensitive and it must be unique (you will be
  6892. notified if it is not unique).    The name may be any string of alphanumeric
  6893. characters.  The server name uniquely identifies the server to VIDEO
  6894. running in the debugger window.  The default server name is "VDMLink".
  6895.  
  6896. When debugging applications running under WIN-OS/2, the following files
  6897. are required for the task window:
  6898.  
  6899.   1. the WIN-OS/2 VDM server task, "VDMSERVW.EXE",
  6900.  
  6901.   2. the interface to Windows, "STD.DLL",
  6902.  
  6903.   3. the executable file to be debugged, and
  6904.  
  6905.   4. any data files required by the executable.
  6906.  
  6907. The following files are required on the debugger machine:
  6908.  
  6909.   1. the WATCOM debugger, "WVIDEO.EXE", and
  6910.  
  6911.   2. the trap file, "VDM.DLL".
  6912. ::::RFX
  6913. Remote File Operations (DOS, OS/2 Only)
  6914. ═══════════════════════════════════════
  6915.  
  6916. The Remote File eXchange program, RFX, may be used to manipulate files on a
  6917. personal computer which is connected to your personal computer using one of
  6918. the connection strategies described later on under this topic.    The types of
  6919. file operations that are supported on both local and remote machines
  6920. include:
  6921.  
  6922.   1. directory creation, listing and removal,
  6923.  
  6924.   2. setting of current drive and directory, and
  6925.  
  6926.   3. file display, renaming, erasure, and copying (including PC to PC file
  6927.     transfers).
  6928.  
  6929. The PC to PC links that are currently supported are:
  6930.  
  6931.   1. serial port to serial port,
  6932.  
  6933.   2. parallel port to parallel port,
  6934.  
  6935.   3. the Novell "NetWare" network, and
  6936.  
  6937.   4. the NetBIOS network programming interface.
  6938.  
  6939. To run the remote file operations utility, RFX, the following syntax is
  6940. used.
  6941.  
  6942. ┌──────────────────────────────────────────────────────────────────────────┐
  6943. │ RFX trap_file[;trap_parm] [rfx_cmd]                       │
  6944. └──────────────────────────────────────────────────────────────────────────┘
  6945.  
  6946. The name of a trap file must be specified when running RFX.  These files
  6947. handle the machine-to-machine communication required for remote file
  6948. operations.
  6949.  
  6950. For DOS, the file extension defaults to ".TRP".  The DOS PATH environment
  6951. variable must contain the path of the trap files.  Trap files are usually
  6952. located in the "BIN" sub-directory of the directory that VIDEO is installed
  6953. in.
  6954.  
  6955. For OS/2, the file extension defaults to ".DLL".  The OS/2 LIBPATH directive
  6956. in the "CONFIG.SYS" file must be used to identify the location of the "DLL"
  6957. trap files.  Trap files are usually located in the "BINP\DLL" sub-directory
  6958. of the directory that VIDEO is installed in.
  6959.  
  6960. Trap files are described in the next section.
  6961.  
  6962. An optional command rfx_cmd may be specified.  RFX commands are described in
  6963. the sections following "RFX Commands".    When RFX is run without specifying a
  6964. command then RFX may be used in an interactive mode.  A prompt will appear
  6965. that resembles your DOS or OS/2 prompt.  Commands will be processed by RFX
  6966. until the "EXIT" command is entered.
  6967.  
  6968.  
  6969. Trap Files
  6970. ══════════
  6971. The following trap files may be used with RFX to support machine-to-machine
  6972. communications.
  6973.  
  6974. STD.TRP, STD16.DLL, STD32.DLL
  6975.        Under DOS, if you do not specify a trap file, the default trap
  6976.        file "STD.TRP" will be loaded.  Under OS/2 1.x, if you do not
  6977.        specify a trap file, the default trap file "STD16.DLL" will be
  6978.        loaded.  Under OS/2 2.x, if you do not specify a trap file, the
  6979.        default trap file "STD32.DLL" will be loaded.  These interface
  6980.        modules support file operations on the local personal computer
  6981.        only.  No remote file operations are possible.  The optional
  6982.        "trap_parm" is ignored.
  6983.  
  6984.  
  6985. SER.TRP, SER.DLL
  6986.        This communications driver file supports remote file operations
  6987.        between two personal computers using the serial ports of the two
  6988.        machines.  If RFX is to run under DOS then "SER.TRP" must be
  6989.        used.  If RFX is to run under OS/2 then "SER.DLL" must be used.
  6990.        The serial port of the local machine is connected to the serial
  6991.        port of the remote machine.    The "trap_parm" value specifies the
  6992.        port number to use and an optional maximum BAUD rate (which is
  6993.        separated from the port number by a period).  The port number is
  6994.        1, 2, 3 or 4 (default is 1).  These numbers correspond to the
  6995.        device number used when specifying the serial device "COMx" (as
  6996.        in "COM1", "COM2", etc.).
  6997.  
  6998.        Under DOS, the maximum BAUD rate can be one of:
  6999.  
  7000.          115200
  7001.           57600
  7002.           38400
  7003.           19200
  7004.            9600
  7005.            4800
  7006.            2400
  7007.            1200
  7008.           0 (a special case)
  7009.  
  7010.        The default maximum BAUD rate is 115,200.
  7011.  
  7012.        Under OS/2, the maximum BAUD rate can be one of:
  7013.  
  7014.           19200
  7015.            9600
  7016.            4800
  7017.            2400
  7018.            1200
  7019.           0 (a special case)
  7020.  
  7021.        The default maximum BAUD rate is 19,200.
  7022.  
  7023.        Except for the special BAUD rate of 0, a minimum of two digits
  7024.        must be specified to identify the desired maximum BAUD rate.  The
  7025.        maximum BAUD rate is explained in the section "Remote File
  7026.        Operations Over the Serial Port".  In the following example, port
  7027.        2 and a maximum BAUD rate of 19,200 is specified.
  7028.  
  7029.        Example:
  7030.          /trap=ser;2.19
  7031.  
  7032. PAR.TRP, PAR.DLL
  7033.        This communications driver file supports remote file operations
  7034.        between two personal computers using the parallel ports of the
  7035.        two machines.  If RFX is to run under DOS then "PAR.TRP" must be
  7036.        used.  If RFX is to run under OS/2 then "PAR.DLL" must be used.
  7037.        The parallel port of the local machine is connected to the
  7038.        parallel port of the remote machine.  The port number to use is
  7039.        specified by "trap_parm".  The port number is 1, 2 or 3 (default
  7040.        is 1).  These numbers correspond to the device number used when
  7041.        specifying the printer device "LPTx" (as in "LPT1", "LPT2",
  7042.        etc.).
  7043.  
  7044. NOV.TRP, NOV.TRP
  7045.        This communications driver file supports remote file operations
  7046.        between two personal computers that are connected to the Novell
  7047.        "NetWare" network.  Version 2.0 or higher of NetWare must be
  7048.        used.  The server name to use is specified by "trap_parm".  The
  7049.        server name must match the name that you specified when starting
  7050.        the server on the "task" machine.  The notion of a "server" is
  7051.        explained in the section "Communications Servers".
  7052.  
  7053. NET.TRP, NET.DLL
  7054.        This communications driver file supports remote file operations
  7055.        between two personal computers using the NetBIOS network
  7056.        programming interface.  The server name to use is specified by
  7057.        "trap_parm".  The server name must match the name that you
  7058.        specified when starting the server on the remote machine.  The
  7059.        server name may consist of up to 15 alphanumeric characters.  The
  7060.        notion of a "server" is explained in the section "Communications
  7061.        Servers".
  7062.  
  7063.  
  7064. Communications Servers
  7065. ══════════════════════
  7066. The remote file manipulation facility requires that a server task be run on
  7067. the remote machine before RFX is started on the local machine.    There are
  7068. four such servers provided for use with RFX.
  7069.  
  7070. SERSERV.EXE This program supports remote file operations over the serial
  7071.        port.
  7072.  
  7073. PARSERV.EXE This program supports remote file operations over the parallel
  7074.        port.
  7075.  
  7076. NOVSERV.EXE This program supports remote file operations over the Novell
  7077.        "NetWare" network.
  7078.  
  7079. NETSERV.EXE This program supports remote file operations using NetBIOS
  7080.        support.
  7081.  
  7082. These programs are described in the following sections.
  7083.  
  7084.  
  7085. Remote File Operations Over the Serial Port
  7086. ═══════════════════════════════════════════
  7087. Remote file operations over the serial port require that a server task be
  7088. run on the remote machine before RFX is started on the local machine.  This
  7089. is required since RFX will immediately begin to communicate with the remote
  7090. machine via this special server program.
  7091.  
  7092. RFX and the server will automatically synchronize on a communications speed.
  7093. They may communicate at rates as high as 115,200 BAUD.    Since the BAUD rate,
  7094. parity, number of data bits and stop bits is automatically chosen, the DOS
  7095. or OS/2 "MODE" command need not be used.
  7096.  
  7097. For DOS or OS/2, the formal serial port server command line syntax is shown
  7098. below.
  7099.  
  7100. ┌──────────────────────────────────────────────────────────────────────────┐
  7101. │ SERSERV [/TRap=trap_file[;trap_parm]] [port_number][.max_baud]       │
  7102. └──────────────────────────────────────────────────────────────────────────┘
  7103.  
  7104. The "port_number" for the serial server is the serial port number (between 1
  7105. and 4) that the server should use to communicate with the RFX running on the
  7106. local machine.    The default port number is 1.  These numbers correspond to
  7107. the device number used when specifying a serial device "COMx" (as in "COM1",
  7108. "COM2", etc.).
  7109.  
  7110. The optional "max_baud" value specifies the maximum BAUD rate.    It is
  7111. separated from the port number by a period.  The maximum BAUD rate can be
  7112. one of:
  7113.  
  7114.   115200
  7115.    57600
  7116.    38400
  7117.    19200
  7118.     9600
  7119.     4800
  7120.     2400
  7121.     1200
  7122.        0 (a special case)
  7123.  
  7124. The default maximum BAUD rate is 115,200.  Except for the special BAUD rate
  7125. of 0, a minimum of two digits must be specified to identify the desired
  7126. maximum BAUD rate.  Specification of a maximum BAUD rate is useful when the
  7127. maximum rate at which the two machines can communicate effectively is known.
  7128. The server and RFX normally start at the fastest possible speed and work
  7129. downwards until an effective (error-free) rate is established.    Each trial
  7130. speed can require up to 5 seconds to test.  If the maximum rate is specified
  7131. ahead of time, this will help reduce the startup time.    The BAUD rate
  7132. actually selected will be the minimum of the maximum rates specified when
  7133. both the server and RFX are started and the rate at which the two can
  7134. effectively communicate.  An example may help to explain this.
  7135.  
  7136. Example:
  7137.   Remote machine: C>serserv 2.38400
  7138.   Local  machine: D>rfx ser;1.57600
  7139.  
  7140. In the above example, the maximum rate at which the two machines could
  7141. communicate is 38,400 BAUD (since it is the minimum of 38,400 and 57,600).
  7142. However, the actual rate selected for effective communications may be less
  7143. than this.
  7144.  
  7145. If 0 is specified for the maximum BAUD rate when both the server and RFX are
  7146. started, the process of searching for the maximum rate at which the two
  7147. machines can communicate is eliminated.  The BAUD rate for each side must be
  7148. established through other means (such as the DOS or OS/2 "MODE" command) and
  7149. the rates must be identical.  The parity, word length and number of stop
  7150. bits are selected by the server and RFX so you need not specify these
  7151. parameters.  The BAUD rate value 0 should be specified when modems are
  7152. employed between the two machines.
  7153.  
  7154. Example:
  7155.   Remote machine: C>mode com2:2400
  7156.   Remote machine: C>serserv 2.0
  7157.   Local  machine: D>mode com1:2400
  7158.   Local  machine: D>rfx ser;1.0
  7159.  
  7160. In the above example, the rate at which the two machines can communicate is
  7161. 2400 BAUD (since it is the specified externally using the DOS or OS/2 "MODE"
  7162. command).
  7163.  
  7164. The "TRap" option is only specified in special applications where more than
  7165. two personal computers are chained together in series.    "SERSERV" receives
  7166. requests over a serial port.  It can process these requests locally or pass
  7167. them on to a server running on another computer system.  By default,
  7168. requests will be handled locally by the "STD.TRP" file when DOS is running,
  7169. the "STD16.DLL" file when OS/2 1.x is running, and the "STD32.DLL" file when
  7170. OS/2 2.x is running.
  7171.  
  7172. When manipulating files over the serial port, the following files are
  7173. required on the remote machine:
  7174.  
  7175.   SERSERV.EXE
  7176.   STD.TRP, STD16.DLL, or STD32.DLL
  7177.  
  7178. The following files are required on the local machine:
  7179.  
  7180.   RFX.EXE
  7181.   SER.TRP or SER.DLL
  7182.  
  7183. The following is a sequence of commands that one might issue on DOS to
  7184. manipulate files remotely over the serial port:
  7185.  
  7186.   Remote machine: C>serserv 2
  7187.   Local  machine: D>rfx ser;1
  7188.   Local  machine: commands such as "copy", "dir", etc.
  7189.   Local  machine: exit
  7190.   Remote machine: q
  7191.  
  7192. In the example, serial port 2 is used on the remote machine and serial port
  7193. 1 is used on the local machine.  An appropriately-wired cable (described
  7194. below) runs between serial port 2 of the remote machine and serial port 1 of
  7195. the local machine.  Messages will appear on both the remote and local
  7196. machines indicating the BAUD rate at which the two machines are
  7197. communicating.
  7198.  
  7199. The final "q" typed on the keyboard of the remote machine is used to
  7200. terminate the server.  If this is not done, the server returns to its
  7201. start-up state and you could rerun RFX or run VIDEO.
  7202.  
  7203. The wiring required for serial communications is described under the topic
  7204. entitled "WIRING" in the section entitled "Serial Port Wiring Considerations".
  7205.  
  7206.  
  7207. Remote File Operations Over the Parallel Port
  7208. ═════════════════════════════════════════════
  7209. Remote file operations over the the parallel port are significantly faster
  7210. than the serial port.  Remote file operations over the parallel port require
  7211. that a server task be run on the remote machine before RFX is started on the
  7212. local machine.    This is required since RFX will immediately begin to
  7213. communicate with the remote machine via this special server program.
  7214.  
  7215. For DOS or OS/2, the formal parallel port server command line syntax is
  7216. shown below.
  7217.  
  7218. ┌──────────────────────────────────────────────────────────────────────────┐
  7219. │ PARSERV [/TRap=trap_file[;trap_parm]] [port_number]               │
  7220. └──────────────────────────────────────────────────────────────────────────┘
  7221.  
  7222. The "port_number" for the parallel server is the parallel port number
  7223. (between 1 and 3) that the server should use to communicate with RFX running
  7224. on the local machine.  The default port number is 1.  These numbers
  7225. correspond to the device number used when specifying the parallel printer
  7226. device "LPTx" (as in "LPT1", "LPT2", etc.).
  7227.  
  7228. The "TRap" option is only specified in special applications where more than
  7229. two personal computers are chained together in series.    "PARSERV" receives
  7230. requests over a parallel port.    It can process these requests locally or
  7231. pass them on to a server running on another computer system.  By default,
  7232. requests will be handled locally by the "STD.TRP" file when DOS is running,
  7233. the "STD16.DLL" file when OS/2 1.x is running, and the "STD32.DLL" file when
  7234. OS/2 2.x is running.
  7235.  
  7236. When manipulating files over the parallel port, the following files are
  7237. required on the remote machine:
  7238.  
  7239.   PARSERV.EXE
  7240.   STD.TRP, STD16.DLL, or STD32.DLL
  7241.  
  7242. The following files are required on the local machine:
  7243.  
  7244.   RFX.EXE
  7245.   PAR.TRP or PAR.DLL
  7246.  
  7247. The following is a sequence of commands that one might issue on DOS to
  7248. manipulate files remotely over the parallel port:
  7249.  
  7250.   Remote machine: C>parserv 1
  7251.   Local  machine: D>rfx par;2
  7252.   Local  machine: commands such as "copy", "dir", etc.
  7253.   Local  machine: exit
  7254.   Remote machine: q
  7255.  
  7256. In the example, parallel port 1 is used on the remote machine and parallel
  7257. port 2 is used on the local machine.  An appropriately-wired cable
  7258. (described below) runs between parallel port 1 of the remote machine and
  7259. parallel port 2 of the local machine.
  7260.  
  7261. The final "q" typed on the keyboard of the remote machine is used to
  7262. terminate the server.  If this is not done, the server returns to its
  7263. start-up state and you could rerun RFX or run VIDEO.
  7264.  
  7265. The wiring required for parallel communications is described under the topic
  7266. entitled "WIRING" in the section entitled "Parallel Port Wiring
  7267. Considerations".
  7268.  
  7269.  
  7270. Remote File Operations Over the Novell "NetWare" Network
  7271. ════════════════════════════════════════════════════════
  7272. Remote file operations over the Novell "NetWare" network requires the
  7273. NetWare shell.    The Internetwork Packet Exchange (IPX) must be loaded first
  7274. and the server task must be run on the remote machine before RFX is started
  7275. on the local machine.  This is required since RFX will immediately begin to
  7276. communicate with the remote machine via this special server program.
  7277.  
  7278. For DOS or OS/2, the formal NetWare server command line syntax is shown
  7279. below.
  7280.  
  7281. ┌──────────────────────────────────────────────────────────────────────────┐
  7282. │ NOVSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  7283. └──────────────────────────────────────────────────────────────────────────┘
  7284.  
  7285. The "server_name" is case insensitive and it must be unique (you will be
  7286. notified if it is not unique).    The name is restricted to less than 48
  7287. characters.  It cannot contain the following special characters:
  7288.  
  7289.   / \ : ; . , * ? + -
  7290.  
  7291. Any invalid characters are removed and any excess characters are dropped
  7292. from the name.    The "server_name" uniquely identifies the server to RFX
  7293. running on the local machine.  The default "server_name" is "NovLink".
  7294.  
  7295. The "TRap" option is only specified in special applications where more than
  7296. two personal computers are chained together in series.    "NOVSERV" receives
  7297. requests over the "NetWare" network.  It can process these requests locally
  7298. or pass them on to a server running on another computer system.  By default,
  7299. requests will be handled locally by the "STD.TRP" file when DOS is running,
  7300. the "STD16.DLL" file when OS/2 1.x is running, and the "STD32.DLL" file when
  7301. OS/2 2.x is running.
  7302.  
  7303. When manipulating files over the "NetWare" network, the following files are
  7304. required on the remote machine:
  7305.  
  7306.   NOVSERV.EXE
  7307.   STD.TRP, STD16.DLL, or STD32.DLL
  7308.  
  7309. The following files are required on the local machine:
  7310.  
  7311.   RFX.EXE
  7312.   NOV.TRP or NOV.DLL
  7313.  
  7314. The following is a sequence of commands that one might issue on DOS to
  7315. manipulate files remotely over the "NetWare" network:
  7316.  
  7317.   Remote machine: C>novserv rmt_dbg
  7318.   Local  machine: D>rfx nov;rmt_dbg
  7319.   Local  machine: commands such as "copy", "dir", etc.
  7320.   Local  machine: exit
  7321.   Remote machine: q
  7322.  
  7323. In the example, server name "RMT_DBG" is used on the remote machine so
  7324. server name "RMT_DBG" is also used on the local machine.
  7325.  
  7326. The final "q" typed on the keyboard of the remote machine is used to
  7327. terminate the server.  If this is not done, the server returns to its
  7328. start-up state and you could rerun RFX or run VIDEO.
  7329.  
  7330.  
  7331. Remote File Operations Using NetBIOS Support
  7332. ════════════════════════════════════════════
  7333. Remote file operations using the NetBIOS network programming interface can
  7334. also be done.  Remote file operations using this network protocol requires
  7335. that a server task be run on the remote machine before RFX is started on the
  7336. local machine.    This is required since RFX will immediately begin to
  7337. communicate with the remote machine via this special server program.
  7338.  
  7339. For DOS or OS/2, the formal NetBIOS server command line syntax is shown
  7340. below.
  7341.  
  7342. ┌──────────────────────────────────────────────────────────────────────────┐
  7343. │ NETSERV [/TRap=trap_file[;trap_parm]] [server_name]               │
  7344. └──────────────────────────────────────────────────────────────────────────┘
  7345.  
  7346. The "server_name" is case sensitive and it must be unique (you will be
  7347. notified if it is not unique).    The name may be up to 15 alphanumeric
  7348. characters.  The "server_name" uniquely identifies the server to RFX running
  7349. on the local machine.  The default "server_name" is "NetLink".
  7350.  
  7351. The "TRap" option is only specified in special applications where more than
  7352. two personal computers are chained together in series.    "NETSERV" receives
  7353. requests over a network using the NetBIOS network programming interface.  It
  7354. can process these requests locally or pass them on to a server running on
  7355. another computer system.  By default, requests will be handled locally by
  7356. the "STD.TRP" file when DOS is running, the "STD16.DLL" file when OS/2 1.x
  7357. is running, and the "STD32.DLL" file when OS/2 2.x is running.
  7358.  
  7359. When manipulating files with the NetBIOS network programming interface, the
  7360. following files are required on the remote machine:
  7361.  
  7362.   NETSERV.EXE
  7363.   STD.TRP, STD16.DLL, or STD32.DLL
  7364.  
  7365. The following files are required on the local machine:
  7366.  
  7367.   RFX.EXE
  7368.   NET.TRP or NET.DLL
  7369.  
  7370. The following is a sequence of commands that one might issue on DOS to
  7371. manipulate files remotely with the NetBIOS network programming interface:
  7372.  
  7373.   Remote machine: C>netserv rmt_dbg
  7374.   Local  machine: D>rfx net;rmt_dbg
  7375.   Local  machine: commands such as "copy", "dir", etc.
  7376.   Local  machine: exit
  7377.   Remote machine: q
  7378.  
  7379. In the example, server name "rmt_dbg" is used on the remote machine so
  7380. server name "rmt_dbg" is also used on the local machine.
  7381.  
  7382. The final "q" typed on the keyboard of the remote machine is used to
  7383. terminate the server.  If this is not done, the server returns to its
  7384. start-up state and you could rerun RFX or run VIDEO.
  7385.  
  7386.  
  7387. Specifying Files on Remote and Local Machines
  7388. ═════════════════════════════════════════════
  7389. When using the remote file operations facility, a method for identifying
  7390. files on either of the local or remote machines is required.  In order to
  7391. identify files on either the local or remote machine, two special prefixes
  7392. are supported by RFX.
  7393.  
  7394. @L       The "@L" prefix is used to indicate that the file resides on the
  7395.        local machine (the one on which RFX is running).
  7396.  
  7397.          @L[d:][path]filename[.ext]
  7398.  
  7399.        When "[path]" is not specified, the current directory of the
  7400.        specified drive of the local machine is assumed.  When "[d:]" is
  7401.        not specified, the current drive of the local machine is assumed.
  7402.  
  7403.        Example:
  7404.          TYPE @LOUTPUT.LOG
  7405.          COPY @LOUTPUT.LOG @LLPT2
  7406.          DIR @LD:\CMDS
  7407.          ERASE @LD:\CMDS\DATA.TMP
  7408.  
  7409. @R       The "@R" prefix is used to indicate that the file resides on the
  7410.        remote machine.
  7411.  
  7412.          @R[d:][path]filename[.ext]
  7413.  
  7414.        When "[path]" is not specified, the current directory of the
  7415.        specified drive of the remote machine is assumed.  When "[d:]" is
  7416.        not specified, the current drive of the remote machine is
  7417.        assumed.
  7418.  
  7419.        Example:
  7420.          TYPE @RMYAPPL.DAT
  7421.          ERASE @RD:\PROGRAMS\EXE\MYAPPL.LNK
  7422.          DIR @R\PROGRAMS\SRC
  7423.          COPY @R\PROGRAMS\SRC\UILIB.C @RLPT1
  7424.  
  7425. Thus a file may be identified to RFX in three different ways.
  7426.  
  7427.   [d:][path]filename[.ext]
  7428.   @L[d:][path]filename[.ext]
  7429.   @R[d:][path]filename[.ext]
  7430.  
  7431. A file of the first form resides on either the local or remote machine
  7432. depending on whether the current drive is a local or remote drive.  A file
  7433. of the second form always resides on the local machine.  A file of the third
  7434. form always resides on the remote machine.
  7435.  
  7436. Notes:
  7437.  
  7438.   1. In the each form, the omission of "[d:]" indicates the current drive.
  7439.  
  7440.       [path]filename[.ext]
  7441.       @L[path]filename[.ext]
  7442.       @R[path]filename[.ext]
  7443.  
  7444.   2. In the each form, the omission of "[path]" indicates the current path
  7445.     of the specified drive.
  7446.  
  7447.       [d:]filename[.ext]
  7448.       @L[d:]filename[.ext]
  7449.       @R[d:]filename[.ext]
  7450.  
  7451.     Observe that if "[d:]" is omitted also then the following forms are
  7452.     obtained:
  7453.  
  7454.       filename[.ext]
  7455.       @Lfilename[.ext]
  7456.       @Rfilename[.ext]
  7457.  
  7458.   3. The special drive prefixes "@L" and "@R" cannot be used in your own
  7459.     application to reference files on two different machines.  These
  7460.     prefixes are recognized by RFX and VIDEO only.  Should the situation
  7461.     arise where one of your filenames begins with the same prefix ("@L",
  7462.     "@l", "@R" or "@r") then "@@" can be used.    For example, if your wish to
  7463.     refer to the file on disk called "@link@" then you could specify
  7464.     "@@link@".    Note that ".\@link@" would also suffice.
  7465.  
  7466.  
  7467. RFX Commands
  7468. ════════════
  7469. When RFX is run without specifying a command, the DOS or OS/2 prompt will
  7470. change as illustrated in the following example.
  7471.  
  7472. Example:
  7473.   Mon  11-06-1989 15:17:05.84 E:\DOC\UG
  7474.   E>rfx par
  7475.   [RFX] Mon  11-06-1989 15:17:12.75 @LE:\DOC\UG
  7476.   [RFX] E>
  7477.  
  7478. Note that the current drive specifier "E" in "E:\DOC\UG" has changed to
  7479. "@LE" indicating that the current drive is the local "E" drive.
  7480.  
  7481. Any command can be typed in response to the prompt.  RFX recognizes a
  7482. special set of commands and passes all others on to DOS or OS/2 for
  7483. processing.  The following sections describe RFX commands.
  7484.  
  7485.  
  7486. Set Current Drive - drive:
  7487. ══════════════════════════
  7488. ┌──────────────────────────────────────────────────────────────────────────┐
  7489. │ drive:                                   │
  7490. └──────────────────────────────────────────────────────────────────────────┘
  7491.  
  7492. The current drive and locale can be set using this command.  The "@L" or
  7493. "@R" prefix may be used to specify the locale (local or remote).
  7494.  
  7495. Example:
  7496.   d:
  7497.  
  7498. Make the "D" disk of the current locale (local or remote) the current drive.
  7499. Since the locale is not specified, it remains unchanged.
  7500.  
  7501. Example:
  7502.   @rc:
  7503.  
  7504. Make the "C" disk of the remote machine the current drive.  Both locale and
  7505. disk are specified.
  7506.  
  7507. Example:
  7508.   @le:
  7509.  
  7510. Make the "E" disk of the local machine the current drive.  Both locale and
  7511. disk are specified.
  7512.  
  7513.  
  7514. Change Directory - CHDIR, CD
  7515. ════════════════════════════
  7516. ┌──────────────────────────────────────────────────────────────────────────┐
  7517. │ chdir dir_spec                               │
  7518. │ cd dir_spec                                   │
  7519. └──────────────────────────────────────────────────────────────────────────┘
  7520.  
  7521. This command may be used to change the current directory of any disk on the
  7522. local or remote machine.  CD is a short form for CHDIR.  The "@L" or "@R"
  7523. prefix may be used to specify the locale (local or remote).
  7524.  
  7525. Example:
  7526.   cd \tmp
  7527.  
  7528. Make the "TMP" directory of the current drive the current directory.
  7529.  
  7530. Example:
  7531.   cd d:\etc
  7532.  
  7533. Make the "ETC" directory of the "D" disk of the current locale (local or
  7534. remote) the current directory of that drive.
  7535.  
  7536. Example:
  7537.   cd @rc:\demo
  7538.  
  7539. Make the "DEMO" directory of the "C" disk of the remote machine the current
  7540. directory of that drive.  Both locale and disk are specified.
  7541.  
  7542. Example:
  7543.   cd @le:test
  7544.  
  7545. Make the "TEST" subdirectory of the current directory of the "E" disk of the
  7546. local machine the current directory of that drive.  Both locale and disk are
  7547. specified.
  7548.  
  7549.  
  7550. Copy Files - COPY
  7551. ═════════════════
  7552. ┌──────────────────────────────────────────────────────────────────────────┐
  7553. │ copy [/s] src_spec [dst_spec] [/s]                       │
  7554. └──────────────────────────────────────────────────────────────────────────┘
  7555.  
  7556. The COPY command operates in a manner very similar to the DOS "COPY" and
  7557. "XCOPY" commands.  Files may be copied from the local machine to the local
  7558. or remote machine.  Similarly files may be copied from the remote machine to
  7559. the local or remote machine.  If /s is specified then subdirectories are
  7560. copied as well.  Directories will be created as required for the destination
  7561. files.    If dst_spec is not specified then the default destination will be
  7562. the current directory of the other locale (i.e., remote, if the file's
  7563. locale is local or, local, if the file's locale is remote).
  7564.  
  7565. Example:
  7566.   copy *.for @rd:\tmp
  7567.  
  7568. All files of type "FOR" in the current directory are copied to the "TMP"
  7569. directory of the "D" disk on the remote machine.  If the current locale is
  7570. the local machine then files are copied from the local machine to the remote
  7571. machine.  If the current locale is the remote machine then files are copied
  7572. from the remote machine to the remote machine.
  7573.  
  7574. ┌────────────────────────────────────────────────────────────────────────────┐
  7575. │ Note:  If your default drive is set to one of the disks on the local         │
  7576. │ machine then the locale is local (e.g., @LC:, @LD:, @LE:, etc.).  If your  │
  7577. │ default drive is set to one of the disks on the remote machine then the    │
  7578. │ locale is remote (e.g., @RC:, @RD:, @RE:, etc.).  If your DOS or OS/2      │
  7579. │ prompt contains the current drive and directory then it will be easy to    │
  7580. │ identify which locale is current.                         │
  7581. └────────────────────────────────────────────────────────────────────────────┘
  7582.  
  7583. Example:
  7584.   copy @rd:\tmp\*.for
  7585.  
  7586. All files of type "FOR" in the "TMP" directory of the "D" disk on the remote
  7587. machine are copied to the current directory of the local machine.  Whenever
  7588. a destination is not specified, the current directory of the opposite locale
  7589. is used.  If the source locale is the remote machine then files are copied
  7590. from the remote to the local machine.  If the source locale is the current
  7591. machine then files are copied from the local to the remote machine.
  7592.  
  7593. Example:
  7594.   copy @rc:\watcom\*.* /s
  7595.  
  7596. All files and subdirectories of the "WATCOM" directory of the "C" disk on
  7597. the remote machine are copied to the current directory of the local machine.
  7598. Whenever a destination is not specified, the current directory of the
  7599. opposite locale is used.  If the source locale is the remote machine then
  7600. files are copied from the remote to the local machine.    If the source locale
  7601. is the current machine then files are copied from the local to the remote
  7602. machine.  Subdirectories are created as required.
  7603.  
  7604. ┌────────────────────────────────────────────────────────────────────────────┐
  7605. │ Note:  The "COPY" command is most effectively used when copying files from │
  7606. │ one machine to the other.  Copying of large amounts of files from one      │
  7607. │ place on the remote machine to another place on the remote machine could   │
  7608. │ be done more effectively using the remote machine's DOS or OS/2.  This     │
  7609. │ would eliminate the transfer of data from the remote machine to the local  │
  7610. │ machine and back to the remote machine.                     │
  7611. └────────────────────────────────────────────────────────────────────────────┘
  7612.  
  7613.  
  7614. List Directory - DIR
  7615. ════════════════════
  7616. ┌──────────────────────────────────────────────────────────────────────────┐
  7617. │ dir [/w] dir_spec [/w]                           │
  7618. └──────────────────────────────────────────────────────────────────────────┘
  7619.  
  7620. This command may be used to list the directories of any disk on the local or
  7621. remote machine.  Any of the DOS or OS/2 "wild card" characters ("?" and "*")
  7622. may be used.  If /w is specified then file names are displayed across the
  7623. screen ("wide") and the file creation date and time are omitted.
  7624.  
  7625. Example:
  7626.   dir \tmp
  7627.  
  7628. List the names of files in the "TMP" directory of the current drive.
  7629.  
  7630. Example:
  7631.   dir d:\etc
  7632.  
  7633. List the names of files in the "ETC" directory of the "D" disk of the
  7634. current locale (local or remote).
  7635.  
  7636. Example:
  7637.   dir @rc:\demo
  7638.  
  7639. List the names of files in the "DEMO" directory of the "C" disk of the
  7640. remote machine.  Both locale and disk are specified.
  7641.  
  7642. Example:
  7643.   dir @le:test
  7644.  
  7645. List the names of files in the "TEST" subdirectory of the current directory
  7646. of the "E" disk of the local machine.  If no "TEST" subdirectory exists then
  7647. the names of all files named "TEST" will be listed.  Both locale and disk
  7648. are specified.
  7649.  
  7650. Example:
  7651.   dir @le:test.*
  7652.  
  7653. List the names of all files named "TEST" in the current directory of the "E"
  7654. disk of the local machine.  Both locale and disk are specified.
  7655.  
  7656.  
  7657. Erase File - ERASE, DEL
  7658. ═══════════════════════
  7659. ┌──────────────────────────────────────────────────────────────────────────┐
  7660. │ erase [/s] file_spec [/s]                           │
  7661. │ del [/s] file_spec [/s]                           │
  7662. └──────────────────────────────────────────────────────────────────────────┘
  7663.  
  7664. This command may be used to erase files from the directories of any disk on
  7665. the local or remote machine.  DEL is a short form for ERASE.  Any of the DOS
  7666. or OS/2 "wild card" characters ("?" and "*") may be used.  If /s is
  7667. specified then subdirectories are also processed.
  7668.  
  7669. Example:
  7670.   erase \tmp\*.*
  7671.  
  7672. Erase all the files in the "TMP" directory of the current drive.
  7673.  
  7674. Example:
  7675.   erase d:\etc\*.lst
  7676.  
  7677. Erase all files of type "LST" in the "ETC" directory of the "D" disk of the
  7678. current locale (local or remote).
  7679.  
  7680. Example:
  7681.   erase @rc:\demo\*.obj
  7682.  
  7683. Erase all files of type "OBJ" in the "DEMO" directory of the "C" disk of the
  7684. remote machine.  Both locale and disk are specified.
  7685.  
  7686. Example:
  7687.   erase @le:trial.*
  7688.  
  7689. Erase all files named "TRIAL" of any type in the current directory of the
  7690. "E" disk of the local machine.    Both locale and disk are specified.
  7691.  
  7692.  
  7693. Exit from RFX - EXIT
  7694. ════════════════════
  7695. ┌──────────────────────────────────────────────────────────────────────────┐
  7696. │ exit                                       │
  7697. └──────────────────────────────────────────────────────────────────────────┘
  7698.  
  7699. This command may be used to exit from RFX and return to the invoking
  7700. process.
  7701.  
  7702.  
  7703. Make Directory - MKDIR, MD
  7704. ══════════════════════════
  7705. ┌──────────────────────────────────────────────────────────────────────────┐
  7706. │ mkdir dir_spec                               │
  7707. │ md dir_spec                                   │
  7708. └──────────────────────────────────────────────────────────────────────────┘
  7709.  
  7710. This command may be used to create a directory on any disk on the local or
  7711. remote machine.  MD is a short form for MKDIR.    The "@L" or "@R" prefix may
  7712. be used to specify the locale (local or remote).
  7713.  
  7714. Example:
  7715.   md \tmp
  7716.  
  7717. Create a "TMP" directory in the root of the current drive.
  7718.  
  7719. Example:
  7720.   md d:\etc
  7721.  
  7722. Create an "ETC" directory in the root of the "D" disk of the current locale
  7723. (local or remote).
  7724.  
  7725. Example:
  7726.   md @rc:\demo
  7727.  
  7728. Create a "DEMO" directory in the root of the "C" disk of the remote machine.
  7729. Both locale and disk are specified.
  7730.  
  7731. Example:
  7732.   md @le:test
  7733.  
  7734. Create a "TEST" subdirectory in the current directory of the "E" disk of the
  7735. local machine.    Both locale and disk are specified.
  7736.  
  7737.  
  7738. Rename - RENAME, REN
  7739. ════════════════════
  7740. ┌──────────────────────────────────────────────────────────────────────────┐
  7741. │ rename file_spec new_name                           │
  7742. │ ren file_spec new_name                           │
  7743. └──────────────────────────────────────────────────────────────────────────┘
  7744.  
  7745. This command may be used to rename a file in any directory on any disk on
  7746. the local or remote machine.  REN is a short form for RENAME.  The "@L" or
  7747. "@R" prefix may be used to specify the locale (local or remote).  Unlike the
  7748. DOS "RENAME" command, a file can be moved to a different directory if the
  7749. directory is specified in new_name.
  7750.  
  7751. Example:
  7752.   ren test.tmp test1.tmp
  7753.  
  7754. Rename the file "TEST.TMP" in the current directory of the current drive to
  7755. "TEST1.TMP".
  7756.  
  7757. Example:
  7758.   ren d:\etc\test.tmp test1.tmp
  7759.  
  7760. Rename the file "TEST.TMP" in the "ETC" directory of the "D" disk of the
  7761. current locale (local or remote) to "TEST1.TMP".
  7762.  
  7763. Example:
  7764.   ren @rc:\demo\test.tmp test1.tmp
  7765.  
  7766. Rename the file "TEST.TMP" in the "DEMO" directory of the "C" disk of the
  7767. remote machine to "TEST1.TMP".    Both locale and disk are specified.
  7768.  
  7769. Example:
  7770.   ren @le:trial.dat trial1.dat
  7771.  
  7772. Rename the file "TRIAL.DAT" in the current directory of the "E" disk of the
  7773. local machine to "TRIAL1.DAT".    Both locale and disk are specified.
  7774.  
  7775. Example:
  7776.   ren @le:trial.dat ..\trial1.dat
  7777.  
  7778. Rename the file "TRIAL.DAT" in the current directory of the "E" disk of the
  7779. local machine to "TRIAL1.DAT" and move it to the parent directory.  Both
  7780. locale and disk are specified.
  7781.  
  7782.  
  7783. Remove Directory - RMDIR, RD
  7784. ════════════════════════════
  7785. ┌──────────────────────────────────────────────────────────────────────────┐
  7786. │ rmdir [/s] dir_spec [/s]                           │
  7787. │ rd [/s] dir_spec [/s]                            │
  7788. └──────────────────────────────────────────────────────────────────────────┘
  7789.  
  7790. This command may be used to remove one or more directories on any disk on
  7791. the local or remote machine.  RD is a short form for RMDIR.  The "@L" or
  7792. "@R" prefix may be used to specify the locale (local or remote).  If /s is
  7793. specified then subdirectories are also removed.  Before a directory can be
  7794. removed, it must not contain any files.
  7795.  
  7796. Example:
  7797.   rd \tmp
  7798.  
  7799. Remove the "TMP" directory from the root of the current drive.
  7800.  
  7801. Example:
  7802.   rd d:\etc
  7803.  
  7804. Remove the "ETC" directory from the root of the "D" disk of the current
  7805. locale (local or remote).
  7806.  
  7807. Example:
  7808.   rd @rc:\demo
  7809.  
  7810. Remove the "DEMO" directory from the root of the "C" disk of the remote
  7811. machine.  Both locale and disk are specified.
  7812.  
  7813. Example:
  7814.   rd @le:test
  7815.  
  7816. Remove the "TEST" subdirectory from the current directory of the "E" disk of
  7817. the local machine.  Both locale and disk are specified.
  7818.  
  7819.  
  7820. Display File Contents - TYPE
  7821. ════════════════════════════
  7822. ┌──────────────────────────────────────────────────────────────────────────┐
  7823. │ type dir_spec                                │
  7824. └──────────────────────────────────────────────────────────────────────────┘
  7825.  
  7826. This command may be used to list the contents of a file on any disk on the
  7827. local or remote machine.  The "@L" or "@R" prefix may be used to specify the
  7828. locale (local or remote).  Unlike the DOS "TYPE" command, DOS or OS/2 "wild
  7829. card" characters ("?" or "*") may be used.
  7830.  
  7831. Example:
  7832.   type \tmp\test.dat
  7833.  
  7834. List the contents of the file "TEST.DAT" in the "TMP" directory of the
  7835. current drive.
  7836.  
  7837. Example:
  7838.   type d:\etc\*.lst
  7839.  
  7840. List the contents of all files of type "LST" in the "ETC" directory of the
  7841. "D" disk of the current locale (local or remote).
  7842.  
  7843. Example:
  7844.   type @rc:\demo\test.c
  7845.  
  7846. List the contents of the file "TEST.C" in the "DEMO" directory of the "C"
  7847. disk of the remote machine.  Both locale and disk are specified.
  7848.  
  7849. Example:
  7850.   type @le:trial.*
  7851.  
  7852. List the contents of all files named "TRIAL" of any type in the current
  7853. directory of the "E" disk of the local machine.  Both locale and disk are
  7854. specified.
  7855. ::::SET
  7856. ┌──────────────────────────────────────────────────────────────────────────┐
  7857. │ Set                                       │
  7858. │     Assembly { Lower | Upper | Inside | Outside }               │
  7859. │     Bell     ON | OFf                            │
  7860. │     Call     [dflt_call] [dflt_parms] [dflt_return]               │
  7861. │     Dclick   expr                               │
  7862. │     Fpu      Binary | Decimal                        │
  7863. │     Implicit ON | OFf                            │
  7864. │     INput    window_name                           │
  7865. │     LAnguage lang_name                           │
  7866. │     Level    Assembly | Mix | Source                       │
  7867. │     MAcro    window_name key_expr [cmd_list]                   │
  7868. │     Menu     ON | OFf | Add cmd_list | ACtivate               │
  7869. │     Pfkey    expr (string | "{" string "}")                   │
  7870. │     Radix    expr | ("/"radix_spec [expr])                   │
  7871. │     REcursion ON | OFf                           │
  7872. │     SOurce   [/Add] { "{" {char} "*" {char} "}" }               │
  7873. │     SYmbol   [/Add] { [/(Respect | Ignore)] "{" {char} "*" {char} "}" }  │
  7874. │     Tab      expr                               │
  7875. │     Visible  Assembly | Source [top][,[bot][,bias]]               │
  7876. └──────────────────────────────────────────────────────────────────────────┘
  7877.  
  7878. The Set command is used to establish operational defaults for other VIDEO
  7879. commands.
  7880.  
  7881.  
  7882. Disassembly Options
  7883. ═══════════════════
  7884. ┌──────────────────────────────────────────────────────────────────────────┐
  7885. │ Set Assembly { Lower | Upper | Inside | Outside }               │
  7886. └──────────────────────────────────────────────────────────────────────────┘
  7887.  
  7888. These options control how assembly instructions and operands are displayed.
  7889. The "lower" option causes opcodes and registers to be displayed in
  7890. lowercase.  The "upper" option causes opcodes and registers to be displayed
  7891. in uppercase.  The "inside" option causes register indexing displacements to
  7892. be shown inside brackets (e.g., [BP-2], [EBP-2]).  The "outside" option
  7893. causes register indexing displacements to be shown outside brackets (e.g.,
  7894. -2[BP], -2[EBP]).
  7895.  
  7896.  
  7897. Warning Bell
  7898. ════════════
  7899. ┌──────────────────────────────────────────────────────────────────────────┐
  7900. │ Set Bell ON | OFf                               │
  7901. └──────────────────────────────────────────────────────────────────────────┘
  7902.  
  7903. The warning beep issued by VIDEO may be turned "on" or "off".  A beep is
  7904. issued whenever an error message is printed by the debugger.
  7905.  
  7906.  
  7907. Default Call
  7908. ════════════
  7909. ┌──────────────────────────────────────────────────────────────────────────┐
  7910. │ Set Call [dflt_call] [dflt_parms] [dflt_return]               │
  7911. └──────────────────────────────────────────────────────────────────────────┘
  7912.  
  7913. The default call type (Far, Interrupt or Near) and the default argument
  7914. passing mechanism to be used by the VIDEO Call command may be set.
  7915.  
  7916.   dflt_call ::= /(Far | Interrupt | Near)
  7917.   dflt_parms ::= "(" [ dflt_loc { "," dflt_loc } ] ")"
  7918.   dflt_return ::= "/" | print_list
  7919.   dflt_loc ::= reg_name | reg_aggregate
  7920.  
  7921. In the following example, we define WATCOM's default calling conventions for
  7922. the Call command.
  7923.  
  7924. Example:
  7925.   DBG>set call /far (ax, dx, bx, cx) ax
  7926.  
  7927. To change the default calling convention to one in which "near" calls are
  7928. used and all parameters are passed on the stack, we could issue the
  7929. following command.
  7930.  
  7931. Example:
  7932.   DBG>set call /near () ax
  7933.  
  7934. See the description of the Call command for more information on argument
  7935. passing.
  7936.  
  7937.  
  7938. Setting Double-click Rate
  7939. ═════════════════════════
  7940. ┌──────────────────────────────────────────────────────────────────────────┐
  7941. │ Set Dclick expr                               │
  7942. └──────────────────────────────────────────────────────────────────────────┘
  7943.  
  7944. This command sets the maximum amount of time, in milliseconds, that is
  7945. allowed between two presses of the mouse button, for the two clicks to be
  7946. recognized as a double-click and not two single clicks.  The default value
  7947. is 250 milliseconds (1/4 of a second).
  7948.  
  7949. Example:
  7950.   DBG>set dclick 750
  7951.  
  7952. The above example will cause two mouse presses separated by more than 750
  7953. milliseconds (3/4 of a second) to be regarded as two separate clicks rather
  7954. than a double-click.
  7955.  
  7956. The command show set dclick will show the current value.
  7957.  
  7958.  
  7959. Format of Numeric Data Processor Display
  7960. ════════════════════════════════════════
  7961. ┌──────────────────────────────────────────────────────────────────────────┐
  7962. │ Set Fpu Binary | Decimal                           │
  7963. └──────────────────────────────────────────────────────────────────────────┘
  7964.  
  7965. The contents of the 80x87 Numeric Data Processor (NDP, math coprocessor)
  7966. registers ST(0), ST(1), etc.  can be displayed in hexadecimal (binary)
  7967. format or scientific notation (decimal).  The registers and flags of the
  7968. math coprocessor are displayed in the FPU window.
  7969.  
  7970. The command show set fpu will show the current setting.
  7971.  
  7972.  
  7973. Automatic Command File Invocation
  7974. ═════════════════════════════════
  7975. ┌──────────────────────────────────────────────────────────────────────────┐
  7976. │ Set Implicit    ON │ OFf                           │
  7977. └──────────────────────────────────────────────────────────────────────────┘
  7978.  
  7979. When "implicit" is "on", VIDEO will treat an unknown command as the name of
  7980. a command file and automatically attempt to invoke it.    When "implicit" is
  7981. "off", the INvoke command must be used.
  7982.  
  7983. Example:
  7984.   DBG>set implicit on
  7985.   DBG>* invoke "mix" command file
  7986.   DBG>mix
  7987.  
  7988. Under QNX, it is possible for a conflict to arise when "implicit" is on.  If
  7989. a path is specified for a command file name, it will be confused with the
  7990. short form of the DO command which is "/".
  7991.  
  7992. Example:
  7993.   DBG>/etc=1
  7994.   DBG>/etc/wvideo/mix
  7995.  
  7996. The first example assigns the value 1 to the variable etc.  The second
  7997. example attempts to run the "mix" command file from the "/etc/wvideo"
  7998. directory but a syntactical error results.  To resolve this conflict, you
  7999. can use either the INvoke command or the local file specifier prefix "@l".
  8000.  
  8001. Example:
  8002.   DBG>invoke /etc/wvideo/mix
  8003.   DBG>@l/etc/wvideo/mix
  8004.  
  8005. A similar problem arises under DOS, MS Windows or OS/2 when a drive
  8006. specifier forms part of the file name.
  8007.  
  8008. Example:
  8009.   DBG>d:\watcom\binb\mix
  8010.   DBG>invoke d:\watcom\binb\mix
  8011.   DBG>@ld:\watcom\binb\mix
  8012.  
  8013. The first example results in a syntactical error ("d" is interpreted as the
  8014. short form of the Display command).  The second and third examples resolve
  8015. the problem.
  8016.  
  8017. Local and remote file specifier prefixes are described under the topic
  8018. entitled "REMOTE_DEBUGGING".
  8019.  
  8020.  
  8021. Current Window
  8022. ══════════════
  8023. ┌──────────────────────────────────────────────────────────────────────────┐
  8024. │ Set INput window_name                            │
  8025. └──────────────────────────────────────────────────────────────────────────┘
  8026.  
  8027. The Set INput command is used to move the text cursor directly to the
  8028. specified window.  The valid window names are:
  8029.  
  8030.   Assembly
  8031.   Command
  8032.   Dialogue
  8033.   Fpu
  8034.   Memory
  8035.   Prompt
  8036.   Register
  8037.   SOurce
  8038.   STack
  8039.   Thread
  8040.  
  8041. The Tab and Shift Tab keys can also be used to move the text cursor to the
  8042. following or previous window.  The selected window becomes the active
  8043. window.  Keys and the mouse react in the manner described in the sections
  8044. "Window Manipulation with Keys" and "Window Manipulation with a Mouse" under
  8045. the topic entitled "WINDOWS".
  8046.  
  8047. Expression Syntax
  8048. ═════════════════
  8049. ┌──────────────────────────────────────────────────────────────────────────┐
  8050. │ Set LAnguage lang_name                           │
  8051. └──────────────────────────────────────────────────────────────────────────┘
  8052.  
  8053. The debugger expression processor can be set to understand the syntax of
  8054. certain programming languages.    The operand lang_name represents the name of
  8055. an expression syntax or "parse" file.
  8056.  
  8057. C       The file "c.prs" describes the ANSI C programming language
  8058.        expression syntax supported by VIDEO.
  8059.  
  8060. FORTRAN    The file "fortran.prs" describes the ANSI FORTRAN 77 programming
  8061.        language expression syntax supported by VIDEO.
  8062.  
  8063. Under DOS, MS Windows or OS/2, the "prs" files are usually located in the
  8064. "BINB" sub-directory of the directory that VIDEO is installed in.  You
  8065. should ensure that the "BINB" directory is included in the PATH environment
  8066. variable.
  8067.  
  8068. Under QNX, the "prs" files are usually located in the "/etc/wvideo"
  8069. directory.  The search order for language parsing files is as follows:
  8070.  
  8071.   1. the current directory,
  8072.   2. the paths listed in the WVIDEO_PATH environment variable,
  8073.   3. the path listed in the HOME environment variable, and, finally,
  8074.   4. the "/etc/wvideo" directory.
  8075.  
  8076. Example:
  8077.   DBG>set language fortran
  8078.  
  8079. The debugger will load the expression syntax for FORTRAN 77 from the file
  8080. "fortran.prs".
  8081.  
  8082. The command show set language will show the current setting.
  8083.  
  8084.  
  8085. Debugging Level
  8086. ═══════════════
  8087. ┌──────────────────────────────────────────────────────────────────────────┐
  8088. │ Set Level Assembly | Mix | Source                       │
  8089. └──────────────────────────────────────────────────────────────────────────┘
  8090.  
  8091. The Set Level command is used to set the default debugging level.
  8092.  
  8093. Assembly   VIDEO will display debugging information at the assembly language
  8094.        level.
  8095.  
  8096.        Example:
  8097.          DBG>set level assembly
  8098.  
  8099. Mix       VIDEO will display debugging information at the source language
  8100.        level whenever possible, or at the assembly language level when
  8101.        no source line information is available.
  8102.  
  8103.        Example:
  8104.          DBG>set level mix
  8105.  
  8106.        This is the default mode of VIDEO.
  8107.  
  8108. Source       The source language level is similar to the mix language level
  8109.        except that modules for which no source line information is
  8110.        available are not traced unless explicitly requested.
  8111.  
  8112.        Example:
  8113.          DBG>set level source
  8114.  
  8115.  
  8116. Macro Hot Keys
  8117. ══════════════
  8118. ┌──────────────────────────────────────────────────────────────────────────┐
  8119. │ Set MAcro window_name key_expr [cmd_list]                   │
  8120. └──────────────────────────────────────────────────────────────────────────┘
  8121.  
  8122. The Set MAcro command may be used to define "hot" keys for various windows.
  8123. The valid window names are:
  8124.  
  8125.   Assembly
  8126.   Command
  8127.   Dialogue
  8128.   Fpu
  8129.   Memory
  8130.   Register
  8131.   SOurce
  8132.   STack
  8133.   Thread
  8134.  
  8135. The value for key_expr must fall within the range 32 (space) to 126 (tilde).
  8136. These are the ASCII printable characters.  One or more debugger commands can
  8137. be specified for cmd_list.
  8138.  
  8139. Example:
  8140.   DBG>set macro source 'v' {view}
  8141.  
  8142. In the above example, the command view will be invoked if a lowercase "v" is
  8143. pressed when the Source window is active (i.e., when the text cursor is in
  8144. the Source window).
  8145.  
  8146. Example:
  8147.   DBG>set macro assembly 'b' {break dbg$code}
  8148.  
  8149. In the above example, the command break dbg$code will be invoked if a
  8150. lowercase "b" is pressed when the Assembly window is active (i.e., when the
  8151. text cursor is in the Assembly window).  A break point will be set at the
  8152. currently highlighted line.
  8153.  
  8154. Example:
  8155.   DBG>set macro source ' ' {trace/source/over}
  8156.  
  8157. In the above example, the command trace/source/over will be invoked if the
  8158. space bar is pressed when the Source window is active (i.e., when the text
  8159. cursor is in the Source window).  A single-shot trace command will be
  8160. executed.
  8161.  
  8162. ┌────────────────────────────────────────────────────────────────────────────┐
  8163. │ Note:  The Prompt window is the only window where hot keys cannot be         │
  8164. │ defined since text must be entered in this window.                 │
  8165. └────────────────────────────────────────────────────────────────────────────┘
  8166.  
  8167.  
  8168. Menu Bar
  8169. ════════
  8170. ┌──────────────────────────────────────────────────────────────────────────┐
  8171. │ Set Menu ON | OFf | Add cmd_list | ACtivate                   │
  8172. └──────────────────────────────────────────────────────────────────────────┘
  8173.  
  8174. The Set Menu ON and Set menu OFf commands turn the menu bar display "on" or
  8175. "off".
  8176.  
  8177. The Set Menu Add command permits the creation of command entries in the
  8178. "User" pop-down menu.  An entry is a list of one or more VIDEO commands.
  8179. Each new entry is labelled with a letter from the alphabet.  An entry may be
  8180. selected by pressing Alt/U to engage the "User" pop-down menu and then
  8181. Alt/<letter> where <letter> corresponds to the letter beside the desired
  8182. entry.    The mouse can also be used to select an entry.    When an entry is
  8183. selected, the commands listed in that entry are executed.  Up to 20 items
  8184. can be added to the "User" menu.
  8185.  
  8186. The Set Menu ACtivate command emulates the action of pressing and releasing
  8187. the Alt key.
  8188.  
  8189. Example:
  8190.   DBG>set pfkey 10 {set menu activate}
  8191.  
  8192. In the above example, we bind the Set Menu ACtivate command to programmable
  8193. function key 10.
  8194.  
  8195. For a description of VIDEO menus, see the topic entitled "MENUS".
  8196.  
  8197.  
  8198. Programmable Function Keys
  8199. ══════════════════════════
  8200. ┌──────────────────────────────────────────────────────────────────────────┐
  8201. │ Set Pfkey expr (string | "{" string "}")                   │
  8202. └──────────────────────────────────────────────────────────────────────────┘
  8203.  
  8204. One or more VIDEO commands can be assigned to a programmable function (PF)
  8205. key.  Each time that key is pressed, the commands are executed.  You must
  8206. use "{" and "}" when you have a ";" in the string since VIDEO uses the
  8207. semicolon as a command separator.  If the string is omitted then the current
  8208. assignment for the specified PF key is removed.  PF keys are numbered from 1
  8209. to 40.
  8210.  
  8211. F1-F10       PF keys 1 through 10 are obtained by pressing one of the keys F1
  8212.        through F10 (on some keyboards, these may be labeled PF1 through
  8213.        PF10).
  8214.  
  8215. F11-F20    PF keys 11 through 20 are obtained by pressing both the Shift key
  8216.        and one of keys F1 through F10.
  8217.  
  8218. F21-F30    PF keys 21 through 30 are obtained by pressing both the Ctrl key
  8219.        and one of keys F1 through F10.
  8220.  
  8221. F31-F40    PF keys 31 through 40 are obtained by pressing both the Alt key
  8222.        and one of keys F1 through F10.
  8223.  
  8224. The expression expr is always evaluated with a radix of 10, regardless of
  8225. the current default radix for numbers.
  8226.  
  8227. Example:
  8228.   DBG>set pfkey 1 go/keep
  8229.  
  8230. In the above example, function key F1 is defined with a go/keep command.
  8231. Each time the F1 key is pressed, VIDEO will execute this command.  This form
  8232. of the "go" command keeps any temporary break point that may have been
  8233. specified in a previous "go" command.
  8234.  
  8235. Example:
  8236.   DBG>set pf 1 {go/keep;?ax}
  8237.  
  8238. The above example is similar to the previous except that a second command
  8239. has been added.  Now, whenever F1 is pressed, two commands will be executed.
  8240. When a break point occurs, the contents of the AX register are displayed in
  8241. the Dialogue window.  This example demonstrates the importance of the
  8242. braces.
  8243.  
  8244. Example:
  8245.   DBG>set pf 1 go/keep;?ax
  8246.  
  8247. If omitted as shown above, VIDEO will first execute a Set command and then
  8248. it will execute a Print (?) command.  This is equivalent to issuing the two
  8249. commands on two separate command lines.
  8250.  
  8251. Example:
  8252.   DBG>set pf 1 go/keep
  8253.   DBG>?ax
  8254.  
  8255. Example:
  8256.   DBG>/k1=-1
  8257.   DBG>set pf 1 if ++k1%3==0{<src}{if k1%3==1{<asm}{<mix}}
  8258.  
  8259. The user-defined symbol k1 is set to -1 and programmable function key 1 is
  8260. assigned a command which may be used to cycle through each one of the
  8261. "src.dbg", "asm.dbg" and "mix.dbg" command files.
  8262.  
  8263. Example:
  8264.   DBG>set pf 1
  8265.  
  8266. The current assignment to programmable function key 1 is removed.
  8267.  
  8268.  
  8269. Default Numeric Radix and Specifiers
  8270. ════════════════════════════════════
  8271. ┌──────────────────────────────────────────────────────────────────────────┐
  8272. │ Set Radix expr | ("/"radix_spec [expr])                   │
  8273. └──────────────────────────────────────────────────────────────────────────┘
  8274.  
  8275. This command may be used to define both the default radix of numbers entered
  8276. by the user and what character strings are to be interpreted as radix
  8277. specifiers.  The expression expr is always evaluated with a radix of 10,
  8278. regardless of the current default radix for numbers.
  8279.  
  8280.  
  8281. Setting Default Radix
  8282. ═════════════════════
  8283. ┌──────────────────────────────────────────────────────────────────────────┐
  8284. │ Set Radix expr                               │
  8285. └──────────────────────────────────────────────────────────────────────────┘
  8286.  
  8287. Example:
  8288.   DBG>set radix 10
  8289.   DBG>set radix 16
  8290.   DBG>set radix 8
  8291.  
  8292. The above examples illustrate the setting of a default radix for numeric
  8293. values input by the user.  In the first example, we set the default radix to
  8294. decimal (i.e., base 10); in the second example, to hexadecimal (i.e., base
  8295. 16); and in the third example, to octal (i.e., base 8).  The minimum radix
  8296. that you may specify is 2 and the maximum is 36.  The digits that may be
  8297. used to form numeric values are taken from the set of digits (0-9) and the
  8298. letters of the alphabet (A-Z or a-z).
  8299.  
  8300. Suppose that the default radix was set to 36.  In terms of decimal values,
  8301. 'A' represents the value 10, 'B' represents the value 11, and so on up to
  8302. 'Z' which represents the value 35.
  8303.  
  8304. In the absence of a radix specifier, only characters which are valid for the
  8305. default radix may appear in a numeric value.  For example, if the default
  8306. radix is 16 then you cannot use the letters 'G' through 'Z'.
  8307.  
  8308. When a numeric constant could legitimately be interpreted as a symbol name,
  8309. VIDEO will first try to find a symbol by that name and, if the search was
  8310. unsuccessful, it will treat the string as a constant.
  8311.  
  8312. Example:
  8313.   DBG>/abc=1
  8314.   DBG>?abc
  8315.  
  8316. In the above example, the user defines a variable called "abc" and assigns
  8317. it the value 1.  In the second statement, the debugger is asked to print the
  8318. value of "abc".  If the default radix was 16, this could represent a numeric
  8319. value (10*16**2 + 11*16 + 12).    However, VIDEO will first attempt to locate
  8320. the symbol "abc".  Since this will succeed, the value displayed in the
  8321. Dialogue window is 1.  Note that we could quite easily form a numeric
  8322. constant by preceding the letters by a '0' digit.
  8323.  
  8324. Example:
  8325.   DBG>?0abc
  8326.  
  8327. Any time a constant begins with one of the digits '0' through '9', VIDEO
  8328. will interpret the item as a numeric value.  Thus a symbol name must not
  8329. begin with one of the numeric digits (0-9).
  8330.  
  8331.  
  8332. Setting A Radix Specifier
  8333. ═════════════════════════
  8334. ┌──────────────────────────────────────────────────────────────────────────┐
  8335. │ Set Radix "/"radix_spec [expr]                       │
  8336. └──────────────────────────────────────────────────────────────────────────┘
  8337.  
  8338. The second feature of the Set Radix command is the ability to define one or
  8339. more radix specifiers.
  8340.  
  8341. Example:
  8342.   DBG>set radix /0x 16
  8343.  
  8344. In the above example, the string "0x" is defined to introduce hexadecimal
  8345. (base 16) numbers.  Thus 0x12 represents a hexadecimal constant.
  8346.  
  8347. If the expression is omitted then the string is removed from the set of
  8348. current defined radix specifiers.
  8349.  
  8350. Example:
  8351.   DBG>set radix /0x
  8352.  
  8353. In the above example, the string "0x" is removed from the set of radix
  8354. specifiers.  Now 0x12 is an illegal construct.
  8355.  
  8356. Example:
  8357.   DBG>set radix /# 10
  8358.  
  8359. In the above example, the string "#" is defined to introduce decimal (base
  8360. 10) numbers.  Thus #12 represents a decimal constant.
  8361.  
  8362. By defining a selection of radix specifiers, we can enter numeric values in
  8363. any radix of our choosing and remain independent of the current default
  8364. radix.
  8365.  
  8366.  
  8367. Default Recursion Handling
  8368. ═════════════════════════
  8369. ┌──────────────────────────────────────────────────────────────────────────┐
  8370. │ Set REcursion ON | OFf                           │
  8371. └──────────────────────────────────────────────────────────────────────────┘
  8372.  
  8373. This command is used to control the way "tracing over" recursive function
  8374. calls is handled.  Consider the following example which contains the
  8375. recursive function fact which computes factorials.
  8376.  
  8377. Example:
  8378.   #include <stdio.h>
  8379.  
  8380.   long fact( long i )
  8381.   {
  8382.       if( i != 1 ) i = i * fact( i-1 );
  8383.       return( i );
  8384.   }
  8385.  
  8386.   void main()
  8387.   {
  8388.       printf( "%d! is %ld\n", 10, fact(10) );
  8389.   }
  8390.  
  8391. Suppose that you trace into the fact function using the single-step Trace
  8392. command and up to the statement containing the recursive call to fact.
  8393.  
  8394.       if( i != 1 ) i = i * fact( i-1 );
  8395.  
  8396. When you step over the recursive call to fact, a break point will occur at
  8397. the machine-level code immediately following the call to fact (which is
  8398. the code for the remainder of the expression i = i * fact( i-1 )).  Since
  8399. the function is recursive, this break point will not occur in the original
  8400. call to fact but after the first time that fact returns (after i is equal
  8401. to 1).
  8402.  
  8403. When the recursion checking option is "on", the debugger will check for a
  8404. recursive function call and resume execution from each break point until a
  8405. break point at the original call is detected.  Thus execution will suspend
  8406. when 10!  has been computed.
  8407.  
  8408. If the recursion checking option is "off", the break point that occurred
  8409. after the first return from fact will cause execution to suspend.
  8410.  
  8411.  
  8412. Source File Search Patterns
  8413. ═══════════════════════════
  8414. ┌──────────────────────────────────────────────────────────────────────────┐
  8415. │ Set SOurce [/Add] { {char} "*" {char} }                   │
  8416. └──────────────────────────────────────────────────────────────────────────┘
  8417.  
  8418. This command is used to define patterns to be applied to module names when
  8419. VIDEO searches for a corresponding source file.  VIDEO will first attempt to
  8420. open the source file by using the file specification used to compile the
  8421. file.  We require a mechanism for specifying other candidates for the source
  8422. file in the following cases.
  8423.  
  8424.   1. A relative path specification was given at compile time and the
  8425.     directory from which you are running the program is different from the
  8426.     directory from which the file was compiled.
  8427.   2. The source file has been moved to a different directory since it was
  8428.     compiled.
  8429.  
  8430. The following examples use file name specifications from DOS, MS Windows or
  8431. OS/2.  To construct equivalent QNX examples, the path separator "\" should
  8432. be replaced by "/" and all file specifications should be in lowercase
  8433. letters.
  8434.  
  8435. Suppose the current directory is "\TEST\O" and the source file ("HELLO.C")
  8436. is contained in the directory "\TEST\C".  Suppose we use the following
  8437. command to compile "HELLO.C".
  8438.  
  8439. Example:
  8440.   C>wcc ..\c\hello -d2
  8441.  
  8442. The compiler will place the string "..\C\HELLO.C" in the object file.
  8443. Suppose that we move up a level in the directory and link our program.    We
  8444. then use VIDEO to load and run the program while in the "\TEST" directory.
  8445. The debugger will not be able to locate the source file since it will use
  8446. the file specification "..\C\HELLO.C".
  8447.  
  8448. Example:
  8449.   DBG>set source *.c
  8450.  
  8451. In the above example, we specify that VIDEO should also try to locate a
  8452. source file by appending ".c" to the module name.  The asterisk is used as a
  8453. place holder for the module name.  The module name in the previous example
  8454. is "HELLO".  Thus, after unsuccessfully trying to locate "..\C\HELLO.C", an
  8455. attempt will be made to locate the file "HELLO.C".  This attempt will also
  8456. fail.
  8457.  
  8458. Example:
  8459.   DBG>set source \test\c\*.c
  8460.  
  8461. In the above example, we revise the pattern to include the path
  8462. specification for the source file.  Now an attempt will be made to locate
  8463. the file "\TEST\C\HELLO.C" and this attempt will succeed.
  8464.  
  8465. Example:
  8466.   DBG>set source *.c \test\c\*.c
  8467.  
  8468. In the above example, we add a second pattern to the list of possible names
  8469. for the source file.  If VIDEO is unsuccessful at locating the source file
  8470. in the current directory as "HELLO.C", it will also try "\TEST\C\HELLO.C" as
  8471. a possibility.
  8472.  
  8473. To indicate that we wish to add more patterns to the currently defined
  8474. pattern set, we can specify the /Add qualifier.  Without this qualifier,
  8475. VIDEO will replace the current pattern set with the one that we specify.
  8476. The following example is equivalent to the previous one.
  8477.  
  8478. Example:
  8479.   DBG>set source *.c
  8480.   DBG>set source /add \progs\src\*.c
  8481.  
  8482. Under QNX, a path specification that begins with a "/" could be interpreted
  8483. as a qualifier.
  8484.  
  8485. Example:
  8486.   DBG>set source /users/fred/*.c
  8487.  
  8488. In the above example, the "/users" qualifier is not supported and an error
  8489. will result.  To resolve this conflict, the local file specifier prefix "@l"
  8490. can be used.
  8491.  
  8492. Example:
  8493.   DBG>set source @l/users/fred/*.c
  8494.  
  8495. Local and remote file specifier prefixes are described under the topic
  8496. entitled "REMOTE_DEBUGGING".
  8497.  
  8498.  
  8499. Symbol Name Pattern Matching
  8500. ════════════════════════════
  8501. ┌──────────────────────────────────────────────────────────────────────────┐
  8502. │ Set SYmbol [/Add] {[/(Respect | Ignore)] {char} "*" {char}}           │
  8503. └──────────────────────────────────────────────────────────────────────────┘
  8504.  
  8505. This command is used to control the manner in which VIDEO will look up a
  8506. symbol.  By default, symbol names match if they agree in case (both upper
  8507. and lower case characters) and in spelling.  This command can be used to
  8508. loosen those restrictions.
  8509.  
  8510. Language compilers often prefix or suffix a user-defined global symbol with
  8511. one or more special characters such as underscores "_" or currency symbols
  8512. "$".  Sometimes all the characters in the name are converted entirely to
  8513. upper case or lower case.  To simplify the specification of symbol names,
  8514. you can define a series of patterns which VIDEO will use when looking up a
  8515. symbol.
  8516.  
  8517. Example:
  8518.   DBG>set symbol *_
  8519.  
  8520. The above pattern indicates that an underscore could be suffixed to the name
  8521. you specify.  For example, main might actually be spelled main_.  The
  8522. asterisk is used as a place holder for the user-specified name.
  8523.  
  8524. We can specify several patterns.
  8525.  
  8526. Example:
  8527.   DBG>set symbol *_ _*
  8528.  
  8529. In this example, we are stating that possible alternatives for the spelling
  8530. of main are main_ and _main.  VIDEO will search for a symbol by using the
  8531. specified patterns.  Patterns are processed in the order they were given.
  8532. If no patterns exist, VIDEO will look for an exact match.
  8533.  
  8534. Curly braces may be used to delimit a pattern.
  8535.  
  8536. Example:
  8537.   DBG>set symbol {*_} {_*}
  8538.  
  8539. Within braces, space characters are significant.  Therefore, you would
  8540. normally not include them except in the rare case where symbol names could
  8541. contain space characters.
  8542.  
  8543. To indicate that we wish to add more patterns to the currently defined
  8544. pattern set, we can specify the /Add qualifier.  Without this qualifier,
  8545. VIDEO will replace the current pattern set with the one that we specify.
  8546.  
  8547. To indicate whether the case of the name is important in the process of
  8548. looking up the name, we can specify one of /Respect or /Ignore in front of
  8549. the list of patterns.
  8550.  
  8551. Example:
  8552.   DBG>set symbol /ignore *_ _*
  8553.  
  8554. In the above example, we indicate for each pattern substitution that the
  8555. case of the name is not important.  In this case, the user-specified name
  8556. main could match many possible spellings such as main_, Main_, MAIN_, _MaiN,
  8557. and so on.
  8558.  
  8559. In the previous example, we did not include MAIN as a possible match for the
  8560. user-specified main.  To include this case, we could issue the following
  8561. command:
  8562.  
  8563. Example:
  8564.   DBG>set symbol /add /ignore *
  8565.  
  8566. VIDEO will now also look for an exact spelling with no regard to case.
  8567.  
  8568. We could invent more complicated rules for pattern matching based on case.
  8569.  
  8570. Example:
  8571.   DBG>set symbol /ignore * *_ _* /respect _*_
  8572.  
  8573. In the above example, we indicate for the first three patterns that the case
  8574. of the name is not important but that the case must match for the last
  8575. pattern.  If the user-specified name is cmain and the actual spelling is
  8576. _CMAIN_ then the debugger will not produce a match.  However, if the user
  8577. specified CMAIN then the debugger would match it with _CMAIN_.
  8578.  
  8579.  
  8580. Setting the Tab Interval
  8581. ════════════════════════
  8582. ┌──────────────────────────────────────────────────────────────────────────┐
  8583. │ Set Tab expr                                   │
  8584. └──────────────────────────────────────────────────────────────────────────┘
  8585.  
  8586. This command controls how the debugger will display text files with embedded
  8587. TAB characters.  A TAB character causes the text following it to start at
  8588. the next tab stop.  By default, tab stops are set for every 8 columns.    You
  8589. can alter this default using the Set Tab command.
  8590.  
  8591. Example:
  8592.   DBG>set tab 4
  8593.  
  8594. The above example will set tab stops for every 4 columns.
  8595.  
  8596. The command show set tab will show the current value.
  8597.  
  8598.  
  8599. Source and Assembly Window Line Context
  8600. ═══════════════════════════════════════
  8601. ┌──────────────────────────────────────────────────────────────────────────┐
  8602. │ Set Visible Source | Assembly [top][,[bot],[bias]]               │
  8603. └──────────────────────────────────────────────────────────────────────────┘
  8604.  
  8605. This command controls how the debugger will display source text in the
  8606. Source window or assembly code in the Assembly window.    In these two
  8607. windows, the debugger can be instructed to leave so many lines above (top)
  8608. and below (bot) the current line when scrolling text or assembly lines.  The
  8609. debugger can also be instructed to display lines beginning at some column
  8610. other than 1 (bias).
  8611.  
  8612. Example:
  8613.   DBG>set visible source 1,2,9
  8614.  
  8615. In the above example, the debugger is instructed to display at least one
  8616. line above the current line, to display at least 2 lines below the current
  8617. line, and to not display the first 8 columns of source text.  If the window
  8618. is too small for the debugger to adhere to these constraints, it will do the
  8619. best it can.
  8620.  
  8621. The command "show set visible" will show the current settings for the Source
  8622. and Assembly windows.
  8623. ::::SHOW
  8624. ┌──────────────────────────────────────────────────────────────────────────┐
  8625. │ SHow                                       │
  8626. │     Calls   [expr]                               │
  8627. │     Display {window_name}                           │
  8628. │     Flip                                   │
  8629. │     Modules [name]                               │
  8630. │     Paint   {window_name}                           │
  8631. │     Set     {Assembly | Bell | Call | Dclick | Fpu | Implicit |       │
  8632. │          INput | LAnguage | Level | MAcro | Menu | Pfkey |        │
  8633. │          Radix | REcursion | SOurce | SYmbol | Tab | Visible}       │
  8634. └──────────────────────────────────────────────────────────────────────────┘
  8635.  
  8636. The SHow command may be used to display information about the currently
  8637. executing application and various VIDEO settings.
  8638.  
  8639.  
  8640. Show Calling Sequence
  8641. ═════════════════════
  8642. ┌──────────────────────────────────────────────────────────────────────────┐
  8643. │ SHow Calls [expr]                               │
  8644. └──────────────────────────────────────────────────────────────────────────┘
  8645.  
  8646. This command is used to display an execution trace-back of the calling
  8647. sequence.  In order to display the execution trace-back, local symbol
  8648. information is required for all functions in the trace-back.  VIDEO will
  8649. list all functions up to the first for which no local symbol information is
  8650. available.  For information on generating local symbol information, see the
  8651. book entitled "WATCOM Linker User's Guide" ("The DEBUG Directive").
  8652.  
  8653. If an expression is specified, it is evaluated and only that many levels of
  8654. the calling sequence are displayed.
  8655.  
  8656. In the following example, we show a calling sequence in the C "Calendar"
  8657. program.
  8658.  
  8659. Example:
  8660.   DBG>show calls
  8661.   at          PosCursor+32(calendar@160)
  8662.   called from Line+68(calendar@147)
  8663.   called from Box+39(calendar@121)
  8664.   called from Calendar+43(calendar@79)
  8665.   called from main+70(calendar@40)
  8666.  
  8667. In the following example, we show a calling sequence in the FORTRAN 77
  8668. "Calendar" program.
  8669.  
  8670. Example:
  8671.   DBG>show calls
  8672.   at          POSCURSOR+22(calendar@149)
  8673.   called from LINE+234(calendar@124)
  8674.   called from BOX+65(calendar@101)
  8675.   called from CALENDAR+107(calendar@63)
  8676.   called from FMAIN+120(calendar@22)
  8677.   DBG>log
  8678.  
  8679.  
  8680. Show Window Settings
  8681. ════════════════════
  8682. ┌──────────────────────────────────────────────────────────────────────────┐
  8683. │ SHow Display {window_name}                           │
  8684. └──────────────────────────────────────────────────────────────────────────┘
  8685.  
  8686. This command is used to display the settings for all or some windows.  The
  8687. valid window names are:
  8688.  
  8689.   Assembly
  8690.   Command
  8691.   Dialogue
  8692.   Fpu
  8693.   Memory
  8694.   Prompt
  8695.   Register
  8696.   SOurce
  8697.   STack
  8698.   Thread
  8699.  
  8700. Example:
  8701.   DBG>show display assembly register
  8702.   display assembly /open {Assembly: *} 20,24,1,80
  8703.   display register /close {CPU} 3,22,72,80
  8704.  
  8705. If no window name is specified then the settings for all windows are
  8706. displayed.
  8707.  
  8708.  
  8709. Show Flip Setting
  8710. ═════════════════
  8711. ┌──────────────────────────────────────────────────────────────────────────┐
  8712. │ SHow Flip                                   │
  8713. └──────────────────────────────────────────────────────────────────────────┘
  8714.  
  8715. This command is used to show the current setting for screen flipping.  See
  8716. the description of the Flip command for more information.
  8717.  
  8718.  
  8719. Show Module Names
  8720. ═════════════════
  8721. ┌──────────────────────────────────────────────────────────────────────────┐
  8722. │ SHow Modules [name]                               │
  8723. └──────────────────────────────────────────────────────────────────────────┘
  8724.  
  8725. This command is used to display the names of modules in the current
  8726. application.  If name is specified, only those module names that begin with
  8727. "name" are displayed.
  8728.  
  8729. Example:
  8730.   DBG>show module fp
  8731.   FPRTF FPUTC
  8732.  
  8733. In the above example, any module names that begin with the letters "fp" are
  8734. displayed in the Dialogue window.
  8735.  
  8736.  
  8737. Show Window Attributes
  8738. ══════════════════════
  8739. ┌──────────────────────────────────────────────────────────────────────────┐
  8740. │ SHow Paint {window_names}                           │
  8741. └──────────────────────────────────────────────────────────────────────────┘
  8742.  
  8743. This command is used to display the settings of attributes for all or some
  8744. windows.  The valid window names are:
  8745.  
  8746.   Assembly
  8747.   Command
  8748.   Dialogue
  8749.   Fpu
  8750.   Memory
  8751.   Prompt
  8752.   Register
  8753.   SOurce
  8754.   STack
  8755.   Thread
  8756.  
  8757. If no window name is specified then the settings of attributes for all
  8758. windows are displayed.    To display a subset, specify only those window names
  8759. in which you are interested.
  8760.  
  8761. Example:
  8762.   DBG>show paint source dialogue
  8763.   paint source    plain cyan,black
  8764.   paint source    active black,cyan
  8765.   paint source    standout brown,black
  8766.   paint source    title bright brown,black
  8767.   paint source    gadget black,white
  8768.   paint dialogue  plain white,black
  8769.   paint dialogue  active bright brown,black
  8770.   paint dialogue  standout bright magenta,black
  8771.   paint dialogue  title bright brown,black
  8772.   paint dialogue  gadget black,white
  8773.  
  8774.  
  8775. Show Debugger Settings
  8776. ══════════════════════
  8777. ┌──────────────────────────────────────────────────────────────────────────┐
  8778. │ SHow Set {item_names}                            │
  8779. └──────────────────────────────────────────────────────────────────────────┘
  8780.  
  8781. This command is used to display the current settings of various VIDEO
  8782. parameters.  Valid item names are:
  8783.  
  8784.   Assembly
  8785.   Bell
  8786.   Call
  8787.   Dclick
  8788.   Fpu
  8789.   Implicit
  8790.   INput
  8791.   LAnguage
  8792.   Level
  8793.   MAcro
  8794.   Menu
  8795.   Pfkey
  8796.   Radix
  8797.   REcursion
  8798.   SOurce
  8799.   SYmbol
  8800.   Tab
  8801.   Visible
  8802.  
  8803. If no argument is specified then all settings are displayed.  To display a
  8804. subset, specify only those items in which you are interested.
  8805.  
  8806. Example:
  8807.   DBG>show set pfkey radix
  8808.   set pfkey 1 {help}
  8809.   set pfkey 4 {if !?_dbg@pf_4 {/_dbg@pf_4=0};
  8810.       if (++_dbg@pf_4)&1 {disp fpu /o} {disp fpu /c}}
  8811.   set pfkey 5 {reg -1}
  8812.   set pfkey 6 {reg +1}
  8813.   set pfkey 7 {/++_dbg@dbg$wind_split;<wind}
  8814.   set pfkey 8 {if !?_dbg@pf_8 {/_dbg@pf_8=0};
  8815.       if (++_dbg@pf_8)&1 {set menu off;<wind}
  8816.       {set menu on;<wind}}
  8817.   set pfkey 9 {set input source}
  8818.   set pfkey 10 {set input assembly}
  8819.   set radix /0n 10
  8820.   set radix /0x 16
  8821.   set radix /0 8
  8822.   set radix 10
  8823.  
  8824. In the above example, the current settings of the programmable function keys
  8825. and the default radix and radix specifiers are displayed.
  8826. ::::SUMMARY
  8827. BREAK       - set a break point
  8828. CALL       - call a routine
  8829. DISPLAY    - create and remove VIDEO windows
  8830. DO       - assign values to variables, registers, etc.
  8831. ERROR       - report an error to the screen
  8832. EXAMINE    - examine memory contents
  8833. FLIP       - flip to the application's output screen
  8834. GO       - resume execution
  8835. HELP       - request the interactive help facility
  8836. IF       - conditionally execute one or more VIDEO commands
  8837. INVOKE       - execute a VIDEO command file
  8838. LOG       - log VIDEO output to a file
  8839. MODIFY       - modify memory locations
  8840. NEW       - reload a task, respecify the command line, or redirect the
  8841.        standard input and output files
  8842. PAINT       - establish colour attributes for VIDEO windows
  8843. PRINT       - display variable contents
  8844. QUIT       - quit debugging the application and leave VIDEO
  8845. REGISTER   - restore a specific register set
  8846. REMARK       - document a VIDEO command file
  8847. SET       - establish various VIDEO operating parameters (disassembly
  8848.        format, warning bell, "Call" command conventions, mouse double
  8849.        click rate, math coprocessor display, command file invocation,
  8850.        current window, expression grammar, language level, macro hot
  8851.        keys, menu display, programmable function keys, numerical radix,
  8852.        source file location and naming patterns, symbol name case
  8853.        sensitivity and naming conventions, source file tab expansion
  8854.        factor, source and assembly window text display boundaries)
  8855. SHOW       - show various VIDEO operating parameters
  8856. SYSTEM       - invoke a subprocess from within VIDEO
  8857. THREAD       - manipulate the threads of execution of a multi-threaded
  8858.        application under OS/2, NetWare 386, PenPoint or Windows NT
  8859. TRACE       - trace program execution one statement at a time
  8860. VIEW       - examine the contents of a file
  8861. WATCH       - request VIDEO to watch for changes to a variable or memory
  8862.        location
  8863. WHILE       - execute one or more VIDEO commands while an expression is true
  8864. ::::SYMBOLS
  8865. VIDEO defines a number of symbols which have special meaning.  Each of the
  8866. registers is designated by a special name.
  8867.  
  8868. eax       32-bit EAX register (32-bit mode only)
  8869. ax       16-bit AX register
  8870. al       8-bit AL register
  8871. ah       8-bit AH register
  8872. ebx       32-bit EBX register (32-bit mode only)
  8873. bx       16-bit BX register
  8874. bl       8-bit BL register
  8875. bh       8-bit BH register
  8876. ecx       32-bit ECX register (32-bit mode only)
  8877. cx       16-bit CX register
  8878. cl       8-bit CL register
  8879. ch       8-bit CH register
  8880. edx       32-bit EDX register (32-bit mode only)
  8881. dx       16-bit DX register
  8882. dl       8-bit DL register
  8883. dh       8-bit DH register
  8884. eip       Instruction pointer register (32-bit mode only)
  8885. ip       Instruction pointer register
  8886. esi       Source index register (32-bit mode only)
  8887. si       Source index register
  8888. edi       Destination index register (32-bit mode only)
  8889. di       Destination index register
  8890. esp       Stack pointer register (32-bit mode only)
  8891. sp       Stack pointer register
  8892. ebp       Base pointer register (32-bit mode only)
  8893. bp       Base pointer register
  8894. cs       Code segment register
  8895. ds       Data segment register
  8896. es       Extra segment register
  8897. fs       Segment register (32-bit mode only)
  8898. gs       Segment register (32-bit mode only)
  8899. ss       Stack segment register
  8900. fl       Flags register
  8901. efl       Flags register (32-bit mode only)
  8902. fl.flg_bit_name Individual bits in Flags register
  8903.  
  8904.          flg_bit_name ::= "c" | "p" | "a" | "z" | "s" | "i" | "d" | "o"
  8905.  
  8906. efl.flg_bit_name Individual bits in Flags register
  8907.  
  8908.          flg_bit_name ::= "c" | "p" | "a" | "z" | "s" | "i" | "d" | "o"
  8909.  
  8910.        The following table lists the full name for each of the flags
  8911.        register bits:
  8912.  
  8913.        fl.o, efl.o overflow flag
  8914.        fl.d, efl.d direction flag
  8915.        fl.i, efl.i interrupt flag
  8916.        fl.s, efl.s sign flag
  8917.        fl.z, efl.z zero flag
  8918.        fl.a, efl.a auxiliary carry flag
  8919.        fl.p, efl.p parity flag
  8920.        fl.c, efl.c carry flag
  8921.  
  8922. st0 - st7  Numeric Data Processor registers (math coprocessor registers)
  8923. cw       NDP control word (math coprocessor control word)
  8924. cw.cw_bit_name Individual bits in the control word
  8925.  
  8926.          cw_bit_name ::= "ic" | "rc" | "pc" | "iem" | "pm" |
  8927.                      "um" | "om" | "zm" | "dm" | "im"
  8928.  
  8929.        The following table lists the full name for each of the control
  8930.        word bits:
  8931.  
  8932.        cw.ic      infinity control
  8933.  
  8934.             0 = projective
  8935.             1 = affine
  8936.  
  8937.        cw.rc      rounding control (2 bits)
  8938.  
  8939.             00 = round to nearest or even
  8940.             01 = round down (towards negative infinity)
  8941.             10 = round up (towards positive infinity)
  8942.             11 = chop (truncate toward zero)
  8943.  
  8944.        cw.pc      precision control (2 bits)
  8945.  
  8946.             00 = 24 bits
  8947.             01 = reserved
  8948.             10 = 53 bits
  8949.             11 = 64 bits
  8950.  
  8951.        cw.iem     interrupt enable mask (8087 only)
  8952.  
  8953.             0 = interrupts enabled
  8954.             1 = interrupts disabled (masked)
  8955.  
  8956.        cw.pm      precision (inexact result) mask
  8957.        cw.um      underflow mask
  8958.        cw.om      overflow mask
  8959.        cw.zm      zero-divide mask
  8960.        cw.dm      denormalized operand mask
  8961.        cw.im      invalid operand mask
  8962.  
  8963. sw       NDP status word (math coprocessor status word)
  8964. sw.sw_bit_name Individual bits in the status word
  8965.  
  8966.          sw_bit_name ::=  "b" | "c3" | "st" | "c2" | "c1" |
  8967.                      "c0" | "es" | "sf" | "pe" | "ue" |
  8968.                      "oe" | "ze" | "de" | "ie"
  8969.  
  8970.        The following table lists the full name for each of the status
  8971.        word bits:
  8972.  
  8973.        sw.b       busy
  8974.        sw.c3      condition code bit 3
  8975.        sw.st      stack stop pointer (3 bits)
  8976.  
  8977.             000 = register 0 is stack top
  8978.             001 = register 1 is stack top
  8979.             010 = register 2 is stack top
  8980.                 .
  8981.                 .
  8982.                 .
  8983.             111 = register 7 is stack top
  8984.  
  8985.        sw.c2      condition code bit 2
  8986.        sw.c1      condition code bit 1
  8987.        sw.c0      condition code bit 0
  8988.        sw.es      error summary (287, 387 only)
  8989.        sw.sf      stack fault (387 only)
  8990.        sw.pe      precision (inexact result) exception
  8991.        sw.ue      underflow exception
  8992.        sw.oe      overflow exception
  8993.        sw.ze      zero-divide exception
  8994.        sw.de      denormalized operand exception
  8995.        sw.ie      invalid operation exception
  8996.  
  8997. VIDEO permits the manipulation of register contents using any of the
  8998. operators described under the topics "C_OPERATORS" or "F77_OPERATORS".    By
  8999. default, these predefined names are accessed just like any other variables
  9000. defined by the user or the application.  Should the situation ever arise
  9001. where the application defines a variable whose name conflicts with that of
  9002. one of these debugger variables, the module specifier _dbg may be used to
  9003. resolve the ambiguity.    For example, if the application defines a variable
  9004. called cs then _dbg@cs can be specified to resolve the ambiguity.  The
  9005. "_dbg@" prefix indicates that we are referring to a VIDEO defined symbol
  9006. rather than an application defined symbol.
  9007.  
  9008. The flags register, the NDP control word, and the NDP status word can be
  9009. accessed as a whole or by its component status bits.
  9010.  
  9011. Example:
  9012.   /fl.c=0
  9013.   /cw.um=0
  9014.   ?sw.oe
  9015.  
  9016. In the above example, the "carry" flag is cleared, the NDP underflow mask of
  9017. the control word is cleared, and the NDP overflow exception bit of the
  9018. status word is printed.
  9019.  
  9020. The low order bit of the expression result is used to set or clear the
  9021. specified flag.
  9022.  
  9023. Example:
  9024.   fl.c=0x03a6
  9025.  
  9026. In the above example, the "carry" flag is cleared since the low order bit of
  9027. the result is 0.
  9028.  
  9029. VIDEO also defines some other special names.
  9030.  
  9031. dbg$32       This debugger symbol represents the mode in which the processor
  9032.        is running.
  9033.  
  9034.        0          16-bit mode
  9035.        1          32-bit mode
  9036.  
  9037. dbg$bottom This debugger symbol represents the number of the last line on
  9038.        the screen which may be used for windows (see also dbg$top,
  9039.        dbg$left, dbg$right).
  9040.  
  9041. dbg$bp       This debugger symbol represents the register pair SS:BP (16-bit
  9042.        mode) or SS:EBP (32-bit mode).
  9043.  
  9044.        Example:
  9045.          ? dbg$bp
  9046.  
  9047. dbg$code   This debugger symbol represents the current code location under
  9048.        examination.  The dot address "." is either set to dbg$code or
  9049.        dbg$data, depending on whether you were last looking at code or
  9050.        data.
  9051.  
  9052. dbg$cpu    This debugger symbol represents the type of central processing
  9053.        unit which is in your personal computer system.
  9054.  
  9055.        0          Intel 8088, 8086 or compatible processor
  9056.        1          Intel 80188, 80186 or compatible processor
  9057.        2          Intel 80286 or compatible processor
  9058.        3          Intel 80386 or compatible processor
  9059.        4          Intel 80486 or compatible processor
  9060.        5          Intel Pentium processor
  9061.  
  9062. dbg$ctid   This debugger symbol represents the identification number of the
  9063.        current execution thread.  Under DOS and QNX, the current thread
  9064.        ID is always 1.  The current execution thread can be selected
  9065.        using the Thread window or the Thread command.
  9066.  
  9067. dbg$data   This debugger symbol represents the current data location under
  9068.        examination.  The dot address "." is either set to dbg$code or
  9069.        dbg$data, depending on whether you were last looking at code or
  9070.        data.
  9071.  
  9072. dbg$etid   This debugger symbol represents the identification number of the
  9073.        thread that was executing when the debugger was entered.  Under
  9074.        DOS and QNX, the executing thread ID is always 1.
  9075.  
  9076. dbg$fpu    This debugger symbol represents the type of numeric data
  9077.        processor (math coprocessor) that is installed in your personal
  9078.        computer system.
  9079.  
  9080.        -1          An 80x87 emulator is installed
  9081.        0          No coprocessor is installed
  9082.        1          An Intel 8087 is installed
  9083.        2          An Intel 80287 is installed
  9084.        3          An Intel 80387 is installed
  9085.        4          An Intel 80486 processor, supporting coprocessor
  9086.               instructions, is installed
  9087.        5          An Intel Pentium processor, supporting coprocessor
  9088.               instructions, is installed
  9089.  
  9090. dbg$ip       This debugger symbol represents the register pair CS:IP (16-bit
  9091.        mode) or CS:EIP (32-bit mode).
  9092.  
  9093.        Example:
  9094.          ? dbg$ip
  9095.  
  9096. dbg$left   This debugger symbol represents the number of the first column on
  9097.        the screen which may be used for windows (see also dbg$right,
  9098.        dbg$top, dbg$bottom).
  9099.  
  9100. dbg$monitor This debugger symbol represents the type of monitor adapter
  9101.        which is in use.
  9102.  
  9103.        0          IBM Monochrome Adapter
  9104.        1          IBM Colour Graphics Adapter (CGA)
  9105.        2          IBM Enhanced Graphics Adapter (EGA)
  9106.        3          IBM Video Graphics Array (VGA)
  9107.  
  9108. dbg$os       This debugger symbol represents the operating system that is
  9109.        currently running the application.
  9110.  
  9111.        1          DOS
  9112.        2          OS/2
  9113.        3          386|DOS-Extender from Phar Lap Software, Inc.
  9114.        4          OS/386 from ERGO Computing, Inc.
  9115.        5          NetWare 386 from Novell, Inc.
  9116.        6          QNX from Quantum Software Systems Ltd.
  9117.        7          DOS/4GW from Rational Systems, Inc.  (included in the
  9118.               WATCOM C/C++(32) and WATCOM FORTRAN 77(32) packages)
  9119.        8          Microsoft Windows 3.x from Microsoft Corporation
  9120.        9          PenPoint from GO Corporation
  9121.       10          Windows NT from Microsoft Corporation
  9122.       11          AutoCAD from Autodesk, Inc.
  9123.  
  9124. dbg$pid    (OS/2, NetWare 386, PenPoint, QNX, Windows NT only) This debugger
  9125.        symbol contains the process identification value for the program
  9126.        being debugged.
  9127.  
  9128. dbg$psp    (DOS only) This debugger symbol contains the segment value for
  9129.        the DOS "program segment prefix" of the program being debugged.
  9130.  
  9131. dbg$radix  This debugger symbol represents the current default numeric
  9132.        radix.
  9133.  
  9134. dbg$remote This debugger symbol is 1 if the "REMotefiles" option was
  9135.        specified and 0 otherwise.
  9136.  
  9137. dbg$right  This debugger symbol represents the number of the last column on
  9138.        the screen which may be used for windows (see also dbg$left,
  9139.        dbg$top, dbg$bottom).
  9140.  
  9141. dbg$sp       This debugger symbol represents the register pair SS:SP (16-bit
  9142.        mode) or SS:ESP (32-bit mode).
  9143.  
  9144.        Example:
  9145.          ? dbg$sp
  9146.  
  9147. dbg$top    This debugger symbol represents the number of the first line on
  9148.        the screen which may be used for windows (see also dbg$left,
  9149.        dbg$right, dbg$bottom).
  9150.  
  9151. dbg$view   This debugger symbol is set by the View command.  It represents
  9152.        the segment and offset of the code corresponding to the line
  9153.        where the cursor was last positioned when viewing a module of the
  9154.        current application.  This variable has several uses.  For
  9155.        example, it can be used in a Break command to set a break point.
  9156.  
  9157.        Example:
  9158.          break dbg$view
  9159. ::::SYSTEM
  9160. ┌──────────────────────────────────────────────────────────────────────────┐
  9161. │ SYstem[/(Remote | Local)] [ system_cmd | "{" system_cmd "}" ]        │
  9162. │ !                                       │
  9163. └──────────────────────────────────────────────────────────────────────────┘
  9164.  
  9165. The SYstem or !  command may be used to run other commands or programs
  9166. without destroying the debugging environment.  If system_cmd is entered,
  9167. that command is executed by the operating system and control returns to
  9168. VIDEO.
  9169.  
  9170. If system_cmd is omitted, the operating system command interpreter or shell
  9171. is invoked.  Commands may be entered until an "exit" command is entered.
  9172. The shell is terminated and control returns to the debugger.
  9173.  
  9174. The /Remote and /Local qualifiers may be specified when using the remote
  9175. debugging feature.  If the /Remote qualifier is specified, the command is
  9176. run on the task machine.  If the /Local qualifier is specified, the command
  9177. is run on the debugger machine.  If neither qualifier is specified then
  9178. "local" is assumed unless the Remotefiles option was specified on the
  9179. command line.  For more information on remote debugging, see the topic
  9180. entitled "REMOTE_DEBUGGING".
  9181.  
  9182. Under QNX, a path specification that begins with a "/" could be interpreted
  9183. as a qualifier.
  9184.  
  9185. Example:
  9186.   DBG>system /users/fred/myapp
  9187.  
  9188. In the above example, the "/users" qualifier is not supported and an error
  9189. will result.  To resolve this conflict, the /Local qualifier must be used.
  9190.  
  9191. Example:
  9192.   DBG>system/local /users/fred/myapp
  9193.  
  9194. ┌────────────────────────────────────────────────────────────────────────────┐
  9195. │ Note:  There must be enough unused memory in the computer to run the         │
  9196. │ specified program or shell.  Under DOS, the program being debugged must    │
  9197. │ have released some memory back to the system so that there is room to load │
  9198. │ system_cmd.  For DOS, you can use the "RESIZE" command file to set the     │
  9199. │ size of the memory control block containing the Program Segment Prefix     │
  9200. │ (PSP) of the program being debugged.    See the topic entitled             │
  9201. │ "COMMAND_FILES" for more information on this command file.             │
  9202. │                                         │
  9203. │ You can also use the VIDEO "Checksize" option.  See the topic entitled     │
  9204. │ "DOS_STARTUP" for more information on this option.                 │
  9205. └────────────────────────────────────────────────────────────────────────────┘
  9206.  
  9207. Example:
  9208.   DBG>system c:\cmds\cset.com
  9209.  
  9210. In the above DOS example, the program "CSET.COM" is invoked from the "C"
  9211. disk and directory "\CMDS".
  9212.  
  9213. Example:
  9214.   DBG>system
  9215.  
  9216. The command shell is invoked.  The shell will not return to the debugger
  9217. until an "exit" command is executed.
  9218.  
  9219. Example:
  9220.   DBG>sys chdir \asmsrc
  9221.  
  9222. For DOS only, the shell is invoked to change the current directory to
  9223. "\ASMSRC".  Control is then immediately returned to VIDEO.
  9224.  
  9225. Example:
  9226.   DBG>! edit hello.c
  9227.  
  9228. An editor is invoked to edit the file "hello.c".  Corrections to the C
  9229. source code could be applied while the "HELLO" program is being debugged.
  9230. When the editor exits, control is returned to VIDEO.
  9231.  
  9232. Example:
  9233.   DBG>! edit fftc.for
  9234.  
  9235. An editor is invoked to edit the file "fftc.for".  Corrections to the
  9236. FORTRAN source code could be applied while the "FFTC" program is being
  9237. debugged.  When the editor exits, control is returned to VIDEO.
  9238. ::::THREAD
  9239. ┌──────────────────────────────────────────────────────────────────────────┐
  9240. │ THread                                   │
  9241. │ ~                                       │
  9242. │      /Change   [id_num]                           │
  9243. │      /Freeze   [id_num] | ["*"]                       │
  9244. │      /Show     [id_num] | ["*"]                       │
  9245. │      /Thaw     [id_num] | ["*"]                       │
  9246. └──────────────────────────────────────────────────────────────────────────┘
  9247.  
  9248. The THread or ~ command is used to manipulate the threads of execution of
  9249. a multi-threaded application under OS/2, NetWare 386, PenPoint or Windows
  9250. NT.  An execution thread may be selected for examination by VIDEO
  9251. (/Change), an execution thread may be made not runnable (/Freeze), an
  9252. execution thread may be made runnable (/Thaw), or the status of execution
  9253. threads may be displayed (/Show).
  9254.  
  9255. In an application that has multiple threads of execution, a particular
  9256. thread may be selected for examination by specifying its thread
  9257. identification number or thread ID using the Change option.
  9258.  
  9259. Example:
  9260.   00001>thread/change 2
  9261.  
  9262. In the above example, execution thread "2" is selected using the Change
  9263. option.  The debugger prompt will change to "00002" if an execution thread,
  9264. whose ID is "2", exists.  Other windows on the screen will change to reflect
  9265. the selection of another execution thread.  In particular, any Assembly,
  9266. Source, FPU, and Register windows that are present on the screen will
  9267. change.
  9268.  
  9269. The Change option need not be specified since it is the default when only a
  9270. thread ID is specified.
  9271.  
  9272. Example:
  9273.   00001>thread 2
  9274.  
  9275. In the above example, execution thread "2" is selected.
  9276.  
  9277. A particular thread may be "frozen" (i.e., made not runnable) by specifying
  9278. its thread ID using the Freeze option.
  9279.  
  9280. Example:
  9281.   00002>thread/freeze 3
  9282.  
  9283. In the above example, execution thread "3" is made not runnable.
  9284.  
  9285. All threads may be frozen by specifying "*" for the thread ID.
  9286.  
  9287. Example:
  9288.   00002>~/f *
  9289.  
  9290. The current thread may be frozen by omitting the thread ID.
  9291.  
  9292. Example:
  9293.   00002>thread/freeze
  9294.  
  9295. A particular thread may be "thawed" (i.e., made runnable) by specifying its
  9296. thread ID using the Thaw option.
  9297.  
  9298. Example:
  9299.   00002>thread/thaw 3
  9300.  
  9301. In the above example, execution thread "3" is made runnable.
  9302.  
  9303. All threads may be thawed by specifying "*" for the thread ID.
  9304.  
  9305. Example:
  9306.   00002>thread/thaw *
  9307.  
  9308. The current thread may be thawed by omitting the thread ID.
  9309.  
  9310. Example:
  9311.   00002>~/th
  9312.  
  9313. The status of a particular thread may be displayed by specifying its thread
  9314. ID using the Show option.
  9315.  
  9316. Example:
  9317.   00002>thread/show 1
  9318.  
  9319. In the above example, the status of execution thread "1" is displayed.
  9320.  
  9321. The status of all threads may be displayed by specifying "*" for the thread
  9322. ID.
  9323.  
  9324. Example:
  9325.   00002>th/sh *
  9326.  
  9327. Alternately, the status of all threads may be displayed by specifying the
  9328. Thread command without any arguments.
  9329.  
  9330. Example:
  9331.   00002>thread
  9332.  
  9333. The status of the current thread may be displayed by specifying Show and
  9334. omitting the thread ID.
  9335.  
  9336. Example:
  9337.   00002>~/s
  9338. ::::TRACE
  9339. ┌──────────────────────────────────────────────────────────────────────────┐
  9340. │ Trace                                    │
  9341. │     [/Assembly] [/Over | /Into | /Next] [start_addr_expr]           │
  9342. │     [/Mix]        [/Over | /Into | /Next] [start_addr_expr]           │
  9343. │     [/Source]   [/Over | /Into | /Next] [start_addr_expr]           │
  9344. └──────────────────────────────────────────────────────────────────────────┘
  9345.  
  9346. The Trace command is used to step through the execution of a program.
  9347. Execution may be viewed one source line at a time (/Source), one assembly
  9348. instruction at a time (/Assembly), or a combination of both source and
  9349. assembly lines (/Mix).    The latter mode will display source lines when they
  9350. are available and switch to assembly instructions when source line
  9351. information is not available.
  9352.  
  9353. Source line numbers are displayed in the Source window when source line
  9354. information is included in the executable image (for additional information,
  9355. see the description of the compiler's "d1" option and the WATCOM Linker
  9356. "DEBUG" directive).  If the source file can be accessed then the
  9357. corresponding source text is also displayed.  For a discussion of how VIDEO
  9358. locates the source files that correspond to the modules in your application,
  9359. see the description of the Set Source command.
  9360.  
  9361. Assembly instructions are displayed in the Assembly window.
  9362.  
  9363. When source line information is available, both the Source and Assembly
  9364. windows are synchronized.
  9365.  
  9366. /Assembly [/Over | /Into | /Next] [start_addr_expr]
  9367.        VIDEO will trace execution of the application one assembly
  9368.        instruction at a time.
  9369.  
  9370.        Example:
  9371.          DBG>trace /assembly
  9372.  
  9373. /Mix [/Over | /Into | /Next] [start_addr_expr]
  9374.        VIDEO will trace execution of the application one source
  9375.        statement at a time, or one instruction at a time when no source
  9376.        text is available.
  9377.  
  9378.        Example:
  9379.          DBG>trace /mix
  9380.  
  9381. /Source [/Over | /Into | /Next] [start_addr_expr]
  9382.        VIDEO will trace execution of the application one source
  9383.        statement at a time.  Source line information must be available
  9384.        at the time that this command is issued.
  9385.  
  9386.        Example:
  9387.          DBG>trace /source
  9388.  
  9389. When none of the /Assembly, /Mix or /Source qualifiers is specified, VIDEO
  9390. will use a default trace mode.    Initially, the default is /Mix but this
  9391. default can be set with Set Level command.
  9392.  
  9393. By default, VIDEO will enter a tracing mode in which one source statement or
  9394. assembly instruction is executed each time one of the SPACE bar or "I" or
  9395. "N" keys is pressed.
  9396.  
  9397. If the SPACE bar is used to advance execution, the tracing of called
  9398. routines is skipped.  Tracing continues with the statement or instruction
  9399. following the routine invocation.
  9400.  
  9401. Example:
  9402.   C Programming Example
  9403.      8 int main()
  9404.      9   {
  9405.     10    printf( "Hello world\n" );
  9406.     11    return( 0 );
  9407.     12   }
  9408.  
  9409.   FORTRAN Programming Example
  9410.      8     PROGRAM DEMO
  9411.      9     EXTERNAL PRINTF
  9412.     10     CALL PRINTF( 'Hello world' )
  9413.     11     END
  9414.  
  9415. In the above example, we skip the trace of the execution of the "printf"
  9416. routine by pressing the SPACE bar when the "printf" statement is about to be
  9417. executed.
  9418.  
  9419. If the "I" or "into" key is used to advance execution, the execution of
  9420. called routines is traced.
  9421.  
  9422. Example:
  9423.   main_     mov    AX,0002
  9424.   main_+03    push   AX
  9425.   main_+04    call   printf
  9426.   main_+07    add    SP,2
  9427.   main_+0A    xor    AX,AX
  9428.  
  9429. In the above example, we can trace the execution of the "printf" routine by
  9430. pressing the "I" key when the "call" instruction at "main_+04" is about to
  9431. be executed.
  9432.  
  9433. The "N" or "next" key may be used to advance tracing to the next sequential
  9434. statement or instruction immediately following the current statement or
  9435. instruction.  In situations where you are at the bottom of a loop, this
  9436. permits you to skip over the tracing of statements or instructions which
  9437. might be repeated many times.
  9438.  
  9439. Example:
  9440.   _CSTART_+66    sub    SI,SI
  9441.   _CSTART_+68    cmp    BYTE PTR [SI],00
  9442.   _CSTART_+6B    movsb
  9443.   _CSTART_+6C  *jne    _CSTART_+68
  9444.   _CSTART_+6E    cmp    BYTE PTR [SI],00
  9445.  
  9446. In the above example, we can skip tracing of the loop from "_CSTART_+68" to
  9447. "_CSTART_+6C" by pressing the "N" key when the "jne" instruction at
  9448. "_CSTART_+6C" is about to be executed.    The "*" preceding the "jne"
  9449. indicates that the branch to "_CSTART_+68" will be taken.  The next
  9450. instruction to be traced will be the "cmp" at "_CSTART_+6E".
  9451.  
  9452. When using the "N" key, care must be taken to ensure that the execution path
  9453. will eventually reach the next statement or instruction.  If execution fails
  9454. to reach this point then the program may continue to execute until
  9455. completion.  This situation is akin to setting a break point at a statement
  9456. or assembly instruction which will never be executed and then issuing a Go
  9457. command.  In this situation, the application would execute to completion.
  9458.  
  9459. Tracing can be discontinued by pressing any other key.
  9460.  
  9461. The /Over, /Into and /Next modifiers may be used to continue execution to
  9462. the "next" statement or instruction after which VIDEO will prompt for
  9463. another command.  This is often referred to as "single-step" mode.
  9464.  
  9465. /Over       This qualifier may be used to continue execution to the "next"
  9466.        statement or assembly instruction.  If the current statement or
  9467.        instruction invokes a routine then the "next" statement or
  9468.        instruction is the one which follows the invocation of the
  9469.        routine.
  9470.  
  9471. /Into       This qualifier may be used to continue execution to the "next"
  9472.        statement or assembly instruction.  If the current statement or
  9473.        instruction invokes a routine then the "next" statement or
  9474.        instruction is the first one in the called routine.
  9475.  
  9476. /Next       This qualifier may be used to continue execution to the "next"
  9477.        statement or assembly instruction which immediately follows the
  9478.        current statement or instruction in memory.    If the current
  9479.        statement or instruction is one that branches, care must be taken
  9480.        to ensure that the execution path will eventually reach the
  9481.        statement or instruction which follows.  If execution fails to
  9482.        reach this point then the program may continue to execute until
  9483.        completion.
  9484. ::::VIEW
  9485. ┌──────────────────────────────────────────────────────────────────────────┐
  9486. │ View[/Binary]  [module_or_file_spec]                       │
  9487. └──────────────────────────────────────────────────────────────────────────┘
  9488.  
  9489. The View command invokes a simple file browser (i.e., you cannot make
  9490. changes to the file, only look at it).    If module_or_file_spec is not
  9491. specified then the current module name is assumed.
  9492.  
  9493. The argument module_or_file_spec is treated first as a possible module name
  9494. and then as a file name.  The debugger attempts to locate the source file
  9495. that corresponds to the module in the same manner as that used when
  9496. displaying source lines in the Source window.  VIDEO searches for the file
  9497. in the devices and paths that you specify in the Set Source command.
  9498.  
  9499. In cases where there is a conflict between a module name and a file name, a
  9500. drive (DOS, MS Windows, OS/2), path or file extension can be specified to
  9501. resolve the ambiguity.    For example, suppose that you had a data file called
  9502. "printf".  If you entered the command view printf then VIDEO would attempt
  9503. to locate the file "printf.c".    On the other hand, if you entered the
  9504. command view printf.  then VIDEO would attempt to locate the file "printf"
  9505. under DOS, MS Windows or OS/2.    Under QNX, you would enter the command view
  9506. ./printf to view the file "printf".
  9507.  
  9508. If /Binary is specified then the file contents are displayed in hexadecimal
  9509. notation.  A file name must be specified when this qualifier is used.
  9510.  
  9511. The manipulation of the View window with keys and a mouse is described under
  9512. the topic entitled "WINDOWS".
  9513.  
  9514. Under QNX, a path specification that begins with a "/" could be interpreted
  9515. as a qualifier.
  9516.  
  9517. Example:
  9518.   DBG>view /users/fred/test.dat
  9519.  
  9520. In the above example, the "/users" qualifier is not supported and an error
  9521. will result.  To resolve this conflict, the local file specifier prefix "@l"
  9522. can be used.
  9523.  
  9524. Example:
  9525.   DBG>view @l/users/fred/test.dat
  9526.  
  9527. Local and remote file specifier prefixes are described under the topic
  9528. entitled "REMOTE_DEBUGGING".
  9529. ::::WATCH
  9530. ┌──────────────────────────────────────────────────────────────────────────┐
  9531. │ Watch                                    │
  9532. │     [/Set]       addr_expr [ cmd_list ]                   │
  9533. │     /Byte       addr_expr [ cmd_list ]                   │
  9534. │     /Word       addr_expr [ cmd_list ]                   │
  9535. │     /DWord       addr_expr [ cmd_list ]                   │
  9536. │     /Activate    "*" | index_expr | "/" addr_expr               │
  9537. │     /Deactivate  "*" | index_expr | "/" addr_expr               │
  9538. │     /Clear       "*" | index_expr | "/" addr_expr               │
  9539. └──────────────────────────────────────────────────────────────────────────┘
  9540.  
  9541. A watch point defines a memory location which, if modified, causes execution
  9542. of the application to suspend.    A watch point may be defined for:
  9543.  
  9544. /Byte       a byte (8 bits)
  9545.  
  9546. /Word       a word (16 bits), and
  9547.  
  9548. /DWord       a doubleword (32 bits)
  9549.  
  9550. /Set is implied when no other qualifier is specified.  If /Set or no
  9551. qualifier is specified, a watchpoint is set for a word or doubleword
  9552. depending on whether you are debugging a 16-bit or 32-bit application.    A
  9553. watchpoint may be removed with the /Clear qualifier.  Watchpoints may be
  9554. enabled with the /Activate qualifier or disabled with the /Deactivate
  9555. qualifier.  Up to 7 watch points may be defined.  When an instruction
  9556. modifies a location guarded by an active watch point, application execution
  9557. is suspended and the debugger is entered.
  9558.  
  9559. Example:
  9560.   DBG>watch/set _listhead
  9561.   DBG>watch _listhead
  9562.  
  9563. In the above example, two equivalent commands are shown.  A watch point is
  9564. defined and automatically activated for the 16-bit memory location defined
  9565. by the global symbol _listhead.  Only one watch point may be specified for a
  9566. particular location in memory.
  9567.  
  9568. A watch point may be specified in terms of a module name and symbol name.
  9569.  
  9570. Example:
  9571.   DBG>watch sort@_listhead
  9572.  
  9573. When the executing application modifies a memory location guarded by an
  9574. active watch point, application execution is suspended and the debugger is
  9575. entered.  If one or more debugger commands were specified when the watch
  9576. point was defined, the debugger commands are executed first.  The command
  9577. list that follows the address expression in the /Set, /Byte, /Word, or
  9578. /DWord qualifiers is defined as follows:
  9579.  
  9580.   cmd_list ::= "{" [cmd] { ";" [cmd] } "}"
  9581.  
  9582. This is simply a VIDEO command line placed inside of braces.
  9583.  
  9584. Notes:
  9585.  
  9586.   1. For a complete description of valid address expressions, see the
  9587.     chapter entitled "VIDEO Expression Handling".
  9588.  
  9589.   2. Execution of the application may be resumed if one of the commands was
  9590.     a Go command; otherwise the debugger prompts the user for a new command.
  9591.  
  9592.     Example:
  9593.       DBG>watch _listhead {if _listhead != 0 {go/keep}}
  9594.  
  9595.     Each time the "listhead" variable is modified, its value is compared
  9596.     with zero and execution is resumed only if the value is not zero.
  9597.  
  9598.   3. If no arguments are specified to the "Watch" command, the currently
  9599.     defined watch points will be displayed.  The first one shown is watch
  9600.     point number 1, the second one shown is watch point number 2, and so on.
  9601.     These are called the watch point indices.  Active watch points are shown
  9602.     in "active" attributes, inactive ones are shown in "plain" attributes.
  9603.     See the description of the Paint command for a discussion of attributes.
  9604.  
  9605.   4. When activating, deactivating or clearing a watch point, either the
  9606.     watch point index or the address must be specified.  If "*" is specified
  9607.     as the watch point index then all watch points are affected.
  9608.  
  9609.     Example:
  9610.       DBG>watch/set _listhead; watch/deac 1
  9611.       DBG>watch/set _listhead; watch/deac /_listhead
  9612.  
  9613.     In both examples, a watch point is set and then a watch point is
  9614.     deactivated.  In the first example, the watch point set for _listhead is
  9615.     deactivated only if no other watch points have been set (since it will
  9616.     then be watch point number 1).  The second example illustrates how the
  9617.     watch point for _listhead will be deactivated under any circumstances.
  9618.  
  9619.     Example:
  9620.       DBG>watch/activate 2; watch/deactivate 1
  9621.  
  9622.     Watch point number 2 is activated and 1 is deactivated.
  9623.  
  9624.   5. The specified address need not be the name of a symbol.
  9625.  
  9626.     Example:
  9627.       DBG>watch/byte es:di
  9628.  
  9629.     A watch point is set for the 8-bit location specified by the contents of
  9630.     the ES:DI register pair.
  9631.  
  9632.     Example:
  9633.       DBG>watch/deactivate /bx
  9634.  
  9635.     The watch point whose address is specified by the contents of the DS:BX
  9636.     register pair is deactivated.
  9637.  
  9638.   6. All watch points may be removed in a single command.
  9639.  
  9640.     Example:
  9641.       DBG>watch/clear *
  9642.  
  9643.     The asterisk refers to all watch points.
  9644. ::::WHILE
  9645. ┌──────────────────────────────────────────────────────────────────────────┐
  9646. │ WHile <expr> cmd_list                            │
  9647. └──────────────────────────────────────────────────────────────────────────┘
  9648.  
  9649. The WHile command permits execution of a list of commands while the
  9650. specified expression is true (i.e., evaluates to a non-zero result).  The
  9651. command list that follows the command is defined as follows:
  9652.  
  9653.   cmd_list ::= "{" [cmd] { ";" [cmd] } "}"
  9654.  
  9655. Example:
  9656.   DBG>/ax=0; while ax!=25 {/ax++;print ax}
  9657.  
  9658. The above example prints the numbers from 1 to 25 in the Dialogue window.
  9659. It first sets the AX register to 0.  While the content of the AX register is
  9660. not equal to 25, the debugger will increment the value in the AX register
  9661. and print the new value.
  9662.  
  9663. There are more complex scenarios in which the WHile command can be put to
  9664. good use.  For example, it could be used to follow a linked list which is
  9665. terminated by a NULL pointer.
  9666. ::::WIN3_STARTUP
  9667. Debugging an application that is to run under Microsoft Windows 3.x can be
  9668. done in several ways.
  9669.  
  9670.   1. You can run VIDEO under Windows 3.x to debug an application that is
  9671.     to run under Windows 3.x.
  9672.  
  9673.   2. You can also use a second computer system and the "remote debugging"
  9674.     feature of VIDEO.
  9675.  
  9676.   3. You can also debug 16-bit Windows applications under OS/2 using
  9677.     WIN-OS/2 and a Virtual DOS Machine (VDM) link.
  9678.  
  9679. This section will deal with the first topic, namely debugging of Windows
  9680. applications under MS Windows 3.x using a single DOS-based personal
  9681. computer.  See the topic entitled "REMOTE_WIN3" for more information on the
  9682. last two methods.
  9683.  
  9684.  
  9685. Installing the Windows Version of VIDEO
  9686. ═══════════════════════════════════════
  9687. To use VIDEO, Microsoft Windows 3.x must be started in enhanced mode.
  9688. When debugging 32-bit applications, you must include the "device"
  9689. specification listed below in the [386Enh] section of your Windows 3.x
  9690. "SYSTEM.INI" file.
  9691.  
  9692.   DEVICE=[d:]\WATCOM\BINW\WDEBUG.386
  9693.  
  9694. This device driver supports debugging of both 16-bit and 32-bit
  9695. applications.
  9696.  
  9697. You must include the Windows 3.x SDK file "TOOLHELP.DLL" in your path.
  9698. This file is included in the WATCOM software package.
  9699.  
  9700. The following procedures will install VIDEO in the currently selected
  9701. program group.    If you wish, you can create a new program group for VIDEO.
  9702.  
  9703. To install the Windows 3.x version of VIDEO, select the "New" entry of the
  9704. "File" menu of the Windows "Program Manager".  Select the "Program Item"
  9705. option.  For the "Description" field of the "Properties" window, enter the
  9706. name "VIDEO".  For the "Command Line" field, enter the full path
  9707. specification for "WVIDEO.EXE".  Sample entries for the "Description" and
  9708. "Command Line" fields of the "Properties" window are shown in the
  9709. following illustration.
  9710.  
  9711. ┌────────────────────────────────────────────────────────────────────────────┐
  9712. │ Description:      VIDEO                              │
  9713. │ Command Line:   E:\WATCOM\BINW\WVIDEO.EXE                     │
  9714. └────────────────────────────────────────────────────────────────────────────┘
  9715.  
  9716. A lightning bolt icon for VIDEO will appear in the currently selected
  9717. program group.
  9718.  
  9719.  
  9720. Debugging of Windows 3.x Applications
  9721. ═════════════════════════════════════
  9722. To start VIDEO, select the program group in which you have installed
  9723. VIDEO.    One of the icons presented is used to start the debugger.
  9724. Double-click on the VIDEO icon.
  9725.  
  9726. A prompt window will appear in which you will be required to enter a command
  9727. line that will be used to start the application.  The format of the command
  9728. line is described under the topic entitled "DOS_STARTUP".
  9729.  
  9730. You can make special versions of the VIDEO icon using the "Copy" and
  9731. "Properties" entries of the "File" menu of the Windows "Program Manager".
  9732. For example, you can add any options you wish to the "Command Line" field of
  9733. the "Properties" window.  Sample entries for the "Description" and "Command
  9734. Line" fields of the "Properties" window are shown in the following
  9735. illustration.
  9736.  
  9737. ┌────────────────────────────────────────────────────────────────────────────┐
  9738. │ Description:      VIDEO/Custom                             │
  9739. │ Command Line:   E:\WATCOM\BINW\WVIDEO.EXE /reg=4                 │
  9740. └────────────────────────────────────────────────────────────────────────────┘
  9741.  
  9742. When you click on the newly created icon, the options specified in the
  9743. "Command Line" field will be taken as defaults.  As long as no executable
  9744. file name was specified in the "Command Line" field, VIDEO will present its
  9745. prompt window.    In the prompt window, you can specify more options and an
  9746. executable file name.
  9747.  
  9748. If you are debugging the same program over and over again, you might wish to
  9749. create an icon that includes the name of the file you wish to debug in the
  9750. "Command Line" field.  Each time you click on that icon, VIDEO is started
  9751. and it automatically loads the program you wish to debug.
  9752. ::::WIN3_WVIDEOW_ENVIRONMENT_VARIABLE
  9753. The WVIDEOW environment variable can be used to specify commonly used VIDEO
  9754. options.  If the specification of an option involves the use of an "="
  9755. character then the "#" character may be used in its place (this is required
  9756. by the syntax of the "SET" command).  These options are processed before
  9757. options specified on the command line.
  9758.  
  9759. Example:
  9760.   C>set wvideow=/fastswap/vga50/reg#4
  9761.  
  9762. The above examples illustrate how to define default options for the
  9763. debugger.
  9764.  
  9765. Once the WVIDEOW environment variable has been defined, those options listed
  9766. become the default each time VIDEO is invoked.
  9767. ::::WINDOWS
  9768. Types of Windows
  9769. ════════════════
  9770. Windows are rectangular areas on the screen which are devoted to displaying
  9771. a particular type of debugging information such as source lines, machine
  9772. language instructions, and register contents.  Not all windows need be
  9773. present on the screen.    Windows are placed on the screen with the VIDEO
  9774. Display command.  The same command can be used to remove windows from the
  9775. screen.  The attributes of lines displayed in a window are defined with the
  9776. VIDEO Paint command.
  9777.  
  9778. In the preceding illustration only the Source, Dialogue and Prompt windows
  9779. are shown.  The top line is the menu line.  The various types of windows are
  9780. described later under this topic.
  9781.  
  9782.  
  9783. Window Manipulation with Keys
  9784. ═════════════════════════════
  9785. The window which contains the text cursor is called the "active" window.
  9786. The active window is the window that will respond to keystrokes.  In
  9787. general, keys such as the Cursor Up and Down keys perform similar functions
  9788. in all windows.  The following keys perform identical functions in all
  9789. windows.
  9790.  
  9791. Ctrl/Enter may be used to start a text selection process which will be
  9792.        concluded by the appearance of the Action window.  When text
  9793.        selection is started, a block cursor will appear on the screen.
  9794.        The cursor keys may be used to stretch the block cursor to the
  9795.        left, right, up and down, thereby highlighting a portion of the
  9796.        text visible on the screen.    The Ctrl/Cursor Left and Ctrl/Cursor
  9797.        Right keys extend the block cursor to the left or right by a
  9798.        token at a time.  A second press of the Ctrl/Enter key causes the
  9799.        Action window to pop up on the screen.
  9800.  
  9801. The following keys perform identical functions in all windows except the
  9802. View and Error windows.
  9803.  
  9804. Tab       may be used to move the text cursor to the next window on the
  9805.        screen.
  9806.  
  9807. Shift/Tab  (Backtab) may be used to move the text cursor to the previous
  9808.        window on the screen.
  9809.  
  9810. Escape       may be used to move directly to the Prompt window.
  9811.  
  9812. Ctrl/D       may be used to shift the entire active window down on the screen.
  9813.  
  9814. Ctrl/U       combination may be used to shift the entire active window up on
  9815.        the screen.
  9816.  
  9817. Ctrl/P       may be used to invoke the Paint menu for the active window.
  9818.  
  9819. Ctrl/Q       may be used to update the contents of the active window.
  9820.  
  9821. The following keys perform identical functions in all windows except the
  9822. Prompt, View and Error windows.
  9823.  
  9824. Ctrl/L       may be used to move the active window to the left.
  9825.  
  9826. Ctrl/R       may be used to move the active window to the right.
  9827.  
  9828. Ctrl/G       may be used to grow the size of the active window.
  9829.  
  9830. Ctrl/S       may be used to shrink the size of the active window.
  9831.  
  9832. Ctrl/N       may be used to narrow the size of the active window.
  9833.  
  9834. Ctrl/W       may be used to widen the size of the active window.
  9835.  
  9836. Ctrl/E       may be used to erase the active window from the display.
  9837.  
  9838. Ctrl/Z       may be used to zoom the active window between its normal size and
  9839.        the size of the entire screen.
  9840.  
  9841. Later sections describe in detail the responses to various keys when a
  9842. particular window is active.
  9843.  
  9844.  
  9845. Window Manipulation with a Mouse
  9846. ════════════════════════════════
  9847. In order to use a mouse with VIDEO, you must install a mouse driver program.
  9848.  
  9849. Under DOS, you must install the IBM Mouse Driver program that is supplied
  9850. with the IBM Mouse.  Alternatively, you may use a mouse and mouse driver
  9851. that are compatible with the IBM Mouse and IBM Mouse Driver.  The IBM Mouse
  9852. Driver is installed by running the "MOUSE.COM" program.
  9853.  
  9854. Example:
  9855.   C>\dos\mouse
  9856.  
  9857. See your QNX manuals for further information on mouse installation.
  9858.  
  9859. VIDEO supports the use of a mouse in many ways.  Most actions are selected
  9860. by "clicking" the mouse at the desired location.  This is done by moving the
  9861. mouse cursor, the solid rectangle on the screen, to a place on the screen
  9862. and then pressing the left button on the mouse.
  9863.  
  9864. The mouse cursor can be positioned to any window.  In some windows, such as
  9865. the "Source" and "Assembly" windows, text may be scrolled up or down, left
  9866. or right, by "dragging" the mouse.  This is done by moving the mouse cursor
  9867. to a line in the window and, while pressing down the left button on the
  9868. mouse, repositioning the mouse cursor to another place in the window.
  9869.  
  9870. To scroll text up or down by dragging the mouse, vertical scrolling must be
  9871. enabled.  This is done by clicking the mouse on the scroll bar at the right
  9872. side of the window where the word "Locked" appears.  If the word "Locked"
  9873. does not appear then vertical scrolling is already enabled.  Vertical
  9874. scrolling can be enabled/disabled by clicking on the scroll bar again.
  9875.  
  9876. To scroll text left or right by dragging the mouse, horizontal scrolling
  9877. must be enabled.  This is done by clicking the mouse on the scroll bar at
  9878. the bottom of the window where the word "Locked" appears.  If the word
  9879. "Locked" does not appear then horizontal scrolling is already enabled.
  9880. Horizontal scrolling can be enabled/disabled by clicking on the scroll bar
  9881. again.
  9882.  
  9883. The entire window can be repositioned on the screen by dragging the window's
  9884. title line to a new place on the screen.
  9885.  
  9886. Some actions are accomplished by "double-clicking" the left mouse button.
  9887. Double-clicking is done by rapidly pressing the left mouse button twice at
  9888. the same location without moving the mouse cursor.  These actions are
  9889. described in subsequent sections.
  9890.  
  9891. Text selection may be started by pressing the right-hand mouse button.
  9892. Without releasing the button, the mouse cursor may be moved about the screen
  9893. to highlight a sequence of text (characters, words, expressions, etc.).
  9894. When the right-hand mouse button is released, the Action window appears on
  9895. the screen.  If the right-hand mouse button is pressed and released without
  9896. moving the mouse, the "item" under the mouse cursor is selected in its
  9897. entirety and the Action window appears on the screen.
  9898.  
  9899. When using a mouse, many windows have "gadgets".
  9900.  
  9901.   1. The "scroll up" () and "scroll down" () gadgets may be used to scroll
  9902.     text vertically.
  9903.  
  9904.   2. The "scroll left" () and "scroll right" () gadgets may be used to
  9905.     scroll text horizontally.
  9906.  
  9907.   3. The "page up" and "page down" gadgets (small triangle shapes at the
  9908.     right of the window) perform different actions depending on the window.
  9909.  
  9910.   4. The "page left" and "page right" gadgets (small triangle shapes at the
  9911.     bottom of the window) perform different actions depending on the window.
  9912.  
  9913.   5. The "window zoom" gadget (the  symbol, in the top, right corner
  9914.     of the window) may be used to zoom the active window between its normal
  9915.     size and the size of entire screen.
  9916.  
  9917.     If you place the mouse cursor on the "zoom" gadget and press the
  9918.     right-hand mouse button, the window will temporarily zoom to full size.
  9919.     When you release the button, the window will return to its normal size.
  9920.  
  9921.   6. The "window resize" gadget (double arrow, in the bottom, right corner)
  9922.     may be used to enlarge or shrink a window.
  9923.  
  9924.   7. The "window close" gadget (triple bar, in the top, left corner) may be
  9925.     used to remove a window from the screen.
  9926.  
  9927. If you click on a "scroll" or "page" gadget, the associated action is
  9928. performed once.  If you hold the left mouse button down while positioned on
  9929. one of these gadgets, the associated action is performed repeatedly.  If you
  9930. drag the "window resize" gadget, the window to which it belongs is grown or
  9931. shrunk.
  9932.  
  9933. Double-clicking on the title bar will cause the contents of the window to be
  9934. updated.
  9935.  
  9936.  
  9937. Action Window
  9938. ═════════════
  9939. The debugger places this window on the screen after a text selection
  9940. sequence has been completed.  Using the keyboard, text selection is started
  9941. using the Ctrl/Enter key.  When the Ctrl/Enter key is pressed a second time,
  9942. the Action window appears on the screen.
  9943.  
  9944. Using the mouse, text selection is started when the right-hand mouse button
  9945. is pressed.  When the right-hand mouse button is released, the Action window
  9946. appears on the screen.
  9947.  
  9948. The entries in the Action window allow you to
  9949.  
  9950.   1. show the source code pertaining to the selected text,
  9951.   2. display the contents of the variable represented by the selected text,
  9952.   3. evaluate the selected text as an expression,
  9953.   4. examine the memory location represented by the selected text,
  9954.   5. set a break point at the location represented by the selected text,
  9955.   6. set a watch point on the location represented by the selected text, or
  9956.   7. copy the selected text to the Prompt window where it can be manipulated
  9957.     as part of some command.
  9958.  
  9959. When the "Show source" entry is selected, the source/assembly code
  9960. corresponding to the selected text is displayed in the Source and Assembly
  9961. windows (if present on the screen).
  9962.  
  9963. A line appears in the Dialogue window that indicates the address of the
  9964. previous source/assembly code and the new source/assembly code under
  9965. examination.
  9966.  
  9967. Example:
  9968.   0x65CB:0x0012 => ClearScreen
  9969.  
  9970. You can use this entry to return to the previous location by moving the text
  9971. cursor to the Dialogue window using the Tab keys and highlighting the
  9972. address that is displayed on the left of the "=>" using the Ctrl/Enter and
  9973. cursor keys.  You can also do this by pressing the right-hand mouse button,
  9974. highlighting the address that is displayed on the left of the "=>", and then
  9975. releasing the right-hand mouse button.    In the above example, this would be
  9976. the entry "0x65CB:0x0012" (the segment and offset of the previous location
  9977. under examination).
  9978.  
  9979.  
  9980. Assembly Window
  9981. ═══════════════
  9982. The debugger displays assembly instructions for the current code location in
  9983. this window.  If the Code Segment and Instruction Pointer registers (CS:IP,
  9984. CS:EIP) point to an instruction visible in the Assembly window then the line
  9985. containing that instruction is displayed in "active" attributes.  When
  9986. examining assembly instructions, one line is designated as the current line
  9987. and is displayed in "standout" attributes.  The Source window, if present,
  9988. is kept synchronized with the Assembly window provided that source
  9989. information is available.
  9990.  
  9991.  
  9992. Manipulating the Assembly Window with Keys
  9993. ──────────────────────────────────────────
  9994. When the text cursor is positioned in the Assembly window, the Cursor
  9995. Left/Right, Cursor Up/Down, Page Up/Down, Home, End, and Enter keys may be
  9996. used to move about.
  9997.  
  9998. Cursor Left/Right
  9999.        may be used to scroll the text in the window left or right when
  10000.        the cursor moves to the left or right edge of the window.
  10001.  
  10002. Ctrl/Cursor Left/Right
  10003.        may be used to scroll the text in the window left or right
  10004.        without moving the cursor.
  10005.  
  10006. Cursor Up/Down
  10007.        may be used to scroll up and down through assembly instructions.
  10008.  
  10009. Page Up/Down
  10010.        may be used to scroll up and down through assembly instructions
  10011.        in increments of the number of lines in the window minus two.
  10012.  
  10013. Home       may be used to move to the beginning of the current compilation
  10014.        unit.
  10015.  
  10016. End       may be used to move to the end of the current module (compilation
  10017.        unit).
  10018.  
  10019. Enter       may be used to move directly to the assembly instruction
  10020.        referenced by the CS:IP (16-bit mode) or CS:EIP (32-bit mode)
  10021.        register pair.
  10022.  
  10023.  
  10024.  
  10025. Manipulating the Assembly Window with a Mouse
  10026. ─────────────────────────────────────────────
  10027.   1. Clicking in the Assembly window causes the text cursor to move to this
  10028.     window.  It becomes the "active" window.
  10029.  
  10030.   2. Assembly instructions may be scrolled up or down by dragging the mouse.
  10031.     To do this, the right-side scrolling bar must be unlocked.
  10032.  
  10033.   3. Assembly instructions may be scrolled left or right by dragging the
  10034.     mouse.  To do this, the bottom scrolling bar must be unlocked.
  10035.  
  10036.   4. Gadgets are provided for scrolling, resizing, zooming and closing the
  10037.     Assembly window.
  10038.  
  10039.   5. The "scroll up" and "scroll down" gadgets may be used to move up and
  10040.     down through text lines.  When the text cursor moves to the top or
  10041.     bottom of the window, text will be scrolled down or up.
  10042.  
  10043.   6. The "scroll left" and "scroll right" gadgets move the cursor one
  10044.     character left or right.  When the text cursor moves to the left or
  10045.     right edge of the window, text will be scrolled to the right or left.
  10046.  
  10047.   7. The "page up" and "page down" gadgets may be used to scroll up and down
  10048.     through assembly instructions in increments of the number of lines in
  10049.     the window minus two.
  10050.  
  10051.   8. Clicking on an assembly instruction in the Assembly window makes it the
  10052.     current assembly instruction.  This line is displayed in "standout"
  10053.     attributes.  The value of the VIDEO variable dbg$code changes to reflect
  10054.     the change in the current assembly instruction.  This variable reflects
  10055.     the segment:offset of the most recent code location to be examined.  In
  10056.     addition, the "." address is changed to point to the assembly
  10057.     instruction.  The "." address is used in many VIDEO commands.
  10058.  
  10059.     Example:
  10060.       do [CS IP] = .
  10061.       or
  10062.       do [CS EIP] = .
  10063.  
  10064.     In the above example, the contents of the CS:IP or CS:EIP register pair
  10065.     are modified to point to the current assembly instruction.
  10066.  
  10067.   9. Double-clicking on a line will set or clear a breakpoint at the
  10068.     assembly instruction.
  10069.  
  10070.  
  10071. Command Window
  10072. ══════════════
  10073. The debugger will display output from one or more commands that can be bound
  10074. to this window.  In the illustration above, the sample command window is
  10075. titled "date/time structure".
  10076.  
  10077.  
  10078. Manipulating the Command Window with Keys
  10079. ─────────────────────────────────────────
  10080. When the text cursor is positioned in the Command window, the Enter key may
  10081. be used to refresh the window.
  10082.  
  10083.  
  10084. Manipulating the Command Window with a Mouse
  10085. ────────────────────────────────────────────
  10086. Clicking in the Command window causes the text cursor to move to the window
  10087. and the window to be refreshed.  It becomes the "active" window.
  10088.  
  10089.  
  10090. Dialogue Window
  10091. ═══════════════
  10092. By default, the debugger displays responses to commands in this window.
  10093. When one of the other windows is not present on the screen, the output
  10094. normally destined for that window is displayed in the Dialogue window.
  10095.  
  10096.  
  10097. Manipulating the Dialogue Window with Keys
  10098. ──────────────────────────────────────────
  10099. When the text cursor is positioned in the Dialogue window, the Cursor
  10100. Up/Down, Page Up/Down, Home, End, and Enter keys may be used to move about.
  10101.  
  10102. Cursor Left/Right
  10103.        may be used to scroll the text in the window left or right when
  10104.        the cursor moves to the left or right edge of the window.
  10105.  
  10106. Ctrl/Cursor Left/Right
  10107.        may be used to scroll the text in the window left or right
  10108.        without moving the cursor.
  10109.  
  10110. Cursor Up/Down
  10111.        may be used to scroll up and down through Dialogue window output,
  10112.        one line at a time.
  10113.  
  10114. Page Up/Down
  10115.        may be used to scroll up and down through Dialogue window output
  10116.        in increments of the number of lines in the window minus two.
  10117.  
  10118. Home       may be used to move to the beginning of Dialogue window output.
  10119.  
  10120. End       may be used to move to the end of Dialogue window output.
  10121.  
  10122. Enter       may be used to move to the end of Dialogue window output.
  10123.  
  10124. When the text cursor is positioned in the Prompt window, the Page Up, Page
  10125. Down, Ctrl/Page Up and Ctrl/Page Down keys may be used to scroll the
  10126. Dialogue window.
  10127.  
  10128.  
  10129. Page Up/Down
  10130.        may be used to scroll up and down through Dialogue window output,
  10131.        one line at a time.
  10132.  
  10133. Ctrl/Page Up and Ctrl/Page Down
  10134.        may be used to scroll up and down through Dialogue window output
  10135.        in increments of the number of lines in the window minus two.
  10136.  
  10137.  
  10138. Manipulating the Dialogue Window with a Mouse
  10139. ─────────────────────────────────────────────
  10140.   1. Clicking in the Dialogue window causes the text cursor to move to this
  10141.     window.  It becomes the "active" window.
  10142.  
  10143.   2. Text may be scrolled up or down by dragging the mouse.  To do this, the
  10144.     right-side scrolling bar must be unlocked.
  10145.  
  10146.   3. Text may be scrolled left or right by dragging the mouse.    To do this,
  10147.     the bottom scrolling bar must be unlocked.
  10148.  
  10149.   4. Gadgets are provided for scrolling, resizing, and zooming the Dialogue
  10150.     window.
  10151.  
  10152.   5. The "scroll up" and "scroll down" gadgets may be used to move up and
  10153.     down through text lines.  When the text cursor moves to the top or
  10154.     bottom of the window, text will be scrolled down or up.
  10155.  
  10156.   6. The "scroll left" and "scroll right" gadgets move the cursor one
  10157.     character left or right.  When the text cursor moves to the left or
  10158.     right edge of the window, text will be scrolled to the right or left.
  10159.  
  10160.   7. The "page up" and "page down" gadgets may be used to scroll up and down
  10161.     through Dialogue window output in increments of the number of lines in
  10162.     the window minus two.
  10163.  
  10164.  
  10165. FPU Window
  10166. ══════════
  10167. The contents of the 80x87 numeric data processor (math coprocessor)
  10168. registers and status flags are displayed in this window.  When the FPU
  10169. window is active, the currently selected item is displayed in "active"
  10170. attributes.  When the contents of a register have changed from the last time
  10171. that the debugger was entered, it is displayed in "standout" attributes.
  10172.  
  10173.  
  10174. Manipulating the FPU Window with Keys
  10175. ─────────────────────────────────────
  10176. When the text cursor is positioned in the FPU window, the cursor and Enter
  10177. keys may be used to position to register (ST(0), ST(1), etc.) or flag
  10178. displays and modify register or flag contents.    The Home, End, Page Up, and
  10179. Page Down keys may be used to display register sets.  See the description of
  10180. the Register command for more information on register sets.
  10181.  
  10182. Cursor Up, Down, Left and Right
  10183.        keys may be used to move the text cursor to register/flag content
  10184.        displays.
  10185.  
  10186. Enter       may used to modify register contents.  If the text cursor is
  10187.        positioned on a register when the Enter key is pressed, a
  10188.        register modification window is displayed on the screen and a new
  10189.        value may be entered.  The register may be left unmodified by
  10190.        just pressing the Enter key in response to the prompt for a new
  10191.        value.
  10192.  
  10193.        If the text cursor is positioned on a flag when the Enter key is
  10194.        pressed then its value is complemented.
  10195.  
  10196. Home       may be used to move to the oldest register set.
  10197.  
  10198. End       may be used to move to the most recent register set.
  10199.  
  10200. Page Up    may be used to move backwards through register sets to the oldest
  10201.        register set.
  10202.  
  10203. Page Down  may be used to move forwards through register sets to the most
  10204.        recent register set.
  10205.  
  10206. Insert       may be used to switch between binary and decimal display formats.
  10207.  
  10208.  
  10209. Manipulating the FPU Window with a Mouse
  10210. ────────────────────────────────────────
  10211.   1. Clicking in the FPU window causes the text cursor to move to this
  10212.     window.  It becomes the "active" window.  The text cursor may be
  10213.     positioned to any register contents or flag bits display.
  10214.  
  10215.   2. Double-clicking on a register display (ST(0), ST(1), etc.) will cause a
  10216.     register modification window to be displayed on the screen.  A new value
  10217.     may be entered or the register may be left unmodified by just pressing
  10218.     the Enter key in response to the prompt.
  10219.  
  10220.     Double clicking on a flag causes its value to be complemented.
  10221.  
  10222.   3. The "scroll up" gadget may be used to move backwards through register
  10223.     sets to the oldest register set.
  10224.  
  10225.   4. The "scroll down" gadget may be used to move forwards through register
  10226.     sets to the most recent register set.
  10227.  
  10228.   5. The "page up" gadget may be used to move backwards through register
  10229.     sets to the oldest register set.
  10230.  
  10231.   6. The "page down" gadget may be used to move forwards through register
  10232.     sets to the most recent register set.
  10233.  
  10234.  
  10235. Memory Window
  10236. ═════════════
  10237. A portion of memory is displayed in this window.  When the Memory window is
  10238. active, the currently selected memory location is displayed in "active"
  10239. attributes.  Memory window "hot spots" (e.g., BYTE ) are displayed in
  10240. "standout" attributes.    All other items are displayed in "plain" attributes.
  10241.  
  10242.  
  10243. Manipulating the Memory Window with Keys
  10244. ────────────────────────────────────────
  10245. When the text cursor is positioned in the Memory window, the cursor, Home,
  10246. Page Up, Page Down and Enter keys may be used to position to memory entries
  10247. and modify their contents.
  10248.  
  10249. Cursor Up, Down, Left and Right
  10250.        may be used to move the text cursor to individual memory
  10251.        locations.
  10252.  
  10253. Insert       may be used to modify the way in which memory locations are
  10254.        displayed.  Each subsequent press of the Insert key cycles the
  10255.        display through 8-bit bytes, 16-bit words, and 32-bit
  10256.        doublewords.  When 8-bit bytes are displayed, their ASCII
  10257.        equivalents are also displayed on the right-hand side of the
  10258.        window.
  10259.  
  10260. Delete       may be used to select a new memory location to be displayed.  A
  10261.        prompt window appears for the new memory location.
  10262.  
  10263. Home       may be used to move directly to the original location of memory
  10264.        that was requested to be displayed.
  10265.  
  10266. Page Up/Down
  10267.        may be used to scroll up and down through the memory window in
  10268.        increments of the number of lines in the window minus two.
  10269.  
  10270. Enter       may used to modify the contents of the memory location upon which
  10271.        the text cursor is positioned.  When pressed, a memory
  10272.        modification window is displayed on the screen and a new value
  10273.        may be entered.  The entry may be left unmodified by just
  10274.        pressing the Enter key in response to the prompt for a new value.
  10275.        Bytes, words or doublewords may be entered, depending on the way
  10276.        in which memory is being displayed.
  10277.  
  10278.  
  10279. Manipulating the Memory Window with a Mouse
  10280. ───────────────────────────────────────────
  10281.   1. Clicking in the Memory window causes the text cursor to move to this
  10282.     window.  It becomes the "active" window.  The text cursor may be
  10283.     positioned to any memory entry shown in the window.
  10284.  
  10285.   2. Memory entries may be scrolled up or down by dragging the mouse.  To do
  10286.     this, the right-side scrolling bar must be unlocked.
  10287.  
  10288.   3. The "scroll up" and "scroll down" gadgets may be used to scroll up and
  10289.     down through memory.
  10290.  
  10291.   4. The "page up" and "page down" gadgets may be used to scroll up and down
  10292.     through memory in increments of the number of lines in the window minus
  10293.     two.
  10294.  
  10295.   5. Clicking on the "(Ins)" entry will cause the display to change between
  10296.     8-bit bytes, 16-bit words, and 32-bit doublewords.    When 8-bit bytes are
  10297.     displayed, their ASCII equivalents are also displayed on the right-hand
  10298.     side of the window.
  10299.  
  10300.   6. Clicking on the "(Del)" entry may be used to select a new memory
  10301.     location to be displayed.  A prompt window appears for the new memory
  10302.     location.  A new value may be entered or the memory address may be left
  10303.     unmodified by just pressing the Enter key in response to the prompt.
  10304.  
  10305.   7. Clicking on the "HOME" entry may be used to move directly to the
  10306.     original location of memory that was requested to be displayed.
  10307.  
  10308.   8. Double-clicking on a memory location will cause a memory modification
  10309.     window to be displayed on the screen.  A new value may be entered or the
  10310.     memory location may be left unmodified by just pressing the Enter key in
  10311.     response to the prompt.
  10312.  
  10313.  
  10314. Prompt Window
  10315. ═════════════
  10316. The debugger command input prompt "DBG>" is displayed in a window that is
  10317. one line high.    The prompt window is used to enter command lines.
  10318.  
  10319. In multiple execution thread applications, the "DBG>" prompt is replaced by
  10320. a prompt that indicates the current thread.  The form of the prompt is
  10321. "ddddd>" where "ddddd" is the thread identification number.
  10322.  
  10323. Example:
  10324.   00002>
  10325.  
  10326.  
  10327. Manipulating the Prompt Window with Keys
  10328. ────────────────────────────────────────
  10329. VIDEO commands are entered at the "DBG>" input prompt.
  10330.  
  10331.   DBG>
  10332.  
  10333. In multiple execution thread applications, the "DBG>" prompt is replaced by
  10334. a prompt that indicates the current thread.  The form of the prompt is
  10335. "ddddd>" where "ddddd" is the thread identification number.
  10336.  
  10337. Example:
  10338.   00002>
  10339.  
  10340. When the text cursor is positioned in the Prompt window, the cursor, Home,
  10341. End, Ins, Del, Backspace and Enter keys may be used to recall, edit and
  10342. submit commands.
  10343.  
  10344. Cursor Up/Down
  10345.        may be used to scroll through previously entered commands.
  10346.  
  10347. Cursor Left/Right
  10348.        may be used to move the cursor left or right through a command
  10349.        line to make changes.
  10350.  
  10351. Ctrl/Cursor Left and Right
  10352.        keys may be used to move the cursor left or right one word at a
  10353.        time.
  10354.  
  10355. Home       may be used to move to the beginning of the command line.
  10356.  
  10357. End       may be used to move to the end of the command line.
  10358.  
  10359. Insert       key may be used to flip between character insertion and
  10360.        overtyping modes.
  10361.  
  10362. Delete       may be used to remove the character under the cursor.
  10363.  
  10364. Backspace  (or Rubout) may be used to erase the character to the left of the
  10365.        cursor.
  10366.  
  10367. Enter       may be used to submit the command.
  10368.  
  10369. Ctrl/F       may be used to finish a partially entered symbol name.  Pressing
  10370.        Ctrl/F again will find the next symbol name that has the same
  10371.        initial sequence.
  10372.  
  10373. Ctrl/B       may be used to backup to the previous symbol name found with the
  10374.        Ctrl/F keys.
  10375.  
  10376. Command lines that exceed the screen width may be entered.  The command line
  10377. will scroll left or right depending on the cursor placement and direction.
  10378.  
  10379. When the text cursor is positioned in the Prompt window, the Page Up, Page
  10380. Down, Ctrl/Page Up and Ctrl/Page Down keys may be used to scroll the
  10381. Dialogue window (see the earlier section describing Dialogue window
  10382. manipulation).
  10383.  
  10384.  
  10385. Manipulating the Prompt Window with a Mouse
  10386. ───────────────────────────────────────────
  10387. Clicking in the Prompt window causes the text cursor to move to this window.
  10388. It becomes the "active" window and VIDEO commands may be entered.
  10389.  
  10390.  
  10391. Register Window
  10392. ════════════════
  10393. In 16-bit mode, the current contents of the 8086 registers are displayed in
  10394. the Register window.
  10395.  
  10396. In 32-bit mode, the current contents of the 32-bit registers are displayed
  10397. in the Register window.
  10398.  
  10399. When the Register window is active, the currently selected item is displayed
  10400. in "active" attributes.  When the contents of a register have changed from
  10401. the last time that the debugger was entered, it is displayed in "standout"
  10402. attributes.  An exception to this rule is the Instruction Pointer (IP, EIP)
  10403. register which is only displayed in "standout" attributes when its value
  10404. changes because some type of branch or call instruction was executed.
  10405.  
  10406. If a register set other than register set 0 is displayed, then the register
  10407. set number is displayed in brackets (e.g., [1]) with "active" attributes
  10408. (see the description of the Register command).
  10409.  
  10410.  
  10411. Manipulating the Register Window with Keys
  10412. ──────────────────────────────────────────
  10413. When the text cursor is positioned in the Register window, the cursor and
  10414. Enter keys may be used to position to register displays and modify register
  10415. contents.  The Home, End, Page Up, and Page Down keys may be used to display
  10416. register sets.    See the description of the Register command for more
  10417. information on register sets.
  10418.  
  10419. Cursor Up, Down, Left and Right
  10420.        may be used to move the text cursor to register/flag content
  10421.        displays.
  10422.  
  10423. Enter       may used to modify register contents.  If the text cursor is
  10424.        positioned on a register when the Enter key is pressed, a
  10425.        register modification window is displayed on the screen and a new
  10426.        value may be entered.  The register may be left unmodified by
  10427.        just pressing the Enter key in response to the prompt for a new
  10428.        value.
  10429.  
  10430.        If the text cursor is positioned on a flag when the Enter key is
  10431.        pressed then its value is complemented.
  10432.  
  10433. Home       may be used to move to the oldest register set.
  10434.  
  10435. End       may be used to move to the most recent register set.
  10436.  
  10437. Page Up    may be used to move backwards through register sets to the oldest
  10438.        register set.
  10439.  
  10440. Page Down  may be used to move forwards through register sets to the most
  10441.        recent register set.
  10442.  
  10443.  
  10444. Manipulating the Register Window with a Mouse
  10445. ─────────────────────────────────────────────
  10446.   1. Clicking in the Register window causes the text cursor to move to this
  10447.     window.  It becomes the "active" window.  The text cursor may be
  10448.     positioned to any register contents or flag bits display.
  10449.  
  10450.   2. Double-clicking on a register display will cause a register
  10451.     modification window to be displayed on the screen.    A new value may be
  10452.     entered or the register may be left unmodified by just pressing the
  10453.     Enter key in response to the prompt.
  10454.  
  10455.     Double clicking on a flag causes its value to be complemented.
  10456.  
  10457.   3. The "scroll up" gadget may be used to move backwards through register
  10458.     sets to the oldest register set.
  10459.  
  10460.   4. The "scroll down" gadget may be used to move forwards through register
  10461.     sets to the most recent register set.
  10462.  
  10463.   5. The "page up" gadget may be used to move backwards through register
  10464.     sets to the oldest register set (same as "scroll up").
  10465.  
  10466.   6. The "page down" gadget may be used to move forwards through register
  10467.     sets to the most recent register set (same as "scroll down").
  10468.  
  10469.  
  10470. Source Window
  10471. ═════════════
  10472. If program source code information is available for the current code
  10473. location then it will be displayed in this window.  If the Code Segment and
  10474. Instruction Pointer registers (CS:IP, CS:EIP) point to a source line visible
  10475. in the Source window then the line is displayed in "active" attributes.
  10476. When examining source code, one line is designated as the current line and
  10477. is displayed in "standout" attributes.    The Assembly window, if present, is
  10478. kept synchronized with the Source window.
  10479.  
  10480.  
  10481. Manipulating the Source Window with Keys
  10482. ────────────────────────────────────────
  10483. When the text cursor is positioned in the Source window, the Cursor Up/Down,
  10484. Page Up/Down, Home, End, and Enter keys may be used to move about.
  10485.  
  10486. Cursor Left/Right
  10487.        may be used to scroll the text in the window left or right when
  10488.        the cursor moves to the left or right edge of the window.
  10489.  
  10490. Ctrl/Cursor Left/Right
  10491.        may be used to scroll the text in the window left or right
  10492.        without moving the cursor.
  10493.  
  10494. Cursor Up/Down
  10495.        may be used to scroll up and down through source lines.
  10496.  
  10497. Page Up/Down
  10498.        may be used to scroll up and down through source lines in
  10499.        increments of the number of lines in the window minus two.
  10500.  
  10501. Home       may be used to move to the beginning of the current module
  10502.        (compilation unit).
  10503.  
  10504. End       may be used to move to the end of the current module (compilation
  10505.        unit).
  10506.  
  10507. Enter       may be used to move directly to the source line referenced by the
  10508.        CS:IP (16-bit mode) or CS:EIP (32-bit mode) register pair.
  10509.  
  10510.  
  10511. Manipulating the Source Window with a Mouse
  10512. ───────────────────────────────────────────
  10513.   1. Clicking in the Source window causes the text cursor to move to this
  10514.     window.  It becomes the "active" window.
  10515.  
  10516.   2. Source lines may be scrolled up or down by dragging the mouse.  To do
  10517.     this, the right-side scrolling bar must be unlocked.
  10518.  
  10519.   3. Source lines may be scrolled left or right by dragging the mouse.    To
  10520.     do this, the bottom scrolling bar must be unlocked.
  10521.  
  10522.   4. Gadgets are provided for scrolling, resizing, zooming and closing the
  10523.     Source window.
  10524.  
  10525.   5. The "scroll up" and "scroll down" gadgets may be used to move up and
  10526.     down through text lines.  When the text cursor moves to the top or
  10527.     bottom of the window, text will be scrolled down or up.
  10528.  
  10529.   6. The "scroll left" and "scroll right" gadgets move the scroll one
  10530.     character left or right.  When the text cursor moves to the left or
  10531.     right edge of the window, text will be scrolled to the right or left.
  10532.  
  10533.   7. The "page up" and "page down" gadgets may be used to scroll up and down
  10534.     through source lines in increments of the number of lines in the window
  10535.     minus two.
  10536.  
  10537.   8. Clicking on a source line in the Source window makes it the current
  10538.     line.  This line is displayed in "standout" attributes.  The value of
  10539.     the VIDEO variable dbg$code changes to reflect the change in the current
  10540.     line.  This variable reflects the segment:offset of the most recent code
  10541.     location to be examined.  In addition, the "." address is changed to
  10542.     point to the first assembly instruction for the source line.  If there
  10543.     are no assembly instructions for the source line (as in lines or
  10544.     declarative lines) then the "." address is positioned to an earlier line
  10545.     (or the first line) in the module which has assembly instructions.    The
  10546.     "." address is used in many VIDEO commands.
  10547.  
  10548.     Example:
  10549.       do [CS IP] = .
  10550.       or
  10551.       do [CS EIP] = .
  10552.  
  10553.     In the above example, the contents of the CS:IP or CS:EIP register pair
  10554.     are modified to point to the current source line.
  10555.  
  10556.   9. Double-clicking on a line will set or clear a breakpoint at the first
  10557.     assembly instruction for the source line.
  10558.  
  10559.  
  10560. Stack Window
  10561. ════════════
  10562. A portion of the execution stack is displayed in this window.  If the Base
  10563. Pointer (BP, EBP) register points to a visible byte, word or doubleword on
  10564. the stack, that item is displayed in "standout" attributes.  When the Stack
  10565. window is active, the currently selected stack location is displayed in
  10566. "active" attributes.  All other items are displayed in "plain" attributes.
  10567.  
  10568.  
  10569. Manipulating the Stack Window with Keys
  10570. ───────────────────────────────────────
  10571. When the text cursor is positioned in the Stack window, the cursor, Home,
  10572. End, Page Up, Page Down and Enter keys may be used to position to stack
  10573. entries and modify their contents.
  10574.  
  10575. Cursor Up, Down, Left and Right
  10576.        may be used to move the text cursor to individual stack entries.
  10577.  
  10578. Insert       may be used to modify the way in which stack entries are
  10579.        displayed.  Each subsequent press of the Insert key cycles the
  10580.        display through 8-bit bytes, 16-bit words, and 32-bit
  10581.        doublewords.  When 8-bit bytes are displayed, their ASCII
  10582.        equivalents are also displayed on the right-hand side of the
  10583.        window.
  10584.  
  10585. Home       may be used to move directly to the stack entry referenced by
  10586.        SS:SP (16-bit mode) or SS:ESP (32-bit mode).
  10587.  
  10588. End       may be used to move directly to the stack entry referenced by
  10589.        SS:BP (16-bit mode) or SS:EBP (32-bit mode).
  10590.  
  10591. Page Up/Down
  10592.        may be used to scroll up and down through the stack in increments
  10593.        of the number of lines in the window minus two.
  10594.  
  10595. Enter       may used to modify the contents of the stack entry upon which the
  10596.        text cursor is positioned.  When pressed, a stack modification
  10597.        window is displayed on the screen and a new value may be entered.
  10598.        The entry may be left unmodified by just pressing the Enter key
  10599.        in response to the prompt for a new value.
  10600.  
  10601.  
  10602. Manipulating the Stack Window with a Mouse
  10603. ──────────────────────────────────────────
  10604.   1. Clicking in the Stack window causes the text cursor to move to this
  10605.     window.  It becomes the "active" window.  The text cursor may be
  10606.     positioned to any stack entry.
  10607.  
  10608.   2. Stack entries may be scrolled up or down by dragging the mouse.  To do
  10609.     this, the right-side scrolling bar must be unlocked.
  10610.  
  10611.   3. The "scroll up" and "scroll down" gadgets may be used to scroll up and
  10612.     down through the stack.
  10613.  
  10614.   4. The "page up" and "page down" gadgets may be used to scroll up and down
  10615.     through the stack in increments of the number of lines in the window
  10616.     minus two.
  10617.  
  10618.   5. Clicking on the "(Ins)" entry will cause the display to change between
  10619.     8-bit bytes, 16-bit words, and 32-bit doublewords.    When 8-bit bytes are
  10620.     displayed, their ASCII equivalents are also displayed on the right-hand
  10621.     side of the window.
  10622.  
  10623.   6. Clicking on the "HOME" entry may be used to move directly to the stack
  10624.     entry referenced by SS:SP (16-bit mode) or SS:ESP (32-bit mode).
  10625.  
  10626.   7. Double-clicking on a stack entry will cause a stack modification window
  10627.     to be displayed on the screen.  A new value may be entered or the stack
  10628.     entry may be left unmodified by just pressing the Enter key in response
  10629.     to the prompt.
  10630.  
  10631.  
  10632. Thread Window
  10633. ═════════════
  10634. The Thread window is used to display the identification number, state and
  10635. any additional pertinent information of all program execution threads.
  10636. Whenever the debugger is entered, the currently executing thread is
  10637. displayed in "active" attributes.  When a new thread entry has been
  10638. selected, it is displayed in "active" attributes.
  10639.  
  10640. Each entry in the Thread window has a number of fields.  The first field is
  10641. the thread identification number or thread ID.    The second field is the
  10642. thread state which may be one of "runnable" or "frozen".  Under NetWare, the
  10643. third field will contain the thread name which is applicable to NetWare 386
  10644. server tasks only.  The currently selected field is displayed in "standout"
  10645. attributes.  All other items are displayed in "plain" attributes.
  10646.  
  10647. Under DOS and QNX, there is only one execution thread so there is only one
  10648. entry in the Thread window.  Under OS/2, NetWare 386, PenPoint and Windows NT
  10649. there may be several execution threads so there may be be several entries in
  10650. the Thread window.
  10651.  
  10652.  
  10653. Manipulating the Thread Window with Keys
  10654. ────────────────────────────────────────
  10655. When the text cursor is positioned in the Thread window, the cursor, Page
  10656. Up, Page Down and Enter keys may be used to position to thread entries and
  10657. modify their contents.
  10658.  
  10659. Cursor Up, Down, Left and Right
  10660.        may be used to move the text cursor to thread fields.
  10661.  
  10662. Page Up/Down
  10663.        may be used to scroll up and down through the thread window in
  10664.        increments of the number of lines in the window minus two.
  10665.  
  10666. Enter       may be used to modify the contents of the thread field upon which
  10667.        the text cursor is positioned.  When pressed on an "id" field,
  10668.        the selected thread becomes the current thread.  The other
  10669.        windows on the screen will change to reflect the selection of
  10670.        another execution thread.
  10671.  
  10672.        When pressed on a "state" field, the selected thread's state is
  10673.        changed to either "frozen" or "runnable".
  10674.  
  10675.  
  10676. Manipulating the Thread Window with a Mouse
  10677. ───────────────────────────────────────────
  10678.   1. Clicking in the Thread window causes the text cursor to move to this
  10679.     window.  It becomes the "active" window.  The text cursor may be
  10680.     positioned to any thread entry.
  10681.  
  10682.   2. The "scroll up" and "scroll down" gadgets may be used to scroll up and
  10683.     down through thread entries.
  10684.  
  10685.   3. The "page up" and "page down" gadgets may be used to scroll up and down
  10686.     through thread entries in increments of the number of lines in the
  10687.     window minus two.
  10688.  
  10689.   4. Double-clicking on a thread "id" field will cause that thread to become
  10690.     the current thread.  The other windows on the screen will change to
  10691.     reflect the selection of another execution thread.
  10692.  
  10693.     Double-clicking on a "state" field will cause that thread's state to
  10694.     become either "frozen" or "runnable".
  10695.  
  10696.  
  10697. Variable Window
  10698. ═══════════════
  10699. This window is created by the Print /Window command.  The debugger will
  10700. display output from a Print command in this window.  The window is updated
  10701. each time the debugger is entered or a VIDEO command is executed.  In the
  10702. illustration above, the sample Variable window is titled "Variable Display".
  10703.  
  10704.  
  10705.  
  10706. Manipulating the Variable Window with Keys
  10707. ──────────────────────────────────────────
  10708. When the text cursor is positioned in the Variable window, the Cursor
  10709. Up/Down, Enter, Backspace and "S" keys may be used.
  10710.  
  10711. Cursor Up/Down
  10712.        may be used to move up and down through the fields of a
  10713.        structure.  Entries that represent structures are displayed by
  10714.        using "{...}".  Entries that represent arrays are displayed by
  10715.        using "(...)".
  10716.  
  10717. Page Up/Down
  10718.        may be used to scroll up and down through the Variable window in
  10719.        increments of the number of lines in the window.
  10720.  
  10721. Enter       can be used to display the contents of a field.
  10722.  
  10723. Backspace  can be used to return to the previous level.
  10724.  
  10725. "S"       can be used to display an entry as a string.  The Backspace key
  10726.        can be used to return to the original display format.
  10727.  
  10728.  
  10729. Manipulating the Variable Window with a Mouse
  10730. ─────────────────────────────────────────────
  10731.   1. Clicking in the Variable window causes the text cursor to move to this
  10732.     window.  It becomes the "active" window.
  10733.  
  10734.   2. Fields can be selected and viewed by clicking on them.
  10735.  
  10736.   3. If you click on the line of dashes in the window, you will ascend to
  10737.     previous levels.
  10738.  
  10739.   4. Gadgets are provided for scrolling, resizing, zooming and closing the
  10740.     Variable window.
  10741.  
  10742.   5. The "scroll up" and "scroll down" gadgets may be used to move up and
  10743.     down through the fields of a structure.  Entries that represent
  10744.     structures are displayed by using "{...}".    Entries that represent
  10745.     arrays are displayed by using "(...)".
  10746.  
  10747.   6. The "page up" and "page down" gadgets may be used to scroll up and down
  10748.     through the Variable window in increments of the number of lines in the
  10749.     window.
  10750.  
  10751.  
  10752. View Window
  10753. ═══════════
  10754. This window is created by the Help and View commands.  The View window
  10755. occupies the entire display area when it is active.  When the command
  10756. completes, the View window is removed and other windows are redisplayed.
  10757.  
  10758.  
  10759. Manipulating the View Window with Keys
  10760. ──────────────────────────────────────
  10761. When the text cursor is positioned in the View window, the cursor, Page
  10762. Up/Down, Home, End, and Enter keys may be used to move about.  The /, ?, ',
  10763. and " keys may be used to search for text.
  10764.  
  10765. Cursor Up/Down
  10766.        may be used to move up and down through text lines.    Text lines
  10767.        will scroll when the text cursor is moved into the top or bottom
  10768.        areas of the window.
  10769.  
  10770. Cursor Left/Right
  10771.        move the cursor one character left or right.  When the cursor
  10772.        moves to the left or right edge of the window, text will be
  10773.        scrolled to the right or left.
  10774.  
  10775. Ctrl/Cursor Left/Right
  10776.        may be used to scroll the text in the window left or right
  10777.        without moving the cursor.
  10778.  
  10779. Page Up/Down
  10780.        may be used to scroll up and down through source lines in
  10781.        increments of the number of lines in the window minus two.
  10782.  
  10783. Home       may be used to move to the first line of the text being viewed.
  10784.  
  10785. Ctrl/Home  (Help window only) may be used to return to the main help index.
  10786.  
  10787. End       may be used to move to the last line of the text being viewed.
  10788.  
  10789. Enter       may be used to move the text cursor to the start of the next line
  10790.        of text.
  10791.  
  10792.        (Help window only) If you position the text cursor on a word in
  10793.        the window and press the Enter key, VIDEO will search for a topic
  10794.        by that name.
  10795.  
  10796. "/"       may be used to search forwards for a string of text.  A prompt is
  10797.        displayed for the string to search.    The Cursor Up key may be
  10798.        used to fill in the previous search string.
  10799.  
  10800. "?"       may be used to search backwards for a string of text.  A prompt
  10801.        is displayed for the string to search.  The Cursor Up key may be
  10802.        used to fill in the previous search string.
  10803.  
  10804. "'"       (apostrophe) may be used to search forwards for the previously
  10805.        specified search string.
  10806.  
  10807. "          (quote) may be used to search backwards for the previously
  10808.        specified search string.
  10809.  
  10810. "."       (period) may be used to repeat the last action.
  10811.  
  10812. Escape       may be used to terminate the viewing function.
  10813.  
  10814. "0" through "9"
  10815.        may be used to enter a number.  This number is used to repeat the
  10816.        next action the specified number of times.  For example, entering
  10817.        the number 20 followed by Cursor Down moves the cursor down 20
  10818.        lines rather than one.  For the Home and End keys, the number
  10819.        moves to "number" lines from the beginning of file and end of
  10820.        file, respectively.    To cancel a number without executing a
  10821.        command, press the Delete key.
  10822.  
  10823. Pressing one of the search keys causes a prompt for a search string to
  10824. appear.  If a previous string had been entered, this string may be recalled
  10825. using the Cursor Up key.  The recalled string will appear in the prompt
  10826. area.  Pressing the Escape key at this point will cancel the search command.
  10827. The Cursor Left and Right keys and the Home, End, Delete and Backspace keys
  10828. may be used to edit the search string.    After the search string has been
  10829. entered, pressing the Enter key will begin the search.    The search is done
  10830. case insensitively, with the file considered as a ring of text (e.g., if
  10831. searching forwards and the end of the file is reached without finding the
  10832. text, the search continues from the beginning of the file).  If the string
  10833. is found, the cursor is placed under the first matched character and the
  10834. matched string is highlighted.
  10835.  
  10836.  
  10837. Manipulating the View Window with a Mouse
  10838. ─────────────────────────────────────────
  10839.   1. Clicking in the View window causes the text cursor to move to the mouse
  10840.     cursor.
  10841.  
  10842.   2. (Help window only) If you position the text cursor on a word in the
  10843.     window and double-click on it with a mouse, VIDEO will search for a
  10844.     topic by that name.  If you double-click on the title line, VIDEO will
  10845.     return to the main help index.
  10846.  
  10847.   3. Text lines may be scrolled up or down by dragging the mouse.  To do
  10848.     this, the right-side scrolling bar must be unlocked.
  10849.  
  10850.   4. Text lines may be scrolled left or right by dragging the mouse.  To do
  10851.     this, the bottom scrolling bar must be unlocked.
  10852.  
  10853.   5. Gadgets are provided for scrolling and closing the View window.
  10854.  
  10855.   6. The "scroll up" and "scroll down" gadgets may be used to move up and
  10856.     down through text lines.  When the text cursor moves to the top or
  10857.     bottom of the window, text will be scrolled down or up.
  10858.  
  10859.   7. The "scroll left" and "scroll right" gadgets move the scroll one
  10860.     character left or right.  When the text cursor moves to the left or
  10861.     right edge of the window, text will be scrolled to the right or left.
  10862.  
  10863.   8. The "page up" and "page down" gadgets may be used to scroll up and down
  10864.     through source lines in increments of the number of lines in the window
  10865.     minus two.
  10866.  
  10867.  
  10868. Error Window
  10869. ════════════
  10870. In addition to the windows described in earlier sections, an "error" window
  10871. may appear in the middle of the screen when VIDEO wishes to issue an error
  10872. message.  This window will disappear when any key is pressed.
  10873. ::::WINNT_INTERRUPTING_A_PROGRAM
  10874. Once a program has been loaded by VIDEO, its execution can be started by
  10875. the Go command (this command is described in the chapter entitled "VIDEO
  10876. Commands").
  10877.  
  10878. Example:
  10879.   C>wvideo myapp
  10880.    .
  10881.    .
  10882.    .
  10883.   DBG>go
  10884.  
  10885. As is sometimes the case during the development phase, a program may
  10886. execute endlessly.
  10887.  
  10888. Under Windows NT, execution of an application may be interrupted by
  10889. pressing the Ctrl/Break key combination in the VIDEO session.
  10890.  
  10891. VIDEO will print a message in the "Dialogue" window indicating that the
  10892. program's execution has been interrupted.  Execution can be resumed with
  10893. the Go command.
  10894.  
  10895. Also, execution of VIDEO commands may be interrupted by pressing the
  10896. Ctrl/Break key combination in the VIDEO session.
  10897. ::::WINNT_STARTUP
  10898. ┌──────────────────────────────────────────────────────────────────────────┐
  10899. │ WVIDEO [options] [:sym_file] file_spec [cmd_line]               │
  10900. └──────────────────────────────────────────────────────────────────────────┘
  10901.  
  10902. The square brackets [ ] denote items which are optional.
  10903.  
  10904. WVIDEO       is the program name for VIDEO.
  10905.  
  10906. options    is a list of valid VIDEO options, each preceded by a dash ("-")
  10907.        or a slash ("/").  Options may be specified in any order.
  10908.  
  10909. sym_file   is an optional symbolic debugging information file
  10910.        specification.  The specification must be preceded by a colon
  10911.        (":").  For Windows NT, the syntax of sym_file is:
  10912.  
  10913.        [d:][path]filename[.ext]
  10914.  
  10915.        The default file extension of the symbol file is ".SYM".
  10916.  
  10917.        The symbolic information file can be produced by the WATCOM
  10918.        Linker WLINK or by the WATCOM Strip Utility WSTRIP.
  10919.  
  10920. file_spec  is the file name of the file to be loaded into memory.  For
  10921.        Windows NT, the syntax of file_spec is:
  10922.  
  10923.        [d:][path]filename[.ext]
  10924.  
  10925.        d:          is an optional drive specification such as "A:",
  10926.               "B:", etc.  If not specified, the default drive is
  10927.               assumed.
  10928.  
  10929.        path       is an optional path specification such as
  10930.               "\UTILS\BIN\".
  10931.  
  10932.        filename   is the file name of the file to be loaded into
  10933.               memory.
  10934.  
  10935.        ext          is the file extension of the file to be loaded into
  10936.               memory.  A null file extension may be specified by
  10937.               typing the period "." but not the extension.  If no
  10938.               file extension is specified (i.e., both the period
  10939.               and extension are omitted), the default is ".EXE".
  10940.  
  10941. cmd_line   is an optional command line which will be passed on to the
  10942.        application.
  10943.  
  10944. If both drive and path are omitted, VIDEO will first attempt to locate the
  10945. file in the current directory of the default drive.  If this fails, VIDEO
  10946. will search for the file in each path listed in the PATH environment
  10947. string.
  10948.  
  10949. Command Line Options
  10950. ════════════════════
  10951. ┌──────────────────────────────────────────────────────────────────────────┐
  10952. │     /Dynamic=space                               │
  10953. │     /Invoke=file_spec                            │
  10954. │     /NOAltsym                                │
  10955. │     /NOFpu                                   │
  10956. │     /NOInvoke                                │
  10957. │     /NOMouse                                   │
  10958. │     /NOSymbols                               │
  10959. │     /Registers=number                            │
  10960. │     /TRap=trap_file[;trap_parm]                       │
  10961. └──────────────────────────────────────────────────────────────────────────┘
  10962.  
  10963. Options may be specified in any order.    Short forms may be specified for
  10964. options and are shown above in capital letters.  If "space" is suffixed
  10965. with the letter "K" then "space" refers to multiples of 1K bytes (1024
  10966. bytes).  If "space" is suffixed with the letter "B" then "space" refers to
  10967. the number of bytes.  If no suffix is specified and "space" is a number
  10968. less than 1000 then "space" is assumed to refer to multiples of 1K bytes
  10969. (1024 bytes); otherwise it refers to the number of bytes.
  10970.  
  10971. /Dynamic=space specifies the initial amount of dynamic storage that VIDEO
  10972.        is to reserve for items such as windows, user-defined symbols,
  10973.        etc.  The default amount that is set aside is 40960 bytes (40K
  10974.        bytes).  As additional storage is required, VIDEO will allocate
  10975.        it.
  10976.  
  10977. /Invoke=file_spec may be used to specify an alternate name for the
  10978.        debugger command file which is to be automatically invoked at
  10979.        start-up time.  The default file name is "PROFILE.DBG".  VIDEO
  10980.        command files are found in the current directory or one of the
  10981.        directories listed in the Windows NT PATH environment string.
  10982.  
  10983. /NOAltsym  disables debugger support for alternate symbolic information
  10984.        formats such as support for a susbset of CV4 (CodeView) and
  10985.        processing of export tables from NE (Windows NT 1.x, Windows
  10986.        3.x) and PE (Windows NT) executables.  This option reduces the
  10987.        time required by the debugger to load and process executables
  10988.        at startup.
  10989.  
  10990. /NOFpu       requests that the debugger ignore the presence of a math
  10991.        coprocessor.  No memory will be allocated by the debugger for
  10992.        saving the context of the 80x87 numeric data processor.  Use
  10993.        this option if your application will not use the math
  10994.        coprocessor and you wish to reduce the amount of memory
  10995.        required by the debugger.
  10996.  
  10997. /NOInvoke  specifies that the default debugger command file is not to be
  10998.        invoked.
  10999.  
  11000. /NOMouse   requests that the debugger ignore any attached mouse.
  11001.  
  11002. /NOSymbols requests that VIDEO omit all debugging information when loading
  11003.        an executable image.  Information regarding global and local
  11004.        symbol names, data types, and line numbers is not processed.
  11005.  
  11006. /Registers=number may be used to specify how many register sets to set
  11007.        aside for the recording of register contents.  The default
  11008.        number of register sets is 2.  See the description of the
  11009.        Register command for more information (this command is
  11010.        described in the chapter entitled "VIDEO Commands").
  11011.  
  11012. /TRap=trap_file[;trap_parm] is used principally when debugging the startup
  11013.        code of a dynamic link library (DLL) for an application that
  11014.        uses dynamic link libraries.  If you specify "DLL" for the
  11015.        trap_parm then you will get a break point after all DLLs are
  11016.        loaded and before any of them are started.  This allows you to
  11017.        set a break point in DLL startup code.
  11018.  
  11019.        Example:
  11020.          C>wvideo /trap=std;dll calendar
  11021.  
  11022.        If you do not specify this option, the default trap file
  11023.        "STD.DLL" will be loaded from the current directory or one of
  11024.        the directories listed in the PATH environment variable.  The
  11025.        "BINNT" directory contains the trap file provided with VIDEO.
  11026.        The trap file is an interface module that supports debugging on
  11027.        the local computer system running Windows NT.
  11028.  
  11029.        You may specify the pathname of the trap file when using the
  11030.        TRap option (required when the trap file is not in the search
  11031.        path).  The file extension defaults to ".DLL".
  11032. ::::WINNT_WVIDEO_ENVIRONMENT_VARIABLE
  11033. The WVIDEO environment variable can be used to specify commonly used VIDEO
  11034. options.  If the specification of an option involves the use of an "="
  11035. character then the "#" character may be used in its place (this is
  11036. required by the syntax of the "SET" command).  These options are processed
  11037. before options specified on the command line.
  11038.  
  11039. Example:
  11040.   C>set wvideo=/reg#4
  11041.  
  11042. The above examples illustrate how to define default options for the
  11043. debugger.
  11044.  
  11045. Once the WVIDEO environment variable has been defined, those options
  11046. listed become the default each time VIDEO is invoked.
  11047. ::::WIRING
  11048. Serial Port Wiring Considerations
  11049. ═════════════════════════════════
  11050. If you plan to use the serial port Debug Server "SERSERV", a cable must
  11051. connect the serial ports of the two computer systems.  The following diagram
  11052. illustrates the wiring between the two serial ports.  If your computer
  11053. systems have more than one serial port, any serial port may be used.
  11054.  
  11055.       Task Machine        Debugger Machine
  11056.     Serial            Serial
  11057.        Connector           Connector
  11058.  
  11059.        Pin #          Pin #
  11060.        1 (PG) <──────────>1 (PG)
  11061.  
  11062.        2 (TxD)<──────────>3 (RxD)
  11063.  
  11064.        3 (RxD)<──────────>2 (TxD)
  11065.  
  11066.   ┌─────── 4 (RTS)          4 (RTS) ───────┐
  11067.   │                         │
  11068.   └──────> 5 (CTS)          5 (CTS) <──────┘
  11069.  
  11070.   ┌──────> 6 (DSR)          6 (DSR) <──────┐
  11071.   │                         │
  11072.   │       7 (SG) <──────────>7 (SG)         │
  11073.   │                         │
  11074.   ├──────> 8 (DCD)          8 (DCD) <──────┤
  11075.   │                         │
  11076.   └──────>20 (DTR)         20 (DTR) ───────┘
  11077.  
  11078. Figure 76. Serial Port Wiring Scheme
  11079.  
  11080. Note that the wiring is symmetrical (i.e., either end of the cable can be
  11081. plugged into either PC).  This particular arrangement of the wiring is
  11082. sometimes called a "null modem" (since pins 2 and 3 are crossed and no modem
  11083. is involved).
  11084.  
  11085.  
  11086. Parallel Port Wiring Considerations
  11087. ═══════════════════════════════════
  11088. If you plan to use the parallel port Debug Server "PARSERV" or "PARSERVW", a
  11089. cable must connect the parallel ports of the two computer systems.  Three
  11090. cabling methods are supported - the LapLink cable, the Flying Dutchman
  11091. cable, and WATCOM's own design.  There are two advantages to using the
  11092. LapLink or Flying Dutchman cable:
  11093.  
  11094.   1. They are commercially available (you may already own one).
  11095.  
  11096.   2. They may work with more PC "compatibles" than WATCOM's cable.  WATCOM's
  11097.     cabling requires 8 bi-directional data lines in the parallel port and
  11098.     some PC "compatibles" do not support this.
  11099.  
  11100. The disadvantage with the LapLink and Flying Dutchman cables is that they
  11101. are slower than WATCOM's cable since only 4 bits are transmitted in parallel
  11102. versus 8 bits for WATCOM's.  Thus WATCOM's cable is faster but it will have
  11103. to be custom made.
  11104.  
  11105. The LapLink cable is available from:
  11106.  
  11107.   Travelling Software, Inc.
  11108.   18702 North Creek Parkway
  11109.   Bothell, Washington,
  11110.   U.S.A. 98011
  11111.   Telephone: (206) 483-8088
  11112.  
  11113. The Flying Dutchman cable is available from:
  11114.  
  11115.   Cyco,
  11116.   Adm. Banckertweg 2a,
  11117.   2315 SR Leiden,
  11118.   The Netherlands.
  11119.  
  11120. The following diagram illustrates WATCOM's cable wiring between the two
  11121. parallel ports.
  11122.  
  11123.      Task Machine       Debugger Machine
  11124.       Parallel              Parallel
  11125.       Connector           Connector
  11126.  
  11127.        Pin #          Pin #
  11128.        1 <──────────────> 2
  11129.        2 <──────────────> 1
  11130.        3 <──────────────> 14
  11131.        4 <──────────────> 16
  11132.        5 <──────────────> 15
  11133.        6 <──────────────> 13
  11134.        7 <──────────────> 12
  11135.        8 <──────────────> 10
  11136.        9 <──────────────> 11
  11137.       10 <──────────────> 8
  11138.       11 <──────────────> 9
  11139.       12 <──────────────> 7
  11140.       13 <──────────────> 6
  11141.       14 <──────────────> 3
  11142.       15 <──────────────> 5
  11143.       16 <──────────────> 4
  11144.       17 <──────────────> 17
  11145.       18 <──────────────> 18
  11146.  
  11147. Figure 77. Parallel Port Wiring Scheme
  11148.  
  11149. For the IBM PC and PS/2, the connectors are standard "male" DB-25
  11150. connectors.  Note that the wiring is symmetrical (i.e., either end of the
  11151. cable can be plugged into either PC).
  11152.  
  11153. ┌────────────────────────────────────────────────────────────────────────────┐
  11154. │ Note:  Although the wiring is different for all three cables, WATCOM's     │
  11155. │ parallel communications software can determine which one is in use.         │
  11156. └────────────────────────────────────────────────────────────────────────────┘
  11157. ::::~~~DEFAULT
  11158.       ┌──────────────────────────────────────────────────────────┐
  11159.       │              W V I D E O             │
  11160.       │  WATCOM Visual Interactive Debugging Execution Overseer  │
  11161.       └──────────────────────────────────────────────────────────┘
  11162.  
  11163. To obtain help on the desired <topic>, position the cursor on it using the
  11164. cursor keys and press Enter or double-click on it with a mouse.  For more
  11165. topics, scroll this window using the cursor or PgUp/PgDn keys or the mouse.
  11166. Use Ctrl/Home or double-click on the title line to return to this index.
  11167.  
  11168. Help is available on the following topics.
  11169.  
  11170. Commands & General Information:
  11171.  
  11172. <BREAK>         <CALL>        <COMMAND_FILES>     <C_OPERATORS>
  11173. <C++_OPERATORS>     <DISPLAY>        <DO>            <ERROR>
  11174. <EXAMINE>        <F77_OPERATORS>    <FLIP>            <GO>
  11175. <HELP>            <IF>        <INVOKE>        <LOG>
  11176. <MENUS>         <MODIFY>        <NEW>            <NOTATION>
  11177. <PAINT>         <PRINT>        <PRINT_WINDOW>        <QUIT>
  11178. <REGISTER>        <REMARK>        <REMOTE_DEBUGGING>  <REMOTE_WIN3>
  11179. <RFX>            <SET>        <SHOW>            <SUMMARY>
  11180. <SYMBOLS>        <SYSTEM>        <THREAD>        <TRACE>
  11181. <VIEW>            <WATCH>        <WHILE>         <WINDOWS>
  11182. <WIRING>
  11183.  
  11184. Systems:
  11185.  
  11186. <AUTOCAD>
  11187.  
  11188. <DOS_STARTUP>                <DOS_EXTENDER>
  11189. <DOS_GRAPHICS_APPLICATIONS>        <DOS_INTERRUPTING_A_PROGRAM>
  11190. <DOS_REMOTE_DEBUGGING>            <DOS_WVIDEO_ENVIRONMENT_VARIABLE>
  11191.  
  11192. <OS2_STARTUP>                <OS2_INTERRUPTING_A_PROGRAM>
  11193. <OS2_REMOTE_DEBUGGING>            <OS2_WVIDEO_ENVIRONMENT_VARIABLE>
  11194.  
  11195. <QNX_STARTUP>                <QNX_DEBUGGING_USING_POSTMORTEM_DUMP>
  11196. <QNX_INTERRUPTING_A_PROGRAM>        <QNX_REMOTE_DEBUGGING>
  11197. <QNX_SEARCH_ORDER>            <QNX_WVIDEO_ENVIRONMENT_VARIABLE>
  11198.  
  11199. <WIN3_STARTUP>                <WIN3_WVIDEOW_ENVIRONMENT_VARIABLE>
  11200.  
  11201. <WINNT_STARTUP>             <WINNT_WVIDEO_ENVIRONMENT_VARIABLE>
  11202. <WINNT_INTERRUPTING_A_PROGRAM>
  11203.  
  11204. Short forms for the topic name may be specified.
  11205.