[fpc-devel] Interrupt vector table generation
Marco van de Voort
marcov at stack.nl
Mon Mar 7 14:41:00 CET 2011
In our previous episode, Jeppe Johansen said:
> > the name of the interrupt routine is hardwired to the table entry. This
> > allows to get rid of the number constants (which are maintained centrally)
> > all together.
> >
> > It also allows to keep code portable between different versions that might
> > have a different interrupt table layout (since the CPU dependant mapping
> > from names to numbers would be different).
> Wouldn't this be the same as having numbered constants? That is allowed
> in the implementation
That is possible yes. But this is compiler enforced, in the sense if the
symbol is not in the linker file for the current target, you'll get an
linking error. While as with numbers and numeric constants, you can enter
any number.
But you are right that allowing numbered constants takes the main problem
(different device versions different interrupt table numbers) away.
More information about the fpc-devel
mailing list