summaryrefslogtreecommitdiff
path: root/app/baisy/2.2.1-schulis/src/eu disk descriptor
blob: 50f2b7d7d719141766ce0947a8d0aa86591721bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
PACKET eudiskDEFINES loadshardinterfacetable,openeudisk,eusize,euheads,
eutracks,eufirstsector,eulastsector:LET tablelength=15,sizefield=1,headfield=
2,trackfield=3,firstsectorfield=4,lastsectorfield=5;ROW tablelengthROW 5INT 
VAR formattable;INT VAR tabletop:=0,tablepointer;PROC openeudisk:enablestop;
initcheckrerun;IF hdversionTHEN LEAVE openeudiskFI ;INT CONST blocks:=
archiveblocks;IF blocks<=0THEN errorstop("keine Diskette eingelegt")FI ;
searchformattableentry.searchformattableentry:IF tabletop<1THEN errorstop(
"SHard-Interfacetabelle nicht geladen")FI ;tablepointer:=1;WHILE formattable[
tablepointer][sizefield]<>blocksREP tablepointerINCR 1;IF tablepointer>
tabletopTHEN errorstop("Diskettenformat nicht implementiert")FI PER .END 
PROC openeudisk;PROC loadshardinterfacetable:FILE VAR f:=sequentialfile(input
,"shard interface");TEXT VAR line;tabletop:=0;WHILE NOT eof(f)REP getline(f,
line);IF (lineSUB 1)<>";"THEN loadlineFI PER .loadline:tabletopINCR 1;IF 
tabletop>tablelengthTHEN errorstop("Shard Interface Tabelle zu groß")FI ;INT 
VAR blankpos:=1;formattable[tabletop][sizefield]:=nextint;formattable[
tabletop][headfield]:=nextint;formattable[tabletop][trackfield]:=nextint;
formattable[tabletop][firstsectorfield]:=nextint;formattable[tabletop][
lastsectorfield]:=nextint.nextint:line:=compress(subtext(line,blankpos))+" ";
blankpos:=pos(line," ");int(subtext(line,1,blankpos-1)).END PROC 
loadshardinterfacetable;INT PROC eusize:formattable[tablepointer][sizefield]
END PROC eusize;INT PROC euheads:formattable[tablepointer][headfield]END 
PROC euheads;INT PROC eutracks:formattable[tablepointer][trackfield]END PROC 
eutracks;INT PROC eufirstsector:formattable[tablepointer][firstsectorfield]
END PROC eufirstsector;INT PROC eulastsector:formattable[tablepointer][
lastsectorfield]END PROC eulastsector;END PACKET eudisk;