list p=16f877A ; list directive to define processor
#include <p16f877A.inc> ; processor specific variable definitions
__CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _RC_OSC & _WRT_OFF & _LVP_ON & _CPD_OFF
; '__CONFIG' directive is used to embed configuration data within .asm file.
; The lables following the directive are located in the respective .inc file.
; See respective data sheet for additional information on configuration word.
;***** VARIABLE DEFINITIONS
; variable used for context saving
TRISC equ 87h ; variable used for context saving
PORTC equ 07h ; variable used for context saving
COUNT1 equ 20h
COUNT2 equ 21h
;**********************************************************************
ORG 0x000 ; processor reset vector
BSF 03h, 5
BCF 03h, 6
MOVLW b'00000000'
MOVWF 87h
BCF 03h, 5
BCF 03h, 6
;********************************************************************
START MOVLW b'11111111'
MOVWF PORTC
GOTO START
END ; directive 'end of program'