Mail Archives: djgpp/1995/04/27/03:24:49
More followups on the great hardware interrupt bug hunt:
I ran the test8.exe program from pctime12.zip with my GO32 env var set to
'topline'. The program hit the first call to getkey() (before chaining
the timer interrupt) and sat there with 'R' on the top line. I pressed a
key, and got UnsuppUsuppUnsuppUnsupp... all over my screen, then the
machine rebooted. Without 'topline', it runs fine. The program is only
hooking the timer interrupt; is there some weird interaction between go32
and the timer interrupt? (I performed this test several times.)
As for my own code, I tried the -S option to gcc and looked over the
resulting assembler (also had -O2 in there). I noticed that in my
handler function, where it called memset() and where it called
_go32_dpmi_simulate_fcall_iret(), there was no cleaning-up of the stack
on return. I confess that I am not up on 386+ assembler (I learned 8088
assembler then switched to C); I think the 'leave' command does the stack
cleanup (?), but it still looked wrong to me, especially in a handler
function. So I recompiled the module without any optimization, relinked,
and the program ran pretty good. The keyboard handler still seems to be
a problem, but at least I am getting some (unstable) results!
Any thoughts/ideas/feedback welcome.
Bill
- Raw text -