home *** CD-ROM | disk | FTP | other *** search
/ Large Pack of OldSkool DOS MOD Trackers / funk108a.zip / DOS32V30.ZIP / API.DOC next >
Text File  |  1995-06-14  |  31KB  |  839 lines

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