home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #3.1 / RBBSIABOX31.cdr / dosc / dos2.txt < prev    next >
Encoding:
Text File  |  1990-09-29  |  6.4 KB  |  137 lines

  1.      The following is a summary of some undocumented DOS 2.0 functions
  2. which can be invoked through interrupt 21H. The information provided
  3. herein have inaccuracies, so use it at our own risk! It is correct to
  4. the best of my knowledge. See the section in your DOS 2.0 manual entitled
  5. "Invoking DOS Functions" for further information. The function number
  6. provided below for each operation is to be placed in the AH register as
  7. described in the DOS manual. All numbers shown are in hex.
  8.  
  9. FUNCTION                DESCRIPTION
  10.  
  11.    37           This interrupt is used to change incompatible
  12.                 configuration parameters to allow for switch
  13.                 indicators and whether hardware devices are
  14.                 available at every level of the tree directory.
  15.  
  16.                 Usage:  MOV     AH, 37
  17.                         MOV     AL, func                ; function code
  18.                         MOV     DL, data
  19.                         INT     21H
  20.                 ; read function data is returned in DL
  21.  
  22.                 Function code for AL:
  23.                 0 - Return the DOS switch character in DL.
  24.                     Many systems might return "-".
  25.                 1 - Make the character in DL the switch character.
  26.                 2 - Read the device availability byte into DL. A
  27.                     0 means devices that devices must be accessed
  28.                     in file I/O calls by /DEV/device. A non-zero
  29.                     value means that devices are accessible at
  30.                     every level of the directory tree (e.g., PRN
  31.                     is the printer and not a file PRN).
  32.                 3 - Set the device availability byte to the
  33.                     contents of DL.
  34.  
  35.                 Possible errors returned in AL:
  36.                 FF - Illegal function code specified in AL.
  37.  
  38.  
  39.    1F (?)       Retrieve the pointer to the default drive parameter block.
  40.  
  41.                 Usage:  MOV     AH, 1F
  42.                         INT     21H
  43.                 ; address of drive parameter block is returned in DS:BX
  44.  
  45.  
  46.    32 (?)       Retrieve the pointer to the drive parameter block
  47.                 for the drive number in DL, where 0 = default drive,
  48.                 1 = drive A:, 2 = drive B:, etc.).
  49.  
  50.                 Usage:  MOV     AH, 32h
  51.                         MOV     DL, drivenum
  52.                         INT     21H
  53.                 ; address of drive parameter block is returned in DS:BX
  54.                 ; AL contains FF if the drive # in DL is invalid.
  55.  
  56.    F8 (?)       Set OEM handler for INT 21H calls from F9 through FF
  57.                 to DS:DX. To reset these calls, pass DS and DX with FFFF.
  58.                 DOS is set up to allow ONE handler for all 7 of these
  59.                 calls. Any call to these handlers will result in the
  60.                 carry bit being set and AX will contain 1 if they are
  61.                 not initialized. The handling routine is passed all
  62.                 registers just as the user set them. The OEM handler
  63.                 routine should be exited through an IRET.
  64.  
  65.                 Usage:  LDS     DX, handler_addr
  66.                         MOV     AH, F8h
  67.                         INT     21H
  68.  
  69.  
  70.    4B           Load and possibly execute a program (EXEC). This call
  71.                 is PARTIALLY documented in the IBM DOS 2.0 manual, but
  72.                 several function call values (for register AL) are
  73.                 omitted. They are:
  74.  
  75.                         1 - Create the program segment prefix and
  76.                             load the program, but do not begin
  77.                             execution. The CS:IP and SS:SP of the
  78.                             program are placed in the area provided
  79.                             by the user.
  80.  
  81.                                 +-------------------------------+
  82.                                 | Word segment addr of environ. |
  83.                                 +-------------------------------+
  84.                                 | Dword ptr to cmd line at 80h  |
  85.                                 +-------------------------------+
  86.                                 | Dword ptr to default FCB to   |
  87.                                 | be passed at 5Ch.             |
  88.                                 +-------------------------------+
  89.                                 | Dword ptr to default FCD to   |
  90.                                 | be passed at 6Ch.             |
  91.                                 +-------------------------------+
  92.                                 | Dword value of SS:SP returned |
  93.                                 +-------------------------------+
  94.                                 | Dword value of CS:IP returned |
  95.                                 +-------------------------------+
  96.  
  97.                         2 - This function still remains a mystery.
  98.  
  99.  
  100.    4E           Find first matching file (FIND FIRST). This function
  101.                 is PARTIALLY documented in the IBM DOS 2.0 manual.
  102.                 The description of what is returned in the DTA where
  103.                 the first 21 bytes are "reserved for DOS use on
  104.                 subsequent find next calls" contain the following
  105.                 in this order:
  106.  
  107.                         1 byte  - attribute byte of search
  108.                         1 byte  - drive used in search
  109.                         11 bytes- The search name used
  110.                         2 bytes - Word value of last entry
  111.                         4 bytes - Dword pointer to this DTA
  112.                         2 bytes - Word directory start
  113.                         -----------------------------------
  114.                         { The documented bytes follow here
  115.                           such as attribute found, file's
  116.                           time, date, size, and name found. }
  117.  
  118.  
  119.    50           Define the current DTA (?) - this is all I know...
  120.  
  121.    51           Retrieve current DTA (?)
  122.  
  123.    52           Retrieve "IN_VARS" (?)
  124.  
  125.    53           Define something about a DTA (?)
  126.  
  127.    55           Duplicate a DTA (?)
  128.  
  129.  
  130.      If anyone discovers ANYTHING useful and/or incorrect about this
  131. information, then PLEASE contact this bulletin board and leave a
  132. message for everyone. Let's figure out this DOS 2.00 (and 2.10)!
  133.      This document was made available through:
  134.  
  135.         DALTEX  BBS     (214) 991-7934
  136.         TECHNET BBS     (617) 791-1957
  137.