Mail Archives: djgpp/1995/05/02/01:23:04
> I complained about odd behaviour on divide by zero in this test program:-
>#include<stdio.h>
>main(){double x,y; x=0; y=1/x;}
>
> Stephen Turnbull <turnbull AT shako DOT sk DOT tsukuba DOT ac DOT jp> replied:-
>
>> ... Mr. Appleyard was one of the guys who has objections to the default
>> behavior of the coprocessor flags in DJGPP (in particular with respect to
>> exception trapping). If so, and he figured out how to get the flags reset
>> with any of the several solutions that were posted, and he has run any of
>> his programs that muck with the default behavior of the '87....
>
> (1) About when were these `several solutions' posted? Any chance of someone
>emailing them to me personally? I am sorry to trouble you.
I have a copy of the ctrl87 message on disk if you still need it (note
that its contents were doubly encoded--UU _and_ MIME; if you can't deal
with MIME-encoded messages I can unmime it for you).
> (2) This morning (by REM'ing out lines in my C:\AUTOEXEC.BAT) I found that
>if I stop using the mouse handler that came with my Anubis mouse, and instead
>use an ordinary Microsoft mouse handler (MOUSE.COM, 26677 bytes, created at
>12.34.38 on 18 Jan 1990) that was hanging about in my filestore, the trouble
>goes away and the above test program causes a full proper hex dump as follows.
Here's what seems to be happening: Somehow the CPU is in real mode when
the floating-point exception occurs, and the Anubis handler eats up (for
whatever reason) enough real-mode stack to make your code go off the stack
and crash. I can't quite remember the usual remedy for this, but you
might want to put `stacks=0,0' in your config.sys (just a hunch).
> (3) This is the second fault I have found in the Anubis mouse handler. I can
>set it up in 2-button or 3-button mode. If I set it up in 3-button mode, Word
>Perfect and Windows don't see the mouse. So I set it up in 2-button mode, and
>I have the above divide-by-zero nuisance AND no middle mouse button. Please
>does anyone know a mouse handler that works with 2-button AND 3-button mice
>and does not have the abovementioned faults?
That's not a mouse handler problem but a configuration problem. Microsoft's
serial protocol only allows for 2 buttons, so your mouse's three-button mode
uses a different protocol (most likely Mouse Systems'). This might not be
a problem if there weren't apps (like Windoze and apparently WP) which bypass
the driver and try to talk directly with the mouse. Just configure them to
use a Mouse Systems mouse (or, failing that, a Microsloth bus mouse, as
that generally involves calling the driver) and things should be OK.
--- Aaron Ucko (ucko AT vax1 DOT rockhurst DOT edu; finger for PGP public key) | httyp!
Geek code 2.1 [for explanation, finger hayden@ | `God's Laws' (Rudy Rucker,
vax1.mankato.msus.edu]: GCS/M/S d(-) H s g+ p? \ _Master of Space and Time_):
!au a17 w+ v+(++) C++(+++)>++++ UL++(S+)>++++ \ 1) Be clean. 2) Follow Gary.
P+(++) L++ 3(-) E- N+(++) K- W--(---) M-@ V-(--) \ 3) Teach God's Laws.
po-(--) Y+ t(+) !5 j(++) R(-) G' tv--(-) b+++ +---------------------------
!D(--) B--(---) e>++++(*) u++(@) h!() f(+) r-(--)>+++ n+(-) y?
- Raw text -