Mail Archives: djgpp/1998/09/07/19:00:51
Nate Eldredge wrote:
> > The program doesn't compile as I would expect. All it was spose to do is
> > show how you could use inline asm to add 2 integers. But, the return value
> > was always 4. So I looked at the asm code generated for the function, it
> > reads from port 0x83 and does some loops and stuff. All I wanted was 1 add.
> > And the debugger (when the asm window is open) can't debug it right. It
> > skips lines and weird things happen, registers change values without any
> > obvious reason.
> That is extraordinarily bizarre. Could you:
>
> * Find out *exactly* what switches RHIDE invokes GCC with.
gcc -g -Wall -m486 -c t2.cc -o t2.o
I tried removing "-m486" and it worked perfectly. It appears as though the
'-m486' switch sometimes makes programs 'wrong'.
> * Post the complete asm produced.
I don't know how to do that. I use RHIDE, I tried making the targetname
"test.s" and it did not work, stated: "Don't know how to build test.s from
(null)". I also tried "test.S" with the same result.
--
(\/) Endlisnis (\/)
s257m AT unb DOT ca
Endlisnis AT GeoCities DOT com
Endlis AT nbnet DOT nb DOT ca
- Raw text -