[Oberon] ALO usage Log/Query ?

eas lab lab.eas at gmail.com
Sun Sep 7 18:26:03 CEST 2014


OK,
this is quiet difficult: I'm writing in ALO:
editing a copy of a copy of gmail, which was fetched by the X86PC,
and then fetched by rPi via eth0.

|> * what is the dir-structure?

|Generally flat. Everything else is superimposed.

Let's see if from rPi, I can fetch a 'trace' of an ETHO-dir, to better show
what I mean by 'structure'. ...............
Phew!! that was difficult, compared to ETHO WhatYouSeeIsWYGet !

Now to copy/paste it here: EditTools.OpenUnix /home/pi/tasklist
Under LEO: System.Execute dd if=/dev/hda51 skip=888 count=999 | hexdump -C ==
00012000  8d a3 1e 9b 02 00 00 00  00 00 00 00 00 00 00 00  |.AÄ..............|
00012010  4c 65 67 61 6c 42 61 6b  00 00 00 00 00 00 00 00  |LegalBak........|
System.Execute dd if=/dev/hda46 skip=888 count=999 | hexdump -C
00012080  5b 8b 34 00 00 00 00 00  57 65 62 44 41 56 42 61  |[.4.....WebDAVBa|

=> This shows that in Partition-51: skip 888 Sectors + 12000/200=60 sectors.
 I.e. 888+60=948 Sectors from the start of partition 51, the
 directory entries start, after an initial 16 bytes.

System.Execute dd if=/dev/hda34 skip=888 count=999 | hexdump -C
00012010  4c 69 6e 75 78 49 6e 64  69 61 2e 42 61 6b 00 00  |LinuxIndia.Bak..|
0002e850  22 1e 00 00 00 00 00 00  4d 61 63 49 6e 64 65 78  |".......MacIndex|
=> Since directory entries name's each start at hexX0 or X7, it's seen that
each entry is 12 bytes long. Which is too small.
Probably then Oberon DataStructure doesn't map easily to the low-level
byte structure and can't easily be extracted from byte-level?

These 2 partitons seem to show a consistent pattern:-------
System.Execute dd if=/dev/hda13 skip=888 count=999 | hexdump -C
00012000  8d a3 1e 9b 03 00 00 00  57 00 00 00 00 00 00 00  |.AÄ......W.......|
00012010  47 5a 69 70 2e 4f 62 6a  00 00 00 00 00 00 00 00  |GZip.Obj........|
System.Execute dd if=/dev/hda20 skip=888 count=999 | hexdump -C
00012000  8d a3 1e 9b 0b 00 00 00  57 00 00 00 00 00 00 00  |.AÄ......W.......|
00012010  43 52 47 70 70 70 4f 66  66 2e 44 6f 00 00 00 00  |CRGpppOff.Do....|
================ end of LEO-log extract to mail ==========

|> Probably LNO and even LEO could read the files from the PartitionFile.

|LNO even can copy these files to a Linux filesystem.

Yes, the files will be consecutive-bytes on the disk-sectors; but
how to access the begining-of-a-file without the normal route to the directory.
------------
|> System.Directory  FileDir*  <-- No FileDir.Mod included.
|> => Search total ALO:DirTree for FileDir.Mod
|> == None. Source files are being withheld.

| ALO.FileDir.Mod <-- *?

Yes that's available here. It's getting quiet complicated & confusing.

Thanks for the good work.

== Chris Glur.

PS. this thread started about querying the compiler-false-start.
Since I wanted a command to translate the Cyl:Head values from the 2 bytes
in the PartitionTables, I just modified Hello.Mod .
Since I did it in with the 2nd-latest version, I must have had problems here.
OTOH the log of here: 140731Z lists many good compilations.
Here's the source for anybody interested, and a prime example of needing ETHO's
coloring facility [which is lost in the mail]. Also note the compiler-complaint,
and it's nice that I can just reach-into ../140731/CylHead.Mod to
fetch it !! ----
MODULE CylHead;
IMPORT Out;

PROCEDURE ConvertStringtoPos(s: ARRAY OF CHAR; VAR pos: INTEGER);
(* Wandelt einen String in einen entsprechenden ASCII-Code um jm 28.6.95 *)
CONST   undef = -1;  (* 2hex chars max *)
VAR i: INTEGER; hex: ARRAY 17 OF CHAR;
BEGIN
        COPY("0123456789ABCDEF", hex);
        i := 0; WHILE s[i] # 0X DO INC(i) END;
        IF i = 1 THEN
                pos:= ORD(s[0])
        ELSIF i > 1 THEN
                i := 0; WHILE (i < 16) & (s[0] # hex[i]) DO INC(i) END;
                pos := i * 16;
                i := 0; WHILE (i < 16) & (s[1] # hex[i]) DO INC(i) END;
                pos := (pos+i) MOD 256
        ELSE
                pos := undef
        END
END ConvertStringtoPos;


PROCEDURE Write*;
VAR B0,B1,B2,b67,Cyl,Head: INTEGER;
BEGIN
(*      B1 := 7;        B2 := 63;
        B1 := 170;      B2 := 170;
        ConvertStringtoPos("0A",B0); Out.Int(B0,4);Out.Ln;
        ConvertStringtoPos("FA",B0); Out.Int(B0,4);Out.Ln;
        ConvertStringtoPos("10",B0); Out.Int(B0,4);Out.Ln;
        ConvertStringtoPos("95",B1); ConvertStringtoPos("7F",B2);Head
:=63;Cyl :=405
        ConvertStringtoPos("FF",B1); ConvertStringtoPos("6D",B2); 45; 511
        ConvertStringtoPos("6D",B1); ConvertStringtoPos("FF",B2);Head
:= 63;Cyl := 877
        ConvertStringtoPos("6E",B1); ConvertStringtoPos("C1",B2); 1 ; 878 *)
        Head := B2 MOD 64;
        b67 := B2 - Head;
        Cyl := (b67 * 4) + B1;
        Out.String("B2 MOD 64="); Out.Int(B2 MOD 64, 8); Out.Ln;
        Out.String("Head := B2 MOD 64"); Out.Int(B2 MOD 64, 8); Out.Ln;
        Out.String("b67 := B2 - Head"); Out.Int(b67, 8); Out.Ln;
        Out.String("Cyl := (b67 * 256) + B1"); Out.Int(Cyl, 8); Out.Ln;

END Write;

END CylHead.Write
7 63 =  0000  0111  00111111 ;  10101010 10101010 = AA AA = 170 170

-> ARMCompiler.Compile CylHead.Mod ==  System.Free CylHead.Obj ==Signal 11  EGV
==============
PSS. here's a better example of an ETHNO directory: bytes.
Perhaps I'll find the answer if I expalian it enough to others?
Notice that it's alphabetically ordered:----------
WD has P10 starting=7728336
skip=7729431 gets to DirStart

00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
*
00000400  8d a3 1e 9b 54 00 00 00  00 00 00 00 00 00 00 00  |.£..T...........|
00000410  41 49 2e 6f 76 65 72 76  69 65 77 00 00 00 00 00  |AI.overview.....|
00000420  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000430  47 4e 00 00 00 00 00 00  41 49 2e 6f 76 65 72 76  |GN......AI.overv|
00000440  69 65 77 2e 42 61 6b 00  00 00 00 00 00 00 00 00  |iew.Bak.........|
00000450  00 00 00 00 00 00 00 00  dd 4f 00 00 00 00 00 00  |........ÝO......|
00000460  41 49 70 72 6f 6a 65 63  74 73 00 00 00 00 00 00  |AIprojects......|
00000470  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000480  a8 50 00 00 00 00 00 00  41 49 70 72 6f 6a 65 63  |¨P......AIprojec|
00000490  74 73 2e 42 61 6b 00 00  00 00 00 00 00 00 00 00  |ts.Bak..........|
000004a0  00 00 00 00 00 00 00 00  2f 32 00 00 00 00 00 00  |......../2......|
000004b0  41 53 2e 45 6d 6c 00 00  00 00 00 00 00 00 00 00  |AS.Eml..........|
000004c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000004d0  60 36 00 00 00 00 00 00  41 53 2e 45 6d 6c 2e 42  |`6......AS.Eml.B|
000004e0  61 6b 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |ak..............|
000004f0  00 00 00 00 00 00 00 00  0e 37 00 00 00 00 00 00  |.........7......|
00000500  41 53 2e 45 6d 6c 32 00  00 00 00 00 00 00 00 00  |AS.Eml2.........|
00000510  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|



More information about the Oberon mailing list