It won't work for a couple for a couple of reasons
1. Your routine optimizes to nothing. If you make it "volatile int i"
you'll do better as the compiler is then not allowed
to deduce that is not used and throw it away. Right now SDCC realizes
that i is local, never passed or has the address
taken and therefore optimizes it out entirely. For debugging you'd
perhaps do better with a global variable
volatile int testing = 0;
and set that in the routine. That way you can observe the value in the
monitor as well.
2. You need to declare your function to be an interrupt handler as it
has to save the registers and any internal temporaries the compiler
uses on entry and restore them on exit.
> --
> You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
rc2014-z80+...@googlegroups.com.
> To view this discussion on the web, visit
https://groups.google.com/d/msgid/rc2014-z80/055a8a8f-8faf-4640-9d75-3901335309e0n%40googlegroups.com.