Does someone know if this is possible in c? Am I doing something wrong?
I wrote this code, but counter doesn't ever get incremented. The commented line was my attempt to do it in pure c but it didn't work either.
(only significant code is pasted here)
Code: Select all
unsigned char counter;
void func()
{ ++counter; }
void main()
{
counter = 0;
// *( (unsigned char*) 0xFFFA ) = (unsigned char*) func;
asm( "lda %v", func );
asm( "sta $FFFA" );
}