On Tue, 15 May 2001, Frank Heckenbach wrote:
Martin Liddle wrote:
To answer my own question, I finally managed to start to think and came up with this, which seems to do what I want:
Var InBuffer: Array[0..511] of Byte; InFile:File;
Reset(InFile,'/dev/hda',512); Blockread(Infile,InBuffer,1);
OK, if you only want the raw data, sure, you can just read them from the device. I was thinking more complicated -- to get some more readable information or something ...
In case someone later wants to write something there it would be safer to think in terms of a record. Otherwise messing with that last 66 bytes is an invitation to disaster.
type PartitionRec : array[ 1..16 ] of byte;
TMBR = record bootcode : array[ 1..446 ] of byte; PartitionTable : array[ 1..4 ] of PartitionRec; validsig : shortcard; { = AA55h } end;