; uncomment following two lines if using 16f627 or 16f628. config uses internal oscillator
	LIST	p=16F628		;tell assembler what chip we are using
	include "P16F628.inc"		;include the defaults for the chip
	__config 0x3D18			;sets the configuration settings (oscillator type etc.)

; Filename : Sample.asm

; DECLARE VARIABLES!!!!!!
; We are telling the assembler we want to start allocating symbolic variables starting
;    at machine location 0x20. Please refer to technical documents to see if this is OK!!

cblock 	0x20 			;start of general purpose registers
		count1 			;  count1 is symbolic name for location 0x20
		counta 			;  counta is symbolic name for location 0x21
		countb 			;  countb is symbolic name for location 0x22
	endc



;un-comment the following two lines if using 16f627 or 16f628
; FORGET THESE 2 LINES AND FUNNY STUFF HAPPENS

	movlw	0x07
	movwf	CMCON			;turn comparators off (make it like a 16F84)
	
; The following is very typical. We must change memory banks to set the TRIS registers

	bsf		STATUS,RP0
	movlw	0x00
	movwf	TRISB			; portb is output
	movlw	0xff
	movwf	TRISA			;porta is input
	bcf		STATUS,RP0		;return to bank 0

;start  main code here
	
	
	
	
	
; don't forget the word 'end'	
	end