> > in sreg_save,SREG > > in tmp,REGISTER > > andi tmp,0xXX > > out REGISTER,tmp > > out SREG,sreg_save > > sei Hm, another thing to add maybe is that on the AVR you can bit manipulate LOW registers. One is EEDR, which is free when you don't use the EEPROM currently. I could have written, too: in tmp,REGISTER out EEDR,tmp cbi EEDR,intbit in tmp,EEDR out tmp,REGISTER sei It'll take one more cycle, but 1 general purpose register less (sreg_save). But in the actual implementation I did define several literals (all possible combinations) and did directly load them. It consumed more code space total, but less execution time as well as no status bits. While the PIC offers more options for sneaky code, the AVR isn't boring too.