I'm writing a little bootloader and I am jumping from the interrupt
vector to the relocated interrupted vector with little functions like
this

interrupt (PORT1_VECTOR) __attribute((naked)) PORT1SR (void) {
  asm("br &0xfde4" :: );
}

This compiles and works fine.  But it is ugly and has a magic number
in the assembly string.

So I would like to parameterize it out of the way:

#define VECTOR_OFFSET (-512)

interrupt (PORT1_VECTOR) __attribute((naked)) PORT1SR (void) {
  asm("br %[add]" :: [add] "m" (PORT1_VECTOR + VECTOR_OFFSET));
}

but this gives me an error:
main.c: In function ‘PORT1SR’:
main.c:18: error: memory input 0 is not directly addressable

What does "not directly addressable" mean?

Regards,
Mark
markra...@gmail
-- 
Mark Rages, Engineer
Midwest Telecine LLC
[email protected]

Reply via email to