Difference between revisions of "Filing system numbers"

From BeebWiki
Jump to: navigation, search
(Added selection code that includes TAPE/ROM.)
m (B-Em's VDFS returns 17.)
 
(4 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
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        20 RawKbd:                    40 BBScanFS:                   
 
     0 No current filing system        20 RawKbd:                    40 BBScanFS:                   
 
     1 1200 baud cassette              21 DeskFS:                    41 BroadcastLoaderUtils       
 
     1 1200 baud cassette              21 DeskFS:                    41 BroadcastLoaderUtils       
Line 22: Line 22:
 
   15 Serial:                        35 DFSDeskFS:                55 VCMNetFS
 
   15 Serial:                        35 DFSDeskFS:                55 VCMNetFS
 
   16 Harston ADFS                    36 DayIBMFS:                  56 ArcFS:
 
   16 Harston ADFS                    36 DayIBMFS:                  56 ArcFS:
   17 Vdu:                           37 CDFS:                      57 NexusPrintFS
+
   17 B-Em VDFS, Vdu:                 37 CDFS:                      57 NexusPrintFS
 
   18 RawVdu:                        38 ChipFS:, CFS:, RISCardFS:  58 PIA
 
   18 RawVdu:                        38 ChipFS:, CFS:, RISCardFS:  58 PIA
 
   19 Kbd:                            39 pcfs:                      59 RSDosFS
 
   19 Kbd:                            39 pcfs:                      59 RSDosFS
Line 37: Line 37:
 
   99 ShareFS                                                      158 CDROMFS
 
   99 ShareFS                                                      158 CDROMFS
 
   92 LFS: (65Link)                                                162 TFTP:
 
   92 LFS: (65Link)                                                162 TFTP:
                                                                  170 ZIDEFS:
+
  93 BeebLink FS                                                  170 ZIDEFS:
                                                                  192 SDFS:
+
  94 BeebLink Test FS                                            192 SDFS:
 
                                                                   205 AudioFS
 
                                                                   205 AudioFS
 +
</div>
  
 
===Reading filing system numbers===
 
===Reading filing system numbers===
The current filing system number is returned by [[OSARGS|OSARGS 0,0]]. A filing system
+
The current filing system number is returned by [[OSARGS|OSARGS 0,0]]. A
number can be converted to its name on RISC OS systems using:
+
filing system number can be converted to its name on RISC OS systems using:
  
 
         SYS "OS_FSControl",33,fsnumber%,buffer,buflen
 
         SYS "OS_FSControl",33,fsnumber%,buffer,buflen
Line 75: Line 76:
 
   .SelectFS2
 
   .SelectFS2
 
   JMP OSBYTE
 
   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 80: Line 84:
 
being set is used to indicate that no temporary filing system is available.
 
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 <code>*OPT 7,num</code>.
+
CoProFS can be set to any number between 1 and 15 with <code>*OPT
It defaults to 5 (which clashes with NetFS). It is recommended to make
+
7,num</code>. It defaults to 5 (which clashes with NetFS). It is recommended
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 2,num</code>.
+
HADFS can be set to any number between 5 and 16 with <code>*OPT
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

Latest revision as of 13:43, 3 March 2023

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 B-Em VDFS, 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)