home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / DIVERSEN / DOS32V3B / API.DOC next >
Text File  |  1995-03-12  |  25KB  |  822 lines

  1.  
  2.                              DOS32  Version  3.0
  3.  
  4.                     Applications Program Interface (API)
  5.                          
  6.                              10th March 1995
  7.  
  8.             Copyright (C) 1994  Adam Seychell,  All Rights Reserved.
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.      This document contains detailed information of the DOS32 API with each
  16. function obeying the following rules.
  17.  
  18.  1) All services are invoked from software interrupts 31h or 21h.
  19.  2) All parameters are passed through registers.
  20.  3) All services will preserve registers which are not returned with any      
  21.   value. 
  22.  4) Each function listed here has the minimum DOS32 version number needed on  
  23.   the right hand side of it's heading.
  24.  5) Never call a service in a protected mode interrupt handler
  25.     unless otherwise said it is safe to do so.
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.                  The Interrupt 31h services.
  33.  
  34. The following list of services are called from a INT 31h with AX containing
  35. the function number. 
  36.  
  37.  
  38.  
  39.  
  40.  
  41.                  GET DOS32 VERSION AND SELECTOR VALUES                  V3.0+
  42.  
  43.   IN:     AX = EE00h
  44.  
  45.  OUT:     AL = minor version  ( BCD )     currently 00
  46.           AH = major version  ( BCD )        "      03
  47.           DL = system type    1 = raw DOS
  48.                               2 = XMS
  49.                               4 = VCPI
  50.                               8 = DPMI
  51.           BX = Selector of 4GB data segment with zero base address.
  52.  
  53.   Notes:
  54.         o This function may be called in a protected mode interrupt handler.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.                     GET DOS32 ADDRESS INFORMATION                       V3.0+
  67.  
  68.  IN:    AX = EE02h
  69.  
  70.  OUT:   EBX = 32bit linear address of the program segment
  71.         EDX = Total size in bytes of the programs .EXE file after linking.
  72.         ESI = Offset address of PSP ( Program Segment Prefix )
  73.         EDI = Offset address of Program Environment
  74.         ECX = Offset address of the programs .EXE file name and path
  75.                     ( in ASCIZ format, i.e. terminates with a zero )
  76.  
  77.   Notes:
  78.   o   All offset addresses returned are relative to the main program
  79.       segment.
  80.   o   The .EXE file size is generally used for loading extra data
  81.       appended to the original application's .EXE file.
  82.   o   The .EXE file name pointed by ECX is actually the file name contained  
  83.       in the last string of the Environment segment pointed to by EDI.
  84.   o   The PSP address points to the original PSP set up by DOS. Thus pointers
  85.       stored in here still contain real mode (segment:offset) values.
  86.       Also this PSP address may not be the same address returned by DOSs
  87.       Int 21h AH=62h (Get PSP) since DOS32 may of been loaded by a parent
  88.       stub program.
  89.   o   This function may be called in a protected mode interrupt handler.
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.    GET A REAL MODE CALL BACK ADDRESS WITH IRET OR RETF STACK FRAME      V3.0+
  101.  
  102.      This service will return a real mode address which when called (in real
  103. mode) will in turn call a protected mode procedure. The real mode address may
  104. either be called with a REFF or IRET stack frame, i.e far CALL or an
  105. interrupt.
  106.  
  107.  
  108.   Expects:     AX = EE20h     ( for an RETF frame )
  109.                AX = EE21h     ( for an IRET frame )
  110.                ESI -> Offset address of the protected mode procedure to be
  111.                       invoked when the real mode address is called.
  112.                       The procedure must exit with a FAR return.
  113.  
  114.  
  115.   Returns:
  116.                If function was successful:
  117.                Carry flag is clear.
  118.                CX:DX = The real mode far pointer ( SEG:OFFSET ) to
  119.                      call the protected mode procedure.
  120.  
  121.                If function was not successful:
  122.                Carry flag is set.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131. Notes:
  132.     o   This function will fail if it's called more than 30 times.
  133.     o   The protected mode procedure must exit with a FAR return instruction.
  134.     o   The procedure is called undefined selectors in all segment register 
  135.         ( ES,DS,FS,GS & SS ) and must preserve any segment registers it       
  136.         modifies.
  137.     o   EAX, EBX, ECX, EDX, ESI, EDI, EBP registers and flags will be
  138.         preserved across the mode switch.
  139.     o   This function can be used to hook a Real Mode interrupt by setting    
  140.         the real mode interrupt vector to point to the real mode address 
  141.         (CX:DX) returned by this function. See examples on how this may be    
  142.         done.
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.                       TERMINATE AND STAY RESIDENT                       v3.0+
  154.  
  155.    This service will terminate the application to DOS but leaving it
  156.    resident in memory.
  157.  
  158.  IN:   AX  = EE30h
  159.  
  160.  OUT:  Never returns
  161.  
  162.  Notes:
  163.    o   All memory allocated from functions AX=0EE42h ( memory block ) and
  164.        AX=EE41h ( DMA buffer ) will not be freed and stay allocated.
  165.    o   This service may come in handy. Now....  what could you write with a
  166.        multi megabyte TSR ??
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.              UNDO PREVIOUS MEMORY ALLOCATION or DMA BUFFER              v3.0+
  197.  
  198.         This function will free the previously allocated memory block
  199. ( function AX =EE41h ) or DMA buffer ( function AX=EE42h ). If this
  200. function is called multiple times then memory will be deallocated in
  201. reverse order to when allocated. For example, if a memory block was
  202. allocated followed by a DMA buffer then at first time this function
  203. is called the DMA buffer would be freed, a second call to this function
  204. will free the memory block, a third call will return an error ( Carry set )
  205. because at this point no memory is being allocated.
  206.  
  207.  IN:  AX = EE40h
  208.  
  209.  OUT:  If function successful carry flag is cleared
  210.        If unsuccessful the carry flag is set
  211.  
  212.  Notes:
  213.     o   This function will fail if there is no memory allocated.
  214.     o   All memory will automatically be freed when then application
  215.         terminates.
  216.  
  217.  
  218.  
  219.  
  220.  
  221.               16KB BLOCK  ALLOCATION  FOR  DMA  CONTROLLER              V3.0+
  222.  
  223.        This function allocates a DMA buffer allowing the application
  224.        to do DMA transfers of up to 16KB at a time.
  225.  
  226.   Expects:     AX = EE41h
  227.  
  228.   Returns:
  229.                If function was successful:
  230.                Carry flag is clear.
  231.                EBX = Physical address of a contiguous 16KB memory block
  232.                      that dose not cross a 64KB boundary and has a
  233.                      physical address in the lower 16MB.
  234.                EDX = Near pointer to the base address of the block
  235.                      relative to the main program segment.
  236.  
  237.                If function was not successful:
  238.                Carry flag is set.
  239.  
  240.  
  241. NOTES: o  The 16Kb block will not cross a physical 64KB boundary and will
  242.           have a base address aligned on a 4 byte boundary. This is just
  243.           what DMA needs!.
  244.        o  If the carry flag is set then there was not enough memory to
  245.           allocate the DMA block otherwise the carry flag is cleared.
  246.        o  If the application needs to do use more than one DMA channel at
  247.           the same time ( e.g reading floppy disk at the same time as
  248.           sending music to a sound card ) then a buffer should be allocated
  249.           for each channel used.
  250.        o  If all the memory was allocated by the Allocate Memory service
  251.           ( AX=0EE42h ) then this function will fail. Your application
  252.           should allocate it's DMA buffers before is tries to allocate large
  253.           blocks with the AX=0EE42h function.
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.        o  If you need to send large amounts of memory via DMA to a device
  262.           then it will have to be done in 16KB blocks. I know this sounds
  263.           very inefficient but I done tests and found that I could not
  264.           even measure the speed increase between 1Kb blocks to 128Kb blocks.
  265.           Only a noticeable slow down occurred when transferring with blocks
  266.           of 100 bytes or less. In fact the time it takes to program the DMA
  267.           controller and move a 16KB block to the buffer ( using REP MOVSD )
  268.           is under %1 of the DMA transfer time. In other words, it will be
  269.           less than %1 slower using a buffer as opposed to transferring DMA
  270.           directly to/from the data area.
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.                        ALLOCATE A MEMORY BLOCK                   V3.0+
  278.  
  279.         The entire application code,data and stack is initially contained in
  280. one large memory block. This service here is used for allocating extra
  281. memory blocks for the application.
  282.  
  283.  
  284.  IN:  AX = EE42h
  285.       EDX = Size of the memory block requested to allocate in bytes.
  286.  
  287.  OUT:
  288.       EAX = The actual allocated size of the memory block in bytes
  289.       EDX = Near pointer to the base address of the block relative
  290.             to the main program segment.
  291.  
  292.       If the returned size was less than the requested size then the
  293.       Carry flag is set otherwise the carry flag is cleared.
  294.  
  295.  Notes:
  296.    o  The value expected in EDX will be rounded off to the next 4KB
  297.       boundary.  Example, allocating 51001h bytes will actually allocate
  298.        52000h bytes.
  299.    o  Never call this function in a interrupt handler or after using the 
  300.       terminated and stay resident function ( AX=EE30h ).
  301.    o  If EAX is returned with zero then no memory was allocated and
  302.       contents of EDX are undefined.
  303.    o  The function will fail if the requested size is zero.
  304.    o  If your system happens to have 4Gb of RAM installed then
  305.       only about 4032Mb of it can ever be allocated (sorry for those people:)
  306.    o  No more than 64 allocations can be made.
  307.    o  When not running under a DPMI server ( i.e  Raw,XMS or VCPI ) then
  308.       extended memory is allocated before conventional memory is. For
  309.       example, if there is no more extended memory free then conventional
  310.       memory will be allocated. In either case DOS32 sets up the 386 page
  311.       tables such that the allocated memory is addressed in a straight linear
  312.       block when it may actually be physically scattered throughout RAM.
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.                 The Interrupt descriptor table services
  327.  
  328.  
  329.      These services allow the application to get and set vectors of the 
  330. protected mode interrupt descriptor table. The hardware interrupt  vectors
  331. will always be set the default values.  i.e IRQs 0..7 map  onto CPU
  332. interrupts 8..15 and IRQs 8..15 map onto CPU interrupts 70h..77h.
  333.          All protected mode interrupt vectors will initially reflect to the
  334. same interrupt in real mode. In other words a switched to and from real mode  
  335. is automatically made when a protected mode interrupt is called. The
  336. registers EAX,ECX,EDX,EBX,EBP,ESI,EDI and flags will be preserved across the
  337. mode switch. The exception to this rule are protected mode interrupts
  338. 0,1,3,4,5,6 and 7. These are exceptions and will terminate the program
  339. reporting with an error on the screen.
  340.      Hardware interrupt handlers will be called with undefined selectors in
  341. all data segment registers. The interrupt handler must preserve all modified
  342. general registers and segment registers before it returns from the interrupt.
  343.      The application is responsible for returning the original interrupt
  344. vectors before the application terminates. It is only necessary do to this
  345. when running under a DPMI server. However, for reliability, ALL modified
  346. interrupt vectors should be restored to their original value.
  347.  
  348.  
  349.  
  350.  
  351.  
  352.        GET PROTECTED MODE INTERRUPT VECTOR                              V3.0+
  353.  
  354.  IN:  AX = 0204h
  355.       BL = interrupt
  356.  
  357.  OUT: EDX = The 32 bit Offset of the vector
  358.       CX =  Selector of vector
  359.  
  360.  
  361.  
  362.  
  363.  
  364.        SET PROTECTED MODE INTERRUPT VECTOR                              V3.0+
  365.  
  366.  IN:  AX = 0205h
  367.       BL = interrupt
  368.       EDX = The 32 bit Offset of the vector
  369.       CX =  Selector of vector  ( must be a code selector )
  370.  
  371.  OUT: nothing
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.                            Real Mode Call Services
  392.  
  393.      The following three services are used for calling real mode programs 
  394. (e.g a DOS call or a device driver). Each of these services expects a pointer
  395. to a real mode call structure whish is used to passing all registers to and
  396. from the real mode switch. The format of the structure is defined as:
  397.  
  398.  
  399.                               Offset      Register
  400.  
  401.                                 00h         EDI
  402.                                 04h         ESI
  403.                                 08h         EBP
  404.                                 0Ch  Reserved by system
  405.                                 10h         EBX
  406.                                 14h         EDX
  407.                                 18h         ECX
  408.                                 1Ch         EAX
  409.                                 20h         Flags
  410.                                 22h         ES
  411.                                 24h         DS
  412.                                 26h         FS
  413.                                 28h         GS
  414.                                 2Ah         IP
  415.                                 2Ch         CS
  416.                                 2Eh         SP
  417.                                 30h         SS
  418.  
  419.  
  420.  
  421. -----------------------------------------------------------------------------
  422.               Simulate a Real Mode interrupt                            V3.0+
  423.  
  424. IN:
  425.         AX = 0300h
  426.         BL = Interrupt number
  427.         BH = Flags
  428.              Bit 0  = 1 resets the interrupt controller and A20
  429.              line
  430.              Other flags reserved and must be 0
  431.        CX =   Number of  words to  copy from  protected mode to
  432.              real mode stack
  433.        ES:EDI = Selector:Offset of real mode call structure
  434.  
  435. OUT:
  436.  
  437.       If function was successful:
  438.       Carry flag is clear.
  439.       ES:(E)DI =  Selector:Offset of  modified real mode call
  440.        structure
  441.  
  442.       If function was not successful:
  443.        Carry flag is set.
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456. -----------------------------------------------------------------------------
  457.       Call Real Mode Procedure With Far Return Stack Frame              V3.0+
  458.  
  459. IN:
  460.         AX = 0301h
  461.         BH = Flags
  462.              Bit 0  = 1 resets the interrupt controller and A20
  463.              line
  464.              Other flags reserved and must be 0
  465.        CX =   Number of  words to  copy from  protected mode to
  466.              real mode stack
  467.        ES:EDI = Selector:Offset of real mode call structure
  468.  
  469. OUT:
  470.  
  471.       If function was successful:
  472.       Carry flag is clear.
  473.       ES:EDI =  Selector:Offset of  modified real mode call
  474.        structure
  475.  
  476.       If function was not successful:
  477.        Carry flag is set.
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486. -----------------------------------------------------------------------------
  487.          Call Real Mode Procedure With IRET Stack Frame                 V3.0+
  488.  
  489. IN:
  490.         AX = 0302h
  491.         BH = Flags
  492.              Bit 0  = 1 resets the interrupt controller and A20
  493.              line
  494.              Other flags reserved and must be 0
  495.        CX =   Number of  words to  copy from  protected mode to
  496.              real mode stack
  497.        ES:EDI = Selector:Offset of real mode call structure
  498.  
  499. OUT:
  500.  
  501.       If function was successful:
  502.       Carry flag is clear.
  503.       ES:EDI =  Selector:Offset of  modified real mode call
  504.        structure
  505.  
  506.       If function was not successful:
  507.        Carry flag is set.
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.                         The 32 bit DOS type services
  522.  
  523.      The following services are like a protected mode version of DOS's
  524. services. They are called the same way as in real mode where AH=function and
  525. invoked with INT 21h. These services work exactly the same as calling the
  526. DOS services in real mode except 32bit registers and protected mode far
  527. pointers ( selector:offset ) are used. For a more detailed description of how
  528. the services work please refer to DOS programming documentation. The
  529. description below is only to show the use of 32 bit registers.
  530.  
  531. NOTE:  If an INT 21h function is called and is not described here then the
  532.        interrupt is done in real mode with all the registers passed to
  533.        from the call. This is also the case for any other protected mode
  534.        interrupt, not just INT 21h!.
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542. -----------------------------------------------------------------------------
  543.          WRITE STRING TO STANDARD OUTPUT                                V3.0+
  544.      AH = 09h
  545.      DS:EDX -> '$'-terminated string
  546.  
  547.  
  548. -----------------------------------------------------------------------------
  549.          CREATE SUBDIRECTORY                                            V3.0+
  550.      AH = 39h
  551.      DS:EDX -> Selector:Offset of ASCIZ pathname
  552. Return: CF clear if successful
  553.          AX destroyed
  554.      CF set on error
  555.             AX = error code (03h,05h)
  556.  
  557.  
  558. -----------------------------------------------------------------------------
  559.          REMOVE SUBDIRECTORY                                            V3.0+
  560.         AH = 3Ah
  561.         DS:EDX -> Selector:Offset ASCIZ pathname of directory to be removed
  562. Return: CF clear if successful
  563.          AX destroyed
  564.      CF set on error
  565.             AX = error code (03h,05h,06h,10h)
  566.  
  567.  
  568. -----------------------------------------------------------------------------
  569.          CHANGE SUBDIRECTORY                                            V3.0+
  570.         AH = 3Bh
  571.         DS:EDX -> ASCIZ pathname to become current directory (max 64 bytes)
  572. Return: CF clear if successful
  573.          AX destroyed
  574.      CF set on error
  575.             AX = error code (03h)
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586. -----------------------------------------------------------------------------
  587.          CREATE OR TRUNCATE FILE                                        V3.0+
  588.      AH = 3Ch
  589.      CX = file attributes
  590.      DS:EDX -> Selector:Offset ASCIZ filename
  591. Return: CF clear if successful
  592.          AX = file handle
  593.      CF set on error
  594.             AX = error code (03h,04h,05h)
  595.  
  596.  
  597. -----------------------------------------------------------------------------
  598.          OPEN EXISTING FILE                                             V3.0+
  599.      AH = 3Dh
  600.      AL = access and sharing modes
  601.      DS:EDX -> Selector:Offset ASCIZ filename
  602.      CL = attribute mask of files to look for (server call only)
  603. Return: CF clear if successful
  604.          AX = file handle
  605.      CF set on error
  606.             AX = error code (01h,02h,03h,04h,05h,0Ch,56h)
  607.  
  608.  
  609. -----------------------------------------------------------------------------
  610.          READ FROM FILE OR DEVICE                                       V3.0+
  611.      AH = 3Fh
  612.      BX = file handle
  613.      ECX = number of bytes to read  ( may be zero )
  614.      DS:EDX -> Selector:Offset buffer for data
  615. Return: CF clear if successful
  616.          EAX = number of bytes actually read (0 if at EOF before call)
  617.      CF set on error
  618.             AX = error code (05h,06h)
  619.  
  620.  
  621. -----------------------------------------------------------------------------
  622.       WRITE TO FILE OR DEVICE                                           V3.0+
  623.      AH = 40h
  624.      BX = file handle
  625.         ECX = number of bytes to write
  626.         DS:EDX -> Selector:Offset data to write
  627. Return: CF clear if successful
  628.          EAX = number of bytes actually written
  629.      CF set on error
  630.             AX = error code (05h,06h)
  631.  
  632.  
  633. -----------------------------------------------------------------------------
  634.       DELETE FILE                                                       V3.0+
  635.      AH = 41h
  636.         DS:EDX -> Selector:Offset ASCIZ filename (no wildcards )
  637. Return: CF clear if successful
  638.  
  639.         CF set on error
  640.             AX = error code (02h,03h,05h)
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651. -----------------------------------------------------------------------------
  652.          SET CURRENT FILE POSITION                                      V3.0+
  653.      AH = 42h
  654.      AL = origin of move
  655.          00h start of file
  656.          01h current file position
  657.          02h end of file
  658.      BX = file handle
  659.      EDX = offset from origin of new file position
  660. Return: CF clear if successful
  661.             EAX = new file position in bytes from start of file
  662.         CF set on error
  663.             AX = error code (01h,06h)
  664. Notes:    The normal real mode DOS function uses CX:DX as the position of
  665.           the file to seek and returns DX:AX with the new value of the
  666.           position. This protected mode version uses EDX in place of
  667.           CX:DX and uses EAX in place of DX:AX.
  668.  
  669.  
  670.  
  671.  
  672. -----------------------------------------------------------------------------
  673.       GET FILE ATTRIBUTES                                               V3.0+
  674.      AX = 4300h
  675.         DS:EDX -> Selector:Offset ASCIZ filename
  676. Return: CF clear if successful
  677.             CX = file attributes
  678.  
  679.          AX = CX (DR-DOS 5.0)
  680.      CF set on error
  681.             AX = error code (01h,02h,03h,05h)
  682.  
  683.  
  684.  
  685. -----------------------------------------------------------------------------
  686.       SET FILE ATTRIBUTES                                               V3.0+
  687.      AX = 4301h
  688.         CX = new file attributes
  689.         DS:EDX -> Selector:Offset ASCIZ filename
  690. Return: CF clear if successful
  691.          AX destroyed
  692.      CF set on error
  693.             AX = error code (01h,02h,03h,05h)
  694.  
  695.  
  696.  
  697. -----------------------------------------------------------------------------
  698.       GET CURRENT DIRECTORY                                             V3.0+
  699.      AH = 47h
  700.      DL = drive number (00h = default, 01h = A:, etc)
  701.         DS:ESI -> Selector:Offset 64-byte buffer for ASCIZ pathname
  702. Return: CF clear if successful
  703.          AX = 0100h (undocumented)
  704.      CF set on error
  705.             AX = error code (0Fh)
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716. -----------------------------------------------------------------------------
  717.       LOAD AND/OR EXECUTE PROGRAM                                       V3.0+
  718.      AH = 4Bh
  719.      AL = type of load
  720.          00h load and execute
  721.          01h load but do not execute
  722.      DS:EDX -> ASCIZ program name (must include extension)
  723.      DS:EDI -> Program environment to copy for child process (copy caller's
  724.                 environment if EDI = zero )
  725.      DS:ESI -> pointer to command tail to be copied into child's PSP
  726. Return: CF clear if successful
  727.  
  728.         CF set on error
  729.             AX = error code (01h,02h,05h,08h,0Ah,0Bh)
  730.  
  731. Notes:  Unlike DOS's 4Bh function this does not require a parameter block
  732.         to be set up. The environment and command tail are pointed to by
  733.         DS:EDI and DS:ESI respectively. See the examples distributed with     
  734.         DOS32 on how this function may be used.
  735.  
  736.  
  737.  
  738.  
  739. -----------------------------------------------------------------------------
  740.       TERMINATE WITH RETURN CODE                                        V3.0+
  741.      AH = 4Ch
  742.      AL = return code
  743. Return: never returns
  744.  
  745. Notes:
  746.     o   DOS32 applications MUST ALWAYS terminate with this call.
  747.     o   All memory allocated ( including DMA buffers ) will automatically
  748.         be freed when the application terminates with this call.
  749.  
  750.  
  751.  
  752.  
  753. -----------------------------------------------------------------------------
  754.       FIND FIRST MATCHING FILE                                          V3.0+
  755.      AH = 4Eh
  756.      CX = file attribute mask
  757.         DS:EDX -> ASCIZ file specification (may include path and wildcards)
  758. Returns:   CF clear if successful
  759.            The DTA ( Disk Transfer Area ) is filled with file information.
  760.         CF set on error
  761.           AX = Error code (02h, 03h, or 12h)
  762.  
  763. Notes:
  764.         The DTA is set to the default area which is at offset 80h in the
  765.         Program Segment Prefix (PSP). See function INT 31h AX=EE02h for       
  766.         obtaining the PSP address.
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781. -----------------------------------------------------------------------------
  782.          RENAME FILE                                                    V3.0+
  783.      AH = 56h
  784.         DS:EDX -> ASCIZ filename of existing file (no wildcards )
  785.         ES:EDI -> ASCIZ new filename (no wildcards)
  786.      CL = attribute mask
  787. Return: CF clear if successful
  788.      CF set on error
  789.             AX = error code (02h,03h,05h,11h)
  790.  
  791.  
  792.  
  793. -----------------------------------------------------------------------------
  794.          CREATE TEMPORARY FILE                                          V3.0+
  795.      AH = 5Ah
  796.         CX = file attribute
  797.         DS:EDX -> ASCIZ path ending with a '\' + 13 zero bytes to receive the
  798.           generated filename
  799. Return: CF clear if successful
  800.          AX = file handle opened for read/write in compatibility mode
  801.             DS:EDX pathname extended with generated name for temporary file
  802.      CF set on error
  803.             AX = error code (03h,04h,05h)
  804.  
  805.  
  806.  
  807.  
  808.  
  809. -----------------------------------------------------------------------------
  810.          CREATE NEW FILE                                                V3.0+
  811.      AH = 5Bh
  812.         CX = file attribute
  813.         DS:EDX -> ASCIZ filename
  814. Return: CF clear if successful
  815.          AX = file handle opened for read/write in compatibility mode
  816.      CF set on error
  817.             AX = error code (03h,04h,05h,50h)
  818.  
  819.  
  820.  
  821.                               <END OF API.DOC>
  822.