delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/10/08/09:33:50

Via: uk.ac.ulcc.vmsfe; Fri, 8 Oct 1993 13:41:59 +0100
Date: Fri, 8 Oct 93 13:41 GMT
From: "Kevin Ashley, Systems Development, ULCC" <CZIWKGA AT VMSFE DOT ULCC DOT AC DOT UK>
To: DJGPP <DJGPP AT SUN DOT SOE DOT CLARKSON DOT EDU>
Subject: Novice question on FP use and emulation

I'm a relative newcomer to PC programming although I have
many years experience on other (slightly bigger :-)) systems.
I know next to nothing about Intel processors, so please bear
with me...

I recently acquired djgpp 1.09 for my Dell 486-based machine.
I've been extremely pleased with it and have already ported
a number of useful applications to DOS using it. However, I am
confused about a number of issues regarding floating point:

(1)  The manual says that the compiler shouldn't issue floating
point instructions unless you compile floating point code.
But I find that, even if I compile the classic "hello world"
program, the compiler bombs out with an exception unless I
set the 387 enviroment variable to cause an emulator to be used.

(2)  If I DO compile floating point code, set the 387 variable
for an emulator, but don't explicitly specify an emulator in
the GO32 variable, I don't get error messages, but I find that
every floating-point constant in the generated code is
integer -1 (i.e. 4 or 8 bytes of FFFFFFF..) Also, at runtime,
every floating-point result is the same.

(3) I get the same results if I use the djgpp-supplied emulator.

(4) If I use the alternate emulator (wmemu ? I can't remember the
name and don't have access to my system right now, but it's the
one without sources) floating point seems to work fine.


I'm happy in that I have a solution that works (use the emulator
without sources) but I'm unhappy in that I don't understand
the other behaviour. What's more, I had earlier had a (presumably
mistaken) impression that 486 processors performed floating-point
instructions themselves, without the need for a 387 co-processor.
I seem to be wrong. So what sort of co-processor goes with
a 486 ?

Thanks for any replies.
------------------------------------------------------------------------------
Kevin Ashley                              K DOT Ashley AT Ulcc DOT ac DOT uk
Systems Development Group Manager         ...ukc!ncdlab!K.Ashley
University of London Computer Centre. 


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019