Is there a way to set a bit in a register without messing with the other bits? I believe the SBI and CBI instructions can do this but they don't work for registers above 0x1f.
What about the SBR instruction? I guess it's nothing special. Apparently it does the same thing as reading a register, oring in a bit, and writing it back, except it does it faster. Is that right?
In particular, the LCD control and status register A (LCDCRA) on the mega169 etc., has an interrupt pending bit that is set by hardware. That bit is cleared if a 1 is written to that position in the register. There are other bits in the register that must be set by software.
I guess the rule here is to read the register, "and off" the interrupt pending flag, "or in" the bit you want to set, and then write it back to the register.
Actually in this case I guess it doesn't matter what you do because when the LCD is enabled you get periodic interrupts come hell or high water. So if you miss one, there will soon be another.