; '__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.
;********************** CONST DEFINITIONS******************************
FULL_WORK = 10 ; 程㏄戳箇砞
DEF_WORK1 = 2 ; PWM1㏄戳箇砞
DEF_WORK2 = 8 ; PWM2㏄戳箇砞
PORT_OUT = PORTB ; PWM块梆
PIN_PWM1 = 0 ; PWM1块竲
PIN_PWM2 = 1 ; PWM2块竲
;********************** VARIABLE DEFINITIONS***************************
CBLOCK 0x0C
w_temp ; variable used for context saving
status_temp ; variable used for context saving
PWM_FULL ; 程㏄戳璸计竟(计)
PWM_WORK_CFG1 ; PWM1 ㏄戳砞﹚既竟
PWM_WORK_CFG2 ; PWM2 ㏄戳砞﹚既竟
PWM_WORK_CNT1 ; PWM1 ㏄戳璸计竟(计)
PWM_WORK_CNT2 ; PWM2 ㏄戳璸计竟(计)
ENDC
;**********************************************************************
;****************** 垂竚祘Α秈翴 ***********************
;**********************************************************************
ORG 0x000 ; processor reset vector
ResetStart
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