📄 interrupt.asm
字号:
;********************************************************
; PROJECT NAME : nimh charger *
; Author : borg *
; VERSION : V0.0 *
; BODY : SN8P2704a *
; COMPILER : 1.99N *
; function : *
; input : *
; output : tempvolt1_l, tempvolt1_h *
; tempvolt2_l, tempvolt2_h *
; use register : data1, data2, tempvolt1_l, tempvolt1_h*
; tempvolt2_l, tempvolt2_h *
; use flag : dtemp1_f, dtemp2_f *
; run cycles : *
; *******************************************************
INTERRUPT:
XCH A,ACCBUF
XCH A,PFLAG
B0MOV PFLAGBUF,A
b0bts0 ft0irq
jmp t0intr
B0BTS0 FTC0IRQ
JMP TC0INTR
B0BTS0 FP00IRQ
JMP P00INTR
B0BTS0 FTC1IRQ
JMP TC1INTR
b0bts0 fadcirq
jmp adcintr
INTERRUpt90:
XCH A,PFLAGBUF
B0MOV PFLAG,A
XCH A,ACCBUF
RETI
;---------------------------------------
T0INTR:
bclr ft0enb
mov a,#61
mov t0c,a
bset ft0enb
incms t0count1
nop
mov a,#80
cmprs a,t0count1
jmp t0intr90
clr t0count1
bset nopan_check_f
b0bts1 nopan_f
jmp t0intr90
bclr first_f
incms t0count2
NOP
mov a,#60
cmprs a,t0count2
jmp t0intr90
clr t0count2
bset t0_1min_f
jmp t0intr90
T0INTR90:
B0BCLR FT0IRQ
JMP INTERRUPt90
;---------------------------------------
TC1INTR:
b0bts1 buzzer_f
jmp tc1intr30
decms tc1count0
jmp tc1intr30
mov a,tc1count0_copy
mov tc1count0,a
notbit buzzer_p
b0bts0 buzzer_en_sf
jmp tc1intr00
b0bts0 buzzer_en_lf
jmp tc1intr00
decms buzzer_wcount
jmp tc1intr202
bclr buzzer_en_wf
jmp tc1intr201
tc1intr00:
decms buzzer_count
jmp tc1intr001
jmp tc1intr002
tc1intr001:
nop
jmp tc1intr30
tc1intr002:
bclr buzzer_en_sf
bclr buzzer_en_lf
b0bts1 buzzer_en_wf
jmp tc1intr201
jmp tc1intr202
tc1intr201:
bclr buzzer_p
bclr buzzer_f
jmp tc1intr30
tc1intr202:
jmp tc1intr30
tc1intr30:
b0bts1 timer_f
jmp tc1intr90
decms tc1count1
jmp tc1intr90
mov a,#80
mov tc1count1,a
decms tc1count2
jmp tc1intr90
mov a,#60
mov tc1count2,a
incms tc1count3
nop
mov a,timer_MINUTE
cmprs a,tc1count3
jmp tc1intr90
clr tc1count3
bset timer_out_f
bclr timer_f
bset buzzer_active_f
bset buzzer_active_lf
mov a,#5
mov buzzer_count,a
TC1INTR90:
B0BCLR FTC1IRQ
JMP INTERRUPt90
;---------------------------------------
TC0INTR:
nop
TC0INTR90:
B0BCLR FTC0IRQ
JMP INTERRUPt90
;---------------------------------------
P00INTR:
b0bts0 first_f
jmp p00intr90
b0bts1 power_f
jmp p00intr90
bset first_f
bset outctrl_p
NOP
P00INTR90:
B0BCLR FP00IRQ
JMP INTERRUPt90
;---------------------------------------
adcintr:
adcintr90:
bclr fadcirq
jmp interrupt90
;---------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -