Identifying the current disk filing system

discussion of beeb/electron applications, languages, utils and educational s/w
Post Reply
rharper
Posts: 348
Joined: Sat Sep 01, 2012 5:19 pm
Location: Dunstable
Contact:

Identifying the current disk filing system

Post by rharper » Fri Jan 26, 2018 6:29 pm

I would like to identifying the current disk filing system.
I have looked at all the osbytes and oswords but can't find anything that points to the filing system ROM slot or name.
Is there an OS call for this?
Thanks,
Ray
Raycomp

johnkenyon
Posts: 149
Joined: Wed Jul 20, 2011 2:21 pm
Location: Coventry
Contact:

Re: Identifying the current disk filing system

Post by johnkenyon » Fri Jan 26, 2018 7:51 pm

http://beebwiki.mdfs.net/OSARGS
with A=0 and handle=0 ?

User avatar
tricky
Posts: 2441
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Identifying the current disk filing system

Post by tricky » Fri Jan 26, 2018 7:56 pm

From my post here.
Call OSARGS (&FFDA) with Y=0 to get the currently active filing system in A.
The MMC type ROMs often pretend to be DFS by returning 4, so a little further investigation is required.
Call OSBYTE (&FFF4) with A=&A8, X=0 and Y=&FF to get the address of extended vector table in XY (&D9F in OS1.2)
Get the ROM slot by assuming that FILEV will point to the MMC FS, so ?(&D9F + 9*3 + 2) XY + FILEV*3 +2 = ROM slot.

Then I think I can just scan the ROM data, string matching for the type of MMC FS.
JGH confirmed that all the beeb OSs put the extended vector for FILEV at the same place, so you can get the ROM slot directly from there.

If you don't care which FS it is, you could possibly call its routines directly through its service call as you know the slot.

User avatar
jgharston
Posts: 3053
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: Identifying the current disk filing system

Post by jgharston » Fri Jan 26, 2018 11:53 pm

rharper wrote:I would like to identifying the current disk filing system.
I have looked at all the osbytes and oswords but can't find anything that points to the filing system ROM slot or name.
Identifying the current *DISK* filing system? Or identifying the cutrrent *FILING* system?

To identify the current *DISK* filing system, you first have to verify that you a have a *DISK* filing system selected. You do that by identifying what *FILING* system you have selected with OSARGS 0,0 and confirming that it is 4 = DISK.

To identify what disk filing system you have selected once you have confirmed that you do actually have a disk filing system selected, the only way is to examine the ROM. As mentioned in the above post, XFILEV is the standard way of finding the current filing system's ROM.

A=0, Y=0, CALL OSARGS
IF A=4 THEN {
page in rom XFILEV?2
examine memory at &8000-&BFFF
}

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

rharper
Posts: 348
Joined: Sat Sep 01, 2012 5:19 pm
Location: Dunstable
Contact:

Re: Identifying the current disk filing system

Post by rharper » Sat Jan 27, 2018 11:32 am

Thanks, that's just what I need to know.
I am indeed trying to distinguish between MMFS and the DFS 0.9 variants.
One of those will be running.

Thanks,
Ray :D
Raycomp

Post Reply