On 02/11/2014 11:55 AM, Fred Cisin wrote:
On Tue, 11 Feb 2014, Glenn Roberts wrote:
it's been many years... but don't you
have to issue a disk reset if you
know the drive is swapped? either via BIOS (INT 13h, AH=0) or DOS (INT
21h, AH=0Dh)? this flushes buffers in RAM and refreshes key tables.
DO BOTH!
Will do... DOS first then BIOS, presumably.
There is a DOS function 5D01h which claims to flush disk buffers and update
directory info, but it's marked (at least in Ralf Brown's list) as
internal, so I assume I'm not supposed to be messing with it!
Incidentally, the 21/0Dh entry in Ralf's list claims: "This function writes
all modified disk buffers to disk, but does not update the directory
information (that is only done when files are closed or a SYNC call is
issued)". As I'm ensuring that I'm closing any open file before a disk
swap, I think I'm covered, but I'm not sure what it means by a sync call
(in a DOS context).
Is this software only for your own use, or for release
to the public?
Most likely own use; it's some code for doing sector dumps of DOS
partitions, as I managed to get my Sperry XT clone running (in addition to
the Laser XT that I mentioned on the list a short while ago), but its hard
disk is rather sickly - I'd like to salvage what data I can from it before
it fails completely. I'm surely reinventing the wheel, but it's been fun
reacquainting myself with a DOS programming environment again.
My original intention was just to archive clusters that DOS was using -
i.e. parse the partition's FAT - but I can't be sure that the filesystem is
completely intact, so I came to the conclusion that it was better to snarf
everything.
If for your own use, use DOS 6.2x if you're gonna
use SMARTDRV!
No need for any bells and whistles :-) I'm using plain old DOS 3.30
cheers
Jules