cm2.bas

来自「82 sample programs written in BASCOM-805」· BAS 代码 · 共 33 行

BAS
33
字号
'--------------------------------------------------------------
'                     (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 + =
减小字号Ctrl + -
显示快捷键?