-
Notifications
You must be signed in to change notification settings - Fork 3
/
E2-DOS.txt
1547 lines (1327 loc) · 36.1 KB
/
E2-DOS.txt
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
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
@name E2-DOS
@inputs [PWR MDA CGA VGA PS2 USB RS232]:wirelink
@outputs Text:string
@persist [CPWR CMDA CCGA CVGA CPS2 CUSB]
@persist [E O KUser User PS2E USBE CGAE MDAE]:entity
@persist [SText Text Version FontName]:string
@persist [Fcolor Bcolor]:vector
@persist [DebugMode FontSize HZ FcolorCGA TextWidth TextMax TypeFlag]
@persist [C10 CD FileLoad FileData EXCurData]:string
@persist [Command CChar WebSite WebData WriteText]:string
@persist NST:string
@persist [DDevN DLBA DData]
@persist [Start X Y N I CY MX MY]
@persist [Exec LockC LockD LockF] [LockRsn]:string
@persist [On Flick KD KDF Echo SBL RqStart CmdN MDAFastmode]
@persist [Commands Devices Locks KDevs DevTypes DiskAct]:array
@persist [Types TypeNs TypeNums Files ExeTypes]:array
@persist [Exp1 Exp2 Exp3 Exp4 Exp5 Exp6 Exp7 Exp8 Exp9 Exp10]:array
@persist [Exp11 Exp12 Exp13 Exp14 Exp15 Exp16 Exp17 Exp18 Exp19 Exp20]:array
@persist [K1 K2 K3 K4 K5 K6 K7 K8 K9 K10]
@persist [K11 K12 K13 K14 K15 K16 K17 K18 K19 K20]
@persist [N1 N2 N3 N4 N5 N6 N7 N8 N9 N10]
@persist [N11 N12 N13 N14 N15 N16 N17 N18 N19 N20]
@persist [N21 N22 N23 N24 N25 N26 N27 N28 N29 N30]
@persist [N31 N32 N33 N34 N35 N36 N37 N38 N39 N40]
@persist [N41 N42 N43 N44 N45 N46 N47 N48 N49 N50]
@persist [FF1 FF2 FF3 FF4 FF5]
@persist [S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 SAll]:string
@persist [S11 S12 S13 S14 S15 S16 S17 S18 S19 S20]:string
@persist [S21 S22 S23 S24 S25 S26 S27 S28 S29 S30]:string
@persist [E1]
@persist [V21 Cursor]:vector2 [V31]:vector
if(first()){
#Variables information
#**INPUTS**
#1
#PWR - Turns on/halts the system by parsing "A" output
#CGA - Output for the MDA-capable screen (Text Screen). Doesn't support graphics.
#CGA - Output for the CGA-capable screen (Console Screen). Unsupported.
#VGA - Output for the VGA-capable screen (EGP)
#PS2 - Input for the keyboard
#USB - USB unlimited port. Unstable
#RS232 - RS-232 aka service port. Now used to wire system with other USB devices
#**PERSIST**
#2
#C*** (ex. CVGA) - Flag that is parsing if wirelink was connected
#3
#E - entity()
#O - owner()
#KUser - Wire keyboard user
#User - Actual user
#CGAE - CGA screen entity
#MDAE - MDA screen entity
#4
#SText - Text + Mods
#Text - Text that is being in the memory
#Version - System version
#FontName - Font name
#5
#Fcolor - Forecolor main vector
#Bcolor - Backcolor main vector
#6
#DebugMode - Flag of Debugmode
#FontSize - Font size
#HZ - CPU frequency
#FcolorCGA - Fcolor converted to CGA
#TextWidth - Width of text
#TextMax - Maximum chars per cell
#TypeFlag - Is user typing?
#7
#C10 - Same as toChar(10)
#CD - Checkdir output information / Echo
#FileLoad - File that is going to be loading
#FileData - Loaded file's data
#8
#Command - Current Command
#CChar - Current char
#WebSite - Website
#WebData - Web Data
#WriteText - Information for the samenamed lock
#9
#NST - "No Signal" Text
#10
#Start - Begin of EGP ids
#X - Current X pos
#Y - Current Y pos
#I - Current tick (always increases)
#N - Current EGP ID
#CY - Console Screen Y
#MX - Max X pos
#MY - Max Y pos
#11
#Exec - Does system executes something?
#LockC - Locks count
#LockD - Lock delta
#LockF - Lock flag
#LockRsn - Lock reason
#12
#On - Is system online?
#Flick - Current flick flag
#KD - Keyboard data
#KDF - Keyboard data fix
#Echo Flag of echo (@echo on/off)
#SBL - Space Between Letters
#RqStart - Delta of (not)started Internet activity
#CmdN -
#MDAFastmode - MDA Fast text processing mode (a LOT faster but unstable)
#13
#Commands - Array of known commands
#Devices - Array of connected devices via USB
#Locks - Array of locks
#KDevs - Array of known devices
#DevTypes - Array of known devices names
#DiskAct - Array of disk activity
#14
#Types - Array of known wire data types
#TypeNs - Array of wire data types needed exploded strings (0=INF)
#TypeNums - Array of flags of 'numberality' of wire data types
#Files - Array of files
#ExeTypes - Array of known executable types of files
#15-16
#Exp*** - Arrays of exploded strings:
#Exp1 - Titleize
#Exp2 - WireUni
#Exp3 - Execute Switch
#Exp4 - ScrollMDA
#Exp5 - Execute Service
#Exp6 - FileData Run
#Exp7 - FileData List
#Exp8 - WriteText 1
#Exp9 - Check for scrollmda needness
#Exp10 -
#Exp11 -
#Exp12 -
#Exp13 -
#Exp14 -
#Exp15 -
#Exp16 -
#Exp17 -
#Exp18 -
#Exp19 -
#Exp20 -
#17-18
#K*** - Variables used for functions, such as if(),while()... etc
#K1 - WriteArE
#K2 - WriteArS
#K3 - EinAr
#K4 - SinAr
#K5 - ScrollVGA
#K6 - FColor
#K7 - WireUni
#K8 - Titleize
#K9 - FileData Run
#K10 - FileData List
#K11 - Fcolor CGA
#K12 - WriteText 1
#K13 - WriteText 2
#K14 - ClearCGA
#K15 - ScrollMDA
#K16 - NinAr
#K17 -
#K18 -
#K19 -
#K20 -
#19-22
#N*** - Temporary Numbers
#N1 - swrite X
#N2 - swrite Y
#N3 - swrite N
#N4 - Piano 'Echo' Backup
#N5 - ScrollVGA 'HZ' Backup
#N6 - USB Service
#N7 - FColor 'HZ' Backup
#N8 - Execute Service
#N9 - Material 'Echo' Backup
#N10 - Einar Service
#N11 - HttpRq Service
#N12 - HttpRq Service
#N13 - SinAr Service
#N14 - DevType Service
#N15 - WireUni Service
#N16 - WireUni Service
#N17 - WireUni Service
#N18 - WireUni Service
#N19 - Write Service
#N20 - WriteText Service
#N21 - WriteText 'HZ' Backup
#N22 - HttpRq Tick
#N23 - WriteCGA Service
#N24 - swrite CY
#N25 - Echo Command Service
#N26 - Cursor X Pos for Console
#N27 - Cursor Y Pos for Console
#N28 - WireDevice Service
#N29 - HDDRead Service
#N30 - HDDWrite Service
#N31 - CGA Cursor State
#N32 - VGA Cursor State
#N33 - Backup of N26
#N34 - Backup of N27
#N35 - EXCurData toNumber
#N36 - Cursor X
#N37 - Cursor Y
#N38 - Backup of NN
#N39 - ScrollMDA 'HZ' Backup
#N40 -
#N41 - NinAr Service
#N42 - ScrollVGA Service 2
#N43 -
#N44 - NN Block
#N45 - ScrollVGA Service
#N46 - WriteCol Service
#N47 - lockTrim service
#N48 -
#N49 -
#N50 -
#23
#24-26
#S*** - Temporary Strings
#S1 - Part of exploded execute string
#S2 - Part of exploded execute string
#S3 - Part of exploded execute string
#S4 - Part of exploded execute string
#S5 - Part of exploded execute string
#S6 - Part of exploded execute string
#S7 - Part of exploded execute string
#S8 - Part of exploded execute string
#S9 - Execute function service string
#S10 - iChar
#S11 - WireUni InputType
#S12 - Titleize service string
#S13 - WriteText 1
#S14 - WriteText 2
#S15 - Titleize service string
#S16 - Website Text Mod
#S17 - swrite while press Mod
#S18 -
#S19 -
#S20 -
#S21 -
#S22 -
#S23 -
#S24 -
#S25 -
#S26 -
#S27 -
#S28 -
#S29 -
#S30 -
#27
#FF** - Flags for functions and lockups to prevent zeroing of "LockD" by running other lockup from source
#FF1 - L: Writetext
#FF2 -
#FF3 -
#FF4 -
#FF5 -
#E1 - Unused
#28
#V21 - Scroll Service
#Cursor - Cursor Pos
#V31 - WriteCol Service
function kbsound(){
PS2E:soundPlay(2,1,"ambient/machines/keyboard"+int(random(1,7)):toString()+"_clicks.wav")
}
function fcmdaupd(){if(CMDA){MDA["FGColor",vector]=Fcolor}}
function bcmdaupd(){if(CMDA){MDA["BGColor",vector]=Bcolor}}
function string string:sleft(Number){
return This:left(This:length()-Number)
}
function clearCGA(Number1,Number2){
if(CCGA){
if(Number1==0&Number2==0){
Number2=17
}
K14=Number1
while(K14<=Number2){
CGA:writeString(" ", 0, K14,FcolorCGA,0)
K14++
}
}
}
function number vector:forCGA(){
return int(This:x()*9/255*100)+int(This:y()*9/255*10)+int(This:z()*9/255*1)
}
function string entity:gost(){
return "["+This:id():toString()+"]["+This:type()+"]"
}
function number einar(Ent:entity,Ar:array){
K3=1
N10=0
while(K3<=Ar:count()){
if(Ent==Ar[K3,entity]){
return K3
N10=1
break
}
K3++
}
if(N10==0){return 0}
}
function number sinar(Str:string,Ar:array){
K4=1
N13=0
while(K4<=Ar:count()){
if(Str==Ar[K4,string]){
return K4
N13=1
break
}
K4++
}
if(N13==0){return 0}
}
function number ninar(Numstr:number,Ar:array){
K16=1
N41=0
while(K16<=Ar:count()){
if(Numstr==Ar[K16,number]){
return K16
N41=1
break
}
K16++
}
if(N13==0){return 0}
}
function delta(This,N) {
This-=N
This+=N
}
function clsf(){
LockC=0
Locks:clear()
LockF=0
LockRsn=""
LockC=1
Command=""
Bcolor=vec(0,0,0)
Fcolor=vec(255,255,255)
bcmdaupd()
fcmdaupd()
FcolorCGA=Fcolor:forCGA()
N=1
X=0
Y=8
CY=0
CGA[2041]=1
Text=""
if(CVGA){
VGA:egpClear()
VGA:egpBox(3,vec2(MX/2,MY/2),vec2(MX,MY))
VGA:egpColor(3,Bcolor)
}
if(CCGA){
CGA:writeCell(2042,Bcolor:forCGA())
}
}
function lockup(Str:string){
if(Str:length()>0){
Locks=array(Str):add(Locks)
LockC=1
} else{
LockC++
}
if(LockC<=Locks:count()){
LockF=1
LockRsn=Locks[LockC,string]
} else {
Locks:clear()
LockF=0
LockRsn=""
LockC=1
}
LockD=0
}
function lockTrim(String:string){
N47=sinar(String, Locks)
if(N47){
while(N47<=Locks:count()){
N47++
if(Locks[N47,string]==String){Locks[N47,string]=""}
}
}
}
function string string:titleize(){
K8=1
S12=""
Exp1=This:explode(" ")
while(K8<=Exp1:count()){
S15=Exp1[K8,string]
S12=S12+S15:left(1):upper()+S15:right(S15:length()-1)+" "
K8++
}
S12:sleft(1)
return S12
}
function string entity:wiredevice(){
N28=This:type():find("wire",1)
if(N28){
return This:type():right(This:type():length()-N28-"wire":length()):replace("_"," "):titleize()
} else {
return ""
}
}
function string entity:devtype(){
S3=This:type()
N14=sinar(S3,KDevs)
S4=This:wiredevice()
if(N14>0){
return DevTypes[N14,string]
} else {
if(S4:length()){
return S4
} else {
return S3:replace("_"," "):titleize()
}
}
}
function rs() {
Devices:clear()
FontSize=16
FontName="Lucida Console"
if(CMDA){MDA["Font",string]=FontName}
Echo=1
SBL=1.5
CD="C:"+toChar(92)
if(CVGA){
VGA:egpBox(3,vec2(MX/2,MY/2),vec2(MX,MY))
}
TextWidth=(FontSize/SBL)
}
function writeCGA(Str:string){
if(CCGA){
N23=mod(CY,17)
CY=N23
if(floor(N23)==8){
clearCGA(9,17)
} elseif(floor(N23)==0){
clearCGA(0,8)
}
CGA:writeString(Str,X/TextWidth,N23,FcolorCGA,0,0)
}
}
function writeCGAM(Str:string, MNX,MNY){
if(CCGA){
CGA:writeString(Str,MNX,MNY,FcolorCGA,0,0)
}
}
function iChar(Value){
if(Value){
S10="|"
} else {
S10=" "
}
if(CMDA){
SText=Text+S10
}
if(CVGA){
VGA:egpText(299,S10,vec2(X,Y))
}
if(CCGA){
writeCGAM(S10,X/TextWidth,CY)
}
}
function lne(){
if(CVGA){
N++
X=0
Y+=FontSize
CY++
if(Y>=(MY-FontSize)){
lockup("scrollvga")
}
}
Text=Text+C10
#if(Exp9:count()>19){lockup("scrollmda")}
}
function write(Str:string){
if(N==N38){
Text=Text:sleft(S17:length()-1)+Str
} else {
Text=Text+Str
}
if(CVGA){
N19=Str:length()
VGA:egpText(N,Str,vec2(X,Y))
VGA:egpFont(N,FontName,FontSize)
VGA:egpColor(N,Fcolor)
}
if(CCGA){
writeCGA(Str)
}
if(X>=MX){
lne()
} else {
X+=N19*TextWidth
}
N38=N
}
function writeln(Str:string){
write(Str)
lne()
}
function writeCol(Str:string, Color:vector){
N++
V31=Fcolor
N46=FcolorCGA
Fcolor=Color
FcolorCGA = Fcolor:forCGA()
write(Str)
Fcolor=V31
FcolorCGA=N46
}
function swrite(Str:string){
N2=Y
N3=N
N24=CY
X=0
write(Str)
Y=N2
N=N3
CY=N24
}
function writeArS(Ar:array,Add:string){
K2=1
while(K2<=Ar:count()){
writeln(" "+K2:toString()+". "+Ar[K2,string]+Add)
K2++
}
lne()
}
function writeArE(Ar:array){
K1=1
FontSize=FontSize/2
while(K1<=Ar:count()){
writeln(" "+K1:toString()+". "+Ar[K1,entity]:gost())
K1++
}
FontSize=FontSize*2
lne()
}
function rewrite(){
if(Echo){
S17=CD+Command
}else{
S17=Command
}
swrite(S17)
}
function downletter(Remove){
X-=(FontSize/SBL)*Command:length()
if(Remove){
kbsound()
Command=Command:left(Command:length()-1)
Text=Text:left(Text:length()-2)
if(CVGA){
VGA:egpRemove(N)
rewrite()
}
}
iChar(Flick)
if(CCGA){
writeCGAM(" ",(X/TextWidth)+1,CY)
}
}
function eon(){
if(Echo){
swrite(CD)
}
}
function command(){
writeln("Dark_Timur(R) E2-DOS(R) Version "+Version)
writeln("(C)Copyright Valve Corporation 2006-2042")
lne()
}
function eventMessage(){
writeCol("Fuck ",vec(255,255,255))
writeCol("the ",vec(0,0,255))
writeCol("Putin", vec(255,0,0))
lne()
writeCol("Glory to ",vec(255,200,0))
writeCol("Ukraine",vec(0,87,255))
lne()
lne()
}
function startdos(){
writeln("Starting E2-DOS v"+Version+"...")
lne()
eventMessage()
if(DebugMode){
writeln("DEBUG MODE")
lne()
}
eon()
CGA:writeString("Console screen is unsupported",0,17,900,0,1)
}
function pcpwr(){
writeln("Dark_Timur's BIOS v"+"1.0E")
writeln("CPU: WireMod Celeron, "+(1000/HZ):toString()+" HZ")
lne()
if(CPS2){startdos()}else{lockup("nokeyboard")}
}
function number string:isNumeric(){
return This=="0"|This:toNumber()>0
}
function number string:isNumericW(){
if(This:isNumeric()){
return 1
} else {
writeln("Error: Parameter is not numeric.")
return 0
}
}
function string wireUni(Ent:entity, In:string, Str:string){
RS232=Ent:wirelink()
S11=RS232:inputType(In):lower()
N15=sinar(S11,Types)
N18=0
if(Ent:id()==0){
writeln("Bad entity")
N18++
} elseif (S11==""){
writeln("Bad input")
N18++
}elseif(N15==0){
writeln("Unknown data type")
N18++
} else {
Exp2=Str:explode(" ")
N16=TypeNs[N15,number]
N17=Exp2:count()
if(N16>0){
if(N16!=N17){
writeln("Bad data parameter count")
writeln("Nominal: "+N16+" // Declared: "+N17)
N18++
}
}
if(TypeNums[N15,number]>0){
K7=1
while(K7<=Exp2:count()){
N18+=!Exp2[K7,string]:isNumericW()
K7++
}
}
}
if(N18==0){
switch(S11){
case Types[1,string], #normal
RS232:setNumber(In,Str:toNumber())
case Types[2,string], #num
RS232:setNumber(In,Str:toNumber())
case Types[3,string], #str
RS232:setString(In,Str)
case Types[4,string], #ar
RS232:setArray(In,Exp2)
case Types[5,string], #vec2
RS232:setVector2(In,vec2(Exp2[1,string]:toNumber(),Exp2[2,string]:toNumber()))
case Types[6,string], #vec3
RS232:setVector(In,vec(Exp2[1,string]:toNumber(),Exp2[2,string]:toNumber(),Exp2[3,string]:toNumber()))
case Types[7,string], #vec4
RS232:setVector4(In,vec4(Exp2[1,string]:toNumber(),Exp2[2,string]:toNumber(),Exp2[3,string]:toNumber(),Exp2[4,string]:toNumber()))
case Types[8,string], #ent
RS232:setEntity(In,entity(Str:toNumber()))
case Types[9,string], #ang
RS232:setAngle(In,ang(Exp2[1,string]:toNumber(),Exp2[2,string]:toNumber(),Exp2[3,string]:toNumber()))
}
writeln(S11:titleize()+" '"+In+"' successfully set to "+Str)
}
}
function execute(Str:string){
N8=sinar(Str:right(Str:reverse():lower():find(".")-1),ExeTypes)
if(N8>0){
Str=Str:left(Str:length()-ExeTypes[N8,string]:length()-".":length())
}
Exp5=Str:explode(" ")[1,string]:explode(".")
S9=Exp5[Exp5:count(),string]
Exp3=Str:explode(" ")
S1=Exp3[1,string]:lower()
S2=Exp3[2,string]
S3=Exp3[3,string]
S4=Exp3[4,string]
S5=Exp3[5,string]
S6=Exp3[6,string]
S7=Exp3[7,string]
S8=Exp3[8,string]
SAll=S2+" "+S3+" "+S4+" "+S5+" "+S6+" "+S7+" "+S8
lne()
switch(S1){
case Commands[1,string],
Exec=1
if(S2:lower()=="on"){
Echo=1
if(CD==""){CD="C:"+toChar(92)}
} elseif(S2:lower()=="off"){
Echo=0
} else {
writeln("Unknown parameter")
}
break
Exec=0
case Commands[2,string],
if(N8>0){
N25=1+S1:length()+ExeTypes[N8,string]:length()+2
} else {
N25=1+S1:length()
}
writeln(Command:right(Command:length()-1-S1:length()-(ExeTypes[N8,string]:length()-".":length())*(N8>0)))
break
case Commands[3,string],
lockup("cls")
break
case Commands[4,string],
N4=Echo
Echo=0
writeln("E2-DOS Piano v1.00")
writeln("Press 'Pause/Break to exit'")
lockup("piano")
break
case Commands[5,string],
pcpwr()
rs()
break
case Commands[6,string],
writeArS(Commands,".exe")
break
case Commands[7,string],
writeArS(Commands,".exe")
break
case Commands[8,string],
if(S2:length()>0){
CD=S2
} else {
lne()
write(CD)
lne()
}
break
case Commands[9,string],
writeln("List of devices attached")
writeArE(Devices)
break
case Commands[10,string],
if(S2==""&S3==""&S4==""){
writeln(Commands[10,string]+" "+"R G B")
} elseif(!S2:isNumeric()){
writeln("Bad 'R' parameter")
} elseif(!S3:isNumeric()){
writeln("Bad 'G' parameter")
} elseif(!S4:isNumeric()){
writeln("Bad 'B' parameter")
} else {
Bcolor=vec(S2:toNumber(),S3:toNumber(),S4:toNumber())
if(CVGA){
VGA:egpColor(3,Bcolor)
}
fcmdaupd()
if(CCGA){
CGA:writeCell(2042,Bcolor:forCGA())
}
}
break
case Commands[11,string],
if(S2==""&S3==""&S4==""){
writeln(Commands[11,string]+" "+"R G B")
} elseif(!S2:isNumeric()){
writeln("Bad 'R' parameter")
} elseif(!S3:isNumeric()){
writeln("Bad 'G' parameter")
} elseif(!S4:isNumeric()){
writeln("Bad 'B' parameter")
} else {
Fcolor=vec(S2:toNumber(),S3:toNumber(),S4:toNumber())
lockup("fcolor")
}
break
case Commands[12,string],
if(S2==""){
writeln("Bad parameter #2")
}elseif(S2:isNumeric()==0){
writeln("Please select needed USB device")
} elseif(S3==""){
writeln("Bad parameter #3")
} else {
wireUni(Devices[S2:toNumber(),entity],S3,Str:replace(S1+" "+S2+" "+S3+" ",""))
}
break
case Commands[13,string],
Files=fileReadList()
writeArS(Files," FILE")
break
case Commands[14,string],
Files=fileReadList()
writeArS(Files," FILE")
break
case Commands[15,string],
if(S2:length()>0){
lockup("material")
} else {
writeln("DRAW 'path to vtf'")
}
break
case Commands[16,string],
command()
break
case Commands[17,string],
command()
break
case Commands[18,string],
if(S2){
FileLoad="/"+S2
lockup("loadc")
} else {
writeln("LOAD filename")
}
break
case Commands[19,string],
Exp6=FileData:explode(C10)
K9=1
lockup("run")
break
case Commands[20,string],
Exp7=FileData:explode(C10)
K10=1
lockup("list")
break
case Commands[21,string],
if(S2:length()) {
WebSite=S2
lockup("httprq")
} else {
writeln("Netscape http://website.com")
}
case Commands[22,string],
case Commands[23,string],
if(S2:length()){
if(O==KUser){
if(convarnum("wire_expression2_concmd")){
concmd(SAll)
writeln("Command executed successfully")
} else {
writeln("Need to ENABLE the Concmd. To enable it run in the console:")
writeln("wire_expression2_concmd 1")
}
} else {
writeln("Access denied! Wrong user")
}
} else {
writeln("Concmd %console_command%")
}
case "",
break
case S1,