[net.micro.pc] Need help with DOS Read failures!

sandy@druxv.UUCP (BishSL) (05/23/85)

OK, all you DOS experts!  I have this funky bug that I'd love to let you
help me fix....

I'm doing repeated DOS (MSDOS 2.11) reads from a home-brewed device driver
that's reading from a COM port.  All reads are OK, until at some point
(can be reproduced in a couple of different scenarios) all reads begin
to return 0, and the device driver read routine is never invoked.  All
future reads are hopeless, due to 0 returns.  Not
having access to DOS source, I'm not sure what types of situations will
cause DOS to return 0, even though there is in fact data waiting at the
port.

Now for the weird part of the bug.  This problem cannot be reproduced
on some systems, even though these systems have the same DOS version, and
almost identical hardware and software configurations.  The problem can
be "fixed" by reducing the number of "set" environment variables, or by
INCREASING the number of characters in the environment!  Since this
environment can be found in memory immediately after the stack, a rampant
stack pointer or stack overflow is suspect, but cannot be located.

Has anyone seen anything similar?  Why is the stack loaded right before
the environment?  The environment seems to be copied to multiple places
in memory, rather than just in the location specified by offset 2C hex
of the Program Segment Prefix, as noted in the DOS Ref Manual.

In one such occurrence of this bug, doing a "peek" before each read, thus
preventing reads when there is no data available, seems to alleviate the
problem.

Anxiously awaiting all your helpful tips......
	
		--sandy bish, AT&T Information Systems
		--(303)-538-4717, ihnp4!drutx!druxv!sandy

v00v05@unido.UUCP (05/24/85)

Subject: Bugs in MSDOS


We 've had lots of similar problems.
Our solution: Sell your XT (and hope DOS 3.0 will be slightly better)