home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / SOFTIC~1.ZIP / DOC-TXT.ZIP / CHAP5 < prev    next >
Text File  |  1992-05-24  |  69KB  |  2,314 lines

  1.  
  2.   CHAPTER 5
  3.  
  4.  Using Other Commands
  5.    5.1 Display and Edit Commands
  6.    5.2 I/O Port Commands
  7.    5.3 Transfer Control Commands
  8.    5.4 Debug Mode Commands
  9.    5.5 Utility Commands
  10.    5.6 Specialized Debugging Commands
  11.    5.7 Windowing Commands
  12.    5.8 Debugger Customization Commands
  13.    5.9 Screen Control Commands
  14.    5.10 Symbol and Source Line Commands
  15.    5.1 Display and Edit Commands
  16.  
  17.      75
  18.  
  19. Commands:
  20.  U        -- Unassemble instructions or display source
  21.  R        -- Display or change registers
  22.  MAP      -- Display system memory map
  23.  D        -- Display memory in the most recently
  24.                      specified format
  25.  DB       -- Display memory in byte format
  26.  DW       -- Display memory in word format
  27.  DD       -- Display memory in double word format
  28.  E        -- Edit memory in the most recently
  29.                      specified format
  30.  EB       -- Edit memory bytes
  31.  EW       -- Edit memory words
  32.  ED       -- Edit memory double words
  33.  INT?     -- Display last interrupt number
  34.  ? or H   -- Display help information
  35.  VER      -- Display Soft-ICE version number
  36.  
  37.      76
  38.        
  39.                     U
  40.  
  41. U -- Unassemble instructions or display source
  42.  
  43. Syntax :
  44.  
  45.     U [address] [L[=]length]
  46.  
  47.    length -- The number of instructions
  48.                      to be unassembled
  49.  
  50. Comments:
  51. The U command displays the instructions of the program being debugged.
  52.  
  53. If length is not specified, the length defaults to eight lines if
  54. available, or one less than the screen length.
  55.  
  56. If address is not specified, the command unassembles at address starting
  57. at the first byte after the last byte unassembled by a previous unassemble
  58. command. If the has been no previous unassemble command, the address
  59. defaults to the current CS:IP.
  60.  
  61. If the code window is visible, the instructions are displayed in the code
  62. window.
  63.  
  64. If source is loaded for the address range specified then source lines may
  65. be displayed depending on the current source mode.
  66.  
  67. Example:
  68.     U $-10
  69.    This command unassembles instructions beginning
  70.    10 hexadecimal bytes before the current address.
  71.  
  72.      77
  73.  
  74.  U .499
  75.  
  76. This command displays the current source file starting at line 499. The
  77. code window must be visible and in source mode.
  78.  
  79.      78
  80.  
  81.                        R
  82.  
  83. R-- Display or change registers
  84.  
  85. Syntax:
  86.  
  87.  R register-name [ [ = ]value] ]
  88.  
  89.  register-name -- Any of the following:
  90.                    AL, AH, AX, BL, BH,
  91.                    BX, CL, CH, CX, DL,
  92.                    DH, DX, DI, SI, BP,
  93.                    SP, IP, CS, DS, ES, SS,
  94.                    or FL
  95.   value -- If register-name is any name other than
  96.                    FL, value is a hex value or an
  97.                    expression. If register-name is FL,
  98.                    value is a series of one or more of the
  99.                    following flag symbols, each
  100.                    optionally preceded by a plus or
  101.                    minus sign:
  102.                       O (Overflow flag)
  103.                       D (Direction flag)
  104.                       I (Interrupt flag)
  105.                       S (Sign flag)
  106.                       Z (Zero flag)
  107.                       A (Auxiliary carry flag)
  108.                       P (Parity flag)
  109.                       C (Carry flag)
  110.  
  111. Comments:
  112. The R command displays or changes register values.
  113.  
  114. If no parameters are supplied, all register and flag value are displayed,
  115. as well as the instruction at the current CS:IP address.
  116.  
  117. If register-name is supplied without a value, Soft-ICE displays the
  118. current value of the specified register and
  119.  
  120.      79 
  121.  
  122. prompts you for a new value. If register-name is FL, flags that are set
  123. are displayed as highlighted uppercase characters; flags that are cleared
  124. are displayed as non-highlighted lowercase characters. To retain the
  125. current value of a register, press ENTER.
  126.  
  127. If both register-name and value are supplied, the specified register's
  128. contents are changed to the value.
  129.  
  130. To change a flag value, use FL as the register-name, followed by the
  131. symbols of the flag whose values you want to toggle. To turn a flag on,
  132. precede the flag symbol with a plus sign. To turn a flag off, precede the
  133. flag symbol with a minus sign. The flags can be listed in any order.
  134.  
  135. Examples:
  136.   RAH 5
  137.   
  138.   This command sets the AH register equal to 5.
  139.   
  140.   R FL = OZP
  141.   
  142.   This command toggles the O, Z, and P flag values.
  143.    
  144.   R FL
  145.   
  146.   This command displays the current flag values, and
  147.   allows them to be changed.
  148.   
  149.   RFL O + A-C
  150.  
  151.   This command toggles the O flag value, turns on the
  152.   flag value, and turns off the C flag value.
  153.  
  154.      80
  155.  
  156.                     MAP
  157.  
  158. MAP -- Display system memory map
  159.  
  160. Syntax :
  161.  
  162.     MAP
  163.  
  164. Comments:
  165. The MAP command displays the names, locations, and sizes of system memory
  166. components. The size is displayed in paragraphs. One paragraph is
  167. equivalent to 10 hexadecimal bytes.
  168.  
  169. The component that the CS:IP register currently points to is highlighted.
  170.  
  171. Use the MAP command when:
  172.     * A break point occurs and CS:IP is not in a known
  173.         memory region.
  174.     * You want to get control within a resident program
  175.         or system program. A range break point can be set
  176.         based on the starting address and size reflected by
  177.         MAP.
  178.     * You suspect a program or system component of
  179.         writing over code outside of its memory space.
  180.         MAP is used to obtain the memory address of the
  181.         region to use with the CSIP command.
  182.     * You need to find out which resident program owns
  183.         certain interrupt vectors.
  184.  
  185.      81 
  186.  
  187. Example:
  188.  
  189.    MAP
  190.  
  191.    The following is a sample display produced by the
  192.    command:
  193.       Start Length
  194.       0000:0000 0040 Interrupt Vector Table
  195.       0040:0000 0030 ROM BIOS Variables
  196.       0070:0000 00FE I/O System
  197.       016E:0000 06B7 DOS
  198.       0842:0000 02CE DOS File Table & Buffers
  199.       A000:0000 5E00 System BUS
  200.       F000:0000 1000 ROM BIOS
  201.  
  202.    Versions of DOS lower than 3.1 display program
  203.    addresses instead of displaying the program names.
  204.  
  205.      82
  206.  
  207.             D, DB, DW, DD
  208.  
  209. D, DB, DW, DD -- Display memory
  210.  
  211. Syntax:
  212.  
  213.      D [size] [address] [L[ = ]length]
  214.      size -- B -- Byte
  215.              W -- Word
  216.              D -- Double Word
  217.  
  218.      length -- The number of bytes to be
  219.                   displayed. 
  220.  
  221. Comments:
  222. The D command displays the memory contents of the specified address.
  223.  
  224. The contents are displayed in the format of the size specified. If no size
  225. is specified, the last size used will be displayed. The ASCII
  226. representation is also displayed for all forms.
  227.  
  228. If address is not specified, the command displays memory at the address
  229. starting at the first byte after the last byte displayed.
  230.  
  231. If length is not specified, it defaults to eight lines, or fewer if the
  232. window is smaller.
  233.  
  234. If the data window is visible, the data is displayed in the data window
  235. and the length is ignored.
  236.  
  237. Example:
  238.   DW DS:00 L=8
  239.     This command displays, in word format and in ASCII
  240.     format, the value of the first eight bytes of the current
  241.     data segment.
  242.  
  243.      83
  244.  
  245.            E, EB, EW, ED
  246.  
  247. E, EB, EW, ED -- Edit memory
  248.  
  249. Syntax:
  250.  
  251.     E [size ] address [data-list]
  252.     size -- B -- Byte
  253.             W -- Word
  254.             D -- Double Word
  255.  
  256.     data-list -- list of data objects of the specified size
  257.                     (Bytes, Words or Double Words) or
  258.                     quoted strings separated by commas
  259.                     or spaces. The quoted string can
  260.                     begin with a single quote or a double
  261.                     quote.
  262.  
  263. Comments:
  264. The E commands display the memory contents at the specified address, and
  265. allow you to edit the values.
  266.  
  267. These commands display the memory contents in ASCII format, and in the
  268. format of the size specified.
  269.  
  270. A memory editor is provided for quick memory updates. Memory can be edited
  271. by typing ASCII characters, or by typing byte, word, or double word
  272. values. If no size is specified, the last size used will be assumed. The
  273. memory Editing key strokes are:
  274.     @ -- Move cursor up
  275.     @ -- Move cursor down
  276.     @ -- Move cursor right
  277.     @ -- Move cursor left
  278.     SPACE -- Move cursor to next element
  279.  
  280.      84
  281.  
  282.     TAB -- Toggle between numeric and
  283.                   ASCII areas
  284.  
  285.     ESC or
  286.     ENTER -- Exit memory editor
  287.  
  288. As values are input, the actual memory locations are updated. All numeric
  289. values are hex numbers. To toggle between the ASCII and numeric display
  290. areas, press the TAB key.
  291.  
  292. If the data window is visible, the data is edited in the data window,
  293. otherwise the data is edited in the command window.
  294.  
  295. The data display length defaults to 8 lines if in the command window, or
  296. to the size of the data window if it's visible.
  297.  
  298. If no parameters are supplied, the cursor moves into the data window if
  299. the data window if visible. If the data window is not visible, the data is
  300. edited in the command window at the last address displayed or edited.
  301.  
  302. Examples:
  303.    EB 1000:0
  304.     This command displays, in byte format, up to six lines
  305.     containing both the numeric and the ASCII
  306.     representation of the values of the data starting at
  307.     location 1000:0000. Once the lines are displayed, you
  308.     can edit the values.
  309.     EB 8000:0 "Hello",0D
  310.     This command replaces the values starting at locatio
  311.     8000:0000 with the string "Hello" followed by a carriage
  312.     return.
  313.  
  314.      85
  315.  
  316.              INT?
  317.  
  318. INT? -- Display last interrupt number
  319.  
  320. Syntax:
  321.  
  322.    INT?
  323.  
  324. Comments:
  325. The INT? command displays the address and the number the last interrupt
  326. that happened.
  327.  
  328. Example:
  329.    INT?
  330.    An example of the display produced by the INT?
  331.    command follows:
  332.        Last Interrupt: 16
  333.        At: 0070:0255
  334.  
  335.    This example shows that the last interrupt generated in
  336.    the system before the Soft-ICE window was brought up
  337.    was an interrupt 16 hexadecimal, at location
  338.    0070:0255H. If the last interrupt that happened was a
  339.    software interrupt, unassembling the code at
  340.    0070:0255H will show the interrupt instruction. If it
  341.    was a hardware interrupt, unassembling the code will
  342.    show the instruction that was executing when the
  343.    hardware interrupt occurred.
  344.  
  345.      86
  346.  
  347.               ? or H
  348.  
  349. ? or H -- Display help information
  350.  
  351. Syntax:
  352.  
  353.     < ? | H > [command | expression]
  354.  
  355. Comments:
  356. The ? command and the H command both display help information.
  357.  
  358. If no parameters are specified, help displays short descriptions of all
  359. the commands and operators, one screen at a time. Press any key to
  360. continue, or press ESC to quit displaying help.
  361.  
  362. If command is specified, help displays more detailed information on the
  363. specified command, including the command syntax and an example.
  364.  
  365. If expression is specified, the expression is evaluated and the result is
  366. displayed in hexadecimal, decimal, and ASCII.
  367.  
  368. Examples:
  369.   ? ALTKEY
  370.     This command displays information about the
  371.     ALTKEY command, including its syntax and an
  372.     example.
  373.   H 10 + 14*2
  374.    This command displays: 0038 00056 "8". These are the
  375.    hexadecimal, decimal and ASCII representations of
  376.    value of the expression "10 + 14*2".
  377.  
  378.      87
  379.  
  380.           VER
  381.  
  382. VER -- Display Soft-ICE version number
  383.  
  384. Syntax:
  385.  
  386.   VER
  387.  
  388. Example:
  389.    VER
  390.    This command displays the Soft-ICE version
  391.    and the Nu-Mega Technologies copyright message.
  392.    
  393.  
  394.      88 
  395.  
  396. 5.2 I/O Port Commands
  397.  
  398. Commands:
  399.    I or IB -- Input from byte I/O port
  400.    IW -- Input from word I/O port
  401.    O or OB -- Output to byte I/O port
  402.    OW -- Output to word I/O port
  403.  
  404.      89 
  405.  
  406.                     I, IB, IW
  407.  
  408. I, IB, IW -- Input from I/O port
  409.  
  410. Syntax:
  411.  
  412.    I [size] port
  413.  
  414.    Size -- B -- Byte
  415.            W -- Word
  416.  
  417.    port -- A byte or word value
  418.  
  419. Comments:
  420. The input from port commands are used to read and display a value from a
  421. hardware port. Input can be done From byte or word ports. If no size is
  422. specified, the default is byte.
  423.  
  424. Example:
  425.    I 21
  426.    This command displays the mask register for interrupt
  427.    controller one.
  428.  
  429.      90
  430.  
  431.          O, OB, OW
  432.  
  433. O, OB, OW, -- Output to I/O port
  434.  
  435. Syntax:
  436.  
  437.     O [size] port value
  438.     size -- B -- Byte
  439.             W -- Word
  440.  
  441.     port -- A byte or word value
  442.     value -- A byte for a byte port or a word
  443.                      for a word port
  444.  
  445. Comments:
  446. The output to port commands are used to write a value to a hardware port.
  447. Output can be done to byte or word ports If no size is specified, the
  448. default is byte.
  449.  
  450. Example:
  451.    O 21 FF
  452.     This command masks off all the interrupts for interrupt
  453.     controller one.
  454.  
  455.      91 
  456.  
  457. 5.3 Transfer Control Commands
  458.  
  459. Commands:
  460.  X        -- Exit from Soft-ICE window
  461.  G        -- Go to address
  462.  T        -- Trace one instruction
  463.  P        -- Program step
  464.  HERE     -- Go to current cursor line
  465.  GENINT   -- Force an interrupt
  466.  EXIT     -- Force exit of current DOS program
  467.  BOOT     -- System boot (retain Soft-ICE)
  468.  HBOOT    -- Hard system boot (total reset)
  469.  
  470.      92
  471.  
  472.                            X
  473.  
  474. X -- Exit from Soft-ICE window
  475.  
  476.  Syntax:
  477.  
  478.     X
  479.  
  480. Comments:
  481. The X command exits the Soft-ICE window and restores control to the
  482. program that was interrupted to bring up Soft-ICE. The Soft-ICE window
  483. disappears. If any break points have been set, they become active.
  484.  
  485. Example:
  486.     X
  487.  
  488.      93
  489.  
  490.                            G
  491.  
  492. G -- Go to address
  493.  
  494. Syntax:
  495.  
  496.     G [=start-address] [break-address]
  497.  
  498. Comments:
  499. The G command exits from the Soft-ICE window with a single one-time
  500. execution break point set. In addition, all sticky break points are armed.
  501.  
  502. Execution begins at the current CS:IP unless the start-address parameter
  503. is supplied. In that case execution begins at start-address. Execution
  504. continues until break-address is encountered, the window pop-up key
  505. sequence is used, or a sticky break point occurs.
  506.  
  507. The break-address must be the first byte of an instruction opcode.
  508.  
  509. When the specified break-address is reached, the current CS:IP will be the
  510. instruction where the break point was set.
  511.  
  512. The G command with no parameters behaves the same as the X command.
  513.  
  514. The non-sticky execution break point uses an 80386 break point register,
  515. unless all break point registers have been allocated to sticky break
  516. points. In that case, an INT 3 style break point is implemented. When this
  517. case occurs, the G and P commands will not work correctly in ROM. An error
  518. message will be displayed if this is attempted.
  519.  
  520. Example:
  521.    G CS:1234
  522.     This command sets a one time break point at CS:1234
  523.   
  524.      94
  525.  
  526.                              T
  527.  
  528. T -- Trace one instruction
  529.  
  530. Syntax:
  531.  
  532.     T [=start-address] [count]
  533.  
  534. Comments:
  535. The T command single steps one instruction by utilizing the single step
  536. flag.
  537.  
  538. Execution begins at the current CS:IP unless the start-address parameter
  539. is specified. If start-address is specified, CS:IP is changed to start-
  540. address prior to single stepping.
  541.  
  542. If count is specified then Soft-ICE single steps count time The TRACE
  543. command will continue until the count is exhausted or the Esc key is
  544. pressed, regardless of which break points are reached.
  545.  
  546. In source mode, the T command steps to the next source statement. If the
  547. current statement is a procedure or function call, and source exists for
  548. the routine being called, T steps into the call. If there is no source
  549. available for the called procedure or function, T steps over the routine.
  550.  
  551. Example :
  552.    T = 1284 3
  553.     This command single steps through three instruction
  554.     starting at memory location 1284.
  555.  
  556.      95
  557.  
  558.                             P
  559.  
  560. P -- Program step
  561.  
  562. Syntax:
  563.  
  564.    P 
  565.  
  566. Comments:
  567. The P command is a logical program step. One instruction at the current
  568. CS:IP is executed unless the instruction is a call, interrupt, loop, or
  569. repeated string instruction. In those cases, the entire routine or
  570. iteration is completed before control is returned to Soft-ICE.
  571.  
  572. The P command uses a one-time execution break point. The non-sticky
  573. execution break point uses an 80386 break point register, unless all break
  574. point registers have been allocated to sticky break points. In that case,
  575. an INT3 style break point is implemented. When this case occurs, the P and
  576. G commands will not work correctly in ROM. An error message will be
  577. displayed if this is attempted.
  578.  
  579. In source mode, the P command steps to the next source statement. If the
  580. current statement is a procedure or function call, the P command steps
  581. over the it.
  582.  
  583. Example:
  584.     P
  585.     This command executes one 'program step'.
  586.  
  587.      96
  588.  
  589.                          HERE
  590.  
  591. HERE -- Go to current cursor line
  592.  
  593. Syntax:
  594.  
  595.   HERE
  596.  
  597. Comments:
  598. The HERE command executes until the program reaches the current cursor
  599. line. HERE is only available when the cursor is in the code window. If the
  600. code window is not visible or the cursor is not in the code window, use
  601. the G command instead.
  602.  
  603. The HERE command exits from Soft-ICE with a single one-time execution
  604. break point set. In addition, all sticky break points are armed. 
  605.  
  606. Execution begins at the current CS:IP and continues until address of the
  607. current cursor position in the code window encountered, the window pop-up
  608. key sequence is used, a sticky break point occurs.
  609.  
  610. The non-sticky execution break point uses an 80386 break point register,
  611. unless all break point registers have been allocated to sticky break
  612. points. In that case, an INT 3 style break point is implemented. When this
  613. case occurs, the HERE command will not work correctly in ROM. An error
  614. message will be displayed if this is attempted.
  615.  
  616. Example:
  617.  HERE
  618.     This example sets an execution break point at the
  619.     current cursor position, then exits from Soft-ICE and
  620.     begins execution at the current CS:IP.
  621. Default Function Key: F7
  622.  
  623.      97
  624.  
  625.           GENINT
  626.  
  627. GENlNT -- Force an interrupt
  628.  
  629. Syntax:
  630.  
  631.    GENINT INT1 | INT3 | NMI | interrupt-number
  632.  
  633.    interrupt-number -- a number in the range 00 - FF
  634.  
  635. Comments:
  636. The GENINT command forces an interrupt to occur. This function can be used
  637. to hand off control to another debugger when using Soft-ICE with another
  638. software debugger. It can also be used to test interrupt routines.
  639.  
  640. The GENINT command simulates the processing sequence of a hardware
  641. interrupt or an INT instruction. It pushes the flags, the CS register, and
  642. the IP register, then changes the value of the CS and IP registers to the
  643. value of the interrupt vector table entry corresponding with the specified
  644. interrupt number.
  645.  
  646. Example:
  647.     GENINT NMI
  648.     This forces a non-maskable interrupt. This will give
  649.     control back to CodeView if Soft-ICE is being used as
  650.     an assistant to CodeView.
  651.  
  652.      98
  653.  
  654.             EXIT
  655.  
  656. EXIT -- Force exit of current DOS program
  657.  
  658. Syntax:
  659.  
  660.    EXIT [R] [D]
  661.     R -- Restore the interrupt vector table
  662.     D -- Delete all break points
  663.  
  664. Comments:
  665. The EXIT command attempts to abort the current program by forcing a DOS
  666. exit function (INT 21H, function 4CH) This command will only work if the
  667. DOS is in a state where it is able to accept the exit function call. If
  668. this call is made from certain interrupt routines, or other times when the
  669. DOS is not ready, the system may behave unpredictably.
  670.  
  671. This function does NOT do any system resetting other than the interrupt
  672. table when the R option is used. This means that BIOS variables, video
  673. modes and other systems level data are not restored.
  674.  
  675. Using the R option will cause the interrupt vectors to be restored to
  676. whatever they were the last time they were saved. Soft-ICE saves the
  677. interrupt vectors when it is loaded, when a program is loaded with
  678. LDR.EXE, and when the VECS S command is used.
  679.  
  680. Note:
  681. To re-start a program that has been loaded with the Soft-ICE program
  682. loader (LDR.EXE) do the following:
  683.      EXIT R
  684.      LDR prog.EXE
  685.  
  686. The EXIT command will restore the interrupt table to the values it
  687. contained before the program was loaded, then
  688.  
  689.      99 
  690.  
  691. exit to the command processor. By running the LDR utility and specifying
  692. the .EXE suffix, the program is loaded back in without re-loading symbols
  693. and source. The symbols and source will remain in memory.
  694.  
  695. Caution:
  696. The EXIT command should be used with care. Since Soft-ICE can be popped up
  697. at any time, a situation can occur where the DOS is not in a state to
  698. accept an exit function call. Also, the EXIT command does not do any
  699. program specific resetting. For instance, the EXIT command does not reset
  700. the video mode. If your program has placed the video BIOS and hardware in
  701. a particular video mode, it will stay in that mode after the EXIT command.
  702.  
  703. Example:
  704.   EXIT R
  705.     Restores the interrupt table and exits the current
  706.     program. The R option should be used if exiting from
  707.     a program loaded with the Soft-ICE program loader
  708.     LDR.EXE.
  709.  
  710.      100
  711.  
  712.           BOOT
  713.  
  714. BOOT -- System boot (retain Soft-ICE)
  715.  
  716. Syntax:
  717.  
  718.   BOOT
  719.  
  720. Comments:
  721. The BOOT command resets the system and retains Soft-ICE. BOOT is required
  722. to debug boot sequences, DOS loadable drivers, and non-DOS operating
  723. systems.
  724.  
  725. BOOT is implemented with an Interrupt 19H ROM BIOS call. In some instances
  726. memory may be corrupted to the point where Interrupt 19 will not work. If
  727. this occurs, bring up Soft-ICE and use the HBOOT command.
  728.  
  729. For BOOT to work properly, Soft-ICE should be installed as a loadable
  730. driver in CONFIG.SYS before any other device drivers. This is so Soft-ICE
  731. can restore the original system state as accurately as possible.
  732.  
  733. Example:
  734.   BOOT
  735.    This command makes the system reboot. Soft-ICE
  736.    remains resident.
  737.  
  738. 101
  739.  
  740.          HBOOT
  741.  
  742. HBOOT -- Hard system boot (total reset)
  743.  
  744. Syntax:
  745.  
  746.   HBOOT
  747.  
  748. Comments:
  749. The HBOOT command resets the entire system. Soft-ICE is not retained in
  750. the reset process. HBOOT is sufficient unless an adapter card requires a
  751. power-on reset. In those rare cases, the machine power must be recycled.
  752.  
  753. Example :
  754.   HBOOT
  755.    This command makes the system reboot. Soft-ICE
  756.    must be reloaded.
  757.  
  758.      102 
  759.  
  760. 5.4 Debug Mode Commands
  761.  
  762. Commands:
  763.    ACTION      -- Set action after break point is reached
  764.    WARN        -- Set DOS/ROM BIOS re-entrancy
  765.                       warning mode
  766.    BREAK       -- Break out any time
  767.    I3HERE      -- Direct Interrupt 3's to Soft-ICE
  768.  
  769.      103
  770.  
  771.          ACTION
  772.  
  773. ACTION -- Set action after break point is reached
  774.  
  775. Syntax:
  776.  
  777.    ACTION [INT1 | INT3 | NMI | HERE | int-number]
  778.  
  779.    int-number -- Any valid interrupt number (0-FFH).
  780.                     Use this option only if a user-supplied
  781.                     break point qualification routine has
  782.                     taken over that interrupt vector (see
  783.                     section 11.2).
  784.  
  785. Comments:
  786. The ACTION command determines where control is given when break point
  787. conditions have been met. In most cases, the desired action is INT3 or
  788. HERE, INT3 is typically used if Soft-ICE is being used with a host
  789. debugger, HERE is used when it is desired to return to Soft-ICE when break
  790. point conditions have been met, INT1 and NMI are alternatives for certain
  791. debuggers that will not work with the INT3 option. For instance, CODEVIEW
  792. works best with ACTION set to NMI.
  793.  
  794.  
  795.  
  796. Use int-number if there is a user-supplied break point qualification
  797. routine installed. Using int-number without having a user-supplied break
  798. point qualification routine installed causes an error. For more
  799. information, see section 11.2,'User-Qualified Break Points'.
  800.  
  801. If no parameter is supplied with the ACTION command, the current action is
  802. displayed.
  803.  
  804. The default action is HERE.
  805.  
  806.      104
  807.  
  808. Example:
  809.   ACTION HERE
  810. This command specifies that control will return to Soft-ICE when break
  811. point conditions have been met.
  812.  
  813.      105
  814.  
  815.                WARN
  816.  
  817. WARN -- Set DOS/ROM BIOS re-entrancy warning mode
  818.  
  819. Syntax:
  820.  
  821.   WARN [ON | OFF]
  822.  
  823. Comments:
  824. The WARN command is provided for using Soft-ICE with debuggers that use
  825. DOS and ROM BIOS. Many debuggers use DOS and ROM BIOS for screen output
  826. and for receiving keystrokes. Since DOS and ROM BIOS are not fully re-
  827. entrant, these debuggers may not work properly if break point occurs while
  828. the DOS or ROM BIOS is executing.
  829.  
  830. If WARN ON is set, and ACTION is not HERE, then control will come to Soft-
  831. ICE before the actual action occurs. The system displays the current CS:IP
  832. and gives you the choice of continuing or returning to Soft-ICE.
  833. Generally, you should choose to return to Soft-ICE to continue your
  834. debugging. Only continue with the host debugger if you know your debugger
  835. will not cause DOS or ROM BIOS to be re-entered.
  836.  
  837. WARN mode should be turned on to use Soft-ICE with DEBUG, SYMDEB, and
  838. CODEVIEW.
  839.  
  840. If no parameter is specified, the current state of WARN is displayed.
  841.  
  842. The default is WARN mode OFF.
  843.  
  844. Example:
  845.   WARN ON
  846.    This command turns on DOS/ROM BIOS re-entrancy
  847.    warning mode.
  848.  
  849.  
  850.  
  851.      106 
  852.  
  853.                          BREAK
  854.  
  855. BREAK -- Break out any time
  856.  
  857. Syntax:
  858.  
  859.   BREAK [ON | OFF]
  860.  
  861. Comments:
  862. The BREAK command allows popping up the Soft-ICE window when the system is
  863. hung with interrupts disabled. Break mode can be used for the entire
  864. debugging session, or it can be turned on and off when it is required.
  865.  
  866. Break mode degrades system performance slightly. This performance
  867. degradation must be weighed against the necessity of breaking out of a
  868. hung program. A user may want to have break mode on all the time, even
  869. though performance is degraded, because the program could hang at any
  870. time.
  871.  
  872. Unlike other debuggers that can also be brought up at any time, Soft-ICE
  873. does not require an external switch. When BREAK is on, the Soft-ICE window
  874. can be brought up at any time by pressing the current key sequence.
  875.  
  876. If no parameter is specified, the current state of BREAK is displayed.
  877.  
  878. The default is BREAK mode OFF.
  879.  
  880. Example:
  881.  BREAK ON
  882.     This command turns on break mode. This means that
  883.     the Soft-ICE window can be brought up at any time,
  884.     even if interrupts are disabled.
  885.  
  886.      107
  887.  
  888.             13 HERE
  889.  
  890. 13HERE -- Direct Interrupt 3's to Soft-ICE
  891.  
  892. Syntax: 
  893.  
  894.   13HERE [ON | OFF]
  895.  
  896. Comments:
  897. The 13HERE command lets you specify that any Interrupt 3 will bring up the
  898. Soft-ICE window. This feature is useful for stopping your program in a
  899. specific location.
  900.  
  901. To use this feature, place an INT 3 into your code at the location where
  902. you want to stop. When the INT 3 occurs, it will bring up the Soft-ICE
  903. window. At this point, you can use the R IP command to change your
  904. instruction pointer to the instruction after the INT 3, then you can
  905. continue debugging.
  906.  
  907. If no parameter is specified, the current state of 13HERE is displayed.
  908.  
  909. The default is 13HERE mode OFF.
  910.  
  911. Example:
  912.   13HERE ON
  913.     This command turns on 13HERE mode. Any INT 3's
  914.     generated after this point will bring up the Soft-ICE
  915.     window.
  916.  
  917.      108 
  918.  
  919. 5.5 Utility Commands
  920.  
  921. Commands:
  922.     A     -- Assemble code
  923.     S     -- Search for data
  924.     F     -- Fill memory with data
  925.     M     -- Move data
  926.     C     -- Compare two data blocks
  927.  
  928.      109
  929.  
  930.                            A
  931.  
  932. A -- Assemble code
  933.  
  934. Syntax:
  935.  
  936.     A [address]
  937.  
  938. Comments:
  939. The Soft-ICE assembler allows you to assemble instructions directly into
  940. memory. The assembler supports the basic 8086 instruction set with the
  941. 80186 and 80286 real address mode extensions. Numeric co-processor
  942. instructions and 80386 specific instructions, registers and addressing
  943. modes can NOT be assembled.
  944.  
  945. The A command enters the Soft-ICE interactive assembler. An address is
  946. displayed as a prompt for each assembly line After an assembly language
  947. instruction is typed in and ENTER is pressed, the instructions are
  948. assembled into memory at the specified address. Instructions must be
  949. entered with standard Intel format. Press ENTER at an address prompt to
  950. exit assembler mode.
  951.  
  952. If the address range in which you are assembling instructions is visible
  953. in the code window, the instructions will change interactively as you
  954. assemble.
  955.  
  956. The Soft-ICE assembler supports the standard 8086 family mnemonics,
  957. however there are some special additions :
  958.    * The DB mnemonic is used to define bytes of data
  959.        directly into memory. The DB command is
  960.        followed by a list of bytes and/or quoted strings
  961.        separated by spaces or commas.
  962.    * The RETF mnemonic represents a far return.
  963.    * WORD PTR and BYTE PTR are used to
  964.        determine data size if there is no register
  965.  
  966.      110 
  967.  
  968.         argument, for example: MOV BYTE PTR
  969.         ES:[ 1234],1.
  970.     * Use FAR and NEAR to explicitly assemble far and
  971.         near jumps and calls. If FAR or NEAR is not
  972.         specified then all jumps and calls are near.
  973.     * Operands referring to memory locations should
  974.         placed in square brackets, for example: MOV
  975.         AX,[1234].
  976.  
  977. Example:
  978.    A CS:1234
  979.     This command prompts you for assembly instruction
  980.     then assembles them beginning at offset 1234H with
  981.     the current code segment. Press ENTER at the
  982.     address prompt after entering the last instruction.
  983.  
  984.  
  985.      111
  986.  
  987.                             S
  988.  
  989. S -- Search for data
  990.  
  991. Syntax:
  992.  
  993.    S address L length data-list
  994.    data-list -- list of bytes or quoted strings separated
  995.                     by commas or spaces. .A quoted string
  996.                     can begin with a single quote or a
  997.                     double quote.
  998.  
  999.    length -- length in bytes
  1000.  
  1001. Comments:
  1002. The S command searches memory for a series of bytes or characters that
  1003. matches the data-list. The search begins at the specified address and
  1004. continues for the length specified. The address of each occurrence found
  1005. in the range is displayed.
  1006.  
  1007. Example:
  1008.    S DS:SI+10 L CX 'Hello',12,34
  1009.     This command searches for the string 'Hello' followed
  1010.     by the bytes 12H and 34H starting at offset SI+10 in
  1011.     the current data segment and ending CX bytes later.
  1012.  
  1013.      112
  1014.  
  1015.                            F
  1016.  
  1017. F -- Fill memory with data
  1018.  
  1019. Syntax:
  1020.  
  1021.    F address L length data-list
  1022.    data-list -- list of bytes or quoted strings separated
  1023.                       by commas or spaces. A quoted string
  1024.                       can begin with a single quote or a
  1025.                       double quote.
  1026.  
  1027.    length -- length in bytes
  1028.  
  1029. Comments:
  1030. The F command fills memory with the series of bytes or characters
  1031. specified in the data-list. Memory is filled starting at the specified
  1032. address and continuing for the specified length, repeating the data-list
  1033. if necessary.
  1034.  
  1035.  Example:
  1036.     F 8000:0 L 100 'Test'
  1037.     This command fills memory starting at 8000:0 for a
  1038.     length of 100H bytes with the string 'Test'. The string
  1039.     'Test' is repeated until the fill length is exhausted.
  1040.  
  1041.      113
  1042.  
  1043.                          M
  1044.  
  1045. M -- Move data
  1046.  
  1047. Syntax:
  1048.  
  1049.    M start-address L length end-address
  1050.    length -- length in bytes
  1051.  
  1052. Comments:
  1053. The M command moves the specified number of bytes from the start-address
  1054. in memory to the end-address in memory.
  1055.  
  1056. Example:
  1057.    M 1000:0 L 200 2000:0
  1058.    This command moves 200H bytes from memory
  1059.    location 1000:0 to memory location 2000:0.
  1060.  
  1061.      114
  1062.  
  1063.                           C
  1064.  
  1065. C -- Compare two data blocks
  1066.  
  1067. Syntax:
  1068.  
  1069.    C address1 L length address2
  1070.     length -- length in bytes
  1071.  
  1072. Comments:
  1073. The C command compares the memory block specified by address1 and the
  1074. length with the memory block specified address2 and the length.
  1075. When a byte from the first data block does not match a byte from the
  1076. second data block, both bytes are displayed, along with their addresses.
  1077.  
  1078. Example:
  1079.    C 5000:100 L 10 6000:100
  1080.     This command compares the 10H bytes starting at
  1081.     memory location 5000:100 with the 10H bytes starting
  1082.     at memory location 6000:100.
  1083.  
  1084.      115 
  1085.  
  1086. 5.6 Specialized Debugging Commands
  1087.  
  1088. Commands:
  1089.  SHOW     -- Display instructions from history buffer
  1090.  TRACE    -- Enter trace simulation mode
  1091.  XT       -- Single step in trace simulation mode
  1092.  XP       -- Program step in trace simulation mode
  1093.  XG       -- Go to address in trace simulation mode
  1094.  XRSET    -- Reset back trace buffer
  1095.  VECS     -- Save/restore/compare interrupt vectors
  1096.  SNAP     -- Take snap shot of memory block
  1097.  EMMMAP   -- Display EMM allocation map
  1098.  
  1099.      116
  1100.  
  1101.          SHOW
  1102.  
  1103. SHOW -- Display instructions from history buffer
  1104.  
  1105. Syntax:
  1106.  
  1107.    SHOW [B | start]
  1108.     B -- This tells the show command to start
  1109.                      the display with the oldest instruction
  1110.                      in the back trace buffer.
  1111.  
  1112.    start -- The number of instructions back from
  1113.                      the buffer end (last instruction
  1114.                      captured) to begin display.
  1115.  
  1116. Comments:
  1117. The SHOW command displays instructions from the back trace history buffer.
  1118. If source is available for the instructions then the display is in mixed
  1119. mode, otherwise only code is displayed.
  1120.  
  1121. SHOW allows scrolling through the back trace buffer with the up, down,
  1122. Pageup and PaqeDn keys. To exit from SHOW you must press the Esc key.
  1123.  
  1124. Preceding the address of each instruction is the buffer entry number. This
  1125. number shows how deep into the buffer you are displaying. The higher the
  1126. number, the deeper you are into the buffer.
  1127.  
  1128. Note:
  1129. Before using the SHOW command, instructions must have been logged with a
  1130. back trace range. See chapter 9 for more information on back trace ranges.
  1131.  
  1132.      117 
  1133.  
  1134. Hints:
  1135. It is often useful to have the code window visible with the actual code of
  1136. the region you are displaying from the back trace buffer. When you compare
  1137. the actual instruction flow to code, displayed jumps and calls are usually
  1138. less confusing.
  1139.  
  1140. Using SHOW in conjunction with the TRACE command will allow you to see the
  1141. instructions in the back trace history buffer from two different points of
  1142. view.
  1143.  
  1144. Example:
  1145.   SHOW 40
  1146.    This example will displays starting with the 40th
  1147.    instruction back in the back trace buffer.
  1148.  
  1149.      118 
  1150.  
  1151.           TRACE
  1152.  
  1153. TRACE -- Enter trace simulation mode
  1154.  
  1155. Syntax:
  1156.  
  1157.    TRACE [start] | [OFF]
  1158.    start -- The number of instructions back from
  1159.                       the buffer end (last instruction
  1160.                       captured) to begin trace simulation
  1161.  
  1162.    OFF -- Exit trace simulation mode.
  1163.  
  1164. Comments:
  1165. The TRACE command allows you to replay instructions from the instruction
  1166. back trace history buffer just as if they were being executed for the
  1167. first time. To use trace simulation mode you must have the code window
  1168. visible After entering trace simulation mode you use the XT, XP and XG
  1169. commands to trace through the instructions in the buffer.
  1170.  
  1171. To exit trace simulation mode type TRACE OFF.
  1172.  
  1173. TRACE with no parameters specified displays whether trace simulation mode
  1174. is on or off.
  1175.  
  1176. Note:
  1177. Before using the TRACE command, instructions must have been logged with a
  1178. back trace range. See chapter 9 for more information on back trace ranges.
  1179.  
  1180. Hints:
  1181. Trace simulation mode is most useful when the code window is visible. It
  1182. is often useful to use TRACE in conjunction with the SHOW command. This
  1183. allows the
  1184.  
  1185.      119 
  1186.  
  1187. instructions in the back trace history buffer to be viewed simultaneously
  1188. in two different forms.
  1189.  
  1190. Example:
  1191.    TRACE 40
  1192.    This example enters trace simulation mode starting 40
  1193.    instructions back from the last instruction logged. It
  1194.    will remain in trace simulation mode until TRACE
  1195.    OFF is entered.
  1196.  
  1197.      120 
  1198.  
  1199.                XT
  1200.  
  1201. XT -- Single step in trace simulation mode
  1202.  
  1203. Syntax:
  1204.  
  1205.    XT [R]
  1206.    R -- Single step in reverse direction.
  1207.  
  1208. Comments:
  1209. The XT command single steps through the instruction back trace history
  1210. buffer. This command acts like the T command for normal debugging. Note
  1211. that the registers do NOT change while stepping in trace simulation mode
  1212. except CS and IP,
  1213.  
  1214. The XT instruction allows you to replay instructions from the back trace
  1215. history buffer,
  1216.  
  1217. Note:
  1218. Before using XT you must be in trace simulation mode. See chapter 9 and
  1219. the TRACE command in this section for more information on back trace
  1220. ranges.
  1221.  
  1222. Hint:
  1223. If you are using XT frequently, like any other Soft-ICE command it can be
  1224. assigned to a function key.
  1225.  
  1226. Example:
  1227.     XT
  1228.     This command single steps one instruction in trace
  1229.     simulation mode.
  1230.  
  1231.      121
  1232.      
  1233.                           XP
  1234.  
  1235. XP -- Program step in trace simulation mode
  1236.  
  1237. Syntax:
  1238.  
  1239.    XP
  1240.  
  1241. Comments:
  1242. The XP command does a logical program step through the instruction back
  1243. trace history buffer. This command acts like the P command for normal
  1244. debugging. Note that the registers do NOT change while stepping in trace
  1245. simulation mode except CS and IP.
  1246.  
  1247. The XP instruction allows you to replay instructions from the back trace
  1248. history buffer.
  1249.  
  1250. Note:
  1251. Before using XP you must be in trace simulation mode. See chapter 9 and
  1252. the TRACE command in this section for more information on back trace
  1253. ranges.
  1254.  
  1255. Hint:
  1256. If you are using XP frequently, like any other Soft-ICE command it can be
  1257. assigned to a function key.
  1258.  
  1259. Example:
  1260.     XP
  1261.    This command executes one program step in trace
  1262.    simulation mode.
  1263.  
  1264.      122 
  1265.  
  1266.                     XG
  1267.  
  1268. XG -- Go to an address in trace simulation mode
  1269.  
  1270. Syntax:
  1271.  
  1272.     X [R] address
  1273.     R -- Search for address in reverse direction.
  1274.  
  1275.     address -- Address to go to in the back trace
  1276.                       history buffer.
  1277.  
  1278. Comments:
  1279. The XG command moves the instruction pointer to the next occurrence of the
  1280. specified address in the back trace history buffer. If R is specified
  1281. preceding the address, then the instruction pointer is moved to the
  1282. previous occurrence  the specified address in the back trace buffer.
  1283.  
  1284. The address must be the first byte of an instruction opcode.
  1285.  
  1286. The XG is analogous to the G command in normal debugging.
  1287.  
  1288. Note:
  1289. Before using XG you must be in trace simulation mode. See chapter 9 and
  1290. the TRACE command in this section for more information on back trace
  1291. ranges.
  1292.  
  1293. Example:
  1294.     XG 273:1030
  1295.     This command moves the instruction pointer to the
  1296.     next instance of the instruction at address 273:1030.
  1297.  
  1298.      123
  1299.  
  1300.           XRSET
  1301.  
  1302. XRSET -- Reset back trace history buffer
  1303.  
  1304. Syntax:
  1305.  
  1306.    XRSET
  1307.  
  1308. Comments:
  1309. The XRSET command resets the back trace history buffer. This command
  1310. should be executed before setting a back trace range if there is unwanted
  1311. instruction information in the back trace buffer.
  1312.  
  1313. Example:
  1314.   XRSET
  1315.    This command resets the back trace buffer.
  1316.    
  1317.  
  1318.      124
  1319.  
  1320.            VECS
  1321.  
  1322. VECS -- Save/restore/compare interrupt vectors
  1323.  
  1324. Syntax:
  1325.  
  1326.    VECS [C|S|R]
  1327.         C -- Compare current table with stored table
  1328.         S -- Save current interrupt table to buffer
  1329.         R -- Restore interrupt table from buffer
  1330.  
  1331. Comments:
  1332. The VECS command allows you to save and restore the interrupt table to an
  1333. internal Soft-ICE buffer. The actual table can also be compared to the
  1334. stored table with the differences displayed.
  1335.  
  1336.  
  1337. When the C option is used to compare the current interrupt vector table
  1338. with the stored copy the output is in the following format:
  1339.  
  1340.    address old-vector new-vector
  1341.  
  1342. Each vector that has changed is displayed.
  1343.  
  1344. The interrupt vector table is initially stored when Soft-ICE is loaded. It
  1345. is also automatically stored when a program loaded with LDR.EXE. Only one
  1346. copy of the interrupt vector table is stored, so each time VECS S is
  1347. executed, previous copy of the interrupt table is overwritten.
  1348.  
  1349. If no parameters are specified, the entire interrupt vector table is
  1350. displayed.
  1351.  
  1352.      125 
  1353.  
  1354. Example:
  1355.    VECS C
  1356.    This command compares the actual interrupt vector
  1357.    table with one that had been previously stored in the
  1358.    Soft-ICE internal VECS buffer.
  1359.  
  1360.      126 
  1361.  
  1362.                     SNAP
  1363.  
  1364. SNAP -- Take snap shot of memory block
  1365.  
  1366. Syntax:
  1367.  
  1368.     SNAP [C | S | R] address1 address2
  1369.         C -- Compare buffer with address range
  1370.         S -- Save address range to buffer
  1371.         R -- Restore buffer to address range
  1372.  
  1373. Comments:
  1374. The SNAP command takes a snap shot of a memory block for later comparison.
  1375. The S option copies a block of memory to a buffer in extended memory. The
  1376. C option displays differences between the buffer in extended memory and
  1377. the actual memory specified by the address range. The R option copies the
  1378. buffer in extended memory to the address range in conventional memory.
  1379.  
  1380. When the C option is used to compare the buffer with the address range the
  1381. output is in the following format:
  1382.  
  1383.    address old-data new-data
  1384.  
  1385. Each byte that has changed is displayed.
  1386.  
  1387. The address is usually not necessary for the C and R options. If the
  1388. address is not specified, the address from the last time SNAP was entered
  1389. with a specified address used.
  1390.  
  1391.  
  1392. Notes:
  1393. To use the SNAP command you must have specified the /TRA XXXX switch on
  1394. the S-ICE.EXE line in CONFIG.SYS.
  1395.  
  1396.      127 
  1397.  
  1398. The SNAP command saves data in the back trace history buffer. If you are
  1399. using back trace then you will have a conflict with SNAP. Specifically,
  1400. SNAP will overwrite back trace information if you do a SNAP S when
  1401. instruction history is in the back trace buffer. Conversely, if you have
  1402. saved a region with SNAP, then enabling a back trace range will overwrite
  1403. the SNAP buffer.
  1404.  
  1405. Example:
  1406.    SNAP S 2000:0 4000:0
  1407.    This command stores the data block from 2000:0 to
  1408.    4000:0 in the Soft-ICE back trace buffer.
  1409.  
  1410.      128 
  1411.  
  1412.         EMMMAP
  1413.  
  1414. EMMMAP -- Display EMM allocation map
  1415.  
  1416. Syntax:
  1417.  
  1418.   EMMMAP
  1419.  
  1420. Comments:
  1421. The EMMMAP command displays each physical page that is available for EMM
  1422. memory and the pages that are currently mapped in.
  1423.  
  1424. Note:
  1425. The Soft-ICE EMM feature must be enabled to use this function. See chapter
  1426. 8 for more information on enabling EMM capability.
  1427.  
  1428. Example:
  1429.  EMMMAP
  1430.    This example displays the current EMM allocation in
  1431.    in the following form.
  1432.    Phy page Seg address Handle/Page
  1433.    00 D000 FFFF
  1434.    01 D400 0001/0000
  1435.    02 D800 0001/0001
  1436.    03 DC00 0001/0002
  1437.    In this example, physical page 0 is located at D000 and
  1438.    is unmapped. Physical page 1 is located at D400 and
  1439.    has handle 1, page 0 mapped into it. Physical page 2 is
  1440.    located at D800 and has handle 1, page I mapped into
  1441.    it. Physical page 3 is located at DC00 and has handle
  1442.    page 2 mapped into it.
  1443.  
  1444.      129 
  1445.  
  1446.  
  1447. 5.7 Windowing Commands
  1448.  
  1449. Commands:
  1450.    WR     -- Toggle register window
  1451.    WC     -- Toggle/set size of code window
  1452.    WD     -- Toggle/set size of data window
  1453.    EC     -- Enter/exit code window
  1454.    .      -- Locate current instruction
  1455.    
  1456.    Three window types may be created with Soft-ICE:
  1457.    register, data, and code. Any of these windows can be
  1458.    toggled on or off at any time. The data and code
  1459.    windows can be of variable size; the register window is
  1460.    fixed in size. The windows always remain in a fixed
  1461.    order. Starting from the top of the screen, the order is
  1462.    register window, data window, then code window.
  1463.  
  1464.      130
  1465.  
  1466.                     WR
  1467.  
  1468.  WR -- Toggle register window
  1469.  
  1470. Syntax:
  1471.  
  1472.  WR
  1473.  
  1474. Comments:
  1475. The command makes the register window visible if not currently visible. If
  1476. the register window is currently visible, WR removes the register window.
  1477.  
  1478. The register window displays the 8086 register set and the processor
  1479. flags.
  1480.  
  1481. Default Function: F2
  1482.  
  1483.      131
  1484.  
  1485.                           WC
  1486.  
  1487. WC -- Toggle/set size of code window
  1488.  
  1489. Syntax:
  1490.  
  1491.    WC [window-size]
  1492.    window-size -- a decimal number between one and 21.
  1493.  
  1494. Comments:
  1495. If window-size is not specified, this command toggles the code window. If
  1496. it was not visible it is made visible, and if it was visible it is
  1497. removed.
  1498.  
  1499. If window-size is specified the code window is resized, or it was not
  1500. visible it is made visible with the specified size.
  1501.  
  1502. Note:
  1503. If you wish to move the cursor to the code window use the EC command. See
  1504. description of the EC command for more details.
  1505.  
  1506. Example:
  1507.    WC 12
  1508.    If no code window is present, then a code window 12
  1509.    lines in length is created. If the code window is
  1510.    currently on the screen, it is resized to 12 lines.
  1511.  
  1512.      132
  1513.  
  1514.                     WD
  1515.  
  1516.  WD -- Toggle/set size of data window
  1517.  
  1518. Syntax:
  1519.  
  1520.      WD [window-size]
  1521.      window-size -- a decimal number between one and 21.
  1522.  
  1523. Comments:
  1524. If window-size is not specified, this command toggles the data window. If
  1525. it was not visible it is made visible, and if it was visible it is
  1526. removed.
  1527.  
  1528. If window-size is specified the data window is resized, or it was not
  1529. visible it is made visible with the specified size.
  1530.  
  1531.  Example:
  1532.  WD 1
  1533.     If no data window is present then a data window of one
  1534.     line is created. If the data window is currently on the
  1535.     screen, it is resized to one line.
  1536.  
  1537.      133 
  1538.  
  1539.                     EC
  1540.  
  1541. EC -- Enter/exit code window
  1542.  
  1543. Syntax:
  1544.  
  1545.     EC
  1546.  
  1547. Comments:
  1548. The EC command toggles the cursor location between the code window and the
  1549. command window. If the cursor was in the command window it is moved to the
  1550. code window, and if the cursor was in the code window it is moved to the
  1551. command window.
  1552.  
  1553. When the cursor is in the code window several options become available
  1554. that make debugging much easier. The options are:
  1555.     * Point-and-shoot break points
  1556.         Point-and-shoot break points are set with the BP
  1557.         command. If no parameters are specified with the
  1558.         BPX command an execution break point is set at
  1559.         the location of the cursor position in the code
  1560.         window. The cursor must be on a line that
  1561.         contains code (place the code window in mixed
  1562.         mode if you are unsure). The default function key
  1563.         assignment for BPX is F9.
  1564.  
  1565.     * Go to cursor line
  1566.         You can set a temporary break point at the cursor
  1567.         and go with the HERE command. The cursor must
  1568.         be on a line that contains code (place the code
  1569.         window in mixed mode if you are unsure). The
  1570.         default function key assignment for HERE is F7.
  1571.  
  1572.      134
  1573.  
  1574.    * Scrolling the code window
  1575.        The code window can be scrolled only while the
  1576.        cursor is in the code window. The scrolling keys
  1577.        (UP arrow, DOWN arrow, PageUp and
  1578.        PageDown) are redefined while the cursor is in
  1579.        code window. When the cursor is in the code
  1580.        window the scrolling keys do the following:
  1581.         up -- Scroll code window up one line
  1582.         down -- Scroll code window down one
  1583.         pageup -- Scroll code window up one window
  1584.         pageDn -- Scroll code window down one
  1585.                         window
  1586.  
  1587. Note:
  1588. The code window must be visible for the EC command to work.
  1589. Default Function Key: F6
  1590.  
  1591.      135
  1592.  
  1593.                             .
  1594.  
  1595. . -- Locate current instruction
  1596.  
  1597. Syntax:
  1598.  .
  1599.  
  1600. Comments:
  1601. When the code window is visible, the . command makes the current source
  1602. line or current instruction visible.
  1603.  
  1604.      136 
  1605.  
  1606. 5.8 Debugger Customization Commands
  1607.  
  1608. Commands:
  1609.    PAUSE       -- Pause after each screen
  1610.    ALTKEY      -- Set alternate key sequence to
  1611.                            invoke Soft-ICE
  1612.    FKEY        -- Show and edit function keys
  1613.    BASE        -- Set/display current radix
  1614.    CTRL-P      -- Toggle log session to printer
  1615.    Print-Screen -- Print contents of screen
  1616.    PRN         -- Set printer output port
  1617.  
  1618.      137 
  1619.  
  1620.                     PAUSE
  1621.  
  1622. PAUSE -- Pause after each screen
  1623.  
  1624. Syntax:
  1625.  
  1626.    PAUSE [ON | OFF]
  1627.  
  1628. Comments:
  1629. PAUSE controls screen pause at the end of each page. If PAUSE is ON, you
  1630. are prompted to press any key before information is scrolled off the
  1631. window. The prompt is displayed in the status line at the bottom of the
  1632. window.
  1633.  
  1634. If no parameter is specified, the current state of PAUSE is displayed.
  1635.  
  1636. The default is PAUSE mode ON.
  1637.  
  1638. Example:
  1639.    PAUSE ON
  1640.    This command specifies that subsequent window
  1641.    display commands will cause the screen to wait for you
  1642.    to press a key before scrolling new information off the
  1643.    window.
  1644.  
  1645.      138 
  1646.  
  1647.                     ALTKEY
  1648.  
  1649. ALTKEY -- Set alternate key sequence to invoke Soft-ICE
  1650.  
  1651. Syntax:
  1652.  
  1653.      ALTKEY [ALTletter] | [CTRLletter] | [SYSREQ]
  1654.      letter - Any letter (A - Z)
  1655.  
  1656. Comments:
  1657. The ALTKEY command allows the key sequence for popping up Soft-ICE to be
  1658. changed. The key sequence be changed to CTRL + letter, ALT + letter, or
  1659. the SysRq key.
  1660.  
  1661. Occasionally you may be using a program that conflicts with the CTRL D key
  1662. sequence that brings up the Soft-ICE window. One way to circumvent this
  1663. possible problem is to use the ALTKEY command to change the key sequence.
  1664. Another way is to add the SHIFT key to the current sequence. Soft-ICE does
  1665. not respond to this key sequence and allows it to go through to your
  1666. program. For example if a resident program you are using is brought up
  1667. with the CTRL D key sequence, try using the key sequence CTRL SHIFT D to
  1668. bring up your resident program. On some keyboards, you must press ALT and
  1669. the prtsc key simultaneously to generate a system request. Care must be
  1670. taken so the screen is not printed accidentally.
  1671.  
  1672. If no parameter is specified, the current key sequence state is displayed.
  1673.  
  1674. The default key sequence is CTRL D. 
  1675.  
  1676.      139
  1677.  
  1678.  Example:
  1679.  ALTKEY ALT Z
  1680.    This command specifies that the key sequence
  1681.    ALT Z will now be used to pop up the Soft-ICE
  1682.    window.
  1683.  
  1684.      140
  1685.  
  1686.              FKEY
  1687.  
  1688. FKEY -- Show and edit function keys
  1689.  
  1690. Syntax:
  1691.  
  1692.    FKEY [function-key-name string]
  1693.    function-key-name -- F1, F2... F12
  1694.  
  1695.    string -- The string consists of any valid Soft-ICE
  1696.                     commands and the special character
  1697.                     ^ (caret) and ; (semicolon). A ^ is
  1698.                     placed in the string to make a
  1699.                     command invisible. A ; is placed in
  1700.                     the string to denote a carriage return.
  1701.  
  1702. Comments:
  1703. The FKEY command is used from the command line to assign a function key to
  1704. a command string. Function key can be assigned to any command string that
  1705. can be typed into Soft-ICE.
  1706.  
  1707. If no parameters are specified, then the current function key assignments
  1708. are displayed.
  1709.  
  1710. To unassign a specified function key, use the FKEY command with these
  1711. parameters: a function-key-name followed by a null string.
  1712.  
  1713. The function keys can also be pre-initialized in the definition file S-
  1714. ICE.DAT. For more information on function key definitions in the
  1715. definition file, refer to section 6.4.
  1716.  
  1717. Using carriage return symbols in a function key assignment string allows
  1718. you to assign a function key a series of commands. A carriage return is
  1719. represented by a ; (semicolon). 
  1720.  
  1721.      141 
  1722.  
  1723. If you put ^ (shift 6) in front of a function key definition, the
  1724. subsequent command will be invisible. The command will function as normal,
  1725. but all information displayed in the command window (including error
  1726. messages) is suppressed. The invisible mode is useful when a command
  1727. changes information in a window (code, register or data) but you do not
  1728. want to clutter the command window,
  1729.  
  1730. When a function key is made invisible with ^, the function key can be used
  1731. in the middle of typing in other command without affecting their
  1732. operation. For example, if you are using the default assignment for F2,
  1733. you can toggle the register window with F2 even if you are partially
  1734. through typing in your next command.
  1735.  
  1736. Note :
  1737. Soft-ICE now has a definition file named S-ICE.DAT. You can place function
  1738. key assignments in this file so that function keys will be automatically
  1739. assigned when Soft-ICE is loaded. The syntax for assigning a function key
  1740. in the configuration file is:
  1741.  
  1742.     function-key-name = "string"
  1743.  
  1744. When assigning function keys to a command string in S-ICE.DAT, the string
  1745. must be enclosed in double quotes.
  1746.  
  1747. Command line examples:
  1748.    FKEY F2 ^WR;
  1749.     This example will assign the toggle register window
  1750.     command to the F2 key. The ^ makes the function
  1751.     invisible, and the ; ends the function with a carriage
  1752.     return. The F2 key will toggle the register window
  1753.     on or off, and can even be evoked while typing in
  1754.     another command.
  1755.  
  1756.      142
  1757.  
  1758.     FKEY F1 "G CS:120; R; G CS:"
  1759.     This example shows that multiple commands can be
  1760.     assigned to a single function key and that partial
  1761.     commands can be assigned for the user to complete.
  1762.     After this command is entered, pressing the F1 key
  1763.     will cause the program to execute until location
  1764.     CS:120 is reached, display the registers, then start the
  1765.     G command for the user to complete.
  1766.  
  1767.     FKEY F1 WD 3;D DS:100;
  1768.     This example will assign a series of commands to the
  1769.     F1 key. The function is visible, and ends with a
  1770.     carriage return. The F1 key will make the data
  1771.     window three lines long and dump data starting at
  1772.     DS:100.
  1773.  S-ICE.DAT example:
  1774.     F1 = "WR;WD 2;WC 10;"
  1775.     If this line is placed in S-ICE.DAT, when Soft-ICE is
  1776.     loaded it will assign the string to the F1 key. When
  1777.     F1 is pressed while in Soft-ICE, it will toggle the
  1778.     register window, create a data window of length 2 and a
  1779.     code window of length 10. For more information about
  1780.     assigning function key definitions in S-ICE.DAT, refer
  1781.     to chapter 6.
  1782.  
  1783.      143
  1784.  
  1785.            BASE
  1786.  
  1787. BASE -- Set/display current radix
  1788.  
  1789. Syntax:
  1790.  
  1791.    BASE [10 | 16]
  1792.  
  1793. Comments:
  1794. The BASE command sets the current radix to base 10 or base 16. Base 10 is
  1795. of limited use in the narrow window because of window width limitations.
  1796. It also limits the amount of information displayed in some commands in the
  1797. wide mode.
  1798.  
  1799. When the current radix is base 10, all numbers and addresses typed into
  1800. and displayed by Soft-ICE are in decimal, When the current radix is base
  1801. 16, all numbers and addresses typed into Soft-ICE are in hexadecimal
  1802. except:
  1803.     * source line numbers
  1804.     * screen coordinates and sizes in the WIN command
  1805.  
  1806. These exceptions are always typed in and displayed as decimal numbers.
  1807.  
  1808. The default radix is base 16.
  1809.  
  1810. Example:
  1811.    BASE 16
  1812.     This example sets the current radix to base 16.
  1813.  
  1814.      144
  1815.  
  1816.                        CTRL-P
  1817.  
  1818. CTRL-P --- Toggle log session to printer
  1819.  
  1820. Syntax:
  1821.  
  1822.   CTRL-P
  1823.  
  1824. Comments:
  1825. When the CTRL key followed by the P key is pressed, all subsequent
  1826. information displayed in the command window is also sent to the printer.
  1827. To turn the log to printer mode off, type CTRL followed by P again.
  1828.  
  1829. When you are sending a lot of information to the printer using CTRL-P, you
  1830. may want to turn the PAUSE command OFF to allow information to scroll off
  1831. the window without pressing a key.
  1832.  
  1833.      145
  1834.  
  1835.              Print-Screen
  1836.  
  1837. Print-Screen - Print contents of screen
  1838.  
  1839. Syntax:
  1840.  
  1841.    Print-Screen
  1842.  
  1843. Comments:
  1844. Depressing the print-screen key does a screen dump to printer. All
  1845. information from the screen is sent the printer.
  1846.  
  1847. If you wish to print the memory map or help information is usually much
  1848. faster to use CTRL-P than Print-Screen. This is because Print-Screen
  1849. prints every character on the screen including borders.
  1850.  
  1851.      146 
  1852.  
  1853.                        PRN
  1854.  
  1855. PRN --- Set printer output port
  1856.  
  1857. Syntax:
  1858.  
  1859.   PRN [LPTx | COMx]
  1860.   x -- a decimal number between 1 and 4.
  1861.  
  1862. Comments:
  1863. The PRN command allows you to send output from the CTRL-P and Print-Screen
  1864. commands to a different printer port.
  1865.  
  1866. If no parameters are supplied, PRN displays the currently assigned printer
  1867. port. 
  1868.  
  1869. Example:
  1870.   PRN COM 1
  1871.    This command causes the CTRL-P and Print-Screen
  1872.    command output to go to the COM 1 port.
  1873.  
  1874.      147 
  1875.  
  1876. 5.9 Screen Control Commands
  1877.  
  1878. Commands:
  1879.  FLASH         -- Restore screen during P and T
  1880.  FLICK         -- Screen flicker reduction
  1881.  WATCHV        -- Set watch video mode
  1882.  RS            -- Restore program screen
  1883.  CLS           -- Clear window
  1884.  ALTSCR        -- Change to alternate screen
  1885.  WIN           -- Change size of Soft-ICE window
  1886.  
  1887.      148
  1888.  
  1889.                   FLASH
  1890.  
  1891. FLASH -- Restore screen during P and T
  1892.  
  1893. Syntax:
  1894.  
  1895.   FLASH [ON | OFF]
  1896.  
  1897. Comments:
  1898. The FLASH command lets you specify whether the screen will be restored
  1899. during any Trace and Program step commands. If you specify that the screen
  1900. is to be restored it is restored for the brief time period that the P or T
  1901. command is executing. This feature is needed to debug sections of code
  1902. that access video memory.
  1903.  
  1904. If the P command executes across a call or an interrupt, the screen will
  1905. always be restored, because the routine being called may write to the
  1906. screen.
  1907.  
  1908. If no parameter is specified, the current state of FLASH is displayed.
  1909.  
  1910. The default is FLASH mode OFF.
  1911.  
  1912. Example:
  1913.   FLASH ON
  1914.    This command turns on FLASH mode. The screen will
  1915.    be restored during any subsequent P or T commands.
  1916.  
  1917.                              
  1918.      149
  1919.  
  1920.            FLICK
  1921.  
  1922. FLICK -- Screen flicker reduction
  1923.  
  1924. Syntax:
  1925.  
  1926.    FLICK [ON | OFF]
  1927.  
  1928. Comments:
  1929. Certain types of video cards require waiting for horizontal or vertical
  1930. retrace before outputting characters. If the video writes are made
  1931. arbitrarily, flickering will appear while displaying characters. If
  1932. flickering occurs on your screen while using the Soft-ICE window, you
  1933. should turn FLICK on.
  1934.  
  1935.  
  1936. With some EGA cards, colors will not be restored properly when you exit
  1937. from Soft-ICE. This is a problem with virtualizing EGA video. The port 3DA
  1938. is a video port used for two purposes. The first is old CGA software
  1939. polling 3DA for hsync and vsync. This allows them to have flicker free
  1940. output on some old CGA controller cards. The second is that it is used to
  1941. reset a palette latch on EGA cards. Soft-ICE has an algorithm to avoid
  1942. having to constantly watch this port, which would slow down old programs
  1943. that think they are on a CGA. However, there can occasional be
  1944. circumstances where this algorithm does not work. If you are using Soft-
  1945. ICE on an EGA screen and you notice that the colors are not restored
  1946. correctly, then turn FLICK ON and Soft-ICE will watch the 3DA port, fixing
  1947. the problem.
  1948.  
  1949. When FLICK mode is ON, screen update will be slower.
  1950.  
  1951. If no parameter is specified, the current state of FLICK is displayed.
  1952.  
  1953. The default is FLICK mode OFF.
  1954.  
  1955.      150
  1956.  
  1957.  
  1958. Example:
  1959.   FLICK ON
  1960.   This command turns on FLICK mode. This causes
  1961.   Soft-ICE to wait for the horizontal or vertical retrace
  1962.   before outputting characters.
  1963.  
  1964.      151 
  1965.  
  1966.         WATCHV
  1967.  
  1968. WATCHV -- Set watch video mode
  1969.  
  1970. Syntax:
  1971.  
  1972.   WATCHV [ON | OFF]
  1973.  
  1974. Comments:
  1975. The WATCHV command allows you to specify how Soft-ICE should watch the
  1976. video ports. Normally, Soft-ICE only watches video ports after an INT 10
  1977. instruction has been executed that switches to a non-character video mode.
  1978. Some programs do not use INT 10 to switch modes. In these cases, if WATCHV
  1979. is OFF, Soft-ICE may have trouble saving and restoring the screen
  1980. properly. Turning WATCHV ON will cause Soft-ICE to watch the video ports
  1981. all the time.
  1982.  
  1983. Turn WATCHV ON if you notice that Soft-ICE is not handling your screen
  1984. properly, or if the cursor is not being restored properly. Turning WATCHV
  1985. ON may have a performance impact in certain video modes.
  1986.  
  1987. If no parameter is specified, the current state of WATCHV is displayed.
  1988.  
  1989. The default is WATCHV mode OFF.
  1990.  
  1991.  
  1992. Example:
  1993.    WATCHV ON
  1994.    This command turns on WATCHV mode. This causes
  1995.    Soft-ICE to watch additional video ports for the
  1996.    purpose of virtualization.
  1997.  
  1998.      152
  1999.  
  2000.                          RS
  2001.  
  2002. RS -- Restore program screen
  2003.  
  2004. Syntax:
  2005.  
  2006.     RS
  2007.  
  2008. Comments:
  2009. The RS command allows you to restore the program screen temporarily. The
  2010. Soft-ICE window disappears until any key is pressed.
  2011.  
  2012. This feature is useful when debugging graphic programs that update the
  2013. screen frequently. When Soft-ICE is brought up, it returns to text mode.
  2014. Using the RS command temporarily restores the graphics screen.
  2015.  
  2016. Example:
  2017.     RS
  2018.  
  2019.      153
  2020.  
  2021.             CLS
  2022.  
  2023. CLS -- Clear window
  2024.  
  2025. Syntax:
  2026.  
  2027.   CLS
  2028.  
  2029. Comments:
  2030. The CLS command clears the Soft-ICE window and moves the prompt and the
  2031. cursor to the upper left-hand corner the window.
  2032.  
  2033. Example:
  2034.   CLS
  2035.  
  2036.      154
  2037.  
  2038.                   ALTSCR
  2039.  
  2040. ALTSCR -- Change to alternate screen
  2041.  
  2042. Syntax:
  2043.  
  2044.   ALTSCR [ON | OFF]
  2045.  
  2046.  
  2047. Comments:
  2048. The ALTSCR command allows you to redirect the Soft-ICE output from your
  2049. default screen to the alternate screen. This feature is useful, for
  2050. instance, when you want to debug a graphics program without having to
  2051. switch between the Soft-ICE window and the graphics display.
  2052.  
  2053. ALTSCR requires the system to have two monitors attached. The alternate
  2054. monitor should be in a character mode, which is the default mode for
  2055. monitors.
  2056.  
  2057. The default is ALTSCR mode OFF.
  2058.  
  2059. Example:
  2060.    ALTSCR ON
  2061.    This command redirects screen output to the alternate
  2062.    monitor.
  2063.  
  2064.      155
  2065.  
  2066.                WIN
  2067.  
  2068. WIN -- Change size of Soft-ICE window
  2069.  
  2070. Syntax:
  2071.  
  2072.    WIN [N | W] [start-row length [start-column]]
  2073.    N -- When N is specified, the window will
  2074.                   be set to the narrow width: 46
  2075.                   characters.
  2076.  
  2077.    W -- When W is specified, the window will
  2078.                   be set to full screen width.
  2079.  
  2080.    start-row -- Number from 0 to 17 specifying row
  2081.                   where window display starts.
  2082.  
  2083.    length -- Number from 8 to 25 specifying how
  2084.                   many lines tall you want the window
  2085.                   to be.
  2086.  
  2087.    start-column-- Column position of the left side of
  2088.                   narrow window. The start-row and
  2089.                   start-column specify the upper left
  2090.                   hand corner of the narrow window.
  2091.                   The start-column is ignored if applied
  2092.                   to the wide window.
  2093.  
  2094. Comments:
  2095. The WIN command allows you to modify the width and height of the Soft-ICE
  2096. display window.
  2097.  
  2098. If no parameters are specified, this command toggles the window between
  2099. wide and narrow screen display modes.
  2100.  
  2101. If the WIN command is specified with only the N or the W parameter, the
  2102. window size will be changed to the requested width at the current height. 
  2103.  
  2104.      156 
  2105.  
  2106. If the number of lines plus the starting row number is larger than 25, the
  2107. window length goes to the bottom of the screen.
  2108.  
  2109. The default is WIN mode narrow.
  2110.  
  2111. Examples:
  2112.    WIN N 4 9 30
  2113.    This command causes the window display to start at
  2114.    row 4 and column 30, and to be 9 rows tall and 46
  2115.    characters wide.
  2116.    WIN
  2117.    This command toggles the window display width from
  2118.    its current state (either wide or narrow) to the opposite
  2119.    state.
  2120.  
  2121.    WIN W 10 8
  2122.    This command causes the window display to start at
  2123.    row 10, and to be 8 rows tall and go the width of the
  2124.    screen.
  2125.  
  2126.      157 
  2127.  
  2128. 5.10 Symbol and Source Line Commands
  2129.  
  2130.  Commands:
  2131.    SYM         -- Display/set symbol
  2132.    SYMLOC      -- Relocate symbol base
  2133.    SRC         -- Toggle between source, mixed and code
  2134.    FILE        -- Change/display current source
  2135.    SS          -- Search current source file for string
  2136.  
  2137.      158 
  2138.  
  2139.                          SYM
  2140.  
  2141. SYM -- Display/set symbol
  2142.  
  2143. Syntax:
  2144.  
  2145.    SYM [symbol-name [value]]
  2146.    symbol-name -- A valid symbol name. The symbol
  2147.                    name can end with an * (asterisk).
  2148.                    This allows searching if only the first
  2149.                    part of the symbol name is known.
  2150.                    The , (comma) character can be used
  2151.                    as a wild card character in place of
  2152.                    character in the symbol-name.
  2153.  
  2154.     value -- This is a word value that is used if you
  2155.                    want to set a symbol to a specific value.
  2156.  
  2157. Comments:
  2158. The SYM command allows displaying and setting of symbols. If SYM is
  2159. entered with no parameters all symbols are displayed. The value of each
  2160. symbol is displayed next to the symbol name.
  2161.  
  2162. If a symbol name is specified with no value then the symbol name and value
  2163. are displayed. If the symbol name was not found then nothing is displayed.
  2164.  
  2165. The SYM command is often useful for finding a symbol name when you can
  2166. only remember a portion of the name Two wild card methods are available
  2167. for locating symbols. If symbol-name ends with an *, then all symbols that
  2168. match the actual characters typed prior to the * will be displayed
  2169. regardless of their ending characters. If a , is used in place of a
  2170. specific character in symbol-name, that character is a wild card
  2171. character.
  2172.  
  2173. If value is specified, all symbols that match symbol-name are set to the 
  2174. value. All symbols have word values.
  2175.  
  2176.  
  2177.      159 
  2178.  
  2179. Examples:
  2180.    SYM FOO*
  2181.    All symbols that start with FOO are displayed.
  2182.    SYM FOO* 6000
  2183.    All symbols that start with FOO are given the value
  2184.    6000.
  2185.  
  2186.      160 
  2187.  
  2188.           SYMLOC
  2189.  
  2190. SYMLOC -- Relocate symbol base
  2191.  
  2192. Syntax:
  2193.  
  2194.    SYMLOC segment-address
  2195.  
  2196. Comments:
  2197. The SYMLOC command relocates the segment components of all symbols
  2198. relative to the specified segment address. This function is necessary when
  2199. debugging loadable device drivers or other programs that can not be loaded
  2200. directly with LDR.EXE.
  2201.  
  2202. When relocating for a loadable device driver, use the value of the base
  2203. address of the driver as found in the MAP command. When relocating for an
  2204. .EXE program, the value is 10H greater than that found as the base in the
  2205. MAP command. When relocating for a .COM program, use the base segment
  2206. address that is found in the MAP command.
  2207.  
  2208. The MAP command will display at least two entries for each program. The
  2209. first is typically the environment and the second is typically the
  2210. program. The base address of the program is the relocation value.
  2211.  
  2212. Example:
  2213.     SYMLOC 1244 + 10
  2214.     This will relocate all segments in the symbol table
  2215.     relative to 1244. The + 10 is used to relocate a TSR
  2216.     that was originally a .EXE file. If it is a .COM file the
  2217.     + 10 is not necessary.
  2218.  
  2219.      161
  2220.  
  2221.            SRC
  2222.  
  2223. SRC -- Toggle between source, mixed and code
  2224.  
  2225. Syntax:
  2226.  
  2227.     SRC [?]
  2228.  
  2229. Comments:
  2230. The SRC command toggles between source mode, mixed mode and code mode in
  2231. the code window.
  2232.  
  2233. If SRC ? is entered, the current state is displayed.
  2234.  
  2235. Example:
  2236.    SRC
  2237.    This command changes the current mode of the code
  2238.    window. If the mode was source, it becomes mixed.
  2239.    the mode was mixed, it becomes code. If the mode was
  2240.    code, it becomes source.
  2241.  
  2242. Default-Function Key: F3
  2243.  
  2244.      162
  2245.  
  2246.                            FILE
  2247.  
  2248. FILE -- Change/display current source file
  2249.  
  2250. Syntax:
  2251.  
  2252.    FILE {file-name]
  2253.  
  2254. Comments:
  2255. If a file-name is specified, that file becomes the current file and the
  2256. start of the file is displayed in the code window. If no name is
  2257. specified, the name of the current source file (if any) is displayed.
  2258.  
  2259. The FILE command is often useful when setting a break point on a line that
  2260. has no associated public symbol. Use file to bring the desired file into
  2261. the code window, use the SS command to locate the specific line, move the
  2262. cursor the specific line, then type BPX to set the break point.
  2263.  
  2264. Note:
  2265. Only source files that have been loaded into extended memory with LDR.EXE
  2266. are available with the FILE command.
  2267.  
  2268. Example:
  2269.    FILE MAIN.C
  2270.    If MAIN.C had been loaded with LDR.EXE, this
  2271.    command brings it up in the code window starting with
  2272.    line 1.
  2273.  
  2274.      163
  2275.  
  2276.                            SS
  2277.  
  2278. SS -- Search current source file for string
  2279.  
  2280. Syntax:
  2281.  
  2282.     SS [line-number] [' string']
  2283.     line-number -- a decimal number
  2284.  
  2285.     string -- a character string surrounded by quotes
  2286.                      The quotes can be either single quotes
  2287.                      or double quotes.
  2288.  
  2289. Comments:
  2290. The SS command searches the current source file for the specified
  2291. character string. If there is a match, the line that the string was
  2292. located in will be displayed as the top line in the code window.
  2293.  
  2294. The search starts at the specified line number. If no line number is
  2295. specified the search starts at the top line displayed in the code window.
  2296.  
  2297. If no parameters are specified, the search continues for the previously
  2298. specified string.
  2299.  
  2300. Note:
  2301. The code window must be visible and in source mode before using the SS
  2302. command.
  2303.  
  2304. Example:
  2305.     SS 1 'if (i = = 3)'
  2306.     The current source file is searched starting at line 1 for
  2307.     the string 'if (i = = 3)'. The line containing the next
  2308.     occurrence of the string becomes the top line displayed
  2309.     in the code window.
  2310.  
  2311.      164
  2312.  
  2313.  
  2314.