-=>Quoting Frank Cox to Whoever Cares <=-
FC>Does anyone know how DOS reads a file?
That depends on the BIOS/motherboard as well as the operating system,
and whether it is a hard or floppy disk operation. Win95 reads entire
*tracks* regardless of the number of sectors on them. BIOS reads
several sectors depending on the number of bytes requested in the INT
21h call.
FC>Would that type of "secret data" follow along if one copied the
FC>affected file from one place to another, i.e. does DOS read a file
FC>one cluster at a time until it runs out of file (and thereby
FC>copying the slack space at the end of the last cluster), or does
FC>it read it byte-by-byte until it hits the end-of-file.
DOS reads blocks of data until (1) a CTRL-Z is incountered, or (2)
the number of bytes in the files size field is reached. Further reads
will only pass the last byte read again, not any bytes after it.
To read this 'secret data' you must do read the sector using the BIOS
call 13h, subfunction 2. And, you must know the actual sector
address, which requires you to consult the FAT. That requires
algorithums for 12, 16, and 32 bit versions. A lot of trouble for
'secret' data than it's worth.
FC>Would the "secret data" follow along if one ran DEFRAG?
I haven't tested this, but I should think so. Entire sectors are
moved without regard to where the end of a file is.
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 916-893-8079 * (1:119/88)
|