Difference between revisions of "Filing system numbers"

From BeebWiki
Jump to: navigation, search
m (1 revision)
m (Fixed formatting.)
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Filing]]
+
[[Category:Filing]]__NOTOC__
 
 
 
Each filing system has a unique number that identifies it and allows it to
 
Each filing system has a unique number that identifies it and allows it to
be selected. The following is a list of currently defined filing system
+
be selected. The following is a list of currently defined filing system
 
numbers.
 
numbers.
 
+
<div class="mw-widebody">
     0 No current filing system        30 Fax:
+
     0 No current filing system        20 RawKbd:                   40 BBScanFS:                 
     1 1200 baud cassette              31 Z88:
+
     1 1200 baud cassette              21 DeskFS:                   41 BroadcastLoaderUtils     
     2 300 baud cassette              32 SCSIDeskFS:
+
     2 300 baud cassette              22 Computer Concepts RomFS:   42 ChunkFS                   
     3 ROM filing system              33 NFS: (UNIX Network FS)
+
     3 ROM filing system, ROM:        23 RamFS:, RAM:               43 DOSFS:, MSDOSFS:, MSDOS:  
     4 Disk filing system             34 Serial2:
+
     4 Disk filing system, DISK:      24 RISCiXFS:, UnixFS:        44 NoRiscFS:                
     5 NetFS, (CoProFS)               35 DFSDeskFS:
+
     5 Network, NET: (CoProFS)         25 Streamer, DigiTape        45 Nexus filing system       
     6 Telesoftware                    36 DayIBMFS:
+
     6 Telesoftware                    26 SCSIFS:, SCSI:             46 ResourceFS               
     7 IEEE filing system             37 CDFS:
+
     7 IEEE filing system, IEEEFS:    27 Digitiser, TVFS:           47 PipeFS                   
     8 Acorn ADFS                      38 ChipFS:, CFS:, RISCardFS:
+
     8 Acorn ADFS                      28 Scanner, ScanFS:           48 NexusFilerFS             
     9 Host filing system             39 pcfs:
+
     9 Host filing system, HostFS:    29 MultiFS:, Petrov DOSFS    49 IDEFS:                    
 
    
 
    
   10 Videodisk filing system         40 BBScanFS:
+
   10 Videodisk filing system, VFS:  30 Fax:                       50 CCPrintFS
   11 CoProFS, Acorn WDFS            41 BroadcastLoaderUtils
+
   11 CoProFS, Acorn WDFS            31 Z88:                      51 VideoDigitiserFS
   12 Acacia RamFS, NetPrint:        42 ChunkFS
+
   12 Acacia RamFS, NetPrint:        32 SCSIDeskFS:                52 SoundDigitiserFS
   13 Null:                          43 DOSFS:, MSDOSFS:
+
   13 Null:                          33 NFS: (UNIX Network FS)    53 Device:
   14 Printer:                        44 NoRiscFS:
+
   14 Printer:                        34 Serial2:                  54 Parallel:
   15 Serial:                        45 Nexus filing system
+
   15 Serial:                        35 DFSDeskFS:                55 VCMNetFS
   16 Harston ADFS                    46 ResourceFS:
+
   16 Harston ADFS                    36 DayIBMFS:                  56 ArcFS:
   17 Vdu:                            47 PipeFS:
+
   17 Vdu:                            37 CDFS:                     57 NexusPrintFS
   18 RawVdu:                        48 NexusFilerFS
+
   18 RawVdu:                        38 ChipFS:, CFS:, RISCardFS:  58 PIA
   19 Kbd:                            49 IDEFS:
+
   19 Kbd:                            39 pcfs:                     59 RSDosFS
 
    
 
    
   20 RawKbd:                        50 CCPrintFS
+
   60 dbFS                    101 Computer Concepts PrintQueueFS  128 SPSTFS
  21 DeskFS:                        51 VideoDigitiserFS
+
   61 PCompress:               102 LanMan                         134 FastSpool
  22 Computer Concepts RomFS:        52 SoundDigitiserFS
+
   66 SparkFS:                 104 OmniPrint                      136 FlashFS
   23 RamFS:                          53 DeviceFS:
+
   71 BeebItFS:               105 AppleFS                         141 BDFS
   24 RISCiXFS:, UnixFS:              54 Parallel:
+
   77 MirrorFS:                111 IOmega ZipFS:, iZipFS:         142 raFS:
   25 Streamer, DigiTape              55 VCMNetFS
+
   79 FTP:                     115 ATAFS:                         145 lprFS
  26 SCSIFS:                        56 ArcFS:
+
   86 FontFS:                 118 CacheFS                        148 CDRFS
   27 Digitiser, TVFS:                57 NexusPrintFS
+
   91 Memphis                 121 MenonFS                        152 ParaFS 
  28 Scanner, ScanFS:               58 PIA
+
   96 AddressDevice           123 IZipFS                          156 LanMan98
  29 MultiFS:, Petrov DOSFS          59 RSDosFS
+
   99 ShareFS                                                     158 CDROMFS
 
+
   92 LFS: (65Link)                                               162 TFTP:
   60 dbFS                          118 CacheFS
+
  93 BeebLink FS                                                  170 ZIDEFS:
  66 SparkFS:                       121 MenonFS
+
  94 BeebLink Test FS                                            192 SDFS:
  71 BeebItFS:                     123 IZipFS
+
                                                                  205 AudioFS
   86 FontFS:                       128 SPSTFS
+
</div>
   91 Memphis                       134 FastSpool
 
   96 AddressDevice                 141 BDFS
 
   99 ShareFS                       142 raFS:
 
   92 LFS: (65Link)                 145 lprFS
 
  101 Computer Concepts PrintQueueFS 148 CDRFS
 
  102 LanMan                        152 ParaFS
 
  104 OmniPrint                      156 LanMan98
 
  105 AppleFS                        158 CDROMFS
 
  111 IOmega ZipFS:, iZipFS:        170 ZIDEFS:
 
  115 ATAFS:                         205 AudioFS
 
  
 
===Reading filing system numbers===
 
===Reading filing system numbers===
The current filing system number is returned by OSARGS 0,0. A filing system
+
The current filing system number is returned by [[OSARGS|OSARGS 0,0]]. A
can be selected by its number using Service call 18.  A filing system number
+
filing system number can be converted to its name on RISC OS systems using:
can be converted to its name on ARM systems, using
 
  
 
         SYS "OS_FSControl",33,fsnumber%,buffer,buflen
 
         SYS "OS_FSControl",33,fsnumber%,buffer,buflen
  
 
which returns a null-terminated string in buffer, or "" if not known.
 
which returns a null-terminated string in buffer, or "" if not known.
 +
 +
===Selecting filing system===
 +
The filing system number can be used to select the filing system by making
 +
[[Service calls|service call &12]].
 +
 +
  A%=143:X%=18:Y%=filingsystemnumber
 +
  CALL OSBYTE
 +
 +
The TAPE and ROM filing systems cannot be selected with service call &12,
 +
they have to be selected with [[OSBYTE &8C|OSBYTE 140,speed]] for TAPE and
 +
[[OSBYTE &8D|OSBYTE 141]] for ROM:
 +
 +
  REM Select filing system Y%, must not be zero
 +
  REM -----------------------------------------
 +
  DEFPROCfs(Y%):LOCAL X%,A%
 +
  IF Y%<4:A%=139.5+Y%/2:X%=Y%+1 ELSE A%=143:X%=18
 +
  CALL &FFF4:ENDPROC
 +
 
 +
  ; Select filing system in Y, must not be zero
 +
  ; -------------------------------------------
 +
  .SelectFS
 +
  LDA #143:LDX #18              ; 143 for service call
 +
  CPY #4:BCS SelectFS2          ; Select via sideways ROM
 +
  TYA:TAX:INX                  ; X=TAPE speed
 +
  LSR A:ADC #139                ; 140/141 for TAPE/ROM
 +
  .SelectFS2
 +
  JMP OSBYTE
 +
 +
On the Master TAPE and ROM can be selected with service call &12, but the
 +
above code works on all machines.
  
 
===Notes===
 
===Notes===
Line 67: Line 85:
  
 
CoProFS can be set to any number between 1 and 15 with <code>*OPT
 
CoProFS can be set to any number between 1 and 15 with <code>*OPT
7,num</code>. It defaults to 5 (which clashes with NetFS). It is
+
7,num</code>. It defaults to 5 (which clashes with NetFS). It is recommended
recommended to make CoProFS use 11 with <code>*OPT 7,11</code>.
+
to make CoProFS use 11 with <code>*OPT 7,11</code>.
  
 
HADFS can be set to any number between 5 and 16 with <code>*OPT
 
HADFS can be set to any number between 5 and 16 with <code>*OPT
2,num</code>. It defaults to 16.
+
2,num</code>. It defaults to 16.
  
 
WDFS (filing system 11) appears to be a preliminary allocation by Acorn for
 
WDFS (filing system 11) appears to be a preliminary allocation by Acorn for
Line 82: Line 100:
 
When a DOS disk or partition is opened as an image file, the returned filing
 
When a DOS disk or partition is opened as an image file, the returned filing
 
system number is 0.
 
system number is 0.
 +
 +
==See also==
 +
* [http://mdfs.net/Comp/BBC/ProgTips/SelectFS Selecting filing systems] at mdfs.net
  
 
[[User:Jgharston|Jgharston]] 22:13, 1 September 2007 (BST)
 
[[User:Jgharston|Jgharston]] 22:13, 1 September 2007 (BST)
 +
[[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 04:38, 16 March 2017 (UTC)

Revision as of 16:19, 21 November 2021

Each filing system has a unique number that identifies it and allows it to be selected. The following is a list of currently defined filing system numbers.

   0 No current filing system        20 RawKbd:                    40 BBScanFS:                  
   1 1200 baud cassette              21 DeskFS:                    41 BroadcastLoaderUtils       
   2 300 baud cassette               22 Computer Concepts RomFS:   42 ChunkFS                    
   3 ROM filing system, ROM:         23 RamFS:, RAM:               43 DOSFS:, MSDOSFS:, MSDOS:   
   4 Disk filing system, DISK:       24 RISCiXFS:, UnixFS:         44 NoRiscFS:                  
   5 Network, NET: (CoProFS)         25 Streamer, DigiTape         45 Nexus filing system        
   6 Telesoftware                    26 SCSIFS:, SCSI:             46 ResourceFS                 
   7 IEEE filing system, IEEEFS:     27 Digitiser, TVFS:           47 PipeFS                     
   8 Acorn ADFS                      28 Scanner, ScanFS:           48 NexusFilerFS               
   9 Host filing system, HostFS:     29 MultiFS:, Petrov DOSFS     49 IDEFS:                     
  
  10 Videodisk filing system, VFS:   30 Fax:                       50 CCPrintFS
  11 CoProFS, Acorn WDFS             31 Z88:                       51 VideoDigitiserFS
  12 Acacia RamFS, NetPrint:         32 SCSIDeskFS:                52 SoundDigitiserFS
  13 Null:                           33 NFS: (UNIX Network FS)     53 Device:
  14 Printer:                        34 Serial2:                   54 Parallel:
  15 Serial:                         35 DFSDeskFS:                 55 VCMNetFS
  16 Harston ADFS                    36 DayIBMFS:                  56 ArcFS:
  17 Vdu:                            37 CDFS:                      57 NexusPrintFS
  18 RawVdu:                         38 ChipFS:, CFS:, RISCardFS:  58 PIA
  19 Kbd:                            39 pcfs:                      59 RSDosFS
  
  60 dbFS                     101 Computer Concepts PrintQueueFS  128 SPSTFS 
  61 PCompress:               102 LanMan                          134 FastSpool 
  66 SparkFS:                 104 OmniPrint                       136 FlashFS
  71 BeebItFS:                105 AppleFS                         141 BDFS
  77 MirrorFS:                111 IOmega ZipFS:, iZipFS:          142 raFS:
  79 FTP:                     115 ATAFS:                          145 lprFS
  86 FontFS:                  118 CacheFS                         148 CDRFS 
  91 Memphis                  121 MenonFS                         152 ParaFS  
  96 AddressDevice            123 IZipFS                          156 LanMan98
  99 ShareFS                                                      158 CDROMFS
  92 LFS: (65Link)                                                162 TFTP:
  93 BeebLink FS                                                  170 ZIDEFS:
  94 BeebLink Test FS                                             192 SDFS:
                                                                  205 AudioFS

Reading filing system numbers

The current filing system number is returned by OSARGS 0,0. A filing system number can be converted to its name on RISC OS systems using:

       SYS "OS_FSControl",33,fsnumber%,buffer,buflen

which returns a null-terminated string in buffer, or "" if not known.

Selecting filing system

The filing system number can be used to select the filing system by making service call &12.

 A%=143:X%=18:Y%=filingsystemnumber
 CALL OSBYTE

The TAPE and ROM filing systems cannot be selected with service call &12, they have to be selected with OSBYTE 140,speed for TAPE and OSBYTE 141 for ROM:

 REM Select filing system Y%, must not be zero
 REM -----------------------------------------
 DEFPROCfs(Y%):LOCAL X%,A%
 IF Y%<4:A%=139.5+Y%/2:X%=Y%+1 ELSE A%=143:X%=18
 CALL &FFF4:ENDPROC
 
 ; Select filing system in Y, must not be zero
 ; -------------------------------------------
 .SelectFS
 LDA #143:LDX #18              ; 143 for service call
 CPY #4:BCS SelectFS2          ; Select via sideways ROM
 TYA:TAX:INX                   ; X=TAPE speed
 LSR A:ADC #139                ; 140/141 for TAPE/ROM
 .SelectFS2
 JMP OSBYTE

On the Master TAPE and ROM can be selected with service call &12, but the above code works on all machines.

Notes

The filing system number on 8-bit systems must be less than &80, as bit 7 being set is used to indicate that no temporary filing system is available.

CoProFS can be set to any number between 1 and 15 with *OPT 7,num. It defaults to 5 (which clashes with NetFS). It is recommended to make CoProFS use 11 with *OPT 7,11.

HADFS can be set to any number between 5 and 16 with *OPT 2,num. It defaults to 16.

WDFS (filing system 11) appears to be a preliminary allocation by Acorn for the Winchester Disk Filing System before ADFS was designed with hard drive support.

Some documentation lists Acacia RamFS as having filing system number 16. This is incorrect, it is actually 12.

When a DOS disk or partition is opened as an image file, the returned filing system number is 0.

See also

Jgharston 22:13, 1 September 2007 (BST) Jgharston (talk) 04:38, 16 March 2017 (UTC)