second attempt pictures of adfs ?

discussion of beeb/electron applications, languages, utils and educational s/w
duikkie
Posts: 2661
Joined: Fri Feb 07, 2014 3:28 pm

second attempt pictures of adfs ?

Postby duikkie » Sat Jul 15, 2017 9:58 am

because i dont have adfs i want some pictures of the stucture of the directory

so if someone can give my

*cat (picture)
save a file name a :)
make a sub dir called map1
*cat (picture)
save a file in map1 called b
make a sub in map1 called map2
*cat (piture)
save a file in map2 called c
*cat (picture)

in dos you get
if you do cd
c:\map1\map2
if you do cd .
c:\map1\map2
if you do cd ..
c:\map1
if you do cd \
c:

i don't know how adfs is working ??

User avatar
sydney
Posts: 1968
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne

Re: second attempt pictures of adfs ?

Postby sydney » Sat Jul 15, 2017 10:33 am

The output will look different depending on which screen mode you are in. Not sure exactly what you wanted so Ive done the following:

1 A picture of a *. of an empty drive modes 3 & 7.
2 A picture of a *. of a root directory with a file named A in modes 3 & 7.
3 A picture of a *. of a root directory with a file named A and a directory named MAP1 in modes 3 & 7.
4 A picture of a *. of a directory called MAP1 with 1 file named B in modes 3 & 7.
5 A picture of a *. of a directory called MAP1 with 1 file named B and a sub directory called MAP2 in modes 3 & 7.
6 A picture of a *. of a directory called MAP2 with 1 file named C in modes 3 & 7.
A picture of a *. of an a root directory with 5 files and 5 directories in modes 3 & 7.

duikkie
Posts: 2661
Joined: Fri Feb 07, 2014 3:28 pm

Re: second attempt pictures of adfs ?

Postby duikkie » Sat Jul 15, 2017 2:37 pm

oke you don't see that map2 is under map1 :(

in dos you see c:/map1/map2

allso why DLR ?? and not DIR ??

i am thinking about a dos sd card printing on beeb screen

but i have to think about the layout

allso troubles with showing path of directory

in dos

you have . and .. and \

in dos root a directory is like a file with clusternumber

like map1 00 00 05 00 =cluster 5
a dir of map1 gives
. 00 00 05 00
.. 00 00 00 00 (root)

map2 00 00 0A 00 = cluster 10
a dir of map2 gives
. 00 00 0A 00
.. 00 00 05 00

so printing the command cd on beeb if you are in map 2 is like c:\map1\map2
the things to do is holding cluster 10 , look at .. if 0 then root else print name before 00 00 05 00
but before printing you must find a .. with 00 00 00 00

i am thinking printing backwards map2\map1\$ then somehow printing that backwards so you get $\map1\map2
in the mean time not forgetting your file are at cluster 10 , for printing filenames in map2 #-o

duikkie
Posts: 2661
Joined: Fri Feb 07, 2014 3:28 pm

Re: second attempt pictures of adfs ?

Postby duikkie » Sat Jul 15, 2017 2:42 pm

pushing it on stack but stack is only 256 bytes

so troubles with c:\map1\map\map3\ ..... map256 will give stack overflow

User avatar
sydney
Posts: 1968
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne

Re: second attempt pictures of adfs ?

Postby sydney » Sat Jul 15, 2017 2:49 pm

I'm not really an expert on ADFS. Would the manual help at all?

ADFS User Guide

Page 33 describes the DLR as being attributes.

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

Re: second attempt pictures of adfs ?

Postby jgharston » Sat Jul 15, 2017 4:22 pm

duikkie wrote:oke you don't see that map2 is under map1 :(
in dos you see c:/map1/map2
also why DLR ?? and not DIR ??

D 'cos it's a Directory
L 'cos it's Locked
R 'cos it's Readable

duikkie wrote:i am thinking about a dos sd card printing on beeb screen

Cataloguing a DOS disk on a BBC filing system will look as near to identical as makes no difference to cataloging a non-DOS disk on a BBC filing system, like this.

duikkie wrote:also troubles with showing path of directory

You normally don't show the path of the directory, just the leafname of the directory.

duikkie wrote:in dos you have . and .. and \

On the BBC you have @ (current directory) / (extension seperator) ^ (parent directory) and . (directory seperator).
:drive.$.directory.filename/ext
has a one-to-one mapping to and from
drive:\directory\filename.ext on DOSy systems
and
drive:/directory/filename.ext on Unixy systems

If just dealing with leafnames, and not full pathnames:
filename/ext on BBC systems maps directly to
filename.ext on non-BBC systems.

The simplest translation if just translating leafnames is to bidirectionally swap '.' and '/' which can be easily done with code such as:
REM B%=character
IF (B%AND&FE)=46 THEN B%=B%EOR1


(there are a few other characters you need to swap, but that covers 99% of cases. There's some badly-written articles on the Wiki covering pathname and filename translation link)

duikkie wrote:(snip)

Everything you can do in DOS from the command prompt you can do on the BBC from the command prompt, just swapping
DOS <-> BBC
DIR <-> CAT
CD <-> DIR
\ <-> .
. (extension) <-> /
.. <-> ^
. (directory) <-> @
\ (root) <-> $
drive: <-> :drive

Are you actually asking for the filesystem structure?

Code: Select all

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

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

Re: second attempt pictures of adfs ?

Postby jgharston » Sat Jul 15, 2017 4:26 pm

duikkie wrote:i am thinking printing backwards map2\map1\$ then somehow printing that backwards so you get $\map1\map2 in the mean time not forgetting your file are at cluster 10 , for printing filenames in map2 #-o
pushing it on stack but stack is only 256 bytes so troubles with c:\map1\map\map3\ ..... map256 will give stack overflow

You do it with this standard code, and yes, you will get String too long with a pathname that is longer than 255 characters, because it's longer than 255 characters.

Code: Select all

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


Return to “software: other”

Who is online

Users browsing this forum: iamaran and 1 guest