Re: How interrupts work (x86 vs. C64)
- From: Bjarni Juliusson <spamtrap@xxxxxxxxxx>
- Date: Mon, 23 Oct 2006 22:49:38 +0200
MJ wrote:
Hi,
Some time ago I used interrupts at Commodore C-64. When I preset address
of system interrupt (as I know there was only one interrupt available)
to my code (which ended with jump to original address of interrupt) the
result was, that my code was repeated continuously (~60 times pre
second, in other 'thread'). The interrupts at x86 seem to work
differently. How do they work, and how to 'emulate' behavior of
interrupt from C64 ?
There is a table in memory with pointers to a number of interrupt routines to be called when the different interrupts occur. In real mode, this table is at address 0, but in protected mode it can be located anywhere and you set a register pointing to it. The actual calling of interrupt routines is also a little more complicated in protected mode, but it's all covered by the manuals. Maybe someone in the group with the knowledge fresh in his memory can help you there. There are more than 1 interrupt (but didn't the C64 have two? one IRQ and one NMI?), tied to different events such as external interrupts, segment violation faults, traps, etc.
What exactly do you mean by "emulating the C64"? Do you want to get timer interrupts? In that case, how to do it depends on what kind of timer you have. Is this a PC? An old PC or a new one?
Bjarni
--
INFORMATION WANTS TO BE FREE
.
- Follow-Ups:
- Re: How interrupts work (x86 vs. C64)
- From: MJ
- Re: How interrupts work (x86 vs. C64)
- From: João Jerónimo
- Re: How interrupts work (x86 vs. C64)
- References:
- How interrupts work (x86 vs. C64)
- From: MJ
- How interrupts work (x86 vs. C64)
- Prev by Date: Re: Yasm Label question
- Next by Date: Port 73h?
- Previous by thread: How interrupts work (x86 vs. C64)
- Next by thread: Re: How interrupts work (x86 vs. C64)
- Index(es):
Relevant Pages
|