-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkodablak.frm
303 lines (280 loc) · 8.28 KB
/
kodablak.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
VERSION 5.00
Begin VB.Form kodablak
BorderStyle = 3 'Fixed Dialog
Caption = "Kód szerkesztõ"
ClientHeight = 2205
ClientLeft = 45
ClientTop = 435
ClientWidth = 5745
ClipControls = 0 'False
ControlBox = 0 'False
Icon = "kodablak.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2205
ScaleWidth = 5745
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.ComboBox p
Height = 315
Index = 1
ItemData = "kodablak.frx":0CCA
Left = 3000
List = "kodablak.frx":0CE6
TabIndex = 2
Top = 360
Width = 975
End
Begin VB.ComboBox p
Height = 315
Index = 0
ItemData = "kodablak.frx":0D02
Left = 1800
List = "kodablak.frx":0D1E
TabIndex = 1
Top = 360
Width = 975
End
Begin VB.CommandButton megse
Caption = "Mégse"
Height = 375
Left = 4440
TabIndex = 5
Top = 720
Width = 1215
End
Begin VB.CommandButton ok
Caption = "OK"
Default = -1 'True
Height = 375
Left = 4440
TabIndex = 4
Top = 240
Width = 1215
End
Begin VB.TextBox megj
Height = 375
Left = 120
TabIndex = 3
Top = 960
Width = 3975
End
Begin VB.ComboBox kod
Height = 315
Left = 120
Style = 2 'Dropdown List
TabIndex = 0
Top = 360
Width = 1455
End
Begin VB.Label sugo
ForeColor = &H00FF0000&
Height = 615
Left = 240
TabIndex = 10
Top = 1440
Width = 3735
End
Begin VB.Label cimke
AutoSize = -1 'True
Caption = "Megjegyzés:"
Height = 195
Index = 3
Left = 120
TabIndex = 9
Top = 720
Width = 885
End
Begin VB.Line Line1
X1 = 4200
X2 = 4200
Y1 = 120
Y2 = 2040
End
Begin VB.Label cimke
AutoSize = -1 'True
Caption = "2. Paraméter:"
Height = 195
Index = 2
Left = 3000
TabIndex = 8
Top = 120
Width = 945
End
Begin VB.Label cimke
AutoSize = -1 'True
Caption = "1. Paraméter:"
Height = 195
Index = 1
Left = 1800
TabIndex = 7
Top = 120
Width = 945
End
Begin VB.Label cimke
AutoSize = -1 'True
Caption = "Utasítás:"
Height = 195
Index = 0
Left = 120
TabIndex = 6
Top = 120
Width = 630
End
End
Attribute VB_Name = "kodablak"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private SorSzam As Long
Private letezik As Boolean
Public modosit As String, felvesz As String
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then megse_Click
End Sub
Private Sub Form_Load()
kod.AddItem "REM"
kod.AddItem "INP"
kod.AddItem "LET"
kod.AddItem "STR"
kod.AddItem "ADD"
kod.AddItem "INC"
kod.AddItem "SUB"
kod.AddItem "DEC"
kod.AddItem "MLP"
kod.AddItem "DIV"
kod.AddItem "MOV"
kod.AddItem "JMP"
kod.AddItem "SIG"
kod.AddItem "GTO"
kod.AddItem "GSB"
kod.AddItem "RET"
kod.AddItem "OUT"
kod.AddItem "END"
kod.Text = kod.List(1)
kod_Click
End Sub
Public Sub kod_Click()
Dim m As Byte
m = 0
Select Case kod.Text
Case "REM"
m = 2
sugo.Caption = utasitasok(1)
Case "INP"
sugo.Caption = utasitasok(2)
Case "LET"
sugo.Caption = utasitasok(3)
Case "STR"
sugo.Caption = utasitasok(4)
m = 1
Case "ADD"
sugo.Caption = utasitasok(5)
Case "SUB"
sugo.Caption = utasitasok(6)
Case "INC"
sugo.Caption = utasitasok(7)
m = 1
Case "DEC"
sugo.Caption = utasitasok(8)
m = 1
Case "MLP"
sugo.Caption = utasitasok(9)
Case "DIV"
sugo.Caption = utasitasok(10)
Case "MOV"
sugo.Caption = utasitasok(11)
Case "JMP"
sugo.Caption = utasitasok(12)
m = 1
Case "SIG"
sugo.Caption = utasitasok(13)
m = 1
Case "GTO"
sugo.Caption = utasitasok(14)
m = 1
Case "GSB"
sugo.Caption = utasitasok(15)
m = 1
Case "RET"
sugo.Caption = utasitasok(16)
m = 1
Case "OUT"
sugo.Caption = utasitasok(17)
m = 1
Case "END"
m = 2
sugo.Caption = utasitasok(18)
End Select
p(0).Enabled = True
p(1).Enabled = True
If m = 1 Then p(1).Enabled = False
If m = 2 Then
p(0).Enabled = False
p(1).Enabled = False
End If
End Sub
Private Sub megse_Click()
'Unload Me
Me.Hide
End Sub
Public Sub ok_Click()
Dim sor As String
sor = SorSzam + 1 & ": " & kod.Text & " " & p(0).Text & " " & p(1).Text
If Len(Trim(megj.Text)) <> 0 Then
sor = sor & " //" & megj.Text
End If
If letezik Then
emulator.code.List(SorSzam) = sor
Else
Dim i As Long
With emulator.code
'.AddItem .List(.ListCount - 1) ', SorSzam
'emulator.SorszamJavitasa (.ListCount - 1)
'For i = .ListCount - 2 To SorSzam Step -1
' .List(i + 1) = .List(i)
' emulator.SorszamJavitasa (i + 1)
'Next i
'.List(SorSzam) = Sor
''emulator.SorszamJavitasa (SorSzam)
.AddItem sor, SorSzam
emulator.Ujrasorszamoz
.Selected(SorSzam) = True
End With
End If
megse_Click
End Sub
Public Sub Mutasd(Melyiket As Long, Van As Boolean)
'On Error Resume Next
'Form_Load
betolt Melyiket, Van
kodablak.Show vbModal
End Sub
Public Sub betolt(Melyiket As Long, Van As Boolean)
On Error GoTo hiba
letezik = Van
If Van Then
kodablak.kod.Text = emulator.Utasitas(emulator.code.List(Melyiket))
kodablak.p(0).Text = emulator.Parameter(emulator.code.List(Melyiket), 1)
kodablak.p(1).Text = emulator.Parameter(emulator.code.List(Melyiket), 2)
If InStr(1, emulator.code.List(Melyiket), "//") <> 0 Then
megj.Text = Mid(emulator.code.List(Melyiket), InStr(1, emulator.code.List(Melyiket), "//") + 2)
End If
'kodablak.megj.Text = emulator.Parameter(emulator.code.List(Melyiket), 3)
'megj.Text = Mid(megj.Text, 3)
ok.Caption = modosit
Else
ok.Caption = felvesz
End If
SorSzam = Melyiket
Exit Sub
hiba:
MsgBox Err.Description, vbInformation, Err.Number
Resume Next
End Sub
Private Sub p_Change(Index As Integer)
p(Index).Text = UCase(p(Index).Text)
End Sub