home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 303.lha / AssemTools / sslib.doc < prev    next >
Text File  |  1980-12-03  |  3KB  |  173 lines

  1. ;
  2. ; DOCUMENTATION FOR SSLIB.LIB LIBRARY FILE
  3. ;
  4.  
  5.  
  6.  
  7. FileReq:    Create a file requester and ask the user
  8.         to select a file.
  9.  
  10.  Inputs:    - a0.l filename_buffer*
  11.         - a1.l pointer to window title ( <= 15 chars)
  12.  Outputs:    - a0.l filename* (not changed)
  13.         - d0.l success code:
  14.             0 = error, cannot create requester
  15.             1 = success, name gotten
  16.            -1 = user selected the Cancel gg
  17.         - name buffer: contains null-terminated filename
  18.  
  19.  Regs used:    - d0
  20.  
  21.  Author:    - tm 890711, see fir.asm
  22.  
  23.  
  24.  
  25.  
  26. fopen:        Open a buffered file for reading and writing.
  27.  
  28.  Inputs:    - a0.l filename*
  29.         - d0.l access mode (MODE_NEWFILE or MODE_OLDFILE)
  30.         - a6.l dosbase
  31.  Outputs:    - d0.l filehandle*
  32.             0 = error, cannot open file
  33.            -1 = no memory
  34.            gt = file opened succesfully
  35.  
  36.  Author:    - jm 890804, see ffile.asm
  37.  
  38.  
  39.  
  40. fclose:        Close a buffered file opened with fopen.
  41.  
  42.  Inputs:    - a0.l filehandle*
  43.         - a6.l dosbase
  44.  Outputs:    - .c   error flag (fflush failed)
  45.             1 = error, cannot flush buffer
  46.             0 = ok
  47.  
  48.  Regs used:    - none
  49.  
  50.  Author:    - jm 890804, see ffile.asm
  51.  
  52.  
  53.  
  54. fflush:        Flush the file buffer if any characters were written.
  55.  
  56.  Inputs:    - a0.l filehandle*
  57.         - a6.l dosbase
  58.  Outputs:    - .c   error
  59.             1 = error, cannot flush buffer
  60.             0 = ok
  61.  
  62.  Author:    - jm 890804, see ffile.asm
  63.  
  64.  
  65.  
  66. feof:        Check if any bytes left to read in file.
  67.  
  68.  Inputs:    - a0.l filehandle*
  69.         - a6.l dosbase
  70.  Outputs:    - .z   flag
  71.            eq = no bytes left (end of file)
  72.            ne = more bytes found
  73.  
  74.  Author:    - jm 890804, see ffile.asm
  75.  
  76.  
  77.  
  78. fgetc:        Read one byte from file from the current position.
  79.  
  80.  Inputs:    - a0.l filehandle*
  81.         - a6.l dosbase
  82.  Outputs:    - d0.b byte or d0.l = -1
  83.            -1 = no more characters or error
  84.  
  85.  Author:    - jm 890804, see ffile.asm
  86.  
  87.  
  88.  
  89. fgets:        Read one line from file.  Calls fgetc until a NULL
  90.         or LF character is read.
  91.  
  92.  Inputs:    - a0.l filehandle*
  93.         - a1.l buffer*
  94.         - a6.l dosbase
  95.  Outputs:    - d0.l number of bytes read
  96.             0 = no more characters or error
  97.  
  98.  Author:    - jm 890804, see ffile.asm
  99.  
  100.  
  101.  
  102. fputc:        Write one byte to file at the current position.
  103.  
  104.  Inputs:    - d0.b byte to be written
  105.         - a0.l filehandle*
  106.         - a6.l dosbase
  107.  Outputs:    - .c   error
  108.             1 = error writing file
  109.             0 = ok
  110.  
  111.  Author:    - jm 890804, see ffile.asm
  112.  
  113.  
  114.  
  115. fputs:        Write a string to file.  Calls fputc until a NULL byte
  116.         is encountered.
  117.  
  118.  Inputs:    - a0.l filehandle*
  119.         - a1.l buffer*
  120.         - a6.l dosbase
  121.  Outputs:    - .c   error
  122.             1 = error writing file
  123.             0 = ok
  124.  
  125.  Author:    - jm 890804, see ffile.asm
  126.  
  127.  
  128.  
  129. fread:        Read requested number of bytes from file.  Uses no
  130.         buffering and flushes the buffers if needed.
  131.  
  132.  Inputs:    - d0.l number of bytes to read
  133.         - a0.l filehandle*
  134.         - a1.l buffer*
  135.         - a6.l dosbase
  136.  Outputs:    - d0.l number of bytes read
  137.  
  138.  Author:    - jm 890804, see ffile.asm
  139.  
  140.  
  141.  
  142. fwrite:        Write requested number of bytes to file.  Uses no
  143.         buffering and flushes the buffers if needed.
  144.  
  145.  Inputs:    - d0.l number of bytes to write
  146.         - a0.l filehandle*
  147.         - a1.l buffer*
  148.         - a6.l dosbase
  149.  Outputs:    - .c   error
  150.             1 = error writing file
  151.             0 = ok
  152.  
  153.  Author:    - jm 890804, see ffile.asm
  154.  
  155.  
  156.  
  157. fseek:        Seek the file using AmigaDOS Seek() and handle the
  158.         file buffering as needed.
  159.  
  160.  Inputs:    - d0.l new file position
  161.         - d1.l seek mode (-1, 0, 1 as defined in dos.i)
  162.         - a0.l filehandle*
  163.         - a6.l dosbase
  164.  Outputs:    - .c   error
  165.             1 = error
  166.             0 = ok
  167.  
  168.  Author:    - jm 890804, see ffile.asm
  169.  
  170.  
  171.  
  172.  
  173.