📄 intserver.asm
字号:
;************************************************
;Name :InterruptSub
;Function:
;Input :
;Output :
;Register Used:
;*************************************************
InterruptSub:
XCH A,AccBuf
XCH A,PFLAG
B0MOV PflagBuf,A
b0bts0 FTc0IRQ ;//Analyse the Interrupt resourc
jmp Tc0INTR
b0bts0 FP00IRQ ;//P00 interrupt
jmp P00INTR
b0bts0 FP01IRQ ;//P01 interrupt
jmp P01INTR
Interrup90:
XCH A,PflagBuf
B0MOV PFLAG,A
XCH A,AccBuf ;//For release the Acc And Pflag
RETI
;--------------------------------------------------------
Tc0INTR:
;//User can add interrupt program
bset t10msflag
mov a,keychat
b0bts0 fz
jmp TC0INTR10
decms keychat
nop
;-----
TC0INTR10:
decms timer1s
jmp TC0INTR90
bset t1sflag
mov_ timer1s,#100
;-----
TC0INTR20:
decms timer1m
jmp TC0INTR90
mov_ timer1m,#60
bset t1mflag
TC0INTR90:
b0bclr FTc0IRQ
jmp Interrup90
;--------------------------------------------------------
P00INTR:
;//User can add interrupt program
P00INTR90:
b0bclr FP00IRQ
jmp Interrup90
;--------------------------------------------------------
P01INTR:
;//User can add interrupt program
P01INTR90:
b0bclr FP01IRQ
jmp Interrup90
;***********************************************
;***********************************************
;Name :mnintgnd
;Function:interface between interrupt and main
;Input :
;Output :
;Register Used:
;***********************************************
mnintgnd:
b0bts1 t10msflag
jmp mnintgnd90
;-----------------------------
bclr t10msflag
;----
mov a,buzfrequent
b0bts0 fz
jmp mnintgnd10
;----
decms buzfrequent
jmp mnintgnd10
bset buzfrequentflag
;------------------------------
mnintgnd10:
mov a,loadfrequent
b0bts0 fz
jmp mnintgnd20
;----
decms loadfrequent
jmp mnintgnd20
notbit loadfrequentflag
;------------------------------
mnintgnd20:
mov a,ledfrequent
b0bts0 fz
jmp mnintgnd30
;----
decms ledfrequent
jmp mnintgnd30
bset ledfrequentflag
;-------------------------------
mnintgnd30:
mnintgnd90:
ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -