LIST p=PIC12F629 ;tell assembler what chip we are using
include "P12F629.inc" ;include the defaults for the chip
__config b'11000110010100' ;sets the configuration settings (oscillator type etc.)
cblock 0x20 ;start of general purpose registers
endc
org 0x0000 ;org sets the origin
goto Initialize
org 0x0004
INT
bcf STATUS, RP0 ;select bank 0
bcf INTCON, T0IF
comf GPIO, f
retfie
Initialize
bcf STATUS, RP0 ;select bank 0
movlw 0x07
movwf CMCON ;turn comparators off (p.37)
bsf STATUS, RP0 ;select bank 1
movlw b'00001000'
movwf TRISIO
movlw 0x00
movwf OPTION_REG
movlw b'10100000'
movwf INTCON
bcf STATUS, RP0 ;select bank 0
movlw 0x00 ;set everything off
movwf GPIO
clrf TMR0
Infinite
goto Infinite
END