home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / dos / prg / bas / asilib11 / disk.doc < prev    next >
Text File  |  1994-10-22  |  22KB  |  623 lines

  1.  ************************ ASILIB DISK/FILE SUBROUTINES **********************
  2.  
  3.     DISK / FILE routines look for specified files on your disk, or report
  4.     disk status.  Several ASILIB disk/file subroutines return the following
  5.     error codes:
  6.  
  7.          1 = file name is a nul string
  8.          2 = file not found
  9.          3 = path not found
  10.          4 = too many open files
  11.          5 = access denied (file may be read-only or a subdirectory,
  12.                             or subdirectory not empty)
  13.          6 = handle invalid
  14.          8 = insufficient memory
  15.         15 = invalid drive
  16.         19 = disk is write-protected
  17.     &HFFFF = input past end of file
  18.  
  19.  
  20.     File attributes may be combined.  Each bit of a file attribute means:
  21.  
  22.          0 = normal files
  23.          1 = read-only
  24.          2 = hidden files
  25.          4 = system files
  26.          8 = volume label (only one per disk - may not be
  27.                            reliable)
  28.         16 = subdirectories
  29.         32 = archive bit set
  30.  
  31.      Thus a file attribute of 18 is a hidden subdirectory (16 OR 2)
  32.  
  33.      ASILIB's Input/Output subroutines provide fast, flexible file handling.
  34.      These subroutines return an error code if something went wrong.
  35.  
  36.      Summary of ASILIB's file I/O subroutines:
  37.  
  38.      FOpen       Open an existing file
  39.      FCreate     Make a new file and open it for output
  40.      FClose      Close a file opened by FOpen or FCreate
  41.  
  42.      FGet        Read from a file opened by FOpen to an array
  43.      FGetSTR     Read an ASCII string from a file opened by FOpen
  44.  
  45.      FPut        Write data to a file directly from an array
  46.      FPutCHR     Write one byte to a file
  47.      FPutSTR     Write an ASCII string to a file
  48.      FPutCRLF    Write CR+LF to a file
  49.  
  50.      FSeek       moves the file pointer forward or backward in the file
  51.      FFlush      flushes the ASILIB and DOS output file buffers
  52.  
  53.  
  54. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  55.  
  56. DISKWP:       determines if a floppy disk is write-protected
  57.  
  58. Parameters:   drive$, errcode
  59.  
  60.               Drive$ is of the form "A:filename.ext" or "b:"; either upper
  61.               case or lower case may be used.  Errcode = 0 if the disk in
  62.               drive is OK; errcode = 1 if invalid drive, 3 if disk is
  63.               write-protected, and errcode = 128 if drive not ready.
  64.  
  65. Restrictions: Supports physical drives A: and B: only.
  66.  
  67. Example:
  68.  
  69. REM  check to see if drive A: is ready
  70.  
  71.         call sub "diskwp", "A:", errcode
  72.         REM  error handling code...
  73.         if errcode > 0 then
  74.            .
  75.            .
  76.            .
  77.  
  78.  
  79. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  80.  
  81. DOTBAK:       changes the file extension of an existing file to .BAK
  82.  
  83. Parameters:   Filename$, errcode
  84.  
  85.               Dotbak deletes a previous .BAK file of this name and
  86.               renames the input filename.ext to filename.bak.  Errcode
  87.               returns a DOS error code: if errcode = 5, the existing
  88.               .BAK file is probably read-only.  All other errors refer
  89.               to the name change operation.
  90.  
  91. Example:
  92.  
  93. REM  I'm going to make a new file "MYDATA.DAT" so I want save the old
  94. REM  version as a .BAK file
  95.  
  96.         call sub "dotbak", "mydata.dat", errcode
  97.  
  98.         REM  check for errors
  99.         if errcode > 0 then
  100.            REM etc.
  101.  
  102.  
  103.  
  104.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  105.  
  106. DRIVESPACE:   determine space on specified drive
  107.  
  108. Parameters:   drv$, total&, free&, errcode
  109.  
  110.               Returns the amount of total and free space left on a given
  111.               disk drive.  The drive string may be any legal disk drive,
  112.               or "@" (AT sign) for the default drive.  An illegal drive
  113.               or other error will cause errcode to be returned as -1.
  114.               Note that total& and free& are LONG integers; requires
  115.               ASIC's Extended Math option.  Works with logical devices up
  116.               to 2,147 Megabytes.
  117.  
  118. Example:
  119.  
  120.         drv$="C:"
  121.            .
  122.            .
  123.         call sub "drivespace", drv$, total&, free&, errcode
  124.           if errcode = -1 then
  125.                   print "Invalid drive specification"
  126.                   else
  127.                   print "Free space on drive ";
  128.                   print drv$;
  129.                   print " is";
  130.                   print free&;
  131.                   print "bytes."
  132.  
  133.                   print "Total space on drive ";
  134.                   print drv$;
  135.                   print " is";
  136.                   print total&;
  137.                   print "bytes."
  138.           end if
  139.  
  140.  
  141.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  142.  
  143. FCLOSE:       Close a file opened by FOpen or FCreate.
  144.  
  145. Parameters:   handle, errcode
  146.  
  147.               Handle is a valid file handle returned by a successful call
  148.               to FOpen or FCreate.  After a successful call to FClose, all
  149.               output buffers will be flushed, the file will be closed and
  150.               the handle will no longer be valid.
  151.  
  152.               Errcode is an MS-DOS error code returned by FClose if something
  153.               went wrong.  If errcode = 0, no error.
  154.  
  155. Restrictions: An invalid handle will result in the error code &hex06.
  156.              
  157. Example:
  158.         call sub "FClose", (handle, errcode)
  159.  
  160.  
  161.  
  162. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  163.  
  164. FCOPY:        copy a file
  165.  
  166. Parameters:   sourcename, copyname, errcode
  167.  
  168.               Both filenames must be ASCII strings.  Drive and path need
  169.               not be fully specified; filenames may not include * or ?
  170.               wildcards.  Requires 64k DOS memory available.  Returns
  171.               errcode=0 if no problems were encountered, errcode=-1 if
  172.               insufficient DOS memory is available, or other MS-DOS error
  173.               code if a file handling error occurred.
  174.  
  175. Example:
  176.  
  177. REM  I want to copy ASILIB.LIB to drive a:
  178.  
  179.         call sub "fcopy", "asilib.lib", "a:asilib.lib", errcode
  180.  
  181.  
  182. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  183.  
  184. FCOUNT:       counts the number of files matching an ASCIIZ filespec string.
  185.               The filespec string may include the '*' and '?' wildcards.
  186.  
  187. Parameters:   Filename$, fileattribute, count
  188.  
  189.               Filename$ is a normal ASIC string with filename specifications,
  190.               fileattribute is the type of file you want to find: i. e.,
  191.               normal, hidden, system; file attributes are listed at the
  192.               beginning of this file.  Count is the number of files matching
  193.               the filespec$ specifications with the appropriate attributes.
  194.  
  195. Example:
  196.  
  197. REM  I want to know how many .ASI files are in this directory
  198.  
  199.         fileattributes = 0          REM Nornal files only
  200.         filename$ = "*.asi"
  201.         call sub "fcount", filename$, fileattributes, count
  202.  
  203.  
  204.  
  205.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  206.  
  207. FCREATE:      Create a new file, returning a handle for subsequent access.
  208.  
  209. Parameters:   filename$, handle, errcode
  210.  
  211.               Filename$ is the name of the file you want created.  If a
  212.               file of the same name already exists, the previous contents
  213.               of the file will be lost and the file will be truncated to
  214.               zero bytes.
  215.  
  216.               Handle is the file handle returned by FCreate.  Errcode is
  217.               an MS-DOS error code if something went wrong, or 0 if
  218.               everything is cool.
  219.  
  220. Example:
  221.  
  222. REM  first try to open an existing file, write-only access mode
  223. REM  if that fails then create a new file with that name
  224.  
  225.         file$ = "anyold.dat"
  226.         mode = 1
  227.  
  228.         call sub "fopen", file$, mode, handle, errcode
  229.         if errcode = 2 then
  230.            call sub "fcreate", file$, handle, errcode
  231.         endif
  232.  
  233.  
  234.  
  235.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  236.  
  237. FEXIST:       Determine if a file exists.
  238.  
  239. Parameters:   filename$, errcode
  240.  
  241.               Tells you if a given file already exists and can be opened
  242.               for Read access.  Returns an error code if it doesn't;
  243.               errcode = -1 if it does exist.  Filename$ must not include
  244.               any "?" or "*" wildcard characters.
  245.  
  246. Example:
  247.        filename$ = "asilib.lib"
  248.        call sub "fexist", filename$, errcode
  249.        IF errcode = -1 THEN PRINT "File already exists"
  250.        IF errcode = 0 THEN PRINT "Path exists"    REM  Filename$ = "d:\path"
  251.        IF errcode = 2 THEN PRINT "Path found, file not found"
  252.        IF errcode = 3 THEN PRINT "Path or file not found"
  253.  
  254.  
  255.  
  256.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  257.  
  258. FFLUSH:       Flush the ASILIB and DOS file buffers for specified file.
  259.  
  260. Parameters:   filehandle, errcode
  261.  
  262.               Flushes the ASILIB and DOS file output buffers associated with
  263.               filehandle, returning with an MS-DOS error code if there was
  264.               a problem.  The file must have been opened with ASILIB's FOpen
  265.               or FCreate subroutines.  Flushing the file buffer protects
  266.               against unintended system failures such as power outages.
  267.               Any data written to the file before calling FFlush will be
  268.               safely written to the disk.
  269.  
  270. Example:
  271.  
  272.         f$ = "anyold.fil"
  273.         call sub "fcreate", f$, handle, errcode
  274.  
  275.         REM  program writes data to the file
  276.         .
  277.         .
  278.         .
  279.         call sub "fflush", handle, errcode
  280.  
  281.  
  282.  
  283.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  284.  
  285. FGET:         read data from a file opened by FOPEN
  286.  
  287. Parameters:   handle, datasegment, dataoffset, databytes, errcode
  288.  
  289.               FGET reads from the current file pointer and copies the data
  290.               to datasegment:dataoffset in RAM.  Databytes may be as large
  291.               as 65535, but if it's greater than 32767 you must use a long
  292.               integer (databytes&) to represent the number.  Note that
  293.               long integers require ASIC's extended math option.  The data
  294.               segment may either be the segment address returned by
  295.               ASILIB's AllocDOS or FLoad subroutines, or for data
  296.               initilaized by ASIC, the segment address may be found with
  297.               ASILIB's ASICDS subroutine.
  298.  
  299. Example:
  300.  
  301. REM  read 100 bytes from "anyold.dat" and copy to a(1) through a(50)
  302. REM  note that a() is a normal integer array, 2 bytes per array element
  303.  
  304.         dim a(1000)
  305.         accessmode=0
  306.         call sub "fopen", "anold.dat",accessmode,handle,errcode
  307.  
  308.         REM check for FOPEN errors
  309.         if errcode > 0 then
  310.            .
  311.            .
  312.            .
  313.         endif
  314.  
  315. REM  get a(1) address
  316.         call sub "asicds",datasegment
  317.         dataoffset=varptr(a(1))
  318.  
  319.         call sub "fget",handle, datasegment, dataoffset, 100, errcode
  320.  
  321.  
  322.  
  323.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  324.  
  325. FGETCHR:      read next byte from a file opened by FOPEN
  326.  
  327. Parameters:   handle, byte, errcode
  328.  
  329.               FGETCHR reads one byte (character) from the current file
  330.               pointer.
  331.  
  332. Example:
  333.  
  334. REM  read the first byte from "anyold.dat" & call it I.
  335.  
  336.         accessmode=0
  337.         call sub "fopen", "anyold.dat",accessmode,handle,errcode
  338.  
  339.         REM check for FOPEN errors
  340.         if errcode > 0 then
  341.            .
  342.            .
  343.            .
  344.         endif
  345.         call sub "fgetchr",handle, I, errcode
  346.  
  347.  
  348.  
  349.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  350.  
  351. FGETPOS:      Get file pointer position.
  352.  
  353. Parameters:   handle, pos&, errcode
  354.  
  355.               Returns position pos& of the DOS file pointer for the file
  356.               associated with handle.  Errcode = 0 if no error.  Assumes
  357.               the file was opened with FOPEN or FCREATE.  Requires ASIC's
  358.               extended math option.
  359.  
  360. Example:
  361.  
  362. REM  determine where the file pointer is for file associated with handle
  363.  
  364.         call sub "fgetpos", handle, pos&, errcode
  365.  
  366.  
  367.  
  368.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  369.  
  370. FGETSTR:      read an ASCII string from a file buffer
  371.  
  372. Parameters:   file handle, inputstring$, errcode
  373.  
  374.               Given a valid file handle, FGETSTR will read the next string
  375.               from the associated disk file.  Strings may be terminated
  376.               with either &hex0D or &hex0D+&hex0A.  After reading each
  377.               string, FGetStr positions the buffer pointer to read the
  378.               next string.  String length should be less than the buffer
  379.               size.  See FOPEN.  If you try to read beyond the end of the
  380.               file, errcode = 255.
  381.  
  382. Restrictions: ASIC strings are limited to 80 characters, but you may use
  383.               an array of integers as your string space if you need longer
  384.               strings.  ASILIB will not care whether you use an ASIC string
  385.               or an array of integers; ASIC DOES care.
  386.  
  387. Example:
  388.  
  389. REM  I want to read a text file and print it on the screen
  390. REM  I used this program to test FGETSTR.
  391.  
  392. REM  This is an example of using an array of integers instead of
  393. REM  an ASIC string.  In this case each string in the input file
  394. REM  may be as long as (1000*2) characters.
  395.  
  396.    dim a(1000)
  397.    File$ = "common.inc"
  398. REM  read-only access
  399.    mode = 0
  400.    call sub "fopen", file$, mode, handle, errcode
  401.    if errcode > 0 then
  402.        print errcode
  403.        end
  404.    endif
  405.    for i=0 to 49
  406.    j=i+1
  407.    call sub "fgetstr",handle,a(1),errcode
  408.    if errcode = 255 then endoffile:
  409.    call sub "tprintce",a(1),j,1,23
  410.    next i
  411. endoffile:
  412.    call sub "tprintce","here's the end",j,1,30
  413.    call sub "fclose",handle,errcode
  414.    call sub "getkey",keycode
  415.  
  416.  
  417.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  418.  
  419. FLOAD:        Read a file, loading into far memory
  420.  
  421. Parameters:   filename$, fseg, bytes&, errcode
  422.  
  423.               FLoad reads a specified file (filename$) into far memory,
  424.               returning the segment address (fseg) of the memory block where
  425.               the file was loaded, as well as the size of the file (bytes&).
  426.               If an error occurs when reading the file, errcode is an MS-DOS
  427.               error code and both fseg and bytes& are invalid.  If no error
  428.               occurred, errcode = 0.  To release the far memory allocated by
  429.               this function, use FreeDOS.  See DATA.DOC.
  430.               The complete segment:offset address of the memory block is
  431.               fseg:0.  Note that FLoad requires ASIC's extended math option.
  432.  
  433. Example:
  434.  
  435.         filename$ = "\ramfont\italics.fnt"
  436.         call sub "fload", filename$, fseg, bytes&, errcode
  437.  
  438.         if errcode > 0 then
  439.         REM  error handling code
  440.          .
  441.          .
  442.          .
  443.  
  444.  
  445.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  446.  
  447. FOPEN:        Open an existing file for buffered input or output
  448.  
  449. Parameters:   file$, mode, handle, errcode
  450.  
  451.               File$ is the name of the file you want opened.  Mode is the
  452.               access mode: 0 = read only
  453.                            1 = write only
  454.                            2 = read/write access
  455.               Handle is the file handle returned by FOPEN for later access
  456.               to the file.  FOPEN returns a non-zero MS-DOS error code
  457.               in errcode if someting went wrong.
  458.               When a file is opened by FOpen, the MS-DOS file pointer is
  459.               positioned at the start of the file.  Use FSEEK to position
  460.               the pointer at the end of the file, for appending the file.
  461.  
  462. Example:
  463.  
  464.         File$ = "anyold.fil"
  465.  
  466. REM  read-only access
  467.         mode = 0
  468.         call sub "fopen", file$, mode, handle, errcode
  469.  
  470. REM  check for errors ...
  471.         IF errcode > 0 THEN ...
  472.  
  473.  
  474.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  475.  
  476. FPUT:         write specified data to output file buffer
  477.  
  478. Parameters:   handle, dataseg, dataoffset, bytes, errcode
  479.  
  480.               Handle is the file handle returned by ASILIB's FOPEN or
  481.               FCREATE subroutines.  Dataseg is the segment address of the
  482.               data you want to write to the file.  Dataoffset is the
  483.               offset portion of the data's address.  Bytes is the number
  484.               of bytes of data you want written, and errcode is an MS-DOS
  485.               error code.  Errcode = 0 if there were no problems.  The data
  486.               segment may either be the segment address returned by
  487.               ASILIB's AllocDOS or FLoad subroutines, or for data
  488.               initilaized by ASIC, the segment address may be found with
  489.               ASILIB's ASICDS subroutine.
  490.  
  491. Restrictions: Limited to 32767 bytes per call.  You may call FPUT more
  492.               than one time if you have more data to write.
  493.  
  494. Example:
  495.  
  496. REM  I want to save a text-mode screen as a disk file
  497. REM  I'll use FCREATE to open the file and FPUT to write the screen
  498. REM  to the file.  For this example, I'll assume the screen is 25 rows
  499. REM  and 80 columns and is color.
  500.  
  501.         file$ = "screen.dat"
  502.         call sub "fcreate", file$, handle, errcode
  503.         if errcode = 0 then
  504.           call sub "fput", handle, &hexB800, 0, 4000, errcode
  505.         endif
  506.  
  507.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  508.  
  509. FPUTCHR:      write one byte to output file buffer
  510.  
  511. Parameters:   handle, byte, errcode
  512.  
  513.               Handle is the file handle returned by ASILIB's FOPEN or
  514.               FCREATE subroutines.  Byte is the byte you want to write to
  515.               the output buffer, and errcode is an MS-DOS error code.
  516.               Errcode = 0 if there were no problems.
  517.  
  518. Example:
  519.  
  520.         call sub "fcreate", file$, handle, errcode
  521.         if errcode = 0 then
  522.           call sub "fputchr", handle, byte, errcode
  523.         endif
  524.  
  525.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  526.  
  527. FPUTCRLF:     add carriage return/line feed bytes to a file
  528.  
  529. Parameters:   handle, errcode
  530.  
  531.               Handle is a handle returned by FOPEN or FCREATE; if opened
  532.               by FOPEN, the file must have been opened with Write or
  533.               Read/Write access.  Errcode is returned by FPUTCRLF to the
  534.               calling program; if errcode = 0, no error was detected,
  535.               otherwise, errcode is an MS-DOS error code.
  536.               The carriage return/line feed pair of bytes is the standard
  537.               DOS file "next line" signal; use FPUTCRLF after calling
  538.               FPUTSTR if you want the next FPUTSTR to be written on the next
  539.               line.
  540.  
  541. Example:
  542.  
  543. REM  I'm adding two lines to a file
  544.  
  545.         string1 = "This is the first line"
  546.         string2 = "This is the second line"
  547.         call sub "fputstr", handle, string1, errcode
  548.         call sub "fputcrlf", handle, errcode
  549.         call sub "fputstr", handle, string2, errcode
  550.  
  551.  
  552.  
  553.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  554.  
  555. FPUTSTR:      write a string to output file buffer
  556.  
  557. Parameters:   handle, outputstring$, errcode
  558.  
  559.               Outputstring$ is the string you want written to the file.
  560.               Handle is the file handle returned to the calling program by
  561.               FOPEN or FCREATE.  Errcode is an MS-DOS error code returned
  562.               by FPUTSTR if something went wrong.  If no error, errcode = 0.
  563.  
  564. Restrictions: FPUTSTR does not add a CF/LF to the end of the string.  See
  565.               FPUTCRLF.
  566.  
  567. Example:
  568.  
  569. REM  write outputstring$ to the output file and add a carriage return/
  570. REM  line feed pair to the end of the string.
  571.  
  572.         call sub "fputstr", handle, outputstring$, errcode
  573.         call sub "fputcrlf", handle, errcode
  574.  
  575.  
  576.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  577.  
  578. FSEEK:        Move DOS file pointer forward or backward in file
  579.  
  580. Parameters:   handle, offset&, method, errcode
  581.  
  582.               Moves the file pointer from its present position forward or
  583.               backward in the file.  The file must have been opened by FOpen
  584.               or FCreate.  Offset& is the number of bytes to move the
  585.               pointer.  Errcode is an MS-DOS error code.  Note that FSEEK
  586.               requires ASIC's extended math option.  The method parameter
  587.               is:
  588.  
  589.                 0 if offset& is absoute offset from start of file
  590.                 1 if offset& is signed offset from current file pointer
  591.                 2 if offset& is signed offset from end of file
  592.  
  593. Example:
  594.  
  595. REM  I want to skip forward 200 bytes
  596.         offset& = 200&
  597.         method=1
  598.         call sub "fseek", handle, offset&, method, errcode
  599.  
  600.  
  601.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  602.  
  603. FSIZE:        Determine size of file opened by FOPEN
  604.  
  605. Parameters:   handle, filesize&, errcode
  606.  
  607.               Handle is a valid handle returned by ASILIB's FOPEN subroutine.
  608.               Filesize& is the size of the file, returned by FSize.
  609.               Errcode is an MS-DOS error code indicating any problems.  If
  610.               errcode = 0, no error.  FSize requires ASIC's extended math
  611.               option.
  612.  
  613.  
  614. Example:
  615.  
  616.         call sub "fopen", (file$, mode, handle, errcode)
  617.         if errcode > 0 then . . .
  618.          REM        error control stuff
  619.         call sub "fsize", (handle, filesize&, errcode)
  620.         if errcode > 0 then . . .
  621.          REM        more error control stuff
  622.  
  623.