[Oberon] PO2013 - SD Image Tool

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Sat May 16 19:44:08 CEST 2020


    > An empty but still valid Oberon filesystem will have one sector at
    > sector number 29 (which you divide by 29 and add the FAT file
    > system size to to get the real sector) with the DirMark (9B1EA38DH)
    > as the first 32-bit word in it with the rest of the sector being zeros.

That’s indeed precisely what Oberon0.ClearDirectory does:

  PROCEDURE ClearDirectory; (*clear file directory (root page)*)
    VAR i: INTEGER;
      u: FileDir.DirEntry; a: FileDir.DirPage;
  BEGIN a.mark := FileDir.DirMark; a.m := 0; a.p0 := 0; u.adr := 0; u.p := 0;
    FOR i := 0 TO FileDir.FnLength-1 DO u.name[i] := 0X END ;
    FOR i := 0 TO FileDir.DirPgSize-1 DO a.e[i] := u END ;
    Kernel.PutSector(FileDir.DirRootAdr, a)
  END ClearDirectory;




More information about the Oberon mailing list