[net.micro.pc] Floppy versus HardDisk woes....

greenber@timeinc.UUCP (Ross M. Greenberg) (07/24/85)

While working on some code recently, I decided to use a single-floppy
system in some testing.  Lo! and behold, the code didn't work!

The guts of the code works as follows:

1)	Intercept the timer (0x1c) interrupt
2)	See if there is work to do. If no skip to 3)
	a)	reset the timer interrupt to the old timer interrupt
	b)	call the old timer interrupt
	c)	do the work that is required
	d)	reset the timer interrupt to my routine
	e)	continue
3)	call the old timer interrupt if there was no work to
	do in 2) above
4)	iret

Intent:
Call the timer intercept routine every clock tick.  If there is work
to do, then restore the old interrupt and do the work. When done, restore
my intercept routine.  As a side note, I have determined a method that
allows me to call DOS safely from within the timer routine, so that
doesn't seem to be the problem.

So the basic loop is within 2)-4) above.  Now the code works like a charm
on a Harddisk (coming to a store near you soon!).

But on a floppy --- Oy vey!  I've traced the actual bomb out
to the read routine.  An open and an lseek right before the read
work well.  But the actual read itself doesn't.  The motor turns on,
no head movement for a while, then head movement, then finally the
"Abort, Ignore" message comes up, and the system is dead (since it
called the critical error handler from within the interrupt, this is
reasonable).

It seems obvious that it has something to do with the timing of the
floppy versus the timing on the harddisk, but why should that be?
It doesn't look like the timer routine is used by the BIOS to determine
whether the DMA interrupt came in time.

I'm using DOS 2.1, BTW.

Any leads would be appreciated....

Ross

-- 
------------------------------------------------------------------
Ross M. Greenberg  @ Time Inc, New York 
              --------->{vax135 | ihnp4}!timeinc!greenber<---------

I highly doubt that Time Inc.  would make me their spokesperson.
----
"I saw _Lassie_. It took me four shows to figure out why the hairy kid
 never spoke. I mean, he could roll over and all that, but did that
 deserve a series?"