[cc65] Interrupts howto?

From: Karri Kaksonen <karri1sipo.fi>
Date: 2005-05-03 11:31:31
Hi,

I have tried to understand how callirq and condes should go together
but it would be really helpful to get a small description of how I should
do this.

The way I used to do this was to do something like:

_InitIRQ:
  sets the address of __IRQ to 0xfffe
  rts

_install_irq:
  adds a vector to the _irqvecs table
  rts

__IRQ:
  save registers
  clear interrupts
  set X to index to an interrupt table
  jsr __IRQ5
  restore registers
  rti
__IRQ5: jmp (_irqvecs),x

If I understand correctly I can use CONDES to put my addresses into
the _irqvecs table during the linking phase somehow.

--
Thanks for any help,

Karri

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue May 3 11:34:08 2005

This archive was generated by hypermail 2.1.8 : 2005-05-03 11:34:11 CEST