
#include <at89x52.h>

void my_irq_dontcareabout_p1_high_nibble(void) __interrupt
{
   unsigned char __code table[] = {0x0e, 0x0d, 0x0c, 0x0b, /**/};
   static unsigned char counter;

   P1 = table[counter];
   counter++;
   counter %= sizeof table;
}



unsigned char P1_mirror = 0xa0;

void my_irq_beniceto_p1_high_nibble(void) __interrupt
{
   unsigned char __code table[] = {0x0e, 0x0d, 0x0c, 0x0b /**/};
   static unsigned char counter;

   P1_mirror &= 0xf0;
   P1_mirror |= table[counter];
   P1 = P1_mirror;
   counter++;
   counter %= sizeof table;
}


void my_irq_bitwise(void) __interrupt
{
   unsigned char __code table[] = {0x0e, 0x0d, 0x0c, 0x0b /**/};
   static unsigned char counter;

   P1_0 = (0x01 & table[counter]);
   P1_1 = (0x02 & table[counter]);
   P1_2 = (0x04 & table[counter]);
   P1_3 = (0x08 & table[counter]);

   counter++;
   counter %= sizeof table;
}
