Mail Archives: djgpp/1994/10/17/02:07:55
On Sun, 16 Oct 1994, Kimberley Burchett wrote:
>
> I want to play around with the timer interrupt. I'm going to change the
> frequency, so I don't want to chain it to the old one. However in order
> to keep things working correctly, I do want to call the old handler when
> appropriate. But all I have is a _go32_dpmi_seginfo block I've named
> OldTimerSegInfo. If I try to call OldTimerSegInfo.pm_offset(), it
> crashes. The code I have will work (kindof) if I chain the interrupt,
> but not if I just set it. What I mean by work is I do get a tone out of
> the printer port, but the computer won't respond to anything. (the test
> program is supposed to put a sine-wave out of the printer port, through a
> DAC, into my stereo. I've gotten it working in Pascal).
>
[Stuff deleted]
There is a bug, not in your progrem, but in the
..._chain_protected_mode_interrupt () function. You can work around that,
however, using a jump statement. In you timer interrupt ISR, do some
dummy, one-byte instruction, like push %eax. Then, in your interrupt
installing routine, modify these values so that it becomes an
intersegment jump (I think it is ea xx xx xx xx xx xx xx xx yy yy yy yy,
where xx xx ... xx xx are the for bytes offset, and yy yy yy yy is the
two-bytes code segment selector -- i.e. seg_info.pm_selector.)
Hope that helps,
Long.
+--------------------------------------------------------+
| Long Doan ldoan1 AT mason1 DOT gmu DOT edu |
| ld AT netrix DOT com |
+--------------------------------------------------------+
- Raw text -