Hi Mike
I've tried putting my code into the template and including the .inc file but I get the same errors as before.
list p=16f684 ; list directive to define processor
#include <P16F684.inc> ; processor specific variable definitions
__CONFIG _CP_OFF & _CPD_OFF & _BOD_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT & _MCLRE_ON & _FCMEN_OFF & _IESO_OFF
; '__CONFIG' directive is used to embed configuration data within .asm file.
; The labels following the directive are located in the respective .inc file.
; See respective data sheet for additional information on configuration word.
;***** VARIABLE DEFINITIONS
w_temp EQU 0x7E ; variable used for context saving
status_temp EQU 0x7F ; variable used for context saving
;**********************************************************************
ORG 0x000 ; processor reset vector
goto main ; go to beginning of program
ORG 0x004 ; interrupt vector location
movwf w_temp ; save off current W register contents
movf STATUS,w ; move status register into W register
movwf status_temp ; save off contents of STATUS register
; isr code can go here or be located as a call subroutine elsewhere
movf status_temp,w ; retrieve copy of STATUS register
movwf STATUS ; restore pre-isr STATUS register contents
swapf w_temp,f
swapf w_temp,w ; restore pre-isr W register contents
retfie ; return from interrupt
main
START
MOVLW B'00011111' ;5bits of PORTA are I/P
MOVWF TRISA
CLRF TRISC ;PORTC is OUTPUT
MOVLW B'00000111' ;Prescaler is /256
MOVWF OPTION_REG
CLRF PORTA ;Clears PortA.
CLRF PORTC ;Clears PortC.
;SUBROUTINE SECTION.
WAIT1MS MOVLW d'250' ;Initial value - tweak if req.
NOP
LOOP1MS ADDLW d'255' ;dec W
BTFSS STATUS,2 ;Zero flag set?
GOTO LOOP1MS ; No, keep looping
RETURN ; Yes, 1ms done
;Program starts now.
BEGIN
CLRF TMR0 ;clears tmr0
MOVLW d'178' ;256-178=78 counts for 20ms
MOVWF TMR0
BCF INTCON,2 ;clear overflow flag
BCF OPTION_REG,5 ;start timer mode
BTFSS PORTA,0 ;test for switch press
GOTO SERVOR
GOTO SERVOL
SERVOR BSF PORTC,0 ;turn on power to servo
CALL WAIT1MS
BCF PORTC,0 ;turn off power to servo
GOTO WAIT20MS
SERVOL BSF PORTC,0 ;turn on power to servo
CALL WAIT1MS
CALL WAIT1MS
BCF PORTC,0 ;turn off power to servo
GOTO WAIT20MS
WAIT20MS
BTFSS INTCON,2 ;wait until timer0 reaches 20ms
GOTO WAIT20MS
BSF OPTION_REG,5 ;stop timer mode
GOTO BEGIN ;keep looping
ORG 0x2100 ; data EEPROM location
DE 1,2,3,4 ; define first four EEPROM locations as 1,2,3,&4
END ; directive 'end of program'