Difference between revisions of "FSCV"

From BeebWiki
Jump to: navigation, search
m (Implementations)
(Boot options)
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:MOS_API]]
 
[[Category:MOS_API]]
Filing system control
+
{{PageTitle|FSCV: Filing system control}}
  
 
==Specification==
 
==Specification==
 
This vector is only called by the operating system, and should not be called
 
This vector is only called by the operating system, and should not be called
directly. This list just shows the full list of calls.
+
directly, and the vector should only be set by filing systems. This list just
 +
shows the full list of calls.
  
 
==Specification==
 
==Specification==
Line 20: Line 21:
 
| valign="top" | &00 || *OPT command. X and Y hold parameters.
 
| valign="top" | &00 || *OPT command. X and Y hold parameters.
 
|-
 
|-
| valign="top" | &01 || EOF on channel Y being checked with OSBYTE &7F. On exit, X=&FF if EOF, X=&00 otherwise. If Y=&00, (ie, EOF#0) action is implementation specific.
+
| valign="top" | &01 || EOF on channel X being checked with OSBYTE &7F. On exit, X=&00 if not at EOF, X<>&00 otherwise. If X=&00, (ie, EOF#0) action is implementation specific.
 
|-
 
|-
 
| valign="top" | &02 || */ command. XY points to the command text.
 
| valign="top" | &02 || */ command. XY points to the command text.
Line 49: Line 50:
 
| colspan="2" | '''Functions'''
 
| colspan="2" | '''Functions'''
 
|-
 
|-
| valign="top" | &FF || Startup, Y=0 to boot filing system, Y<>0 for no boot. X=default return value, &00 for no action.
+
| valign="top" | &FF || Startup, X=Reset type, Y=0 to boot filing system, Y<>0 for no boot. On return, Y b0-b1=boot action to perform. Typically Y on entry is &00 for SHift-Break, &08 for Break and &FF for CoPro Client starting up.
 
|}
 
|}
  
Line 58: Line 59:
 
Z88 allows:
 
Z88 allows:
 
* <code>=EOF#-1</code>, returns -1 for expanded and 0 for unexpanded.
 
* <code>=EOF#-1</code>, returns -1 for expanded and 0 for unexpanded.
 +
 +
Some systems allow:
 +
* <code>=EOF#0</code>, returns 0 if the next GET/INKEY will return a character, and -1 if not, so <code>IF NOT EOF#0 THEN key%=GET</code>.
 +
 +
See also [[Handles#Special_cases|Special handles]].
  
 
==Entry points==
 
==Entry points==
 
There is no entry point to FSC. It is called by other parts of the system in
 
There is no entry point to FSC. It is called by other parts of the system in
 
response to other calls, and should not be called directly via the vector.
 
response to other calls, and should not be called directly via the vector.
 +
 +
The FSCV vector is at &021E. A paged ROM may claim FSCV by setting it to the
 +
XFSCV extended vector entry address &FF2D, setting the extended vector XFSCV
 +
at &0DCC/&0DCD/&0DCE to the address of its routine at &0DCC/D and its paged
 +
ROM number at &0DCE, then issuing service call &0F.
  
 
==Implementations==
 
==Implementations==
* *OPT 0 - resets options to default values.
+
* *OPT 0: resets options to default values.
* *OPT 1 - set message reporting level
+
* *OPT 1: set message reporting level
* *OPT 2
+
* *OPT 2:<br>CFS/RFS: set error level<br>HDFS: set number of disk retries<br>HADFS: set primary filing system number
* *OPT 3
+
* *OPT 3:<br>CFS: set interblock gap for BPUT output<br>HDFS: ROM number for LOAD/SAVE<br>HADFS: set secondary filing system number<br>HostFS: set transmission block size
* *OPT 4,n specify boot option
+
* *OPT 4: specify boot option
* *OPT 5
+
* *OPT 5:<br>HADFS: set number of channels (early versions only)<br>ANFS: run FindLib on logon<br>SWEH: set debug level<br>HostFS: set debug level<br>EDOS: display *OPT settings 1,6,7,8,9<br>MMFS: *OPT5,0 claims *DISK/*DISC, *OPT5,1 does not claim *DISK/*DISC.
* *OPT 6,n use internal device drivers for drive n (HADFS)
+
* *OPT 6:<br>HADFS: use internal device drivers for drive n<br>ANFS: claim workspace<br>SWEH: set transmission delay<br>EDOS/Challenger: set density
* *OPT 7,n use external device drivers for drive n (HADFS)
+
* *OPT 7:<br>HADFS: use external device drivers for drive n<br>ADFS: set user options<br>EDOS: set number of volume catalogues<br>Challenger: set track seek rate<br>CPFS: Set filing system number
* *OPT 40,d - some systems implement *OPT40,d to select double-stepping on drive d.
+
* *OPT 8:<br>EDOS/Challenger: set track stepping
* *OPT 80,d - some systems implement *OPT80,d to select single-stepping on drive d.
+
* *OPT 9:<br>EDOS/Challenger: set paged ROM/RAM socket active during disc operations
 +
* *OPT 40: some systems implement *OPT40,d to select double-stepping on drive d.
 +
* *OPT 80: some systems implement *OPT80,d to select single-stepping on drive d.
  
 
* [http://mdfs.net/Tube/Serial TubeHost] implements FSC &FF so that a client filing system can indicate a Shift-Break or a Tube Client Startup has occured.
 
* [http://mdfs.net/Tube/Serial TubeHost] implements FSC &FF so that a client filing system can indicate a Shift-Break or a Tube Client Startup has occured.
  
Some systems search the only current directory with *RUN and search the current directory and the current library library with */name and *name.
+
Some systems search only the current directory with *RUN and search the current directory and the current library with */name and *name.
 +
 
 +
===Boot options===
 +
<nowiki>*</nowiki>OPT 4 sets the boot option for the current filing system and media. In most
 +
cases the boot file is called !BOOT, but the network filing system may use
 +
a different filename specific to the client machine so that the same user can
 +
log on but access a different boot file appropriate to the client machine
 +
being used.
 +
 
 +
<pre>
 +
                  *OPT 4,0  *OPT 4,1        *OPT 4,2      *OPT 4,3
 +
Standard          Off      *LOAD !BOOT    *RUN !BOOT    *EXEC !BOOT
 +
NET RISC OS      Off      *LOAD !ArmBoot  *RUN !ArmBoot  *EXEC !ArmBoot
 +
NET Communicator  Off      *LOAD !CBOOT    *RUN !CBOOT    *EXEC !CBOOT
 +
NET ZX Spectrum  Off      *LOAD !ZXBOOT  *RUN !ZXBOOT  *EXEC !ZXBOOT
 +
</pre>
  
 +
{{Filing}}
 
[[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 22:50, 9 March 2015 (UTC)
 
[[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 22:50, 9 March 2015 (UTC)
 +
[[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 00:08, 13 May 2020 (CEST)

Revision as of 23:40, 29 December 2020

FSCV: Filing system control

Specification

This vector is only called by the operating system, and should not be called directly, and the vector should only be set by filing systems. This list just shows the full list of calls.

Specification

  On entry: On exit:
A = function code Return value, or preserved if function not supported
X,Y =>command string or byte parameters   Any returned data
Functions
&00 *OPT command. X and Y hold parameters.
&01 EOF on channel X being checked with OSBYTE &7F. On exit, X=&00 if not at EOF, X<>&00 otherwise. If X=&00, (ie, EOF#0) action is implementation specific.
&02 */ command. XY points to the command text.
&03 Unrecognised OSCLI. XY points to the command text. The command has already been offered to the paged ROMs via service call &04, and none have responded.
&04 *RUN command. XY points to filename.
&05 *CAT command. XY points to any pathname.
&06 A new filing system is about to take over. This call is generated by filing systems themselves before they start their initialisation.
&07 File handle range request. Lowest returned in X, highest in Y.
&08 OSCLI command being processed. This is used to facilitate the *ENABLE command.
&09 *EX command. XY points to any pathname.
&0A *INFO command. XY points to the object name.
&0B *RUN from library. XY points to the filename.
&0C *RENAME command. XY points to the object names after the command.

Extensions

FSCV can be extended (eg by TubeHost) so that any other calls <&80 pass a string pointed to by X,Y, and calls >&7F pass and receive two bytes of data in X,Y.

Functions
&FF Startup, X=Reset type, Y=0 to boot filing system, Y<>0 for no boot. On return, Y b0-b1=boot action to perform. Typically Y on entry is &00 for SHift-Break, &08 for Break and &FF for CoPro Client starting up.

Calling from BBC BASIC

  • =EOF#ch on 8-bit systems calls OSBYTE 127, which calls FSC &01.

Special handles

Z88 allows:

  • =EOF#-1, returns -1 for expanded and 0 for unexpanded.

Some systems allow:

  • =EOF#0, returns 0 if the next GET/INKEY will return a character, and -1 if not, so IF NOT EOF#0 THEN key%=GET.

See also Special handles.

Entry points

There is no entry point to FSC. It is called by other parts of the system in response to other calls, and should not be called directly via the vector.

The FSCV vector is at &021E. A paged ROM may claim FSCV by setting it to the XFSCV extended vector entry address &FF2D, setting the extended vector XFSCV at &0DCC/&0DCD/&0DCE to the address of its routine at &0DCC/D and its paged ROM number at &0DCE, then issuing service call &0F.

Implementations

  • *OPT 0: resets options to default values.
  • *OPT 1: set message reporting level
  • *OPT 2:
    CFS/RFS: set error level
    HDFS: set number of disk retries
    HADFS: set primary filing system number
  • *OPT 3:
    CFS: set interblock gap for BPUT output
    HDFS: ROM number for LOAD/SAVE
    HADFS: set secondary filing system number
    HostFS: set transmission block size
  • *OPT 4: specify boot option
  • *OPT 5:
    HADFS: set number of channels (early versions only)
    ANFS: run FindLib on logon
    SWEH: set debug level
    HostFS: set debug level
    EDOS: display *OPT settings 1,6,7,8,9
    MMFS: *OPT5,0 claims *DISK/*DISC, *OPT5,1 does not claim *DISK/*DISC.
  • *OPT 6:
    HADFS: use internal device drivers for drive n
    ANFS: claim workspace
    SWEH: set transmission delay
    EDOS/Challenger: set density
  • *OPT 7:
    HADFS: use external device drivers for drive n
    ADFS: set user options
    EDOS: set number of volume catalogues
    Challenger: set track seek rate
    CPFS: Set filing system number
  • *OPT 8:
    EDOS/Challenger: set track stepping
  • *OPT 9:
    EDOS/Challenger: set paged ROM/RAM socket active during disc operations
  • *OPT 40: some systems implement *OPT40,d to select double-stepping on drive d.
  • *OPT 80: some systems implement *OPT80,d to select single-stepping on drive d.
  • TubeHost implements FSC &FF so that a client filing system can indicate a Shift-Break or a Tube Client Startup has occured.

Some systems search only the current directory with *RUN and search the current directory and the current library with */name and *name.

Boot options

*OPT 4 sets the boot option for the current filing system and media. In most cases the boot file is called !BOOT, but the network filing system may use a different filename specific to the client machine so that the same user can log on but access a different boot file appropriate to the client machine being used.

                  *OPT 4,0  *OPT 4,1        *OPT 4,2       *OPT 4,3
Standard          Off       *LOAD !BOOT     *RUN !BOOT     *EXEC !BOOT
NET RISC OS       Off       *LOAD !ArmBoot  *RUN !ArmBoot  *EXEC !ArmBoot
NET Communicator  Off       *LOAD !CBOOT    *RUN !CBOOT    *EXEC !CBOOT
NET ZX Spectrum   Off       *LOAD !ZXBOOT   *RUN !ZXBOOT   *EXEC !ZXBOOT
Filing System Calls
  • OSFILE : File and directory operations
  • OSARGS : Information on open objects
  • OSBGET : Read (get) a byte
  • OSBPUT : Write (put) a byte
  • OSGBPB : Read or write multiple bytes of data
  • OSFIND : Open or close an object
  • FSCV : Filing system control

Jgharston (talk) 22:50, 9 March 2015 (UTC) Jgharston (talk) 00:08, 13 May 2020 (CEST)