home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / DOS_HELP / DOS_FUNC.ZIP / DOS_FUNC.TXT < prev   
Encoding:
Text File  |  1990-04-18  |  7.5 KB  |  253 lines

  1.                              DOS_FUNC.PF0
  2.                        Written by: Dave Skalick
  3.  
  4.  
  5. DOS_FUNC.PF0 is a function library of DOS and BIOS interrupt calls.
  6. GENERAL INFORMATION
  7.  
  8. All functions can be used in any module within SmartWareII.
  9.  
  10. To  use  these functions,  either place them in a project of your  own
  11. design  or  compile  it separately and load it into  memory  with  the
  12. REMEMBER LOAD command.  
  13.  
  14. All  functions  have been tested in SmartWareII version 1.02 and  they
  15. should, however, work in any version of SmartWareII.
  16.  
  17. They should work with DOS versions 2.x and up.  If you are using a DOS
  18. version below that they may not work.
  19.  
  20.  
  21.  
  22.                         FUNCTION SPECIFICATIONS
  23.  
  24.  
  25. _FILESTAT()
  26.  
  27. Purpose:
  28.    To return information on a file.  This function can return the file
  29.    modification date and time,  the file size,  all DOS attributes and
  30.    the file name (useful with wildcard characters).
  31.  
  32. Format:
  33.  
  34.    variable=_FILESTAT(filename,request)
  35.    
  36.    variable -- The name of the variable to store the result in.
  37.    filename -- The file name to return information on.
  38.    request --- The requested information to be returned.
  39.  
  40. Remarks:
  41.    The  file  name can be any file name,  directory  name,  or  volume
  42.    label.   This  function  can take wildcard characters for the  file
  43.    name  ("*"  &  "?")  using the same filename conventions  that  DOS
  44.    requires (which makes sense since it uses DOS interrupts).
  45.    
  46.    The  request  is  a  number that is passed to  return  the  correct
  47.    information on the file.  
  48.    
  49.    Valid request codes are:
  50.      1 -- Return file time in 24 hour format.
  51.      2 -- Return file date in default (original) date2 format.  
  52.      3 -- Return file size.
  53.      4 -- Return all attributes for file (Archive,  Directory, Volume,
  54.            System, Hidden, Read-only 
  55.      5 -- Return file name (great for wildcard characters).
  56.  
  57. Technical information:
  58.    This  function  uses  service calls 0x1A,  0x2F,  and 0x4E  on  DOS
  59.    interrupt 0x21. 
  60.  
  61. ----------------------------------------------------------------------
  62.  
  63. _ATTRIB()
  64.       
  65. Purpose:
  66.    This  function can change or read the DOS attributes assigned to  a
  67.    file.
  68.  
  69. Format:
  70.  
  71.    _ATTRIB(filename,request,attributes)
  72.    
  73.    filename ---- The file name to read/write the attribute of
  74.    request ----- 1  to  write  a  new attributes  or  0  to  read  the
  75.                  attributes
  76.    attributes -- A Listing of all attributes assigned to the file.
  77.                  "A" -- Archive
  78.                  "D" -- Directory
  79.                  "H" -- Hidden
  80.                  "R" -- Read only
  81.                  "S" -- System
  82.                  "V" -- Volume
  83.  
  84. Remarks:
  85.    The  function will change the DOS attributes of a file or read  the
  86.    current setting of them.  If the request is to write new attributes
  87.    to  a file then the function returns a 1 if successful and 0 if  it
  88.    failed.   If  the request was to read the attributes then the first
  89.    letter  of the attributes are returned if successful and a 0 if  it
  90.    failed.
  91.  
  92. Technical information:
  93.    This function uses service call 0x43 on DOS interrupt 0x21.
  94.  
  95. ----------------------------------------------------------------------
  96.  
  97. _GETFREE()
  98.  
  99. Purpose:
  100.    This  function  returns  the total amount of space free on  a  disk
  101.    drive.
  102.  
  103. Format:
  104.  
  105.    variable=_getfree(drive)
  106.    
  107.    variable -- The variable name to store the result in
  108.    drive ----- The drive letter to request space free from
  109.  
  110. Remark:
  111.    This  function returns the total amount of disk space is free on  a
  112.    drive if successful or -1 if failed.
  113.  
  114. Technical information:
  115.    This function uses service call 0x36 on DOS interrupt 0x21.
  116.  
  117. ----------------------------------------------------------------------
  118.  
  119. _SETDATE()
  120.  
  121. Purpose:
  122.    This  function  will  set the system date of the  computer  without
  123.    leaving SmartWareII.
  124.  
  125. Format:
  126.  
  127.    _SETDATE(date)
  128.  
  129. date -- The new system date
  130.  
  131. Remarks:
  132.    If the function is successful then a 1 is returned or 0 if failed.
  133.  
  134. Technical information:
  135.    This function uses service call 0x2B on DOS interrupt 0x21.
  136.  
  137. ----------------------------------------------------------------------
  138.  
  139. _SETTIME()
  140.  
  141. Purpose:
  142.    This  function  will  set the system time of the  computer  without
  143.    leaving SmartWareII.
  144.  
  145. Format:
  146.  
  147.    _SETTIME(time)
  148.    
  149.    time -- The new system time
  150.  
  151. Remarks:
  152.    If the function is successful then a 1 is returned or 0 if failed.
  153.  
  154. Technical information:
  155.    This function uses service call 0x2D on DOS interrupt 0x21.
  156.  
  157. ----------------------------------------------------------------------
  158.  
  159. _PRTSCRN()
  160.  
  161. Purpose:
  162.    Print the screen.
  163.  
  164. Format:
  165.  
  166.    _PRTSCRN()
  167.  
  168. Remarks:
  169.    This  function  is  print the current screen.   No  parameters  are
  170.    needed. It will not return a result.  
  171.  
  172. Note:
  173.    On  some computers,  if the printer is not available,  the computer
  174.    will hang until the screen is printed.
  175.  
  176. Technical information:
  177.    This function uses BIOS interrupt 0x5.
  178.  
  179. ----------------------------------------------------------------------
  180.  
  181. _PRTSTAT()
  182.  
  183. Purpose:
  184.    Check if printer is on-line and ready to print.
  185.  
  186. Format:
  187.  
  188.    _PRTSTAT(port)
  189.  
  190.    port -- LPT port 1 or 2
  191.  
  192. Remarks:
  193.    This  printer will check if the printer on LPT1 or LPT2 is on  line
  194.    and ready to print.  A 1 is returned if it is and 0 if it is not.
  195.  
  196. Technical information:
  197.    This function uses service call 2 on BIOS interrupt 0x17.
  198.  
  199. ----------------------------------------------------------------------
  200.  
  201. _SETFDATE()
  202.  
  203. Purpose:
  204.    To change the date and/or time of a file.
  205.  
  206. Format:
  207.  
  208.    _SETFDATE(filename,date,time)
  209.    
  210.    filename -- The file name to change the date and time on.
  211.    date ------ The new file date
  212.    time ------ The new file time
  213.  
  214. Remarks:
  215.    This function will change the file date and/or time.  Both the date
  216.    and time must be passed,  however,  if the date or time is the null
  217.    string, that information will not be changed.  If both the date and
  218.    time are null then nothing will be done.
  219.    
  220.    This  function will return a 1 if successful and 0 if not failed or
  221.    both date and time are null. 
  222.  
  223. Technical information:
  224.    This function uses service calls 0x3D, 0x3E and 0x57 (with requests
  225.    0 and 1) on DOS interrupt 0x21.
  226.  
  227.  
  228. DISCLAIMER
  229.  
  230. These  functions  has  been  released  into   the public domain.   You
  231. may  freely  distribute  them  in its original  text  form  with  this
  232. documentation  in it's original form.   Please don't change  anything. 
  233. Give it to your friends,  family, enemies, strangers,  or give it as a
  234. Christmas  present.  I  don't care,  just give both in their  original
  235. form.
  236.  
  237. PLEASE  NOTE:  These   functions   is   made  available  without   any 
  238.    warranties or guaranties,   whether expressed or implied.   Neither
  239.    the   creator  of    this   function,   Informix   Software   Inc., 
  240.    Microsoft,  or  IBM   is  held responsible for it's use or mis-use,
  241.    this  includes  lost of data or  profitability.     The   user   of 
  242.    this  project  takes  full responsibility as to it's quality and/or
  243.    performance.   BY  USING THIS PRODUCT YOU AGREE TO THESE TERMS  AND
  244.    ARE BOUND BY THEM.
  245.  
  246.  
  247.      This is not a product of Informix Software, Inc. or any of it
  248.                              subsidiaries.
  249.                                                                          
  250.  SmartWareII is a registered trademark,  and, the product a copyright
  251.                       of, Informix Software, Inc.
  252.                                    
  253.