Mail Archives: djgpp/1998/09/06/13:38:55
Endlisnis 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.
>
> Note: Moving the function after the main makes GCC compile it as expected. I
> am using DJGPP v2.8.1 from RHIDE with "-Wall" and "-g" on, nothing else.
> Also, I've tried compiling it on a different machine with the same results.
That is extraordinarily bizarre. Could you:
* Find out *exactly* what switches RHIDE invokes GCC with.
* Post the complete asm produced.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -