Bob Ammerman wrote: > > The following will work because of the convenient locations of the two > flags > PM and ALM_PM: > > swapf FLAGS,w > xorwf FLAGS,w > andlw 1 > btfss STATUS,Z > goto alm_end Nice! I don't think I'll use it though, because if I later changed the flag bit order, I may not remember that I had to go change this code. For maintainability I'd prefer to have the comparison code refer to the symbols PM and ALM_PM. After seeing the responses here - some clever ideas, but I'm with Olin on transparency. I also note that I'm not exactly short of data memory. I don't agree with the 24-hour idea (in this instance - I would in others), but overall I think the neatest solution for me is to move the PM flags into their own registers. Keeps the code easy to follow, while using 2 GPRs that are otherwise unused, so why not? David Meiklejohn www.gooligum.com.au -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist