home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / pascal / PASLIBR.ZIP / CH8_1.DOC < prev    next >
Encoding:
Text File  |  1991-03-15  |  17.6 KB  |  829 lines

  1. ..pgno01
  2. ..foot60A8-##
  3. ..head02L-----------------------------------------------------------------
  4. ..head04L-----------------------------------------------------------------
  5. ..head03AdChDir
  6. ■ Dos Versions        [2.0+]
  7.  
  8. ■ Source Module Name  d213B00d.asm
  9.  
  10. ■ Description
  11.  
  12.   Change to specified directory
  13.  
  14.  
  15. ■ Summary
  16.  
  17.   Function dChDir( Path : String ) : Integer;
  18.  
  19.  
  20.   Parameter    Description
  21.   ---------    -------------------------------------------------
  22.   Path         path to change to
  23.  
  24.  
  25. ■ Function Return Value
  26.  
  27.   0 - function successfully changed path
  28. ..page
  29. ..head03AdCloseFile
  30. ■ Dos Versions        [2.0+]
  31.  
  32. ■ Source Module Name  d213E00d.asm
  33.  
  34. ■ Description
  35.  
  36.   Closes any file that was previously opened or created with a
  37.   call to dCreateFile or dOpenFile.
  38.  
  39.  
  40. ■ Summary
  41.  
  42.   Function dCloseFile( Var Handle : Integer ) : Integer;
  43.  
  44.  
  45.   Parameter    Description
  46.   ---------    -------------------------------------------------
  47.   Handle       handle of the file to close
  48.  
  49.  
  50. ■ Function Return Value
  51.  
  52.   0 - function successfully closed file
  53. ..page
  54. ..head03AdCreateFile
  55. ■ Dos Versions        [2.0+]
  56.  
  57. ■ Source Module Name  d213C00d.asm
  58.  
  59. ■ Description
  60.  
  61.   Creates a new file in the specified or default directory on the
  62.   specified or default drive.  If the file already exists then
  63.   the file is truncated to length zero.
  64.  
  65.  
  66. ■ Summary
  67.  
  68.   Function dCreateFile(     Path   : String;
  69.                 Attr   : Integer;
  70.             Var Handle : Integer ) : Integer;
  71.  
  72.  
  73.   Parameter    Description
  74.   ---------    -------------------------------------------------
  75.   Path         path and filename of file to create
  76.   Attr         attribute to create file with
  77.   Handle       returns the handle of the file created
  78.  
  79.  
  80. ■ Function Return Value
  81.  
  82.   0 - function successfully changed path
  83. ..page
  84. ..head03AdCreateNewPsp
  85. ■ Dos Versions        [1.1+]
  86.  
  87. ■ Source Module Name  d212600d.asm
  88.  
  89. ■ Description
  90.  
  91.   Copies current programs psp to a specified segment address in
  92.   free memory before updating the psp to make it usable by
  93.   another program.
  94.  
  95.  
  96. ■ Summary
  97.  
  98.   Procedure dCreateNewPsp( Segment : Word );
  99.  
  100.  
  101.   Parameter    Description
  102.   ---------    -------------------------------------------------
  103.   Segment      Segment of the new psp
  104.  
  105. ■ Function Return Value
  106.  
  107.   Nothing.
  108. ..page
  109. ..head03AdDelFile
  110. ■ Dos Versions        [2.0+]
  111.  
  112. ■ Source Module Name  d214100d.asm
  113.  
  114. ■ Description
  115.  
  116.   Delete specified file from the disk.
  117.  
  118.  
  119. ■ Summary
  120.  
  121.   Function dDelFile( FileSpec : String ) : Integer;
  122.  
  123.  
  124.   Parameter    Description
  125.   ---------    -------------------------------------------------
  126.   FileSpec     asciiz string containing the drive path and
  127.                filename of the file to be deleted.
  128.  
  129.  
  130. ■ Function Return Value
  131.  
  132.   0 - file deleted ok
  133.   1 - error trying to delete file
  134. ..page
  135. ..head03AdDiskReset
  136. ■ Dos Versions        [1.1+]
  137.  
  138. ■ Source Module Name  d210D00d.asm
  139.  
  140. ■ Description
  141.  
  142.   Flush all file buffers.  All data in the MS-DOS buffers are
  143.   physically written to the disk. The disk directory is NOT
  144.   updated.
  145.  
  146.  
  147. ■ Summary
  148.  
  149.   Procedure dDiskReset;
  150.  
  151.  
  152. ■ Function Return Value
  153.  
  154.   Nothing
  155. ..page
  156. ..head03AdGetBreakStatus
  157. ■ Dos Versions        [2.0+]
  158.  
  159. ■ Source Module Name  d213300d.asm
  160.  
  161. ■ Description
  162.  
  163.   Get the status of the systems break flag that influences ctrl-c
  164.   checking.
  165.  
  166.  
  167. ■ Summary
  168.  
  169.   Function dGetBreakStatus : Integer;
  170.  
  171.  
  172. ■ Function Return Value
  173.   0 - Break flag is OFF
  174.   1 - Break flag is ON
  175. ..page
  176. ..head03AdGetBusyFlag
  177. ■ Dos Versions        [2.0+?]
  178.  
  179. ■ Source Module Name  d213400u.asm
  180.  
  181. ■ Description
  182.  
  183.   Get the address of the MS-DOS busy flag
  184.  
  185.  
  186. ■ Summary
  187.  
  188.   Procedure dGetBusyFlag( Var dSeg, dOfs : Word );
  189.  
  190.  
  191.   Parameter    Description
  192.   ---------    -------------------------------------------------
  193.   dSeg         returns the segment of the dos busy flag var
  194.   dOfs         returns the offset of the dos busy flag var
  195.  
  196.  
  197. ■ Function Return Value
  198.  
  199.   Segment:Offset address of the MS-DOS busy flag
  200. ..page
  201. ..head03AdGetCurrentDisk
  202. ■ Dos Versions        [1.1+]
  203.  
  204. ■ Source Module Name  d211900d.asm
  205.  
  206. ■ Description
  207.  
  208.   Get the number of the default disk drive.  (0=A, 1=B, etc).
  209.  
  210.  
  211. ■ Summary
  212.  
  213.   Function dGetCurrentDisk : Integer;
  214.  
  215.  
  216. ■ Function Return Value
  217.  
  218.   The drive code of the default disk drive.
  219. ..page
  220. ..head03AdGetDate
  221. ■ Dos Versions        [1.1+]
  222.  
  223. ■ Source Module Name  d212A00d.asm
  224.  
  225. ■ Description
  226.  
  227.   Use Dos to retrieve the system date
  228.  
  229.  
  230. ■ Summary
  231.  
  232.   Procedure dGetDate( Var Month, Day, Year, DayOfWk : Integer );
  233.  
  234.  
  235.   Parameter    Description
  236.   ---------    -------------------------------------------------
  237.   Month        returns the month of the year
  238.   Day          returns the day of the month
  239.   Year         returns the year (1980 thru 2099)
  240.   DayOfWk      returns the day of the week ( 0-6 ) where:
  241.                  0 -> Sunday
  242.                  6 -> Saturday
  243.  
  244.  
  245. ■ Function Return Value
  246.  
  247.   Nothing.
  248. ..page
  249. ..head03AdGetDriveData
  250. ■ Dos Versions        [2.0+]
  251.  
  252. ■ Source Module Name  d211C00d.asm
  253.  
  254. ■ Description
  255.  
  256.   Retrieve information about the default disk drive
  257.  
  258.  
  259. ■ Summary
  260.  
  261.   Function dGetDriveData(     Drive     : Integer;
  262.               Var Sectors     : Word;
  263.               Var MediaSeg     : Word;
  264.               Var MediaOfs     : Word;
  265.               Var SectorSize : Word;
  266.               Var Clusters     : Word ) : Integer;
  267.  
  268.  
  269.   Parameter    Description
  270.   ---------    -------------------------------------------------
  271.   Drive        drive code of the drive to get the data on.
  272.                (0=default, 1=A, 2=B, etc.)
  273.   Sectors      Number of sectors per cluster
  274.   MediaSeg     Segment of the media id byte
  275.   MediaOfs     Offset of the media id byte
  276.   SectorSize   Number of bytes per sector
  277.   Clusters     Number of clusters on the drive
  278.  
  279.  
  280. ■ Function Return Value
  281.  
  282.   0 - unsuccessful (invalid drive, etc)
  283.   1 - successful
  284. ..page
  285. ..head03AdGetDrvAllocInfo
  286. ■ Dos Versions        [2.0+]
  287.  
  288. ■ Source Module Name  d213600d.asm
  289.  
  290. ■ Description
  291.  
  292.   Get information about a specified disk drive.
  293.  
  294.  
  295. ■ Summary
  296.  
  297.   Function dGetDrvAllocInfo(     Drive           : Word;
  298.                  Var Sectors       : Word;
  299.                  Var AvailClusters : Word;
  300.                  Var BytesInSector : Word;
  301.                  Var TotalClusters : Word ) : Integer;
  302.  
  303.  
  304.   Parameter      Description
  305.   ---------      -------------------------------------------------
  306.   Drive          disk drive code (0=default, 1=A, etc)
  307.   Sectors        number of sectors in a cluster
  308.   AvailClusters  number of available clusters
  309.   BytesInSector  number of bytes in a sector
  310.   TotalClusters  number of clusters in drive
  311.  
  312.  
  313. ■ Function Return Value
  314.  
  315.   0 - function unable to obtain information for drive
  316.   1 - function successfully obtained information
  317. ..page
  318. ..head03AdGetDta
  319. ■ Dos Versions        [2.0+]
  320.  
  321. ■ Source Module Name  d212F00d.asm
  322.  
  323. ■ Description
  324.  
  325.   Gets the current address of the disk transfer area being used
  326.   for file related functions.
  327.  
  328.  
  329. ■ Summary
  330.  
  331.   Procedure dGetDta( Var Segment, Offset : Word );
  332.  
  333.  
  334.   Parameter    Description
  335.   ---------    -------------------------------------------------
  336.   Segment      Segment of the DTA
  337.   Offset       Offset of the DTA
  338.  
  339.  
  340. ■ Function Return Value
  341.  
  342.   The segment and offset of the dta.
  343. ..page
  344. ..head03AdGetFileAttr
  345. ■ Dos Versions        [2.0+]
  346.  
  347. ■ Source Module Name  d214300d.asm
  348.  
  349. ■ Description
  350.  
  351.   Gets the attribute for the specified file.
  352.  
  353.  
  354. ■ Summary
  355.  
  356.   Function dGetFileAttr(     FileSpec : String;
  357.              Var Attr     : Integer ) : Integer;
  358.  
  359.  
  360.   Parameter    Description
  361.   ---------    -------------------------------------------------
  362.   FileSpec     handle of file to set file pointer
  363.   Attr         relative position to set location of pointer from
  364.  
  365.  
  366. ■ Function Return Value
  367.  
  368.   0 - file attribute obtained ok
  369.   1 - error trying to obtain files attribute
  370. ..page
  371. ..head03AdGetIntVec
  372. ■ Dos Versions        [2.0+]
  373.  
  374. ■ Source Module Name  d2135xxd.asm
  375.  
  376. ■ Description
  377.  
  378.   Get the address of the specified Interrupt
  379.  
  380.  
  381. ■ Summary
  382.  
  383.   Procedure dGetIntVec(     dInt : Word;
  384.             Var dSeg : Word;
  385.             Var dOfs : Word );
  386.  
  387.  
  388.   Parameter    Description
  389.   ---------    -------------------------------------------------
  390.   dInt         interrupt vector to retrieve
  391.   dSeg         returns the segment of the interrupt specified
  392.   dOfs         returns the offset of the interrupt specified
  393.  
  394. ■ Function Return Value
  395.  
  396.   Segment:Offset of specified interrupt
  397. ..page
  398. ..head03AdGetTime
  399. ■ Dos Versions        [1.1+]
  400.  
  401. ■ Source Module Name  dd212C00d.asm
  402.  
  403. ■ Description
  404.  
  405.   Use Dos to retrieve the system time
  406.  
  407.  
  408. ■ Summary
  409.  
  410.   Procedure dGetTime( Var Hour, Min, Sec, Hund : Integer );
  411.  
  412.  
  413.   Parameter    Description
  414.   ---------    -------------------------------------------------
  415.   Hour         returns the hour (0-23) on 24 hour clock
  416.   Min           returns the minute (0-59)
  417.   Sec           returns the seconds (0-59)
  418.   Hund           returns the hundredths of a second (0-99)
  419.  
  420.  
  421. ■ Function Return Value
  422.  
  423.   Nothing.
  424. ..page
  425. ..head03AdGetVersion
  426. ■ Dos Versions        [2.0+]
  427.  
  428. ■ Source Module Name  d213000d.asm
  429.  
  430. ■ Description
  431.  
  432.   Get the version number of the MS-DOS operating system.
  433.  
  434.  
  435. ■ Summary
  436.  
  437.   Procedure dGetVersion( Var Major, Minor : Integer );
  438.  
  439.  
  440.   Parameter    Description
  441.   ---------    -------------------------------------------------
  442.   Major        Major version number
  443.   Minor        Minor version number
  444.  
  445. ■ Function Return Value
  446.  
  447.   Version number of operating system.
  448. ..page
  449. ..head03AdMkDir
  450. ■ Dos Versions        [2.0+]
  451.  
  452. ■ Source Module Name  d213900d.asm
  453.  
  454. ■ Description
  455.  
  456.   Create directory using specified path
  457.  
  458.  
  459. ■ Summary
  460.  
  461.   Function dMkDir( Path : String ) : Integer;
  462.  
  463.  
  464.   Parameter    Description
  465.   ---------    -------------------------------------------------
  466.   Path         path to create
  467.  
  468.  
  469. ■ Function Return Value
  470.  
  471.   0 - function successfully created path
  472.   n - error code
  473. ..page
  474. ..head03AdOpenFile
  475. ■ Dos Versions        [2.0+]
  476.  
  477. ■ Source Module Name  d213D00d.asm
  478.  
  479. ■ Description
  480.  
  481.   Opens any existing file in the specified or default directory
  482.   on the specified or default drive.
  483.  
  484.  
  485. ■ Summary
  486.  
  487.   Function dOpenFile(      Path     : String;
  488.               Mode     : Integer;
  489.               Var Handle : Integer ) : Integer;
  490.  
  491.  
  492.   Parameter    Description
  493.   ---------    -------------------------------------------------
  494.   Path         path and filename of file to create
  495.   Mode         attribute for the file
  496.   Handle       returns the handle of the file created
  497.  
  498.  
  499. ■ Function Return Value
  500.  
  501.   0 - function successfully changed path
  502. ..page
  503. ..head03AdReadFile
  504. ■ Dos Versions        [2.0+]
  505.  
  506. ■ Source Module Name  d213F00d.asm
  507.  
  508. ■ Description
  509.  
  510.   Read specified number of bytes from file into data buffer
  511.  
  512.  
  513. ■ Summary
  514.  
  515.   Function dReadFile(      Handle    : Integer;
  516.               NBytes    : Word;
  517.               Var Buffer      ;
  518.               Var BytesRead : Word ) : Integer;
  519.  
  520.  
  521.   Parameter    Description
  522.   ---------    -------------------------------------------------
  523.   Handle       valid file handle of file to read from
  524.   NBytes       number of bytes to read
  525.   Buffer       data area to place data read from file
  526.   BytesRead    number of actual bytes read
  527.  
  528. ■ Function Return Value
  529.  
  530.   0 - file read performed ok
  531.   1 - error trying to read file
  532. ..page
  533. ..head03AdRmDir
  534. ■ Dos Versions        [2.0+]
  535.  
  536. ■ Source Module Name  d213A00d.asm
  537.  
  538. ■ Description
  539.  
  540.   Remove specified directory
  541.  
  542.  
  543. ■ Summary
  544.  
  545.   Function dRmDir( Path : String ) : Integer;
  546.  
  547.  
  548.   Parameter    Description
  549.   ---------    -------------------------------------------------
  550.   Path         path to remove
  551.  
  552.  
  553. ■ Function Return Value
  554.  
  555.   0 - function successfully created path
  556.   n - error code
  557. ..page
  558. ..head03AdSelectDisk
  559. ■ Dos Versions        [1.1+]
  560.  
  561. ■ Source Module Name  d210E00d.asm
  562.  
  563. ■ Description
  564.  
  565.   Sets the specified drive to the default drive and returns the
  566.   number of logical drives in the system.
  567.  
  568.  
  569. ■ Summary
  570.  
  571.   Function dSelectDisk( Drive : Integer ) : Integer;
  572.  
  573.  
  574.   Parameter    Description
  575.   ---------    -------------------------------------------------
  576.   Drive        drive number (0=A, 1=B, etc )
  577.  
  578.  
  579. ■ Function Return Value
  580.  
  581.   The number of logical drives.
  582. ..page
  583. ..head03AdSetBreakFlag
  584. ■ Dos Versions        [2.0+]
  585.  
  586. ■ Source Module Name  d213301d.asm
  587.  
  588. ■ Description
  589.  
  590.   Sets the break flag to ON or OFF
  591.  
  592.  
  593. ■ Summary
  594.  
  595.   Procedure dSetBreakFlag( flag : Integer );
  596.  
  597.  
  598.   Parameter    Description
  599.   ---------    -------------------------------------------------
  600.   flag         0 - to set break flag OFF
  601.                1 - to set break flag ON
  602.  
  603. ■ Function Return Value
  604.  
  605.   Nothing.
  606. ..page
  607. ..head03AdSetDate
  608. ■ Dos Versions        [1.1+]
  609.  
  610. ■ Source Module Name  d212B00d.asm
  611.  
  612. ■ Description
  613.  
  614.   Use Dos to set the system to a specified date
  615.  
  616.  
  617. ■ Summary
  618.  
  619.   Function dSetDate( Month, Day, Year : Integer ) : Integer;
  620.  
  621.  
  622.   Parameter    Description
  623.   ---------    -------------------------------------------------
  624.   Month        month of year (1-12)
  625.   Day          day of month (1-31)
  626.   Year         year 1980-2099
  627.  
  628.  
  629. ■ Function Return Value
  630.  
  631.   0 - invalid date
  632.   1 - date set successfully
  633. ..page
  634. ..head03AdSetDta
  635. ■ Dos Versions        [1.1+]
  636.  
  637. ■ Source Module Name  d211A00d.asm
  638.  
  639. ■ Description
  640.  
  641.   Sets the address of the disk transfer area to be used for file
  642.   related functions.
  643.  
  644.  
  645. ■ Summary
  646.  
  647.   Procedure dSetDta( Segment, Offset : Word );
  648.  
  649.  
  650.   Parameter    Description
  651.   ---------    -------------------------------------------------
  652.   Segment      Segment of the new DTA
  653.   Offset       Offset of the new DTA
  654.  
  655. ■ Function Return Value
  656.  
  657.   Nothing.
  658. ..page
  659. ..head03AdSetFileAttr
  660. ■ Dos Versions        [2.0+]
  661.  
  662. ■ Source Module Name  d214301d.asm
  663.  
  664. ■ Description
  665.  
  666.   Sets file position relative to beginning of file, current file
  667.   position, or end of file.
  668.  
  669.  
  670. ■ Summary
  671.  
  672.   Function dGetFileAttr(     FileSpec : String;
  673.              Var Attr     : Integer ) : Integer;
  674.  
  675.  
  676.   Parameter    Description
  677.   ---------    -------------------------------------------------
  678.   FileSpec     handle of file to set file pointer
  679.   Attr         relative position to set location of pointer from
  680.  
  681.  
  682. ■ Function Return Value
  683.  
  684.   0 - file attribute obtained ok
  685.   1 - error trying to obtain files attribute
  686. ..page
  687. ..head03AdSetFilePos
  688. ■ Dos Versions        [2.0+]
  689.  
  690. ■ Source Module Name  d214200d.asm
  691.  
  692. ■ Description
  693.  
  694.   Sets file position relative to beginning of file, current file
  695.   position, or end of file.
  696.  
  697.  
  698. ■ Summary
  699.  
  700.   Function dSetFilePos(     Handle : Integer;
  701.                 Method : Integer;
  702.             Var Ofs    : LongInt ) : Integer;
  703.  
  704.  
  705.   Parameter    Description
  706.   ---------    -------------------------------------------------
  707.   Handle       handle of file to set file pointer
  708.   Method       relative position to set location of pointer from
  709.   Ofs          number of bytes to move pointer.  returns the
  710.                absolute file position from the beginning of the
  711.                file.
  712.  
  713.  
  714. ■ Function Return Value
  715.  
  716.   0 - file pointer moved ok
  717.   1 - error trying to move file pointer
  718. ..page
  719. ..head03AdSetInt
  720. ■ Dos Versions        [1.1+]
  721.  
  722. ■ Source Module name  d2125xxd.asm
  723.  
  724. ■ Description
  725.  
  726.   Initialize the systems interrupt vector to point to a user
  727.   defined interrupt handling routine.
  728.  
  729.  
  730. ■ Summary
  731.  
  732.   Procedure dSetInt( Interp, Seg, Ofs : Word );
  733.  
  734.  
  735.   Parameter    Description
  736.   ---------    -------------------------------------------------
  737.   Interp       Interrupt number
  738.   Seg           Segment of the new interrupt routine
  739.   Ofs           Offset of the new interrupt routine
  740.  
  741.  
  742. ■ Function Return Value
  743.  
  744.   Nothing.
  745. ..page
  746. ..head03AdSetTime
  747. ■ Dos Versions        [1.1+]
  748.  
  749. ■ Source Module Name  dd212D00d.asm
  750.  
  751. ■ Description
  752.  
  753.   Use Dos to set the system clock to a specified time
  754.  
  755.  
  756. ■ Summary
  757.  
  758.   Procedure dSetTime( Hour, Min, Sec, Hund : Integer );
  759.  
  760.  
  761.   Parameter    Description
  762.   ---------    -------------------------------------------------
  763.   Hour         the hour (0-23) on 24 hour clock
  764.   Min           the minute (0-59)
  765.   Sec           the seconds (0-59)
  766.   Hund           the hundredths of a second (0-99)
  767.  
  768.  
  769. ■ Function Return Value
  770.  
  771.   0 - invalid time
  772.   1 - time set successfully
  773. ..page
  774. ..head03AdSetVerityFlag
  775. ■ Dos Versions        [1.1+]
  776.  
  777. ■ Source Module Name  d212E00d.asm
  778.  
  779. ■ Description
  780.  
  781.   Turns the automatic read-after-write verification ON or OFF.
  782.  
  783.  
  784. ■ Summary
  785.  
  786.   Procedure dSetVerifyFlag( VerifyOpt : Integer );
  787.  
  788.  
  789.   Parameter    Description
  790.   ---------    -------------------------------------------------
  791.   VerifyOpt    0 - Turn OFF verify flag
  792.                1 - Turn ON verify flag
  793.  
  794.  
  795. ■ Function Return Value
  796.  
  797.   Nothing.
  798. ..page
  799. ..head03AdWriteFile
  800. ■ Dos Versions        [2.0+]
  801.  
  802. ■ Source Module Name  d214000d.asm
  803.  
  804. ■ Description
  805.  
  806.   Write specified number of bytes to file from data buffer
  807.  
  808.  
  809. ■ Summary
  810.  
  811.   Function dWriteFile(       Handle    : Integer;
  812.                NBytes    : Word;
  813.                Var Buffer          ;
  814.                Var BytesWritten : Word; ) : Integer;
  815.  
  816.  
  817.   Parameter      Description
  818.   ---------      -----------------------------------------------
  819.   Handle         valid file handle of file to write to
  820.   NBytes         number of bytes to write
  821.   Buffer         data area containing data to write
  822.   BytesWritten   number of actual bytes written
  823.  
  824. ■ Function Return Value
  825.  
  826.   0 - file write operation performed ok
  827.   1 - error trying to write file
  828. ..page
  829.