Repository navigation
Expand file tree
/
Copy pathFinalProject.asm
More file actions
1535 lines (1350 loc) · 25.6 KB
/
Copy pathFinalProject.asm
File metadata and controls
1535 lines (1350 loc) · 25.6 KB
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
INCLUDE Irvine32.inc
INCLUDE Macros.inc
INCLUDELIB user32.lib
INCLUDELIB Winmm.lib
GetKeyState PROTO, nVirtkey:DWORD ;判斷按鍵狀況
PlaySound PROTO, pszSound:PTR BYTE, hmod : DWORD, fdwSound : DWORD
mGoTo MACRO indexX:REQ, indexY:REQ ;移動游標
PUSH edx
MOV dl, indexX
MOV dh, indexY
call Gotoxy
POP edx
ENDM
mWrite MACRO drawText:REQ ;劃出圖像
LOCAL string
.data
string BYTE drawText, 0
.code
PUSH edx
MOV edx, OFFSET string
call WriteString
POP edx
ENDM
VK_LEFT EQU 000000025h ;左方向鍵
VK_RIGHT EQU 000000027h ;右方向鍵
.data ;this is the data area
arr byte 0,0,0,0,0,0,0,0,0,0 ;地圖陣列
arr_y byte 0,3,6,9,12,15,18,21,24,27 ;地圖陣列之y座標紀錄
arr_x byte 0,0,0,0,0,0,0,0,0,0 ;地圖陣列之x座標紀錄
arr_type byte 0,0,0,0,0,0,0,0,0,0 ;0:一般地板 1:Sham 2:尖刺 3:滾動
lg_type byte 0,0,0,0,0,0,0,0,0,0
top DWORD 0
bottom DWORD 9
FloorCount byte 2
CurrentFloor byte 2
DropSpeed EQU 200 ;掉落速度
DropStartTime DWORD ? ;掉落起始時間
DropTimer DWORD ? ;Drop Timer
KeySpeed EQU 40 ;鍵盤輸入速度
KeyStartTime DWORD ? ;鍵盤輸入起始時間
KeyTimer DWORD ? ;Key Timer
FloorSpeed EQU 500 ;上升速度
FloorStartTime DWORD ? ;上升起始時間
FloorTimer DWORD ? ;Floor Timer
StateSpeed EQU 10 ;player狀態刷新速度
StateStartTime DWORD ? ;狀態刷新起始時間
StateTimer DWORD ? ;State Timer
InitialPos_X1 EQU 50 ;角色1起始位置X
InitialPos_Y1 EQU 1 ;角色1起始位置Y
CurrentPos_X1 BYTE InitialPos_X1 ;角色1當前位置X
CurrentPos_Y1 BYTE InitialPos_Y1 ;角色1當前位置Y
Player1 EQU 'W'
Score1 DWORD 0 ;角色1分數
InitialPos_X2 EQU 60 ;角色2起始位置X
InitialPos_Y2 EQU 1 ;角色2起始位置Y
CurrentPos_X2 BYTE InitialPos_X2 ;角色2當前位置X
CurrentPos_Y2 BYTE InitialPos_Y2 ;角色2當前位置Y
Player2 EQU 'U'
Score2 DWORD 0 ;角色2分數
Wall EQU ' ' ;牆壁
Floor EQU 'TTTTTTTTTT' ;■■■■
Sham EQU 'HHHHHHHHHH' ;踩到一秒後掉落
Spike EQU 'AAAAAAAAAA' ;踩到後死亡
RollRight_1 EQU '->->->->->'
RollRight_2 EQU '>->->->->-'
RollLeft_1 EQU '-<-<-<-<-<'
RollLeft_2 EQU '<-<-<-<-<-'
RollState Byte 0
decision Byte 0
Empty EQU ' '
Min_X EQU 30
Max_X EQU 91 ;地圖寬
Min_Y EQU 0
Max_Y EQU 30 ;地圖高
flag DWORD 0
State1 BYTE 0 ; 0:不在樓梯上,1:在樓梯上,2:死掉,3:跌在其他人身上
State2 BYTE 0
Floor_type1 byte ? ;0:一般地板 1:sham 2:spikes 3:roll
Floor_type2 byte ?
SND_ALIAS DWORD 00010000h
SND_RESOURCE DWORD 00040005h
SND_FILENAME DWORD 00020001h ;同步: 20001h, 不同步: 20000h
FILE_GAME BYTE "3.wav",0 ;音樂檔名
FILE BYTE "12.wav",0
Win_P1 EQU '00000000 '
Win_P2 EQU '00 00'
Win_P3 EQU '00 00'
Win_P4 EQU '00000000 '
Win_P5 EQU '00 '
Win_P6 EQU '00 '
Win_P7 EQU '00 '
Win_L1 EQU '00 '
Win_L2 EQU '00 '
Win_L3 EQU '00 '
Win_L4 EQU '00 '
Win_L5 EQU '00 '
Win_L6 EQU '00 '
Win_L7 EQU '0000000000'
Win_A1 EQU ' 00'
Win_A2 EQU ' 0000'
Win_A3 EQU ' 00 00'
Win_A4 EQU ' 00 00'
Win_A5 EQU ' 0000000000'
Win_A6 EQU ' 00 00'
Win_A7 EQU '00 00'
Win_Y1 EQU '00 00'
Win_Y2 EQU ' 00 00'
Win_Y3 EQU ' 00 00'
Win_Y4 EQU ' 0000'
Win_Y5 EQU ' 00'
Win_Y6 EQU ' 00'
Win_Y7 EQU ' 00'
Win_E1 EQU '000000000'
Win_E2 EQU '00 '
Win_E3 EQU '00 '
Win_E4 EQU '000000000'
Win_E5 EQU '00 '
Win_E6 EQU '00 '
Win_E7 EQU '000000000'
Win_R1 EQU '00000000'
Win_R2 EQU '00 00'
Win_R3 EQU '00 00'
Win_R4 EQU '00000000'
Win_R5 EQU '00 00 '
Win_R6 EQU '00 00'
Win_R7 EQU '00 00'
Win_11 EQU ' 0000 '
Win_12 EQU ' 00 00 '
Win_13 EQU '00 00 '
Win_14 EQU ' 00 '
Win_15 EQU ' 00 '
Win_16 EQU ' 00 '
Win_17 EQU '0000000000'
Win_21 EQU '0000000000'
Win_22 EQU ' 00'
Win_23 EQU ' 00'
Win_24 EQU '0000000000'
Win_25 EQU '00 '
Win_26 EQU '00 '
Win_27 EQU '0000000000'
Win_W1 EQU '00 00 00'
Win_W2 EQU '00 00 00'
Win_W3 EQU '00 0000 00'
Win_W4 EQU '00 00 00 00'
Win_W5 EQU ' 00 00 00 00'
Win_W6 EQU ' 0000 0000'
Win_W7 EQU ' 00 00'
Win_I1 EQU ' 00000000'
Win_I2 EQU ' 00 '
Win_I3 EQU ' 00 '
Win_I4 EQU ' 00 '
Win_I5 EQU ' 00 '
Win_I6 EQU ' 00 '
Win_I7 EQU '0000000000'
Win_N1 EQU '000 00'
Win_N2 EQU '0000 00'
Win_N3 EQU '00 00 00'
Win_N4 EQU '00 00 00'
Win_N5 EQU '00 00 00'
Win_N6 EQU '00 0000'
Win_N7 EQU '00 000'
Win_T1 EQU '0000000000'
Win_T2 EQU ' 00 '
Win_T3 EQU ' 00 '
Win_T4 EQU ' 00 '
Win_T5 EQU ' 00 '
Win_T6 EQU ' 00 '
Win_T7 EQU ' 00 '
.code ;this is the code area
main proc
Again:
INVOKE PlaySound, OFFSET FILE_GAME, NULL, SND_FILENAME ;play song
call clrscr
mGoto InitialPos_X1,InitialPos_Y1
mov CurrentPos_X1,InitialPos_X1
mov CurrentPos_Y1,InitialPos_Y1
mWrite PLAYER1
mGoto InitialPos_X2,InitialPos_Y2
mov CurrentPos_X2,InitialPos_X2
mov CurrentPos_Y2,InitialPos_Y2
mWrite PLAYER2
mov State1,0
mov State2,0
mov Score1,0
mov Score2,0
mov esi,0
mov ecx,10
call Randomize
FloorInitial:
mov eax , 6
call RandomRange
mov arr[esi] , al
mov eax , 10
call RandomRange
.IF al<4
mov arr_type[esi],0
.ELSEIF al>=4 && al<6
mov arr_type[esi],1
.ELSEIF al>=6 && al<8
mov arr_type[esi],2
.ELSE
mov arr_type[esi],3
.ENDIF
inc esi
loop FloorInitial
call ShowWall
call ShowRole
call clrscr
INVOKE PlaySound, NULL, NULL, 0
mGoto 50,15
mWrite "Play again? yes(1)/no(0) > "
mov eax,0
call ReadDec
cmp al,1
je Again
jmp EndAgain
EndAgain:
Invoke ExitProcess,0
main endp
;----------------------------------------
; 畫出人物
;----------------------------------------
ShowRole PROC
INVOKE GetTickCount
mov DropstartTime,eax
mov KeyStartTime,eax
mov FloorStartTime,eax
mov StateStartTime, eax
Drop:
.IF State1==2 && State2==2
jnl EndDrop ;跳出迴圈
.ENDIF
call ShowScore
;計算掉落的timer
INVOKE GetTickCount ; get new tick count
sub eax,DropstartTime ; get elapsed milliseconds
mov DropTimer,eax
;計算鍵盤輸入的timer
INVOKE GetTickCount ; get new tick count
sub eax,KeyStartTime
mov KeyTimer,eax
;計算地板輸入的timer
INVOKE GetTickCount ; get new tick count
sub eax,FloorStartTime
mov FloorTimer,eax
INVOKE GetTickCount
sub eax,StateStartTime
mov StateTimer,eax
.IF DropTimer>DropSpeed
call ShowDrop
call ChangeState
INVOKE GetTickCount ; get starting tick count
mov DropStartTime,eax ; save it
.ENDIF
.IF StateTimer>StateSpeed
call ChangeState
INVOKE GetTickCount ; get starting tick count
mov StateStartTime,eax
.ENDIF
.IF KeyTimer>KeySpeed
call key
INVOKE GetTickCount ; get starting tick count
mov KeyStartTime,eax
.ENDIF
.IF FloorTimer>FloorSpeed
.IF State1!=2
inc Score1
.ENDIF
.IF State2!=2
inc Score2
.ENDIF
call Left_Right
call ShowFloor
call ChangeState
INVOKE GetTickCount ; get starting tick count
mov FloorStartTime,eax
.ENDIF
.IF CurrentPos_Y1 <= 0 || CurrentPos_Y1 >= 30 ;player1超出範圍
mov State1,2
.ENDIF
.IF CurrentPos_Y2 <= 0 || CurrentPos_Y2 >= 30 ;player2超出範圍
mov State2,2
.ENDIF
.IF State1 != 2 ;player1死亡
mGoTo CurrentPos_X1,CurrentPos_Y1
mWrite Player1
.ENDIF
.IF State2 != 2 ;player2死亡
mGoTo CurrentPos_X2,CurrentPos_Y2
mWrite Player2
.ENDIF
jmp Drop
EndDrop:
INVOKE PlaySound, NULL, NULL, 0 ;關閉前一個音樂
call ShowEnd
Invoke sleep,5000
ret
ShowRole ENDP
;----------------------------------------
; Floor
;----------------------------------------
ShowFloor PROC USES eax
mov esi,0
mov eax,0
mov al,FloorCount
mov CurrentFloor,al
EmptyLoop: ;擦去上一次樓梯的迴圈
mov al,arr[esi]
mov bl,10
mul bl
add al,31
.IF FloorCount!=0 || esi !=0
mGoto al,CurrentFloor
mWrite Empty
.ENDIF
add CurrentFloor,3
inc esi
.IF esi<10
JMP EmptyLoop
.ENDIF
.IF FloorCount==0 ;最上層的地板要超過天花板,陣列需要更新
mov FloorCount,2
mov esi,0
mov ecx,9
L1:
mov al,arr[esi+1]
mov arr[esi],al
mov al,arr_type[esi+1]
mov arr_type[esi],al
mov al,lg_type[esi+1]
mov lg_type[esi],al
inc esi
Loop L1
mov eax , 6
call RandomRange
mov arr[9],al
mov eax , 10
call RandomRange
.IF al<4
mov arr_type[9],0
.ELSEIF al>=4 && al<6
mov arr_type[9],1
.ELSEIF al>=6 && al<8
mov arr_type[9],2
.ELSE
mov arr_type[9],3
.ENDIF
mov eax, 2
call RandomRange
mov lg_type[9],al
.ELSEIF
dec FloorCount
.ENDIF
mov esi,0
mov eax,0
mov al,FloorCount
mov CurrentFloor,al
.IF State1 == 1 || State1 == 3 ;on the stair
mGoto CurrentPos_X1, CurrentPos_Y1
mWrite ' '
dec CurrentPos_Y1
.ENDIF
.IF State2 == 1 || State2 == 3
mGoto CurrentPos_X2, CurrentPos_Y2
mWrite ' '
dec CurrentPos_Y2
.ENDIF
FloorLoop: ;畫樓梯的迴圈
mov al,arr[esi]
mov bl,10
mul bl
add al,31
mov arr_x[esi],al
mov ah,CurrentFloor
mov arr_y[esi],ah
.IF FloorCount!=0 || esi !=0
mGoto al,CurrentFloor
.IF arr_type[esi]==0
mWrite Floor
.ELSEIF arr_type[esi]==1
mWrite Sham
dec CurrentFloor
mov al,CurrentFloor
.IF CurrentPos_Y1==al&&State1==1
mov arr_type[esi],4 ;下次不印東西
mGoto arr_x[esi],arr_y[esi]
mWrite empty
.ENDIF
.IF CurrentPos_Y2==al&&State2==1
mov arr_type[esi],4 ;下次不印東西
mGoto arr_x[esi],arr_y[esi]
mWrite empty
.ENDIF
inc CurrentFloor
.ELSEIF arr_type[esi]==2
mWrite Spike
.ELSEIF arr_type[esi]==3
.IF lg_type[esi]==1
.IF RollState==0
mWrite RollRight_1
.ELSE
mWrite RollRight_2
.ENDIF
.ELSEIF lg_type[esi]==0
.IF RollState==0
mWrite RollLeft_1
.ELSE
mWrite RollLeft_2
.ENDIF
.ENDIF
.ENDIF
.ENDIF
add CurrentFloor,3
inc esi
.IF esi<10
JMP FloorLoop
.ENDIF
.IF RollState==0
mov RollState,1
.ELSE
mov RollState,0
.ENDIF
ret
ShowFloor EndP
;----------------------------------------
; Drop
;----------------------------------------
ShowDrop PROC USES eax
;擦除上一個位置
.IF State1 != 2
mGoTo CurrentPos_X1,CurrentPos_Y1
mWrite ' '
.ENDIF
.IF State2 != 2
mGoTo CurrentPos_X2,CurrentPos_Y2
mWrite ' '
.ENDIF
.IF State1 == 0
inc CurrentPos_Y1
.ENDIF
.IF State2 == 0
inc CurrentPos_Y2
.ENDIF
ret
ShowDrop EndP
;----------------------------------------
; 畫出記分板
;----------------------------------------
ShowScore PROC USES eax
mGoTo 20,1
mov eax,score1
call WriteDec
mGoTo 111,1
mov eax,score2
call WriteDec
ret
ShowScore EndP
;----------------------------------------
; 畫出牆壁
;----------------------------------------
ShowWall PROC USES eax
mov al,Min_Y
WallLoop:
cmp al,Max_Y ;eax < Max_Y?
jnl EndWall ;跳出迴圈
mGoTo Min_X,al
push eax
mov eax,15*16
call setTextColor
pop eax
mWrite Wall
mGoTo Max_X,al
mWrite Wall
inc eax
jmp WallLoop
EndWall:
push eax
mov eax,15
call setTextColor
pop eax
mov esi,0
mov al,FloorCount
mov CurrentFloor,al
FloorLoop:
mov al,arr[esi]
mov bl,10
mul bl
add al,31
mov arr_x[esi],al
mov ah,CurrentFloor
mov arr_y[esi],ah
mGoto al,CurrentFloor
.IF arr_type[esi]==0
mWrite Floor
.ELSEIF arr_type[esi]==1
mWrite Sham
.ELSEIF arr_type[esi]==2
mWrite Spike
.ELSEIF arr_type[esi]==3
.IF lg_type[esi]==1
.IF RollState==0
mWrite RollRight_1
.ELSE
mWrite RollRight_2
.ENDIF
.ELSEIF lg_type[esi]==0
.IF RollState==0
mWrite RollLeft_1
.ELSE
mWrite RollLeft_2
.ENDIF
.ENDIF
.ENDIF
add CurrentFloor,3
inc esi
push eax
mov eax,15
call setTextColor
pop eax
.IF esi<10
JMP FloorLoop
.ENDIF
mov ecx,60
mov al,31
SpikeLoop:
mGoTo al,0
mWrite 'V'
inc al
Loop SpikeLoop
mov RollState,1
mGoTo 1,1
mWrite 'player1 score:'
mGoTo 93,1
mWrite 'player2 score:'
ret
ShowWall ENDP
;----------------------------------------
; 結束畫面
;----------------------------------------
ShowEnd PROC USES eax
call Clrscr
INVOKE PlaySound, OFFSET FILE, NULL, SND_FILENAME ;播放結束音樂
mov eax,score2
mov bh,15
mov bl,7
.IF score1>eax
mGoTo bh,bl
mWrite Win_P1
inc bl
mGoTo bh,bl
mWrite Win_P2
inc bl
mGoTo bh,bl
mWrite Win_P3
inc bl
mGoTo bh,bl
mWrite Win_P4
inc bl
mGoTo bh,bl
mWrite Win_P5
inc bl
mGoTo bh,bl
mWrite Win_P6
inc bl
mGoTo bh,bl
mWrite Win_P7
inc bl
add bh,10
mov bl,7
mGoTo bh,bl
mWrite Win_L1
inc bl
mGoTo bh,bl
mWrite Win_L2
inc bl
mGoTo bh,bl
mWrite Win_L3
inc bl
mGoTo bh,bl
mWrite Win_L4
inc bl
mGoTo bh,bl
mWrite Win_L5
inc bl
mGoTo bh,bl
mWrite Win_L6
inc bl
mGoTo bh,bl
mWrite Win_L7
inc bl
add bh,11
mov bl,7
mGoTo bh,bl
mWrite Win_A1
inc bl
mGoTo bh,bl
mWrite Win_A2
inc bl
mGoTo bh,bl
mWrite Win_A3
inc bl
mGoTo bh,bl
mWrite Win_A4
inc bl
mGoTo bh,bl
mWrite Win_A5
inc bl
mGoTo bh,bl
mWrite Win_A6
inc bl
mGoTo bh,bl
mWrite Win_A7
inc bl
add bh,14
mov bl,7
mGoTo bh,bl
mWrite Win_Y1
inc bl
mGoTo bh,bl
mWrite Win_Y2
inc bl
mGoTo bh,bl
mWrite Win_Y3
inc bl
mGoTo bh,bl
mWrite Win_Y4
inc bl
mGoTo bh,bl
mWrite Win_Y5
inc bl
mGoTo bh,bl
mWrite Win_Y6
inc bl
mGoTo bh,bl
mWrite Win_Y7
inc bl
add bh,11
mov bl,7
mGoTo bh,bl
mWrite Win_E1
inc bl
mGoTo bh,bl
mWrite Win_E2
inc bl
mGoTo bh,bl
mWrite Win_E3
inc bl
mGoTo bh,bl
mWrite Win_E4
inc bl
mGoTo bh,bl
mWrite Win_E5
inc bl
mGoTo bh,bl
mWrite Win_E6
inc bl
mGoTo bh,bl
mWrite Win_E7
inc bl
add bh,10
mov bl,7
mGoTo bh,bl
mWrite Win_R1
inc bl
mGoTo bh,bl
mWrite Win_R2
inc bl
mGoTo bh,bl
mWrite Win_R3
inc bl
mGoTo bh,bl
mWrite Win_R4
inc bl
mGoTo bh,bl
mWrite Win_R5
inc bl
mGoTo bh,bl
mWrite Win_R6
inc bl
mGoTo bh,bl
mWrite Win_R7
inc bl
add bh,20
mov bl,7
mGoTo bh,bl
mWrite Win_11
inc bl
mGoTo bh,bl
mWrite Win_12
inc bl
mGoTo bh,bl
mWrite Win_13
inc bl
mGoTo bh,bl
mWrite Win_14
inc bl
mGoTo bh,bl
mWrite Win_15
inc bl
mGoTo bh,bl
mWrite Win_16
inc bl
mGoTo bh,bl
mWrite Win_17
inc bl
mov bh,30
mov bl,20
mGoTo bh,bl
mWrite Win_W1
inc bl
mGoTo bh,bl
mWrite Win_W2
inc bl
mGoTo bh,bl
mWrite Win_W3
inc bl
mGoTo bh,bl
mWrite Win_W4
inc bl
mGoTo bh,bl
mWrite Win_W5
inc bl
mGoTo bh,bl
mWrite Win_W6
inc bl
mGoTo bh,bl
mWrite Win_W7
inc bl
add bh,20
mov bl,20
mGoTo bh,bl
mWrite Win_I1
inc bl
mGoTo bh,bl
mWrite Win_I2
inc bl
mGoTo bh,bl
mWrite Win_I3
inc bl
mGoTo bh,bl
mWrite Win_I4
inc bl
mGoTo bh,bl
mWrite Win_I5
inc bl
mGoTo bh,bl
mWrite Win_I6
inc bl
mGoTo bh,bl
mWrite Win_I7
inc bl
add bh,11
mov bl,20
mGoTo bh,bl
mWrite Win_N1
inc bl
mGoTo bh,bl
mWrite Win_N2
inc bl
mGoTo bh,bl
mWrite Win_N3
inc bl
mGoTo bh,bl
mWrite Win_N4
inc bl
mGoTo bh,bl
mWrite Win_N5
inc bl
mGoTo bh,bl
mWrite Win_N6
inc bl
mGoTo bh,bl
mWrite Win_N7
inc bl
.ELSEIF score1<eax
mGoTo bh,bl
mWrite Win_P1
inc bl
mGoTo bh,bl
mWrite Win_P2
inc bl
mGoTo bh,bl
mWrite Win_P3
inc bl
mGoTo bh,bl
mWrite Win_P4
inc bl
mGoTo bh,bl
mWrite Win_P5
inc bl
mGoTo bh,bl
mWrite Win_P6
inc bl
mGoTo bh,bl
mWrite Win_P7
inc bl
add bh,10
mov bl,7
mGoTo bh,bl
mWrite Win_L1
inc bl
mGoTo bh,bl
mWrite Win_L2
inc bl
mGoTo bh,bl
mWrite Win_L3
inc bl
mGoTo bh,bl
mWrite Win_L4
inc bl
mGoTo bh,bl
mWrite Win_L5
inc bl
mGoTo bh,bl
mWrite Win_L6
inc bl
mGoTo bh,bl
mWrite Win_L7
inc bl
add bh,11
mov bl,7
mGoTo bh,bl
mWrite Win_A1
inc bl
mGoTo bh,bl
mWrite Win_A2
inc bl
mGoTo bh,bl
mWrite Win_A3
inc bl
mGoTo bh,bl
mWrite Win_A4
inc bl
mGoTo bh,bl
mWrite Win_A5
inc bl
mGoTo bh,bl
mWrite Win_A6
inc bl
mGoTo bh,bl
mWrite Win_A7
inc bl
add bh,14
mov bl,7
mGoTo bh,bl
mWrite Win_Y1
inc bl
mGoTo bh,bl
mWrite Win_Y2
inc bl
mGoTo bh,bl
mWrite Win_Y3
inc bl
mGoTo bh,bl
mWrite Win_Y4
inc bl
mGoTo bh,bl
mWrite Win_Y5
inc bl
mGoTo bh,bl
mWrite Win_Y6
inc bl
mGoTo bh,bl
mWrite Win_Y7
inc bl
add bh,11
mov bl,7
mGoTo bh,bl
mWrite Win_E1
inc bl
mGoTo bh,bl