I have ATmega8
I write my MCU firmware in assembly.
I usually use the bits of r25 and r24 as flags.
In my last program, UART protocol wasn’t used and I kept it inactive. I thought I could use the bits of its unused data register (UDR) also as flags. For these flags, the instructions SBI/CBI and SBIS/SBIC could be used. I noticed that the program didn’t run on board as I expected (I don’t have an external emulator board). So I re-wrote the code using the bits of r23 as flags. The problem was solved. I concluded that UDR shouldn't be used as flags even if its UART protocol not in use.
Although I can test other inactive I/O registers as UBRRL and else, my question is:
Did anyone use the bits of unused I/O registers as flags?