Hi again,

Example:
SBI of bit 0 in PINB register should toggle (xor) PORTB.PB0. Using RMW
approach, we read PINB = 0xff (because DDRB is input/tristate, read as
'1' for each pin), we OR the bitmask (1<<0)=1 on top of it (=0xff) and
write it back to PINB, *which toggles all PORTB bits* --> bug.

PINB register is read only. What you want to achieve?

Regards
 Klaus

_______________________________________________
Simulavr-devel mailing list
Simulavr-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/simulavr-devel

Reply via email to