Re: [cc65] Changes in Interrupt Handling

From: Greg King <greg.king51verizon.net>
Date: 2013-02-14 16:49:54
From: "Oliver Schmidt"; on Wednesday, Feb. 13, 2013; at 7:36 AM -0500
>
> I implemented the change for (almost) all targets; but, tested it on only
> Apple2, C64, and C128. So, if you are familiar with the start-up code of
> a certain target, it would be great if you could check if I didn't
> break anything (the new constructors/destructors are implemented in
> 'irq.s' files in the target directories).

Two things -- a bug report and a suggestion:

1) The actors' priorities are wrong.  They should be the same as they were 
when the code was in the start-up module:  "irq_init" should run _before_ 
all other actors; and, "irq_done" should run _after_ all other actors. 
That order will guarantee that the IRQ trap will handle any IRQs that any 
other constructors create.  So -- "irq_init" could be set at 32, at least. 
And, "irq_done" should be set at 1.

2)  In many cases, "initirq" can load the new interrupt pointer into the 
.XA pseudo-register, then jump into "doneirq".  That second subroutine can 
disable interrupts, store the pointer, and re-enable interrupts -- for both 
subroutines.


P.S., I recommend that you create a macro that generates those Apple2 
byte-table text messages.  It would be similar to the CBM and Atari 
"scrcode" macroes.  It would reverse the text; and, set the high bit.

P.P.S., Does "libsrc/apple2/irq.s" really need to .include "zeropage.inc"?

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Feb 14 16:50:46 2013

This archive was generated by hypermail 2.1.8 : 2013-02-14 16:50:49 CET