Thanks for the help. I am still a bit unclear, so I want to know if I can do something like this (I would do it myself with the PIC but I won't be able to until tomorrow):

Beep var byte
flash var byte


Gosub EEPROM


Start:

if portb.4=1 then
beep=beep+1
gosub EEPROM

if beep=1 then
high portb.0
endif

if portb.3=1 then
flash=flash+1
gosub EEPROM

if flash=2 then
high portb.1
endif

goto start


EEPROM:

write 0, beep
write 1, flash
return

I know this isn't a very complex code but the reason I need to write to the EEPROM is because I need to change functions on an alarm system after the PIC is already programmed. Some questions.... if for example I just say "flash var byte," does the PIC automatically recognize flash as a zero? Lets say the PIC has been running for a while and flash=7. Now, I power off the PIC and it holds the 7 in memory. If I goto power up the PIC and I have it go directly to the write command, will it simply just write over flash but still make it 7? Also, do I need the read command or can I just say "If beep=1 then......?"

Thanks,

Chris