Sphinx‎ > ‎Documentation‎ > ‎Reference‎ > ‎

isxfs

Isxfs provides a convenient low-level interface to the Sphinx file system (sxfs). You must provide a 136-long area of memory (known in Sphinx as filestuff) for each file you want to open and pass the address of that area to each isxfs method you use. For a higher-level file object, see sxfile.

 Spin interface methods

  • PUB Open(pFilestuff, pFilename, mode) -- opens a file. mode is either "R" or "W".  Returns 0 on success. If opening for reading, returns 1 if file not found. 
  • PUB Close(pFilestuff) -- closes a file.
  • PUB Read(pFilestuff, pBuffer, nBytes) -- reads nBytes bytes from a file into hub memory starting at pBuffer.
  • PUB Write(pFilestuff, pBuffer, nBytes) -- writes nBytes bytes to a file from hub memory starting at pBuffer.
  • PUB Execute(pFilestuff, execmode) -- loads a file into memory and executes it. If execmode is non-0, perform the equivalent of a system reset before starting execution.
  • PUB Command(cmd, param0, param1, param2) -- execute an sxfs command.