home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
d
/
drcpas10.zip
/
ABSTEST.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-11-17
|
786b
|
41 lines
{$A+,B-,D-,E-,F-,I+,L-,N-,O-,R-,S+,V-}
{$M 16384,0,0}
program abstest;
(* example of absio.pas: read a sector and display it in hexadecimal *)
uses absio, tools;
type
sector = array[1..512] of byte;
var
s : sector;
i,j,k : integer;
begin
absread (2, 1, 1, s);
if abserror <> 0 then
begin
writeln ('Error ',hexw(abserror),': reading absolute disk sector.');
halt (1);
end;
for i := 0 to 20 do
begin
for j := 0 to 5 do
begin
for k := 1 to 4 do
write (hexb(s[i*24+j*4+k]));
write (' ');
end;
writeln;
end;
for j := 0 to 1 do
begin
for k := 1 to 4 do
write (hexb(s[21*24+j*4+k]));
write (' ');
end;
writeln;
end.