home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / tools / stepdos / stepdos.doc < prev    next >
Text File  |  1988-06-23  |  12KB  |  262 lines

  1.  
  2.                            -=:  STEPDOS  :=-
  3.  
  4.  
  5.                                 6/22/88
  6.                               Version 3.0
  7.            (C) Copyright 1988  Mike Parker  All Rights Reserved
  8.  
  9.        ============================================================
  10.                            Program Description
  11.        ============================================================
  12.  
  13.   STEPDOS is a program written in assembly language that intercepts DOS
  14.   interrupt 21H then executes the target program specified on the command
  15.   line as a subprocess. Each time the target program does an 'INT 21H' call,
  16.   STEPDOS takes over. A 'pop-up window' is displayed with the values of
  17.   all registers and a description of what the DOS call is about to do.
  18.  
  19.   STEPDOS detects whether a CGA or Monochrome adapter is active and will
  20.   determine which video page is currently active each time it puts up the
  21.   information window.
  22.  
  23.        ============================================================
  24.                             Program Execution
  25.        ============================================================
  26.  
  27.   There is a program included in the ARC file for STEPDOS called TEST.COM
  28.   that will give a short demonstration of STEPDOS's capabilities.
  29.  
  30.   TEST.COM does these functions.
  31.     1) Outputs a string using calls to DOS function code 02 (Display Character).
  32.        The string that is output is 'This is a test'.
  33.     2) Checks keyboard input status.
  34.     3) Does an OPEN of the "NUL" device using an FCB.
  35.     4) Terminates itself.
  36.  
  37.  
  38.   For this demonstration first clear the screen by typing CLS followed by
  39.   pressing the ENTER key.
  40.  
  41.   Make sure TEST.COM is in your current directory and type:
  42.   STEPDOS TEST
  43.   followed by pressing the ENTER key.
  44.  
  45.  
  46.   A window will appear:
  47.  
  48.    +------------------------- STEPDOS Version 3.0 -------------------------+
  49.    |                                                                       |
  50.    |  AX   BX   CX   DX   DI   SI   BP   SP   DS   ES   SS   CS   IP   FL  |
  51.    | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- |
  52.    | 02xx xxxx xxxx xx54 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx |
  53.    |                                                                       |
  54.    | Output Character  Hex 54  ASCII T                                     |
  55.    |                                                                       |
  56.    |  Skip Current Func  Return Code  ESC - Non Stop  xxxx - Move Window   |
  57.    |  Display Memory     FCB Display  Watch Toggle                         |
  58.    +-----------------------------------------------------------------------+
  59.  
  60.   The xxxx's under the register names above just mean that what you actually
  61.   see could be anything, only AH and DL are important right here.
  62.  
  63.  
  64.   Move Window
  65.   ===========
  66.   To move the window press any of the cursor positioning keys.
  67.  
  68.  
  69.   Executing DOS Call
  70.   ==================
  71.   Press the ENTER or SPACE key to execute the call.
  72.  
  73.  
  74.   The character 'T' will be displayed at the current cursor position and the
  75.   STEPDOS window will come up again with:
  76.  
  77.  
  78.    +------------------------- STEPDOS Version 3.0 -------------------------+
  79.    |                                                                       |
  80.    |  AX   BX   CX   DX   DI   SI   BP   SP   DS   ES   SS   CS   IP   FL  |
  81.    | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- |
  82.    | 02xx xxxx xxxx xx68 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx |
  83.    |                                                                       |
  84.    | Output Character  Hex 68  ASCII h                                     |
  85.    |                                                                       |
  86.    |  Skip Current Func  Return Code  ESC - Non Stop  xxxx - Move Window   |
  87.    |  Display Memory     FCB Display  Watch Toggle                         |
  88.    +-----------------------------------------------------------------------+
  89.  
  90.   Press the ENTER key and the 'h' character will appear after the 'T'.
  91.  
  92.  
  93.   Skip Current Func
  94.   =================
  95.   To keep you from having to press a key to display each character of a
  96.   potentially long text string use the 'Skip Current Func' option.
  97.   This tells STEPDOS to run nonstop as long as the current function (in this
  98.   case 02h) is being repeated by the target program.
  99.   When a function code other than 02h is executed, STEPDOS will resume display.
  100.  
  101.   Now press 'S' to finish displaying the test string. The following will appear:
  102.  
  103.    +------------------------- STEPDOS Version 3.0 -------------------------+
  104.    |                                                                       |
  105.    |  AX   BX   CX   DX   DI   SI   BP   SP   DS   ES   SS   CS   IP   FL  |
  106.    | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- |
  107.    | 0Bxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx |
  108.    |                                                                       |
  109.    | Check Standard Input Status                                           |
  110.    |                                                                       |
  111.    |  Skip Current Func  Return Code  ESC - Non Stop  xxxx - Move Window   |
  112.    |  Display Memory     FCB Display  Watch Toggle                         |
  113.    +-----------------------------------------------------------------------+
  114.  
  115.  
  116.   Return Code
  117.   ===========
  118.   To see how the 'Return Code' option works press the 'R' key and you
  119.   will see:
  120.  
  121.    +------------------------- STEPDOS Version 3.0 -------------------------+
  122.    |                                                                       |
  123.    |  AX   BX   CX   DX   DI   SI   BP   SP   DS   ES   SS   CS   IP   FL  |
  124.    | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- |
  125.    | 0B00 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx |
  126.    |                                                                       |
  127.    | Return Code = 0B00H    Carry Flag = 0   Zero Flag = 1                 |
  128.    |                                                                       |
  129.    |  Display Memory     FCB Display   ESC - Non Stop  xxxx - Move Window  |
  130.    |                                                                       |
  131.    +-----------------------------------------------------------------------+
  132.  
  133.   This is the result immediately after the INT 21h instruction is executed.
  134.  
  135.  
  136.   Press the ENTER key to see:
  137.  
  138.    +------------------------- STEPDOS Version 3.0 -------------------------+
  139.    |                                                                       |
  140.    |  AX   BX   CX   DX   DI   SI   BP   SP   DS   ES   SS   CS   IP   FL  |
  141.    | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- |
  142.    | 0Fxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx |
  143.    |                                                                       |
  144.    | Open File Using FCB at xxxx:xxxxH                                     |
  145.    |                                                                       |
  146.    |  Skip Current Func  Return Code  ESC - Non Stop  xxxx - Move Window   |
  147.    |  Display Memory     FCB Display  Watch Toggle                         |
  148.    +-----------------------------------------------------------------------+
  149.  
  150.  
  151.   FCB Display
  152.   ===========
  153.   To see a formatted display of the File Control Block before the OPEN press
  154.   the 'F' key. The following window will appear:
  155.  
  156.    +------------------------------+
  157.    |         FCB Contents         |
  158.    |                              |
  159.    | Extension Active = No        |
  160.    |                              |
  161.    | Drive            = Default   |
  162.    | Filename         = NUL       |
  163.    | Extension        =           |
  164.    | Current Block #  = 0000H     |
  165.    | Record Size      = 0000H     |
  166.    | File Size        = 00000000H |
  167.    | File Date        = 00/00/80  |
  168.    | Driver Seg Addr  = 0000H     |
  169.    | Current Record # = 00H       |
  170.    | Random Record #  = 00000000H |
  171.    |                              |
  172.    |    Press Any Key to Exit     |
  173.    +------------------------------+
  174.  
  175.   Press any key to remove the FCB window then press the 'R' key to execute
  176.   the OPEN and display the result.
  177.  
  178.   After the OPEN is executed, the FCB can be viewed again and some of the
  179.   values will have been filled in. One "undocumented" field in the FCB is
  180.   the Driver Segment Address. After the OPEN this will contain the segment
  181.   address of the device driver for the NUL device.
  182.  
  183.   Press the ENTER key to exit the result window and go to the 'Terminate
  184.   Process' function call.
  185.  
  186.  
  187.   Display Memory
  188.   ==============
  189.   Press the 'D' key to display memory. Another window will pop up and you
  190.   will be prompted for a starting address. Enter the segment and address
  191.   separated by a colon (Seg:Addr) then press the ENTER key. Use the cursor
  192.   positioning keys to scroll around. Press ESCAPE to remove the memory
  193.   display window.
  194.  
  195.  
  196.  
  197.   Watch Toggle
  198.   ============
  199.   If you would like to monitor an area of memory each time an INT 21h is
  200.   executed press the 'W' key. Sixteen bytes starting at the last address
  201.   selected from the 'Display Memory' window will be displayed above the
  202.   register names.
  203.  
  204.    +------------------------- STEPDOS Version 3.0 -------------------------+
  205.    |        0000:0000 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F      |
  206.    |  AX   BX   CX   DX   DI   SI   BP   SP   DS   ES   SS   CS   IP   FL  |
  207.    | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- |
  208.    | 4C00 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx |
  209.    |                                                                       |
  210.    | Terminate Process With Return Code 00H                                |
  211.    |                                                                       |
  212.    |  Skip Current Func  Return Code  ESC - Non Stop  xxxx - Move Window   |
  213.    |  Display Memory     FCB Display  Watch Toggle                         |
  214.    +-----------------------------------------------------------------------+
  215.  
  216.  
  217.   Press the ENTER key and STEPDOS will end, returning you to the DOS prompt.
  218.  
  219.  
  220.  
  221.   ESC Key
  222.   =======
  223.   Pressing the ESCAPE key when in the STEPDOS window causes your target
  224.   program to run full speed to completion without STEPDOS popping up
  225.   its window again.
  226.  
  227.  
  228.  
  229.        ============================================================
  230.                              Program Changes
  231.        ============================================================
  232.  
  233.   1) Previous versions did not handle extended FCB properly.
  234.  
  235.   2) Added 'Watch' of 16 bytes to main window.
  236.  
  237.   3) Filled in 'undocumented functions' for DOS versions later than 3.00.
  238.  
  239.   4) Made monochrome display more readable.
  240.  
  241.  
  242.  
  243.   STEPDOS was written to help familiarize myself with the capabilities of all
  244.   of the DOS functions. I have used it to step through COMMAND.COM to see how
  245.   it works as well as some compilers, editors and assemblers. I have also
  246.   found it to be useful when you get one of those programs that says something
  247.   like 'File Not Found' the first time you run it but doesn't tell you what it
  248.   was looking for. You can run STEPDOS and it will tell you the filename that
  249.   the program wants.
  250.  
  251.  
  252.   If you find STEPDOS useful please send $10 (as well as any comments or
  253.   suggestions for improvement) to:
  254.  
  255.  
  256.                               Mike Parker
  257.                          2374 Meadowpark Court
  258.                        Maryland Heights, MO 63043
  259.  
  260.  
  261.  
  262.