呵呵!今天早上看看C,发现里面有什么中断,不知道怎么回事,想了一下,就写个模拟的,代码如下:
Dim CPUinterrupt As Boolean
Dim Timerinterrupt As Boolean
Dim Transmitinterrupt As Boolean
Private Sub Interrupt()
If CPUinterrupt = True Then
Label1.Caption = "CPUinterrupt "
Exit Sub
Else
If Timerinterrupt = True Then
Label1.Caption = "Timerinterrupt "
Exit Sub
Else
If Transmitinterrupt = True Then
Label1.Caption = "Transmitinterrupt "
Exit Sub
Else
MsgBox "No Interrupt!"
Exit Sub
End If
End If
End If
End Sub
Private Sub CmdCPUinterrupt_Click()
CPUinterrupt = True
End Sub
Private Sub CmdReposition_Click()
Transmitinterrupt = False
Timerinterrupt = False
CPUinterrupt = False
End Sub
Private Sub CmdTimerinterrupt_Click()
Timerinterrupt = True
End Sub
Private Sub CmdTransmitinterrupt_Click()
Transmitinterrupt = True
End Sub
Private Sub Timer1_Timer()''''2000,2秒检测一次
Interrupt
End Sub