📄 interrupt.asm
字号:
;************************************************
;Name :InterruptSub
;Function:
;Input :
;Output :
;Register Used:
;*************************************************
InterruptSub:
XCH A,AccBuf
XCH A,PFLAG
B0MOV PflagBuf,A
b0bts1 FTC1IRQ ;//Analyse the Interrupt resourc
jmp Interrupt10
b0bclr ftc1irq
b0bts1 buzzerflag
jmp Interrupt5
notbit ptbuzz
Interrupt5:
incms timer10ms
nop
mov a,#40
cmprs a,timer10ms
jmp Interrupt90
clr timer10ms ;10ms
bset t10msflag
incms timer250ms
nop
mov a,timer250ms
cmprs a,#25
jmp Interrupt8
b0bclr fp00ien
b0bclr fp00irq
clr timer250ms
b0bset t250msflag
notbit lcdt1firf
notbit lcdt2firf
notbit lcdt3firf
b0bclr fc
rlcm t6abcbuf
b0bts0 fc
; jmp display63
b0bset t6abcbuf.0
;display63:
Interrupt8:
jmp Interrupt90
;Interrupt5:
; b0bts1 ft0irq
; jmp Interrupt10
; b0bclr ft0irq
Interrupt10:
b0bts1 fp00ien
jmp Interrupt90
b0bts1 FP00IRQ
jmp Interrupt90
b0bclr fp00irq
mov a,#1
add countfreql,a
mov a,#0
adc countfreqh,a
Interrupt90:
b0bclr fp01irq
b0bclr ft0irq
XCH A,PflagBuf
B0MOV PFLAG,A
XCH A,AccBuf ;//For release the Acc And Pflag
RETI
;--------------------------------------------------------
;--------------------------------------------------------
timing:
b0bts1 t10msflag
jmp timing90
b0bclr t10msflag
incms timer20ms
nop
mov a,timer20ms
cmprs a,#2
jmp timing10
clr timer20ms
b0bset t20msflag
timing10:
mov a,temchat
b0bts0 fz
jmp timing20
decms temchat
nop
timing20:
incms timer500ms
nop
mov a,timer500ms
cmprs a,#25
jmp timing30
clr timer500ms
b0bset t500msflag
timing30:
incms t500ms
nop
mov a,t500ms ;500ms
cmprs a,#50
jmp timing40
clr t500ms
b0bset tim500msflag
incms t1min
nop
mov a,t1min
cmprs a,#120
jmp timing34
clr t1min
incms t3min
nop
mov a,t3min
cmprs a,#3
jmp timing34
b0bset t3minflag
timing34:
incms t5s
nop
mov a,t5s
cmprs a,#10
jmp timing35
b0bset t5sflag
timing35:
incms t15s
nop
mov a,t15s
cmprs a,#30
jmp timing36
b0bset t15sflag
timing36:
incms time2s
nop
mov a,time2s
cmprs a,#4
jmp timing37
b0bset time2sflag
timing37:
incms time8s
nop
mov a,time8s
cmprs a,#16
jmp timing38
b0bset time8sflag
timing38:
incms t60s
nop
mov a,t60s
cmprs a,#120
jmp timing40
clr t60s
incms t40min
nop
mov a,t40min
cmprs a,#40
jmp timing39
b0bset t40minflag
timing39:
incms t10min
nop
mov a,t10min
cmprs a,#10
jmp timing40
b0bset t10minflag
timing40:
incms t1000ms
nop
mov a,t1000ms
cmprs a,#100
jmp timing60
clr t1000ms
incms timerms
nop
mov a,timerms
cmprs a,#60
jmp timing45
clr timerms
incms timer5min
nop
mov a,timer5min
cmprs a,#5
jmp timing45
b0bset time5minf
timing45:
mov a,tns
b0bts0 fz
jmp timing60
decms tns
nop
timing60:
incms t2s
nop
mov a,t2s
cmprs a,#200
jmp timing70
clr t2s
b0bts1 flash456f
jmp timing70
notbit ptled1
timing70:
timing90:
ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -