📄 cm2.bas
字号:
'--------------------------------------------------------------
' (c) 1997-2000 MCS Electronics
'--------------------------------------------------------------
' file: CM2.BAS
' demo: Interrupt example for non stndard 8051 interrupts
' Select 80552.dat
'--------------------------------------------------------------
$regfile = "80552.dat"
Dim Count As Byte , Gt As Byte , I As Word
On Cm2 Cm2_int
Rem the 80552.dat file has a section named [MISC]
Rem under this section the additional interrupts can be found
Rem Each interrupt begins with I_ followed by the name
Rem For this example it is I_CM2 followed by the address
Rem So, the name for the interrupt is CM2
Enable Interrupts 'enable the use of interrupts
Count = 0 'reset counter
Do
Input "Number " , Gt
Print "You entered : " ; Gt
Loop Until Gt = 1 'loop until users presses ESC key
End
Rem The Interrupt For CM2
Cm2_int:
Print "CM2 occured"
Return
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -