Make your own free website on Tripod.com
[front] : [next] :

Further conditions for usage and distribution apply as mentioned in the front page.


QVFS

QDOS Virtual File System - v06
A preliminary release of an internet style filing system for the QL
Pse, save this text in case you want to use the QVFS as there is no english documentation in the archive.
v05/v06: Bugs fixed, fs.headr extended, MAJOR CHANGES in the directory structure.
Find the version changes by looking for the text segment "QVFS v".

Some features:




The archives:

"qvfs06.zip"

"qvfs06b.zip"
"e84" editor

Copyright (C) 1997 by Hans-Peter Recktenwald, Berlin - .hpr97
Author: H.-Peter Recktenwald, D-12159 Berlin, Albestr. 21; email: phpr@snafu.de

The program/code and its accompanying texts may non-commercially and cost free be used and distributed freely.
Any commercial entities that somehow relate to or rely on this file system require a license agreement (re below).
Publishing (any section of) this text is permitted but requires this copyright notice included and a proof copy.


Sorry, due to an ugly HTML-"helper" the text formatting got lost and was not yet fully recovered...


The QVFS system description

Just for legal reason:
This description relates to what the author at the time of writing found the program did and does not promise anything, and thus, with or without a commercial license, no warranty at all applies.

QVFS was made to achieve internet virtual F.S. compliance.
Though very similar, it is not (yet) a LINUX/UNIX style filing system.

This still is merely an experimental program/code. There are many system constellations to test where I simply do not possess the equipment for or, could not afford the time thorough testing would take. Thus alpha testers (who do not insist telling me to implementing a device definition as a "thing", or to writing "C"-code) would be welcome!

It can be linked into QDOS by loading and calling the code by LRESPR or RESPR/LBYTES/CALL
The code will then install a "simple" device handler, not(!) clobbering the very few physical QDOS drive definition tables by even more drives, which maintain the Inet-style filenames and the thus opened QDOS channels I/O and CLOSE operations - there is no FORMAT and only a substitute IDELETE.

The displacement figure required for the Qlib $$asmb directive to linking in the *Basic keywords will be shown immediately after initiating the code, enclosed with ":" characters.



... and that is it.




The QVFS will now take over the files open calls after the chain of "simple devices" was passed and check the names for their Inet-style properties and process those names that fit.

Inet-style names will be recognized if they begin with a slash "/", or if the beginning is one of the symbols "./" for the working directory path or "~/" for the home directory path.
The names will be expected specified as the full path+file names, explicitely, or after internally expanding the HD or WD path's symbols.

The other Inet names special symbols are

"/../" discarding the subdirectory level previously specified in a path description.
"/.." as the trailing characters represent the next higher directory level (towards root).
"/." as the trailing characters represent the directory of the given path.
"/"
will be required to be the last character when creating a new QVFS directory (OPEN_NEW, D3=2) or, to reading the corresponding standard QDOS directory (*Basic: DIR inetname$), and will be read as "/.", otherwise.
"/" a single slash denotes the root directory as set up with the .dev option.
"/" if not in QDOS FS preference mode any other names containing a slash will be tried as Inet style names of files residing in the "working directory" path.
This is much like the LINUX/UNIX FS's, with the exception that those systems do the path-to-root extension internally, which they can, because they safely "know" of what an environment they are in - which the QVFS OPEN call thus can not, and requires the user to at least notify the system of which kind of FS to use. The only extra action required, though, if a name does not already begin with a slash to denoting a fully specified root path is inserting the leading "./" to make a "current path's" name recognizeable. - For **X style automatic WD insertion re below, "naming mode preference".

QVFS 05:
Further, any QDOS style filenames wherein a "/" character was found and which do not begin with one of the above mentioned symbols will be tried Inet style in the working directory and, responded to with a bad name error (-12) if no match found - unless the concerning VFS branch was set to QDOS preference.

No QDOS name designed to be accessible by an Inet-name should contain a character code of 0 till 31. Those characters can be used as another means to exclude a QDOS file from QVFS access.


Several additional features will be available to any job that is an owner of a VFS channel or any successor of such a job. Thus, if assigned to the 1st *Basic job any other program in the QL which was executed after has access to the Inet style FS and its long pathnames - if not some error "protection" within those jobs themselves prevent their use!

When creating new names the path will be taken as set, and the filename added with its first character plus any other characters taken from its end until the QDOS limits are reached. For instance
Working directory: /hd2/inetfiles/system/data/
New file: ./a very long filename with.xtn
Producing: /hd2/inetfiles/system/data/aame with.xtn
Directories of any level, created by the QVFS, will always enable filenames translated to QDOS of up to 27 characters without being truncated. The Inet style path+filenames are limited to the sum of 255 characters, over all. No limits on the number of nested sub-directory levels exist.

The underlying QDOS FS is limited to no more than 15 sub-directory levels, by the filename length limit of 36 (31 if NETworking) characters. This has been overcome by simulating the Inet-names style directories in a way that no limits at all apply to nested directory levels. Those appear as they should when maintained with the QVFS routines, but reside all in the basic QDOS directory of the device concerned, not nested at all, with an arbitrary unique filename, derived from the current DATE value.Therefore each call to creating a directory will be delayed by about one second, to guarantee for unique names in case of fast consecutive such attempts.

[ :HIER: ndern - z.b. durch hilfs-zhler, lo-byte, anstelle hi-byte von 'date' ]

This naming mode does not apply to names created by VFS_SYNC, etc., thus it will be essential to keeping the assignment files safe, as it would be very difficult to restoring the correct directory structure after such a file was lost. - Which can be done by backtracking the 1st assignment of those files.

An additional OPEN mode was introduced, OR-masking the common QDOS open code in D3 by the value of 8, thus modifying any standard OPEN call to its write only mode.
After opening the channel will return with the file pointer set to EOF.
Any attempt to reading from such a channel will be responded with the err.ef (-10) error code in D0.
The new commands FOP_WO, OPEN_WO and VFS_FOP support this mode in *Basic programs. Another OPEN mode can be forced by ORing the standard code with 16, or be left to the system which regardless of what was requested will always use the OPEN code of 17 when OPENing a channel the name of which ends with "/." or "/..", where the actual QDOS channel will be opened r/o as OPEN_IN.
A thus opened file will be regarded as an Inet type directory file the entries of which can be read with a specific INPUT (or io.fline) call - re below. Because the QDOS does not permit shared r/w access to the standard directory devices no new files can be created while the directory file concerned is opened on behalf of any other QVFS call.

QVFS v06, modified:
New Inet type directories - the names of which end with a slash, and are till unknown to the system - can be created with the open code 18. Alternatively a standard OPEN-NEW calll can be used (code 2), where the QVFS will then modify the open code of a conformant name, internally.
Due to the above mentioned QDOS reasons no files of the initial directory level and its successors can be acessed until the end of this process.
While an empty initial assignment file will also be produced by this call (or an existing one left untouched) a VFS_SYNC call will be required to enabling access to any previously unknown conformant files.

The QDOS trap call to deleting a file will not be propagated to the simple devices handlers. This also applies to FORMAT and works out as a safe means to protect the QVFS from external sabotage. Nevertheless, to facilitate the necessary files maintenance a substitute "idelet" can be called with the io.open QDOS trap (trap #2, D0=1) the mode flag set to -1 (in D3), which will outcomment the registered entry in the assignment list and delete the assigned QDOS file, while any other -ve mode flag can be used to just invalidating the Inet name while leaving the QDOS file intact (QVFS v04).
IDELETE is the corresponding new *Basic procedure. ...with an Inet name is not possible (re above).
It can be done from any QDOS program, though, using the standard *Basic/QDOS calls. Links to other files or directories can simply be installed by assigning another Inet name to the same QDOS name or, by the same Inet filename in different directories to different QDOS names; and by a redirected full QDOS name ("/device+filename") assigned to any possible Inet path+name, where then any further levels of redirection could be introduced with the "DEV" virtual device, etc.
But, still, simultaneous multiple access can only be enabled with all channels in the r/o mode - which is a QDOS feature the QVFS (in its present state) cannot override. The working directory is much like the TK2 device default, but more suitably implemented to the QDOS style multitasking systems, as any job(-tree) with a VFS channel will maintain its own independent path.

A path, ending with a "/" slash, can be passed to a VFS channel via the QDOS trap fs.heads or by the *Basic function VFS_WD, which additionally returns the previously set path. The working directory, if set, can then be abbreviated with the symbolic pathname of "./" followed by any further directory level, the backstep symbol(s) inclusive, and the filename requested.

Working directory: owd$ = VFS_WD(#vfs-channel,"/hd2/inetfiles/system/data/")
Filename: /filename.extn
Opening: ch = VFS_FOP(open_code,"./filename.extn")
The VFS-device QDOS-traps io.sstrg and io.fstrg - *Basic PRINT and INPUT - are implemented such that they push and pop a directory segment to/from the WD path (re below, *Basic and QDOS extn's). Another directory path inherent to the VFS channels, each, the only difference of which to the "working" directory path is that it can only be set and manipulated from job 0 (the supervising basic *Basic job) or from the particular VFS channels owner job. *Basic function: VFS_HD, re below. The QVFS can be set to preferably use Inet style names, always inserting the working directory path if no slash leads the channels OPEN names, or to QDOS names only mode, not recognizing any Inet style names at all. The standard mode is 1st trying to decode an Inet name by its leading characters, as stated above, and if that failed and the name does not contain a slash character, proceding to the QDOS directory-devices for further names decoding.
Several specific OPEN names exactly as written below set the FS preference:
  1. QDOS names only: old_flag=VFS_FOP(4,"VFS .fss QLF")
  2. Inet names only : old_flag = VFS_FOP( 4, "VFS .fss VFS")
  3. Standard mode : old_flag = VFS_FOP( 4, "VFS .fss STD")

  4. This mode will also be set if neither of the above .fss-specifiers fit.
"old_flag" will be returned as a +ve 32-bit number (in D0 to QDOS, or as ERNUM to *Basic) with bit 30 set and the flag code in the l.s.byte, -1:Inet-, 0:Standard-, 1:QDOS names decoding mode, and can best be read after some sedecimal conversion, i.e. HEX$ (TK2) or TO_BASE$ (IO2).
The current state can be locked or unlocked by a special sd.extop call (re below), which will be executed if called from job 0, only (*Basic function re VFS_LOK). An error code extensively used by the VFS OPEN routines is the "bad name" error (-12), which is the only one that can safely, i.e. with no other effects, prevent the TK2 routines from inserting its globally set device defaults. Thus the QVFS channels opening errors messageing is not very informative.
The bad name error can be triggered after a bad name was recognized, but also instead of the "not found", "already exists" or "in use" errors. And, it will be returned, due to temporary inaccessiblity of the directory file, if at any level in the search path a file creation or deletion process is currently being run by another job. Often some more precise information can be gained from the internally stored error code in the cdt variables of the VFS channel involved (*Basic: VFS_ERR) which will be set whenever possible.
  1. FORMATting via the Inet names system is not possible.
  2. Different jobs can be assigned different devices lists to.

  3. Different trees jobs cannot access eachothers separate devices lists.
For instance, setting up a very secure system could be done by
In a thus set up and locked system no un-assigned QDOS file can ever be accessed un-authorized, and the access mode cannot be changed other then from job 0, i.e. the basic *Basic job.
Never "know" any data the QVFS (and QDOS) tables supply!
There was a reason to do so: They may change! the filenames length and the header data, for instance.

There is no simple means of distinguishing a directory device name from a name meant to describe a simple device other than by a trial open and directory read which can help to finding out wether a device is capable of files and/or directories simply because the appropriate QDOS traps work, or not in which case a non-directory device might have been found.

Further, the QVFS does provide an sd.extop call, and thus cannot be distinguished from a CON type channel that way, either. But, for those who still feel they cannot trust the QDOS routines a special marker was provided in the handler and in the channels definition tables - re below.

Another warning: Do not falsely interpret the physical data returned by the fs.xinf call, providing some extra media information, unlike the logical data of a directory entry supplying a uniform header structure for each of the several types of QDOS channels.


The QVFS *Basic extensions

Procedures
Many of the keywords default to the currently supervising VFS channel.
Parameters in [brackets] are optional.
The VFS channels can be specified by the full QDOS channel-ID, the QDOS index
or, by their *Basic related channel number if preceded by a "#" number sign.
Delete a file by its Inet name and outcomment the entry in the assignment list concerned.
Directories can only be deleted if empty.
The procedure will always return error free, the error code stored in ERNUM (re VFS_RNUM). Open an until then unused file write only, with the initial file pointer set to EOF. With "qdosdirectory_" specifying the full QDOS path, the devicename inclusive, will produce an assigment file with the filename which previously was passed with the OPEN_DIR call and the ".nam" description, appended to "qdosdirectory_", containing any currently existing filenames of that directory.
For system security reasons any base level directory can only be initiated by a call from job 0.
The VFS channel error code will not be propagated, but can be read with VFS_ERR (re below).
QVFS v06: Standard QDOS F.S. (MDV, QLAY's WIN) related bug fixed. Preliminary.
Re-initiating the *Basic commands in case they were overwritten by other equally named extensions. Might also help, under certain conditions, to registering the names to a *BASIC job of SMSomething or MINERVA if the extension was loaded after the secondary *Basic was set up - some externals calling code as "VGET" of IO2 may be required or, if suitably modified, the "basicv" extension. Extending the working directory path by "inetdirectory/".
The channel defaults to the own or a preceding VFS channel in the current jobs branch. Preliminary.
Service while program development, not designed for common use: Unlinking the device(s).
Functions
Opening the file inetname$ in the write-only mode and returning the corresponding *Basic channel number, or an appropriate error code - re VFS_FOP. This is just a fixed length of 512 bytes input function, which if called with an Inet type directory channel will be returning an empty string after EOF or, the next directory entry and fileheader information, the structure of which is specified below.
An optional parameter can be passed for the number of the directory entry to be fetched.
The **X style first two entries, showing the current and the preceding directories denoted by the pseudo names of "." and ".." are accessible by the entry numbers of -2 (current) and -1 (preceding).
The filepointer positioning calls (QDOS, TK2, IO2) respond to those numbers in a way that the corresponding entry will be read next, but return zero for the current filepointer. The error code which might have been stored internally due to a system files error, the number of which for QDOS reasons could not have been passed as the VFS channels regular error result.
The channel defaults to the own or a preceding VFS channel in the current jobs branch. As FOP_WO but with the open mode explicitely passed as "open_mode":
open_mode access TK2 equivalent
0 r/w FOPEN, the standard r/w open call
1 r/o FOP_IN, shareable read only
2 r/w FOP_NEW, create and open a file
3 r/w FOP_OVER, overwrite and open a file
4 dir FOP_DIR, open a directory, read only
8 w/o the OR mask modifier to "write only"
17 r/o OPEN Inet style directory file
18 r/o create an Inet and its corresponding QDOS style directory
Any QVFS channel the name of which ends with "/." or "/.." will be set to mode 17, the corresponding QDOS channel being opened mode 1, r/o, regardless of the initial open mode command

QVFS v06, modified:
Names ending with "/" will be used to create a new directory, if "open_mode"=2 was passed, and not being responded to with an open channel; the call returning the VFS-ID on success, -12 otherwise.
Creating a new directory will insert any conformant QDOS files to the corresponding QDOS directory, and, if not already existing, produce an empty Inet names assignment file. Re-synchronizing will only be required to enabling any existing (additional) QDOS files - re VFS_SYNC, VFS open trap.

Reading the current and storing a new path to the home directory.
Reading only, with no change, if inetpath$="".
The home path can only be changed by its owner or by job 0.
The channel defaults to the own or a preceding VFS channel in the current jobs branch. Reading the Inet type virtual fileheader of the file "inetname" or of an open channel. Find the current (calling) or the specified jobs supervising VFS channel. Locking (flag =/= 0) or unlocking (flag = 0) the FS names decoding preference mode for the job which owns the specified VFS channel, and that jobs branch until another VFS channel can be found.
Thus different jobs can be in a different state, and different jobs can be locked to different FS's.
Newly created VFS channels of other jobs inherit the lock state of its creator.
The channel defaults to the own or a preceding VFS channel in the current jobs branch.
The function will be active if called from job 0, only. Shorten the working directory path by one level, the name of which will be returned as a string.
The channel defaults to the own or a preceding VFS channel in the current jobs branch. Returning the full size (32 bit) *Basic error code (from $c2(a6), bv.error) as an fp number. Ernum = -9 (err.iu) if the calling job already owns a VFS channel, 0 otherwise. Reading the current and storing a new path to the working directory.
Reading only, with no change, if inetpath$="".
The channel defaults to the own or a preceding VFS channel in the current jobs branch.

Yet unsolved...

  1. Removing a job which is the owner of a VFS channel can leave its system channels open.
  2. Directory read errors might occur due to timing problems via the NETwork fileserver which sometimes did corrupt the cdt pointer in the QDOS tables - the reason of which is still a mystery.
  3. Occasional timing errors were encountered when calling the directory read traps from a secondary *Basic job - which are non-destructive and can be overcome by re-reading.
  4. Early timeout and incorrect data handling in the SMSQ/E versions was the reason for other errors with (slow) NETworking NFS channels, resulting to the destination channels left open.
  5. In the Standard QL (un-expanded, or with TrumpCard) any external i/o-calls with a channel to the root directory, e.g. IDIR"/", got stuck, while no other directories did produce that error.
  6. The SMSQish systems seem (in fact, they do, confirmed by many tests...) to unrecognized overwriting the slave blocks of a single file to which multiple concurrently opened r/o channels exist, not re-fetching them on an attempt to read. This can work out to any number of Inet directories appearing unreadable, though most often remaining accessible. "Normal" r/o access might result in a bad media error (-16).
Any idea? - email

Modified Inet type channels QDOS-Traps:

Data sizes 32 bit if not stated otherwise.
Registers not mentioned remain unchanged or, if applicable return the standard QDOS values.

The additional trap#2 open mode calls:
io.open D0=1 D1/A0 parameter passing and D0 error code as usual.

 D3 OR-Mask 8 "open w/o" modifier:
 D3 Any OPEN mode can be OR masked to the corresponding r/o mode.
 Reading operations will be responded to by the err.ef (-10) error code.
 QDOS-i/o-traps disabled are D0 = 0..3, 8..11, 69, 72 and 78+.
 The filepointer will initially be set to EOF.

 D3 OR-Mask 16 "idir" modifier:
 D3 17 "read idir", directoryfile, r/o; alternatively
 D3 1 plus the Inet name ending with "/." or "/..".
 This mode will be set internally if the path+filename supplied
 ends with "/." or "/..", and passed to QDOS as standard "r/o".

 D3 18 "create idir", create a new directoryfile; alternatively
 D3 2 plus the Inet type name ending with "/".
 An Inet type directory entry will be created in the current level
 assignment file and a uniqely named QDOS directory and, if not yet
 present, an empty corresponding QVFS directoryfile newly set up.
 This mode will be modified, internally, from a call to create a
 new file if the path+filename supplied ends with a slash "/" and
 be responded to with
 D0 = the supervising VFS channels ID on success or,
 D0 = -12 if the directory was not installed
 A0 undetermined, this call leaves no open channel.

 D3 -1 "idelete"
 Replacing the standard io.delet call (D0=4).

 D3 -ve "iremove" QVFS v04
 D3 any -ve value but -1 can be used to recoverably invalidating the
 Inet to QDOS assignation, by out-commenting the entry concerned,
 and not physically deleting any data.
With the following exceptions (trap#3):
 NOTE:
 For the special operations on Inet-style directory files
 D3:=-1 is almost mandatory, uncertain (though not unsafe)
 operation might result, otherwise.
 The repetitive nature of certain calls occasionnally may lead
 to unexpectedly long execution times of up to several seconds,
 depending on the storage media involved.

D0=02, 03 io.fstrg, io.fline fetch a string/line of bytes
 modified handling for directory type channels, only, re below.

D0=71 fs.headr read the (file)header
 IN: D2.L = 512 used to return the Inet type 512 bytes header.
 D2 any other value used to return the QDOS standard data.
 A1 buffer address, if D2=512 odd A1 values will be rejected.
 OUT: D0 = -13, err.te if validating failed or odd address encounterd
 D1 received length (512, any value other than D2 is an error)
 A1 points to after the 512 bytes buffer space; for the received
 data structure re to "fs.headr type QVFS fileheader", below.

D0=74 fs.renam rename a file
 *** yet to be implemented ***
 D1 specifying the over all length of the string at (A1)+.
 A1 even address pointing to the new QDOS type name with leading
 count.w, followed by the <nul> terminated new Inet type name
 at the next even address.

 The trap call will 1st modify the Inet assigned name by
 outcommenting the old and appending the new pair of names,
 then call the QDOS routine. Thus the Inet name will even
 appear changed if the QDOS call failed! - Which can be
 recovered only by editting the assignment file concerned.

 D0 = -12 (err.bn) will be returned if D1 was out of bounds,
 D0 = -13, err.te if validating failed or odd address encounterd
Directory type "ccc/." channels special i/o handling (trap#3):
D0=02, 03 io.fstrg, io.fline fetch a string/line of bytes
 IN: D2 = 512 to fetching the current directory entry,
 D3 = -1 (almost) mandatory (re above),
 D3 at any other value can result to incomplete data transfer.
 A1 buffer address; if D2=512 odd values of A1 will be rejected.
 OUT: D0 = -13, err.te if validating failed or odd address encounterd
 D1 received length (should be no other than 512)
 A1 points to after the 512 bytes buffer space; for the received
 data structure re to "directory type QVFS fileheader", below.
 The buffer will initially be set to all -1, which when this value can
 be read anywhere in the leading 52 bytes or in the Inet name space
 denotes the data not being read (D3 was not set to -1?), and the
 filepointer left at its previous state, enabling loss free re-reading.
QVFS v05: The root directory headers will be made up from the devices
 assignment file, only, no QDOS headers being fetched, because
 of frequent QDOS/PIF related errors.

D0=66 fs.posab




 IN: D1 = number of the entry to be addressed,
 further data as fs.posre.

D0=67 fs.posre
 IN: D1 = number of entries by which the reqired directory entry
 is displaced to the current one.
 OUT: D1 = QDOS style file position at the beginning of the
 line containing the directory entry requested.
 If the absolute number results to -2 or -1 the file pointer
 will be read as zero, while the next consecutive directory
 reads will start at the the pseudo headers of the current (-2)
 or the one step back directories, "." and "..", respectively.

"VFS"-Channel QDOS-Traps:
Those calls apply to the QVFS control channels, only.

D0=02 io.open
 D1 = -1 or owner job ID
 D3 = any non-directory type code
 Setting up a very simple NUL-device channel,
 returning EOF on any reading operations and responding OK
 to writing, with D1 set to D2 on entry, A1 advanced by D1.

 D3 = 4 directory type,
 the general purpose QVFS supervising channel mode:
 A0 = ptr to a special name as explained above,
 which must be written exactly as stated (below).
 The actions concerned apply to the calling jobs VFS channel.

 "VFS .opn"
 registering a QVFS instance to the channels owner job
 "VFS .dev devN_filename"
 registering the enabled devices list.
 "VFS .nam devN_filename"
 registering the 1st files assignment list
 and determining the lists filename used
 throughout this QVFS instance.
 "VFS .nam devN_directory_"
 producing a complete assignemt list of and in the
 directory specified, the listfiles name will be as
 passed with the above .nam registering call.
 "VFS .fss VFS"
 Set QVFS mode to Inet names preference.
 Any names 1st will be tried for Inet style feasibilty,
 with the WD inserted to lead the name if applicable.
 "VFS .fss QLF"
 Set QVFS mode to QDOS names preference.
 Disabling the Inet names decoding.
 "VFS .fss STD"
 Set QVFS mode to standard preference, i.e. if Inet type
 names check failed passing control to the QDOS devices.
D0=01 io.fbyte Not implemented

D0=02, 03 io.fline, io.fstrg pop from WD
 Pop latest directory segment from working directory path.
 FLINE can be accessed with the *Basic command INPUT.
 IN
 D2 buffer length
 D2 = 0 flag to clearing the path entry
 A1 buffer address
 OUT
 D1 segment length
 A1 points to the <nul> byte after the segment string

D0=05 io.sbyte Not implemented

D0=07 io.sstrg push to WD
 Append a directory to the working directory path.
 The string should be terminated with a <nul> byte.
 SSTRG can be accessed by the *Basic command PRINT.
 IN
 D2 string length
 A1 buffer address
 OUT
 D1/A1 as io.fline

D0=09 sd.extop user defined
 Can only be accessed by job 0 or by the VFS-channels owner job.
 Parameters & execution routine user supplied. QVFS data re below.
 Odd values of A2 will be rejected, if not in the range of 1 to 9.
 Registers a0/a3/a4/a5/a6 will safely be restored, internally.
 IN:
 D1/D2/A1 user supplied data.
 A2 user supplied execution address.
 ENTRY:
 D0 -15 err.bp
 D1/D2 parameter
 D3 set by QDOS (0 or -1)
 D4 what originally was passed as A2
 D5 0 Null
 D6 47 "/" character
 D7 undetermined
 A1 parameter
 A2 actual call address
 A3 handler base address
 A4/A5 undetermined
 A6 QDOS system variables
 A7 SSP
 OUT:
 D0 -2 after an unauthorized call.
 D1/A1 as supplied by the user defined routine.

 Special: A2 = 09 Store a new 'home' path
 Accessible by job 0 and the VFS-channel owner job only.
 IN: A1 buffer, string with leading count.w.
 OUT: D1/A1 as io.fstrg
 A2 = 07 Read old & store new WD
 Accessible by any job.
 IN:
 A1 address of a buffer at least 256 bytes of size.
 The buffer size will not be checked internally!
 OUT:
 D1/A1 as io.fstrg
 A2 = 05 Read old & store new HD.
 Accessible by job 0 and the VFS-channel owner job only.
 Parameters as A2=07
 A2 = 03 Lock/unlock decoding mode.
 Accessible by job 0 only.
 D1 =/= 0 locking flag, unlocking otherwise.

D0=70 fs.heads set WD
 Set fully specified working directory
 Parameters as io.sstrg.
 The string further delimited by a <nul> character.

D0=71 fs.headr read WD
 Read working directory of the VFS-channel's owner-job(s chain)
 Parameters as io.fline
 D2 = 512 can be used to fetching the 'home' path.

D0=74 fs.renam set 'home'
 Set 'home'-Directory.
 Accessible by job 0 and the VFS-channel owner job only.
 IN
 A1 buffer address of string with leading count.w
 OUT
 D1/A1 as io.fstrg

QVFS system tables. - Preliminary -

Items size 32-bit if not stated.
There is no free space unless explicitely denoted available to the user.
Actual label values can be found in "qvfs_dat", included in the QVFS archive.

Offsets refer to the base address of the channel definition table, as supplied with A0 in an sd.extop call.
 name disp size use
 dflg 24 signature "VFC"<<8
 dhnd 28 handler base address of primary channel
 doco 32 open mode as passed with D3
 dcdt 36 primary cdt
 dchn 40 primary channel ID
 dvfs 44 ID of supervising VFS channel
 dvjp 48 6 .b i/o trap redirection entry point
 (subroutine call destination address can vary!)
 dhrt 54 primary's i/o return address
 dhcd 58 2ndary (this) cdt base address
 dcvfs 62 address of the supervising VFS cdt
 dfpos 66 current directory entry number
 ddpos 70 current directory entry filepointer
 ... (internal workspace & auxiliary data)
 dnam 594 258 .b count.w + Inet type full path+filename
 dqnm 852 46 .b count.w + QDOS type full device+filename
 ...
Displacements refer to the handler base address, as supplied with A3 in an sd.extop call.
The Inet type auxiliary channel handler linked to the VFS handler by the displacement of (pdtab-pfxntl).
 name disp size use
 pfgnm -36 "QVFS" signature
 pfver -32 "VF06" current release no.
 pxcde -28 base address of the extension code (QVFS v06)
 pqver -24 .w bcd packed QDOS version number
 pfqfl -22 .b -1:SMSQ/E, 0:QL, 1:SMSQ
 pqlfl -21 .b 0:QL hardware present (IPC), -1 otherwise
 pmifl -18 .w -1:MINERVA, 0 otherwise
 pfctab -8 base link into VFS channels' posn qclnk(a0)
 pfccnt -4 .w count of VFS channels currently open
 pdirt -1 .b actual OS' directory file encoding flag
 pfxntl 00 10 .l VFS handler reference
 ...
 pqnmi 40 ID of initial .nam option channel
 pqnmc 44 .w usage counter
 ...
 (.dir & .lok currently unused)
 pqdvi 64 ID of initial .dev option channel
 pqdvc 68 .w usage counter
 pdtab 72 48 .b 2ndary handler reference
 pqdir 120 48 .b (another dummy handler, yet unused)
 ...
Displacements refer to the base address of the channel definition table.
 name disp size use
 qoco 24 open mode as passed with D3 on open
 qnam 28 .nam option channel ID
 qnmc 32 .nam option cdt address
 ...
 qdev 52 .dev option channel ID
 qdvc 56 .dev option cdt address
 qdvh 60 4*8 .b .nam ... .dev channel handler address
 qdvu 62 .w usage counter
 qdvl 64 .w length of QDOS device description
 ...
 qclnk 92 VFS cdt link address
 qsnam 96 4*64 .b count.w+name of the system files
 ...
 qiwdr 412 256 .b working directory path
 qihom 668 256 .b home directory path
 ...
 qiwrk 932 448 .b workspace, volatile, can be used in extop routines
 ...
 quser 1762 128 .b user data (free space)

0002 vfs_fnd
 IN:
 -/-
 OUT:
 D0 VFS-channel handler base address, or -ve
0004 vfs_cid
 IN:
 -/-
 OUT:
 D0 currently valid VFS channel ID,
 0 or -ve if no such channel exists.
 D1 the callers job ID
 D2 the VFS channels owner job ID
 A2 the VFS channels base address
0006 vfs_rnm
 IN:
 A0 a VFS channel ID
 OUT:
 D0 that channels internal QDOS error code.
 -6 if no such channel exists.

 000...063 standard assigned QDOS header
 wherein 004 .w will be set to -1 if this is an error header
 064...081 count.w+QDOS-devicename
 082...249 reserved for future use
 250 count.w of QVFS path (w/o filename)
 252 count.w of QVFS device description
 254 count.w of the..
 256...511 Inet filename, <nul> terminated
 000...063 standard assigned QDOS header
 064 count.w of the...
 066...075 QDOS device name.
 082 count.w of qdos device+path description, current level
 084 count.w of qdos device+path description, previous level
 086 flag -1 if no QDOS header produced (con, pipe, etc)
 088 this directory entries consecutive number
 090 and filepointer.l to the assignement files line
 094...249 reserved for future use
 250 length of Inet device+path description,
 252 length of Inet type device description,
 254 length of the...
 256...511 Inet path+filename, <nul> terminated.

QVFS License

Anyone may use the QVFS in a particular computer free of charges, no matter what for.

Any commercial entities, those things inclusive which someone may be begging a "donation" for, that somehow make use of, rely on, or may be accompanied by, the QVFS require a license the fee of which is determined by the number of pieces intended to be sold, payed to the author in advance:

 - 10: DM 40,- Pounds Sterling 20,- U.S. Dollars 40,-
 - 50: DM 150,- 60,- 110,-
 - 200: DM 400,- 160,- 290,-
(Or any foreign currency equivalent to the above Pounds Sterling rates.)
The above rates are subject to change without public notice and do not
include any foreign trade taxes nor customs fees.
The licensee will receive a written permission to using the QVFS to whatever commercial purpose intended, according to the rate payed, which validates the license agreement.

[top] e-mail - QVFS v06 archive - the QVFS v06 extension code
= 140997'.hpr.g2 ==(count) nbsp;                The actions concerned apply to the calling jobs VFS channel.                 "VFS .opn"                         registering a QVFS instance to the channels owner job                 "VFS .dev devN_filename"                         registering the enabled devices list.                 "VFS .nam devN_filename"                         registering the 1st files assignment list                         and determining the lists filename used                         throughout this QVFS instance.                 "VFS .nam devN_directory_"                         producing a complete assignemt list of and in the                         directory specified, the listfiles name will be as                         passed with the above .nam registering call.                 "VFS .fss VFS"                         Set QVFS mode to Inet names preference.                         Any names will 1st be tried for Inet style feasibilty,                         with the WD inserted to lead the name if applicable.                 "VFS .fss QLF"                         Set QVFS mode to QDOS names preference.                         Disabling the Inet names decoding.                 "VFS .fss STD"                         Set QVFS mode to standard preference, i.e. if Inet type                         names check failed passing control to the QDOS devices.
  D0=01                   io.fbyte                Not implemented

    D0=02, 03               io.fline, io.fstrg                      pop from WD
                    Pop latest directory segment from working directory path.
                    FLINE can be accessed with the *Basic command INPUT.
            IN
                    D2      buffer length
                    D2 = 0  flag to clearing the path entry
                    A1      buffer address
            OUT
                    D1      segment length
                    A1      points to the <nul> byte after the segment string

    D0=05                   io.sbyte                Not implemented

    D0=07                   io.sstrg                                push to WD
                    Append a directory to the working directory path.
                    The string should be terminated with a <nul> byte.
                    SSTRG can be accessed by the *Basic command PRINT.
            IN
                    D2      string length
                    A1      buffer address
            OUT
                    D1/A1   as io.fline

    D0=09                   sd.extop                                user defined
            Can only be accessed by job 0 or by the VFS-channels owner job.
            Parameters & execution routine user supplied. QVFS data re below.
            Odd values of A2 will be rejected, if not in the range of 1 to 9.
            Registers a0/a3/a4/a5/a6 will safely be restored, internally.

            IN:
              D1/D2/A1        user supplied data.
                    A2              user supplied execution address.
            ENTRY:
                    D0      -15     err.bp
                    D1/D2           parameter
                    D3              set by QDOS (0 or -1)
                    D4              what originally was passed as A2
                    D5      0       Null
                    D6      47      "/" character
                    D7              undetermined
                    A1              parameter
                    A2              actual call address
                    A3              handler base address
                    A4/A5           undetermined
                    A6              QDOS system variables
                    A7              SSP
            OUT:
                    D0     -2       after an unauthorized call.
                    D1/A1           as supplied by the user defined routine.

            Special:
       A2 = 09                Store a new 'home' path                 Accessible by job 0 and the VFS-channel owner job only.             IN:                A1      buffer, string with leading count.w.             OUT:                D1/A1   as io.fstrg         A2 = 07         Read old & store new WD                 Accessible by any job.             IN:                 A1      address of a buffer at least 256 bytes of size.                         The buffer size will not be checked internally!             OUT:                 D1/A1   as io.fstrg         A2 = 05         Read old & store new HD.                 Accessible by job 0 and the VFS-channel owner job only.                 Parameters as A2=07         A2 = 03         Lock/unlock decoding mode.                 Accessible by job 0 only.                 D1 =/= 0 locking flag, unlocking otherwise. D0=70                   fs.heads                                set WD                 Set fully specified working directory                 Parameters as io.sstrg.                 The string further delimited by a <nul> character. D0=71                   fs.headr                                read WD                 Read working directory of the VFS-channel's owner-job(s chain)                 Parameters as io.fline                 D2 = 512 can be used to fetching the 'home' path. D0=74                   fs.renam                                set 'home'                 Set 'home'-Directory.                 Accessible by job 0 and the VFS-channel owner job only.         IN                 A1 buffer address of string with leading count.w         OUT                 D1/A1 as io.fstrg

QVFS system tables. - Preliminary -

Items size 32-bit if not stated.
There is no free space unless explicitely denoted available to the user.
Actual label values can be found in "qvfs_dat", included with the QVFS archive.

Offsets refer to the base address of the channel definition table, as supplied with A0 in an sd.extop call.
          name    disp    size    use
            dflg    24              signature "VFC"<<8
            dhnd    28              handler base address of primary channel
            doco    32              open mode as passed with D3 
            dcdt    36              primary cdt
            dchn    40              primary channel ID
            dvfs    44              ID of supervising VFS channel
            dvjp    48      6 .b    i/o trap redirection entry point
                                    (subroutine call destination address can vary!)
            dhrt    54              primary's i/o return address
            dhcd    58              2ndary (this) cdt base address
            dcvfs   62              address of the supervising VFS cdt
            dfpos   66              current directory entry number
            ddpos   70              current directory entry filepointer
                    ...             (internal workspace & auxiliary data)
            dnam    594     258 .b  count.w + Inet type full path+filename
            dqnm    852      46 .b  count.w + QDOS type full device+filename
                    ...
Displacements refer to the handler base address, as supplied with A3 in an sd.extop call.
The Inet type auxiliary channel handler linked to the VFS handler by the displacement of (pdtab-pfxntl).
          name    disp    size    use
            pfgnm   -36             "QVFS" signature
            pfver   -32             "VF06" current release no.
            pxcde   -28             base address of the extension code (QVFS v06)
            pqver   -24     .w      bcd packed QDOS version number
            pfqfl   -22     .b      -1:SMSQ/E, 0:QL, 1:SMSQ
            pqlfl   -21     .b      0:QL hardware present (IPC), -1 otherwise
            pmifl   -18     .w      -1:MINERVA, 0 otherwise
            pfctab  -8              base link into VFS channels' posn qclnk(a0)
            pfccnt  -4      .w      count of VFS channels currently open
            pdirt   -1      .b      actual OS' directory file encoding flag
            pfxntl  00      10 .l   VFS handler reference   
            ...
            pqnmi   40              ID of initial .nam option channel
            pqnmc   44      .w      usage counter
                    ...
                    (.dir & .lok currently unused)
            pqdvi   64              ID of initial .dev option channel
            pqdvc   68      .w      usage counter
            pdtab   72      48 .b   2ndary handler reference
            pqdir   120     48 .b   (another dummy handler, yet unused)
                    ...
Displacements refer to the base address of the channel definition table.
          name    disp    size    use
            qoco    24              open mode as passed with D3 on open
            qnam    28              .nam option channel ID
            qnmc    32              .nam option cdt address
                    ...
            qdev    52              .dev option channel ID
            qdvc    56              .dev option cdt address
            qdvh    60      4*8 .b  .nam ... .dev channel handler address
            qdvu    62      .w              usage counter
            qdvl    64      .w              length of QDOS device description
                    ...
            qclnk   92              VFS cdt link address
            qsnam   96      4*64 .b count.w+name of the system files
                    ...
            qiwdr   412     256 .b  working directory path
            qihom   668     256 .b  home directory path
                    ...
            qiwrk   932     448 .b  workspace, volatile, can be used in extop routines
                    ...
            quser   1762    128 .b  user data (free space)

  0002            vfs_fnd
            IN:
                    -/-
            OUT:
                    D0 VFS-channel handler base address, or -ve
0004            vfs_cid         IN:                 -/-         OUT:                 D0 currently valid VFS channel ID,                    0 or -ve if no such channel exists.                 D1 the callers job ID                 D2 the VFS channels owner job ID                 A2 the VFS channels base address
0006            vfs_rnm         IN:                 A0 a VFS channel ID         OUT:                 D0 that channels internal QDOS error code.                    -6 if no such channel exists.

                  000...063 standard assigned QDOS header
                    wherein 004 .w will be set to -1 if this is an error header
                    064...081 count.w+QDOS-devicename
                    082...249 reserved for future use
                    250 count.w of QVFS path (w/o filename) (+)
                    252 count.w of QVFS device description  (+)
                    254 count.w of the..
                    256...511 Inet filename, <nul> terminated
  
(+) QVFS07: omitted, path's can be of any length.254/256+ used for the filename.
                  000...063 standard assigned QDOS header
                    064 count.w of the...
                    066...075 QDOS device name.
                    082 count.w of qdos device+path description, current level
                    084 count.w of qdos device+path description, previous level
                    086 flag -1 if no QDOS header produced (con, pipe, etc)
                    088 this directory entries consecutive number
                    090 and filepointer.l to the assignement files line
                    094...249 reserved for future use
                    250 length of Inet device+path description, (+)
                    252 length of Inet type device description, (+)
                    254 length of the...
                    256...511 Inet path+filename, <nul> terminated.
(+) QVFS07: omitted, path's can be of any length.254/256+ used for the filename.

QVFS License

Anyone may use the QVFS in a particular computer free of charges, no matter what for.

Any commercial entities, those things inclusive which someone may be begging a "donation" for, that somehow make use of, rely on, or may be accompanied by, the QVFS require a license the fee of which is determined by the number of pieces intended to be sold, payed to the author in advance:

          -  10:  DM       40,-   Pounds Sterling  20,-   U.S. Dollars     40,-
            -  50:  DM      150,-                    60,-                   110,-
            - 200:  DM      400,-                   160,-                   290,-
    (Or any foreign currency equivalent to the above Pounds Sterling rates.)
    The above rates are subject to change without public notice and do not
    include any foreign trade taxes nor customs fees.
The licensee will receive a written permission to using the QVFS to whatever commercial purpose intended, according to the rate payed, which validates the license agreement.

[top] e-mail - QVFS v06 archive - the QVFS v06 extension code 
= 140997'.hpr.g2 = (count)