I'm missing something fundamental here, looking for some advice.
I have a byte where I need to check the last bit for 1 or 0 and choose a path, then shift that bit off. Thinking a register pair would work with a rol but currently my data is in r16.
Here was my attempt.
mov r19, r16 //move data from r16 to r19
andi r19, 0x80 ; and the last bit , result goes in r19 ?
cpi r19, 0 ; //check if its a 0 or 1.
breq sb_send0%=; //path for 0
rjmp sb_send1%= ; //path for 1
later on do a
lsr r16
The above does not seem to work, is there faster/better way to do this operation?