reyge
Member level 4

notepad++ how do you comment
Hello Experts!
I am a newbie in assembly. A and B are 8-bit registers. How do you efficiently implement this in assembly using the instruction set of pic16f876a?
if ( A == B )
call subroutine1
else
call subroutine2
One way, i think is to XOR A and B then use bit testing for all 8 bits. But that could be long.
Another way is to XOR A and B, then add one to the result, then use DECFSZ.
Any other way?
thanks!
Hello Experts!
I am a newbie in assembly. A and B are 8-bit registers. How do you efficiently implement this in assembly using the instruction set of pic16f876a?
if ( A == B )
call subroutine1
else
call subroutine2
One way, i think is to XOR A and B then use bit testing for all 8 bits. But that could be long.
Another way is to XOR A and B, then add one to the result, then use DECFSZ.
Any other way?
thanks!