home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / asmutil / d86v322.zip / D04.DOC < prev    next >
Text File  |  1989-08-07  |  12KB  |  258 lines

  1. CHAPTER 4    D86 CONTROL KEYS
  2.  
  3. D86 has a set of functions invoked by single keys.  Keys which
  4. switch the display (for example, to show a help screen) can be
  5. pressed in any context, to be acted upon immediately.  Other
  6. keys, such as the single-stepping keys, can be invoked any time
  7. D86 is awaiting the beginning of an assembly language command.
  8.  
  9.  
  10. Display Control Keys
  11.  
  12. There are numerous keys that let you control the switchable
  13. window in the upper right corner of the screen.  The F10 and
  14. Alt-F10 keys let you toggle between windows, giving you a "tour"
  15. of what's available.  Various keys accessed by using the "Ctrl"
  16. key as a shift key let you move directly to the window of your
  17. choice.
  18.  
  19. The keys in this section are acted upon in any debugger context,
  20. whether you are in the main command mode or in the middle of one
  21. of the other modes (typing in a debugger command, an
  22. immediate-execute line, a patch-memory line, or a memory window
  23. specification):
  24.  
  25. ALT-F10   Toggles you between Help and Non-Help modes.  If the
  26.           window is showing you a help page, it will switch to
  27.           the last Non-Help page that was displayed.  If not, the
  28.           window switches to the last Help screen displayed for
  29.           the current context.
  30.  
  31.           (HELP key on Wang and DEC, F11 key on TI-PC, CTRL-PF5
  32.           key on Sanyo)
  33.  
  34. F10       In non-help mode, toggles you between the available
  35.           non-help windows: the sign-on/second disassembly
  36.           window, the status window, the memory display window,
  37.           and, if you have a floating-point chip, the
  38.           floating-point display window.
  39.  
  40.           In help mode, toggles you between the help windows
  41.           available in the current context.
  42.  
  43.           (Keypad 0 on the DEC, Print Screen on the Z-100)
  44.  
  45. Ctrl-I    (or TAB) takes you from any other window directly to
  46.           the sign-on/second disassembly window.  This window
  47.           contains the D86 sign-on message until the first time
  48.           that the Instruction Pointer leaves the first
  49.           disassembly page.  From that point on, the sign-on
  50.           message is no longer available, and you get a second
  51.           disassembly page instead.
  52.  
  53. Ctrl-S    Takes you from any other window directly to the
  54.           debugger status window.
  55.  
  56. Ctrl-F    Takes you from any other window directly to the
  57.           floating point display window, if your machine has a
  58.           floating point chip in operation.  If not, this key is
  59.           ignored.
  60.                                                               4-2
  61.  
  62. Ctrl-N    If you have a memory display window in sight, this key
  63.           advances to the Next window full of memory.
  64.  
  65.           If you do not have a memory display window, but do have
  66.           at least one memory line specification, this key takes
  67.           you from any other window to the memory display window,
  68.           continuing from the end of the last line display.
  69.  
  70.           If you have no memory line specifications set up, this
  71.           key is ignored.
  72.  
  73. Ctrl-P    If you have a memory display window in sight, this key
  74.           retreats the pointer to memory displayed, by the amount
  75.           displayed in the window.  If all the memory formats
  76.           specified generate a fixed-size display (such as the
  77.           B,W,T formats), then this will effect a "Previous page"
  78.           function.  If there are formats producing a
  79.           variable-size display (such as the N,D,C,S,L formats),
  80.           then the retreat will be a probably imperfect
  81.           approximation to an appropriate "Previous page" amount.
  82.  
  83.           If you do not have a memory display window, this key
  84.           will go to one, just like the Ctrl-N key.
  85.  
  86. Ctrl-Q    If you are not displaying a help window, this key takes
  87.           you to the last help window that was displayed for the
  88.           current context.  If you are already displaying a help
  89.           window, this key toggles through all the help windows
  90.           available for this context.
  91.  
  92.  
  93. Instruction Pointer Positioning Control Keys
  94.  
  95. All the remaining keys in this chapter can be invoked any time
  96. the debugger is in its main command mode, awaiting the first key
  97. of a debugger command or immediate assembly line.  They change
  98. the value of the Instruction Pointer (IP register), and thus they
  99. change the disassembly display.
  100.  
  101. None of the control keys in this section cause any program code
  102. to be executed, other than the equivalent of a JMP instruction,
  103. to the place that the disassembly cursor winds up.
  104.  
  105. WARNING: On some debuggers, you can change the location of what
  106. is being disassembled without changing the IP register value.
  107. I've decided on a "what you see is what you get" philosophy,
  108. since you may well be moving the IP cursor to effect a jump in
  109. the program (for example, you might use the Down-Arrow key to
  110. experimentally skip over the execution of one or more
  111. instructions in the program).  If your intention was just to look
  112. around the program before continuing execution at the place you
  113. left off, you may use the HOME key to return to the place where
  114. execution last halted.
  115.  
  116. Down-Arrow   Jump to the instruction following the current one.
  117.              Visually, the disassembly cursor moves down by one
  118.              instruction line.
  119.                                                               4-3
  120.  
  121. Up-Arrow     Jump to the instruction preceding the current one.
  122.              Visually, the disassembly cursor moves up by one
  123.              instruction line.  NOTE that the implementation of
  124.              this function is a little tricky, since it's
  125.              impossible to reliably disassemble backwards.  What
  126.              D86 does is retreat a fixed, fair-sized distance,
  127.              disassemble forward until the current instruction is
  128.              reached, and take the instruction disassembled just
  129.              before the current one.  If there is non-instruction
  130.              code in memory shortly before the current position,
  131.              the synchronization may fail, and this instruction
  132.              may put you in the middle of a previous instruction
  133.              instead of the beginning.  If this happens, you may
  134.              adjust by using the Ctrl-D or Ctrl-U keys.
  135.  
  136. Ctrl-D       This key is identical to the Down-Arrow key, except
  137.              the jump forward is just one byte, instead of a full
  138.              (usually multibyte) instruction.  (IP is
  139.              incremented.)  You use this key when you think
  140.              you've landed in the middle, rather than the start,
  141.              of an instruction.
  142.  
  143. Ctrl-U       This key decrements IP, moving the cursor "Up" by
  144.              one byte's worth.  Like Ctrl-D, it is used to
  145.              manually synchronize disassembly.
  146.  
  147. Pg Dn        Jump to the next disassembly page, at the memory
  148.              location immediately following this page.  Repeated
  149.              pressing of this key allows you to scan program code
  150.              quickly.
  151.  
  152.              (Alt-Down-Arrow on the TI-PC, Ctrl-C on the Victor,
  153.              Next Screen on the DEC, F12 on the Z-100)
  154.  
  155. Pg Up        Jump to the previous disassembly page, ending with
  156.              the instruction just before the top instruction on
  157.              the current page.  NOTE the warning given with the
  158.              Up-Arrow description, about possible synchronization
  159.              problems, applies here as well.
  160.  
  161.              (Alt-Up-Arrow on the TI-PC, Ctrl-R on the Victor,
  162.              Prev Screen on the DEC, F11 on the Z-100)
  163.  
  164. Home         If you have moved the IP cursor since the last
  165.              program instruction executed, then this key returns
  166.              IP to that spot.  If you are already at that spot,
  167.              this key returns you to the program's starting
  168.              location.  For COM files, this is always location
  169.              0100 in the original code segment.  For EXE files,
  170.              this location was derived from the EXE header
  171.              record.  Note that repeated pressing of HOME will
  172.              cause IP to alternate between the two locations, so
  173.              you can't mess yourself up by pressing the key one
  174.              too many times-- just press it again.
  175.  
  176.              (Ctrl-K on the Victor, Find on the DEC)
  177.                                                               4-4
  178.  
  179. Ctrl-E       Jump to the End of the program, as determined when
  180.              it was loaded, and possibly advanced if the program
  181.              was patched from the end.
  182.  
  183.  
  184.  
  185. Program Execution Control Keys
  186.  
  187. Ctrl-X       Single step the current instruction.  If the
  188.              instruction is a call, go into the procedure to
  189.              single step it.  If you want the entire procedure
  190.              executed on a single keystroke, use the F2 key.
  191.  
  192. F1           Single-step the current instruction just like the
  193.              Ctrl-X key, except that INT instructions are
  194.              executed all at once, not stepped into.  This
  195.              exception was added with D86 V3.21, because stepping
  196.              into DOS or the BIOS is a hazardous operation,
  197.              likely to crash the computer.
  198.  
  199.              (Keypad 1 on the DEC)
  200.  
  201. F2           Procedure step: start program, trapping at the
  202.              instruction following the current one.  This is used
  203.              for executing a procedure call all at once; for
  204.              breaking out of a loop; and for executing a repeated
  205.              string operation all at once.
  206.  
  207. F4           Start the program, setting a trap at the destination
  208.              of the conditional jump instruction currently
  209.              pointed to.  If we are not pointing to a conditional
  210.              jump, then we single step.
  211.  
  212. F6           Start the program, setting a trap at the address on
  213.              top of the stack (hopefully a procedure return
  214.              address).
  215.  
  216. F9           Go until here: Start the program from the point at
  217.              which it last stopped, setting a trap at the current
  218.              CS:IP location.  If you didn't move the IP cursor
  219.              since the program stopped, this will simply tell the
  220.              program to go until the next time this same point is
  221.              reached.  If you did change IP, (for example, if you
  222.              paged forward to find an interesting section of
  223.              code), this command saves you from having to go back
  224.              and single-step up to this point.
  225.  
  226.  
  227.  
  228. Special Action Control Keys
  229.  
  230. F3           Repeat the last typed-in assembly language or
  231.              debugger command
  232.  
  233. F7           Enter the Patch Memory mode, described in Chapter 3.
  234.                                                               4-5
  235.  
  236. Shift-F7     Mark the current CS:IP memory location, for use by a
  237.              following F debugger line command.  F can either
  238.              return to this location, or find memory bytes that
  239.              match the ones at this location.
  240.  
  241.              (Ctrl-7 on the Sanyo, Select on the DEC)
  242.  
  243. Alt-F9       If you have a Color video board, your debugger
  244.              display may become corrupted by the program's
  245.              console output.  If it does, press Alt-F9 to
  246.              eliminate the corruption.  This key exists only
  247.              temporarily; on later versions of D86, the
  248.              corruption will be corrected automatically.
  249.  
  250.              (Ctrl-Shift-PF4 on the Sanyo)
  251.  
  252. Ctrl-T       Reset the debugger's internal Top-of-Stack pointer
  253.              to the current SP value.  This will cause the
  254.              current stack display to become empty, so that
  255.              subsequently pushed values will appear by themselves
  256.              on the stack display.
  257.  
  258.