⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 JAPAN RTOS TOPPERS/JSP kernel 1.4 PreRelease simulation environment JSP kernel Windows simulation
💻 FRM
字号:
VERSION 5.00
Object = "{194B359F-594E-4EE4-A804-84723D1CF1C4}#1.0#0"; "device.dll"
Begin VB.Form Form1 
   Caption         =   "僨僶僀僗丒僔儈儏儗乕僞"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows 偺婛掕抣
   Begin VB.CommandButton Command1 
      Caption         =   "妱崬傒儃僞儞"
      Height          =   615
      Left            =   2880
      TabIndex        =   8
      Top             =   240
      Width           =   1455
   End
   Begin VB.Frame Frame1 
      Height          =   2175
      Left            =   600
      TabIndex        =   1
      Top             =   840
      Width           =   3855
      Begin VB.Label Label6 
         Caption         =   "儊僢僙乕僕"
         Height          =   495
         Left            =   120
         TabIndex        =   7
         Top             =   960
         Width           =   855
      End
      Begin VB.Label Label5 
         Caption         =   "僉儏乕僀儞僌悢"
         Height          =   375
         Left            =   120
         TabIndex        =   6
         Top             =   600
         Width           =   1215
      End
      Begin VB.Label Label4 
         Caption         =   "忬懺"
         Height          =   375
         Left            =   120
         TabIndex        =   5
         Top             =   240
         Width           =   735
      End
      Begin VB.Label Message 
         Height          =   1095
         Left            =   1560
         TabIndex        =   4
         Top             =   960
         Width           =   2175
      End
      Begin VB.Label QueueingCounter 
         Caption         =   "0"
         Height          =   255
         Left            =   1560
         TabIndex        =   3
         Top             =   600
         Width           =   375
      End
      Begin VB.Label State 
         Caption         =   "捠忢忬懺"
         Height          =   375
         Left            =   1560
         TabIndex        =   2
         Top             =   240
         Width           =   1695
      End
   End
   Begin ATLDEVICELibCtl.DeviceControl DeviceControl1 
      Height          =   495
      Left            =   240
      OleObjectBlob   =   "Form1.frx":0000
      TabIndex        =   0
      Top             =   120
      Visible         =   0   'False
      Width           =   735
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Const NORMAL As String = "捠忢忬懺"
Private Const REQUIRING As String = "張棟梫媮"
Private Const PROCESSING As String = "張棟拞"

Private Sub Form_Load()
    DeviceControl1.Connect         '僨僶僀僗儅僱乕僕儍偲愙懕偡傞
    DeviceControl1.Map &H1000, 1   '0x1000斣抧偵1僶僀僩偺儗僕僗僞傪儅僢僾偡傞
    State = NORMAL
    QueueingCounter = 0
    Message = ""
End Sub

Private Sub Form_Unload(Cancel As Integer)
    DeviceControl1.Close   '僨僶僀僗儅僱乕僕儍偲偺愙懕傪夝彍偡傞
End Sub

Private Sub DeviceControl1_OnRead(ByVal address As Long, ByVal sz As Long)
    DeviceControl1.Value = 0       '撉傒弌偟梫媮傊偺墳摎
    QueueingCounter = QueueingCounter - 1
    State = PROCESSING
End Sub

Private Sub DeviceControl1_OnWrite(ByVal address As Long, ByVal sz As Long)
    Dim tmp As Integer
    tmp = DeviceControl1.Value      '彂偒崬傑傟偨僨乕僞偺撉傒弌偟
    State = NORMAL
End Sub

Private Sub Command1_Click()
   DeviceControl1.RaiseInterrupt (1)  '妱崬傒敪惗
   QueueingCounter = QueueingCounter + 1
   Select Case State
    Case NORMAL
        State = REQUIRING
    Case REQUIRING
    Case PROCESSING
        If QueueingCounter > 5 Then
            Message = "僉儏乕僀儞僌偁傆傟!! 僨僶僀僗偐傜偺張棟梫媮傪僜僼僩僂僃傾偑庢傝偙傏偟偰偄傑偡丅僨僶僀僗丒僔儈儏儗乕僞傪嵞婲摦偟偰壓偝偄"
        End If
    End Select
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -