I need to write an assembly routine that reads a byte from a port and based on that byte sets or clears one of 64 port bits. This should run on a 640.
0b10000001 -> Would set BIT1 on PORTA
0b00000001 -> Would clear BIT1 on PORTA
0b10000100 -> Would set BIT4 on PORTA
0b00000100 -> Would clear BIT4 on PORTA
0b10001101 -> Would set BIT5 on PORTB
0b00001101 -> Would clear BIT5 on PORTB
0b10001111 -> Would set BIT7 on PORTB
0b00001111 -> Would clear BIT7 on PORTB
I have no problem using the "brne" test to make this happen, but with 64+ possible results I would like to know if there is a better way. Any ideas?