Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Task Switch in Protected Mode - Can't return to Win98 - himem.sys? Any Help Welcomed, Thanks.

8 views
Skip to first unread message

exe...@yahoo.com

unread,
Oct 14, 2001, 4:56:00 AM10/14/01
to
I'm having a strange problem with my 32Bit Protected Mode Program and
I was wondering if any of the great intellects here could offer some
help.

It's a simple program, nothing impressive, but after calling a TSS
Descriptor (Task Switch) and returning to DOS I can no longer return
to Windows, or use CodeView without restarting the computer.

Windows fails booting while loading Vmcpd
CodeView gives the error message
run-time error R6915
-DOSX16

I think it might be related to himem.sys, because Microsofts KB says
"This error (DOSX16) is caused by the configuration of the computer.
It may be a memory conflict or a device driver or TSR (Terminate and
Stay Resident) program."

If I don't call the TSS Descriptor (or Task Gate) I can enter windows
without any problems.


Any Ideas?
Thanks, Jeremy

Alexei A. Frounze

unread,
Oct 14, 2001, 8:56:02 AM10/14/01
to
<exe...@yahoo.com> пишет в
сообщении:3djistksl7fgsugho...@4ax.com...

Make sure all segments have limits of exactly 64KB-1B and the Task Switched
bit in the CR0 register is clear (use CLTS instruction). I guess that's it.

Good Luck
--
Alexei A. Frounze
http://alexfru.chat.ru
http://welcome.to/pmode/


exe...@yahoo.com

unread,
Oct 14, 2001, 7:55:56 PM10/14/01
to
Clearing the Task Switched Bit in CR0 with the CLTS instruction fixed
the problem.

Thanks for the help.

Frank Kotler

unread,
Oct 14, 2001, 11:55:53 PM10/14/01
to
"exe...@yahoo.com" wrote:
>
> Clearing the Task Switched Bit in CR0 with the CLTS instruction fixed
> the problem.

Just to add what little I know to this discussion, I regularly leave the
limits "big" when using "Flat Real Mode", and it doesn't *seem* to
bother Windows starting...

Best,
Frank

Alexei A. Frounze

unread,
Oct 15, 2001, 3:55:52 PM10/15/01
to
Frank Kotler <fbko...@ne.mediaone.net> пишет в
сообщении:3BCA50DB...@ne.mediaone.net...

Haven't tried that myself, but I prefer to put most of the stuff into its
regular place and operation. You never know when some other crappy code may
be dependent. :)
The TS flag is the same kind of thing. I had about half a year between
encountering exactly the same problem as the thread initiator and actually
solving it. Suddenly I realized that the other day it could be my program,
which assumes that TS=0 or something like that, and fails to operate
properly.
Not only windows but also many DOS DPMI hosts hang up if they start with
TS=1. They all *assume* one condition to be true.

Good Luck
--
Alexei A. Frounze
http://alexfru.chat.ru

http://alexfru.narod.ru/
http://welcome.to/pmode/


0 new messages