Jason asked for: >#1 A routine to clear all RAM on startup (16F84) How about: movlw 0x00C ; Start at the Beginning of RAM movwf FSR Loop clrf INDF ; Clear the Current Byte Pointed to incf FSR movlw 0x050 ; Has all the RAM been Cleared? subwf FSR, w btfss STATUS, Z goto Loop ; Nope, Do the Next Location >#2 A routine for saving and restoring W,STATUS, etc.. during interrupts.. This is explained in an APNote (which I can't find right now). But, in a nutshell, the registers that are changed are saved before the interrupt is serviced: int movwf _w ; Store "W" movf STATUS, W ; Store the Status Register movwf _status ; Repeat the last two lines for the Registers Used To return from the interrupt, the "w" Register has to be loaded without affecting the zero bit (which will happen with a "movf" instruction). ; Load regs in reverse order to how they were saved movf _status, W ; For example, the Status Register movwf STATUS swapf _w ; Restore "w" using an instruction that doesn't change swapf _w, W ; "STATUS" Bits. Swap nybbles in the Register and retfie ; then Swap them again and leave result in "W" myke > >I suppose I could come up with some on my own... >But who wants to re-invent the wheel.. (especialy this early in the >morning...) >Jason E. Brown >Other Worlds >3801 Dayton Blvd >Chattanooga TN 37415 >(423)870-1074 > >othrwrld@cdc.net = business. >jebrown@cdc.net = me. > > "My ancestors didn't spend millions of years clawing their way to the top of the food chain, just so I could become a vegetarian"