Following is my new code:
list p=12f629, f=inhx32
#include <p12f629.inc>
__CONFIG _WDT_OFF&_INTRC_OSC_NOCLKOUT&_BODEN_ON&_CP_OFF&_PWRTE_ON
COUNTER equ 0x21
COUNTER1 equ 0x22
temp equ 0x23
M1 equ 0x24
M2 equ 0x25
M3 equ 0x26
;ANSEL equ 0x9F
;cblock 0x20
;d1
; d2
;endc
;**********************************************************************
ORG 0x000 ; processor reset vector
goto init ; go to beginning of program
ORG 0x004 ; interrupt vector location
init:
call 0x3FF ; retrieve calibration value
bsf STATUS,RP0 ; set file register bank to 1
movwf OSCCAL ; update register with factory cal value
bcf STATUS,RP0 ; set file register bank to 0
CLRF GPIO ;Init GPIO
MOVLW 07h ;Set GP<2:0> to
MOVWF CMCON ;digital IO
BSF STATUS,RP0 ;Bank 1
;CLRF ANSEL ;Digital I/O
MOVLW b'00011111' ;Sets inputs and outputs
MOVWF TRISIO ;and set outputs
BCF STATUS,RP0 ;Bank 0
;movlw 20h
;movwf GPIO
;movlw 02h
;movwf COUNTER
;Variable definitions
;M1 on time of pulse
;M2 off time of pulse
;M3 number of pulses
;M4 on time of pulse
;M5 off time of pulse
;M6 number of pulses
movlw .10 ;on time of pulse #1
movwf M1
movlw .34 ;off time of pulse #1
movwf M2
movlw 02h ;number of pulse #1
movwf M3
main: decfsz M3,1
call lowtest
;decfsz M3,1
goto loop1
lowtest:
bsf GPIO,5
call Delay
bcf GPIO,5
call Delay1
return
;decfsz M3,1
;goto main
;goto loop1
Delay movf M1,0
movwf COUNTER
nop
decfsz temp,f
goto $-2
decfsz COUNTER,f
goto $-4
retlw 00
Delay1 movf M2,0
movwf COUNTER1
nop
decfsz temp,f
goto $-2
decfsz COUNTER1,f
goto $-4
retlw 00
loop1: ;nop
;goto $-2
end