Trailing-Edge
-
PDP-10 Archives
-
decus_20tap1_198111
-
decus/20-0003/dskop.pas
There are no other files named dskop.pas in the archive.
{This program reads any word on a disk pack. You give absolute block
number (128-word blocks). It then asks for the word within the block.
Little error checking is done: if you ask for a block bigger than
the maximum, I think it wraps around.}
var
block:array[0:511]of integer;
c,u,a,w:integer;
procedure rdblock(c,u,a:integer);
var addr:packed record case boolean of
true:(word:integer);
false:(atype:0..3B;chan:0..37B;unit:0..77B;bnum:0..37777777B)
end;
begin
addr.atype := 1;
addr.chan := c;
addr.unit := u;
addr.bnum := a;
jsys(242B;addr.word,128,block);
end;
function octread:integer;
var i:integer;
begin
1:
i := 0;
while (tty^ >= '0') and (tty^ <= '9') do
if tty^ > '7'
then begin
writeln(tty, 'Octal number required');
readln(tty);
goto 1
end
else begin
i := i*8 + (ord(tty^)-60B);
get(tty)
end;
octread := i
end;
begin
write(tty,'Chan: '); readln(tty); c := octread;
write(tty,'Unit: '); readln(tty); u := octread;
while true do
begin
write(tty,'Block: '); readln(tty); a := octread;
rdblock(c,u,a);
loop
write(tty,'Word (cr to end): '); readln(tty);
exit if eoln(tty);
w := octread;
writeln(tty,w:3:o,' ',block[w]:12:o)
end
end
end.