-
Notifications
You must be signed in to change notification settings - Fork 1
/
project.asm
2102 lines (1764 loc) · 41.7 KB
/
project.asm
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
;bulets zyada damage canon ka zyada krna damage player ka kam krna hy
.model small
.stack 100h
.386
.data
scor db "Score:$"
cman db "Robot$"
canon1 db "CannonA$"
canon2 db "CannonB$"
play db "PLAY$"
endd db "Game End$"
inst db "INSTRUCTIONS$"
scr db "SCORE$"
exts db "EXIT$"
;ooof db "<- ->: move, Up Arrow: shoot, e: exit$"
win db "YOU WIN!!$"
los db "LOSER HAHA$"
pose db "PAUSE", 10, 13, "PRESS SPACE BAR TO RESUME$"
entname db "Enter player name: $"
ename db "Name: $"
lstring db "Press Enter to go to the next level, any other key to end the game $"
uname db 20 dup('$')
score dw 0
sound dw 0
level dw 0
;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
Splash DB 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 ;01
DB 0, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0 ;02
DB 0, 1, 5, 5, 5, 5, 1, 5, 5, 1, 1, 1, 1, 1, 1, 5, 5, 1, 5, 5, 5, 5, 1, 0, 0, 0 ;03
DB 0, 1, 5, 5, 1, 5, 5, 1, 5, 5, 1, 1, 1, 1, 5, 5, 1, 5, 5, 1, 5, 5, 1, 0, 0, 0 ;04
DB 0, 1, 7, 7, 7, 1, 7, 7, 1, 7, 7, 1, 1, 7, 7, 1, 7, 7, 1, 7, 7, 7, 1, 0, 0, 0 ;05
DB 0, 1, 7, 7, 7, 7, 1, 7, 7, 1, 7, 7, 7, 7, 1, 7, 7, 1, 7, 7, 7, 7, 1, 0, 0, 0 ;06
DB 0, 1, 7, 7, 1, 7, 7, 1, 7, 1, 1, 7, 7, 1, 1, 7, 1, 7, 7, 1, 7, 7, 1, 0, 0, 0 ;07
DB 0, 1, 7, 7, 7, 1, 7, 7, 7, 1, 7, 1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B 0, 9, 7, 7, 9, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 5, 5, 5, 9, 0, 0, 0, 0, 0 ;45
DB 0, 9, 7, 7, 9, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0 ;46
splashx dw 100
splashy dw 10
;1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Canoon1 DB 07,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,07;01
DB 07,07,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,07,07;02
DB 07,07,07,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,07,07,07;03
DB 07,07,07,07,10,10,10,10,10,10,10,10,10,10,10,10,10,10,07,07,07,07;04
DB 07,07,07,07,07,10,10,10,10,10,10,10,10,10,10,10,10,07,07,07,07,07;05
DB 07,07,07,07,07,07,10,10,10,10,10,10,10,10,10,10,07,07,07,07,07,07;06
DB 07,07,07,07,07,07,07,10,10,10,10,10,10,10,10,07,07,07,07,07,07,07;07
DB 07,07,07,07,07,07,07,07,10,10,10,10,10,10,07,07,07,07,07,07,07,07;08
DB 07,07,07,07,07,07,07,07,07,10,10,10,10,07,07,07,07,07,07,07,07,07;09
DB 07,07,07,07,07,07,07,07,07,07,10,10,07,07,07,07,07,07,07,07,07,07;10
;1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Canoon2 DB 07,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,07;01
DB 07,07,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,07,07;02
DB 07,07,07,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,07,07,07;03
DB 07,07,07,07,09,09,09,09,09,09,09,09,09,09,09,09,09,09,07,07,07,07;04
DB 07,07,07,07,07,09,09,09,09,09,09,09,09,09,09,09,09,07,07,07,07,07;05
DB 07,07,07,07,07,07,09,09,09,09,09,09,09,09,09,09,07,07,07,07,07,07;06
DB 07,07,07,07,07,07,07,09,09,09,09,09,09,09,09,07,07,07,07,07,07,07;07
DB 07,07,07,07,07,07,07,07,09,09,09,09,09,09,07,07,07,07,07,07,07,07;08
DB 07,07,07,07,07,07,07,07,07,09,09,09,09,07,07,07,07,07,07,07,07,07;09
DB 07,07,07,07,07,07,07,07,07,07,09,09,07,07,07,07,07,07,07,07,07,07;10
;1 2 3 4 5 6
Bullet DB 07, 07, 07, 07, 07, 07 ;01
DB 07, 07, 14, 14, 07, 07 ;02
DB 07, 14, 14, 14, 14, 07 ;03
DB 07, 14, 14, 14, 14, 07 ;04
DB 07, 06, 06, 06, 06, 07 ;05
DB 07, 06, 06, 06, 06, 07 ;06
DB 07, 06, 06, 06, 06, 07 ;07
DB 07, 06, 06, 06, 06, 07 ;08
DB 07, 07, 06, 06, 07, 07 ;09
DB 07, 07, 07, 07, 07, 07 ;10
DB 07, 07, 07, 07, 07, 07 ;11
DB 07, 07, 07, 07, 07, 07 ;12
;1 2 3 4 5 6
BulletC DB 07, 07, 07, 07, 07, 07 ;01
DB 07, 07, 07, 07, 07, 07 ;10
DB 07, 07, 07, 07, 07, 07 ;11
DB 07, 07, 15, 15, 07, 07 ;02
DB 07, 15, 15, 15, 15, 07 ;03
DB 07, 15, 15, 15, 15, 07 ;04
DB 07, 15, 15, 15, 15, 07 ;05
DB 07, 00, 00, 00, 00, 07 ;06
DB 07, 00, 00, 00, 00, 07 ;07
DB 07, 00, 00, 00, 00, 07 ;08
DB 07, 07, 00, 00, 07, 07 ;09
DB 07, 07, 07, 07, 07, 07 ;12
;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
robut DB 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 ;71
DB 7, 7, 7, 7, 7, 7, 7, 7, 7,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, 7, 7 ;25
DB 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 7, 2, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 ;26
DB 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 2, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 ;27
DB 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 2, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 ;28
DB 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 7, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 ;29
DB 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 ;30
; central point of bullets
shotr dw 83
shotc1 dw 61
shotc2 dw 111
time db 0
; x y of bullets initial/final canon 1/2
xbic1 sword 11
xbfc1 sword 22
ybic1 dw 58
ybfc1 dw 64
xbic2 sword 11
xbfc2 sword 22
ybic2 dw 108
ybfc2 dw 114
; x/y bulets initial/final robot
xbir sword 118
xbfr sword 130
ybir dw 80
ybfr dw 86
; y coordinate of canon initial/final 1/2
yci1 dw 50
ycf1 dw 72
yci2 dw 100
ycf2 dw 122
; y coordinate of robot initial/final 1/2
yxi dw 70
yxf dw 97
;-- generic initial coordinates
xcordi dw 0 ; x coordinate initial to draw
xcordf dw 0 ; final
ycordi dw 0
ycordf dw 0
colorOf db 0
;---movement variable for canons
movv1 dw 0
movv2 dw 0
movvb dw 0
movvcb1 dw 0
movvcb2 dw 0
Helth DB 07, 07, 09, 07, 07, 07, 09, 07, 07, 07, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04;36
DB 07, 09, 09, 09, 07, 09, 09, 09, 07, 07, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04
DB 09, 09, 09, 09, 09, 09, 09, 09, 09, 07, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04
DB 09, 09, 09, 09, 09, 09, 09, 09, 09, 07, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04
DB 07, 09, 09, 09, 09, 09, 09, 09, 07, 07, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04
DB 07, 07, 09, 09, 09, 09, 09, 07, 07, 07, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04
DB 07, 07, 07, 09, 09, 09, 07, 07, 07, 07, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04
DB 07, 07, 07, 07, 09, 07, 07, 07, 07, 07, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04, 07, 04, 04, 04
exHelth db 07,07,04,04,07,04,04,07,07 ;09
db 07,04,15,04,04,04,04,04,07
db 07,04,04,04,04,04,04,04,07
db 07,07,04,04,04,04,04,07,07
db 07,07,07,04,04,04,07,07,07
db 07,07,07,07,04,07,07,07,07 ;06
helthx dw 0
helthy dw 0
heltcontr dw 0
helttimr dw 0
heltx dw 260
helty dw 10
;health final robot (x axis)
hfr dw 298
hifr dw 298
hfc1 dw 298
hfc2 dw 298
hifc1 dw 298
hifc2 dw 298
;counters
hlos dw 7
hc1 dw 7
hc2 dw 7
hscore dw 17
;---file load k variable
handle dw ?
filename db "insturr.txt", 0
buffer db 500 DUP('$')
;---file handling for highscores
fname db "hscores.txt",0
handle1 dw ?
buffer1 db 500 dup('$')
count db 10
scount db 3
oof dw ":"
sstring db 10,13, "Highscore: "
hss dw 0
dstring db 10,13 ,"Date: "
date db 10 dup(?)
tstring db 10,13 ,"Time: "
ttime db 8 dup (?)
entr db 10,13
;******************************************************************************************************************************************
.code
main proc
mov ax,@data
mov ds,ax
; setting video mode
mov al, 13h
mov ah, 00h
int 10H
;==========================================SPLASH============================================================================
mov xcordi, 0
mov xcordf, 320
mov ycordi, 0
mov ycordf, 200
mov colorOf, 0
call boxKap
mov si, offset Splash ;draw splash
mov xcordi, 20
mov xcordf, 158
mov ycordi, 100
mov ycordf, 178
mov ah,0ch
mov dx, xcordi ; x coordinate initial( up down)
ywalas:
mov cx, ycordi ;y coordinate initial (left right)
xwalas:
mov al,[si]
int 10h
inc cx
int 10h
inc cx
int 10h
inc si
inc cx
cmp cx, ycordf ; y coordinate final( left right)
jb xwalas
inc dx
mov cx, ycordi
sub si,26
xwalas2:
mov al,[si]
int 10h
inc cx
int 10h
inc cx
int 10h
inc si
inc cx
cmp cx, ycordf ; y coordinate final( left right)
jb xwalas2
inc dx
mov cx, ycordi
sub si,26
xwalas3:
mov al,[si]
int 10h
inc cx
int 10h
inc cx
int 10h
inc si
inc cx
cmp cx, ycordf ; y coordinate final( left right)
jb xwalas3
inc dx
cmp dx, xcordf ; x coordinate final( up down)
jb ywalas
;TIme delay
mov CX, 13H
mov DX, 4240H
mov AH, 86H
int 15H
;==================================================================ENTER NAME===================================================
mov xcordi, 0
mov xcordf, 320
mov ycordi, 0
mov ycordf, 200
mov colorOf, 0
call boxKap
mov ch,2 ;write name
mov cl,2
mov si, offset entname
call stringKap
mov si,offset uname
string1:
mov ah,1
int 21h
cmp al,13
je meenu
mov [si],al
inc si
jmp string1
;==============================================M3Nu==============================================================================
meenu:
;----------M3Nu-------------
mov xcordi, 0
mov xcordf, 320
mov ycordi, 0
mov ycordf, 200
mov colorOf, 0
call boxKap
;-----------strings with dabbe unk
;play box on menu
mov xcordi, 110
mov xcordf, 147
mov ycordi, 72
mov ycordf, 82
mov colorOf, 2
call boxKap
mov ch,9 ;write play
mov cl,54
mov si, offset play
call stringKap
;---------------------------next
mov xcordi, 110
mov xcordf, 210
mov ycordi, 88
mov ycordf, 98
mov colorOf, 4
call boxKap
mov ch,11 ;write Instructions
mov cl,54
mov si, offset inst
call stringKap
;-----------------------------next
mov xcordi, 110
mov xcordf, 154
mov ycordi, 104
mov ycordf, 114
mov colorOf, 0
call boxKap
mov ch,13 ;write score
mov cl,54
mov si, offset scr
call stringKap
;----------------------------------next
mov xcordi, 110
mov xcordf, 147
mov ycordi, 120
mov ycordf, 130
mov colorOf, 6
call boxKap
mov ch,15 ;write Exit
mov cl,54
mov si, offset exts
call stringKap
;========================================================================================================================
;-------Mouse----------------
mov ax,01
int 33h
mouse:
mov ax, 03
int 33h
cmp bx,1
je Cecks
;je dispppp
jmp mouse
Cecks:
;---Play screen----
.if(cx>=210 && cx<=277 && dx>=72 && dx<=82 )
jmp dispppp
.endif
.if(cx>=210 && cx<=420 && dx>=88 && dx<=98)
jmp ififififi
.endif
.if(cx>=210 && cx<=287 && dx>=104 && dx<=114)
jmp hsc
.endif
.if(cx>=210 && cx<=287 && dx>=120 && dx<=130)
jmp extt
.endif
jmp mouse
;--- PRESS SPACE BAR TO START
inputt:
mov ah,0h
int 16h
; mov kee,al
;---display---
; cmp al,020H
; je dispppp
;-----I/i----
; cmp al,049H
; je ififififi
; cmp al,069H
; je ififififi
;---back to menu from backspace
cmp al,008H
je meenu
jmp inputt
;---
hsc:
mov xcordi, 0
mov xcordf, 320
mov ycordi, 0
mov ycordf, 200
mov colorOf, 0
call boxKap
;---reset background---
mov xcordi, 0
mov xcordf, 320
mov ycordi, 0
mov ycordf, 200
mov colorOf, 0
call boxKap
mov ah,02h ;reset cursor
mov bx,0
mov dh,0
mov dl,0
int 10h
;LOAD FILE HANDLE
lea dx, fname ; Load address of String “file”
mov al, 0 ; Open file (read)
mov ah, 3Dh ; Load File Handler and store in ax
int 21h
mov handle1, ax
;READ FROM FILE
mov bx, handle1 ; Move file Handle to bx
lea dx, buffer1
mov ah, 3Fh ; Function to read from file
int 21h
;PRINT BUFFER
lea dx, buffer1
mov ah, 09h
int 21h
;CLOSE FILE HANDLE
mov ah, 3Eh
mov bx, handle1
int 21h
jmp inputt
;--- INSTRUCTIONS TO LOAD
ififififi:
;---reset background---
mov xcordi, 0
mov xcordf, 320
mov ycordi, 0
mov ycordf, 200
mov colorOf, 0
call boxKap
mov ah,02h ;reset cursor
mov bx,0
mov dh,0
mov dl,0
int 10h
;LOAD FILE HANDLE
lea dx, filename ; Load address of String “file”
mov al, 0 ; Open file (read)
mov ah, 3Dh ; Load File Handler and store in ax
int 21h
mov handle, ax
;READ FROM FILE
mov bx, handle ; Move file Handle to bx
lea dx, buffer
mov ah, 3Fh ; Function to read from file
int 21h
;PRINT BUFFER
lea dx, buffer
mov ah, 09h
int 21h
;CLOSE FILE HANDLE
mov ah, 3Eh
mov bx, handle
int 21h
jmp inputt
;========================================================DISPLAY=================================================================
dispppp:
mov ax, 02 ; hides the mouse
int 33h
;------asmaan ka ganda rang----
;top box
mov xcordi, 0
mov xcordf, 320
mov ycordi, 0
mov ycordf, 160
mov colorOf, 7
call boxKap
;division line
mov xcordi, 0
mov xcordf, 320
mov ycordi, 160
mov ycordf, 163
mov colorOf, 8
call boxKap
;ground box
mov xcordi, 0
mov xcordf, 320
mov ycordi, 163
mov ycordf, 200
mov colorOf, 196
call boxKap
;---canons--
mov si, offset Canoon1 ;draw canon1
mov xcordi, 0
mov xcordf, 10
mov ax, yci1
mov ycordi, ax
mov ax, ycf1
mov ycordf, ax
call drawKap
mov si, offset Canoon2 ;draw canon2
mov xcordi, 0
mov xcordf, 10
mov ax, yci2
mov ycordi, ax
mov ax, ycf2
mov ycordf, ax
call drawKap
;---robot--
mov si, offset robut ;draw robot
mov xcordi, 130
mov xcordf, 160
mov ax, yxi
mov ycordi, ax
mov ax, yxf
mov ycordf, ax
call drawKap
; mov ax, ycordi
; add ax,13
; mov shotr, ax
;----health---
;---1
mov si, offset Helth ;draw health of robot
mov xcordi, 30
mov xcordf, 38
mov ycordi, 260
mov ycordf, 298
call drawKap
mov ax,xcordf
mov ycordf,ax
mov ax,xcordi
mov ycordi,ax
.if(hlos > 7)
; mov xcordi, 299
; ;mov xcordf, 301
; mov cx, hlos
; sub cx, 7
; l3helth:
; mov ycordi, 30
; mov ycordf, 38
; mov ax, xcordi
; mov xcordf, ax
; add xcordf, 2
; add ax, 3
; push ax
; push cx
; mov colorOf, 04
; call boxKap
; pop cx
; pop ax
; mov xcordi, ax
; loop l3helth
.endif
mov ycordi, 30
mov ycordf, 38
mov ax, hifr
mov xcordi, ax
mov ax, hfr
mov xcordf, ax
mov colorOf, 07
call boxKap
;---2
mov si, offset Helth ;draw health of canon1
mov xcordi, 70
mov xcordf, 78
mov ycordi, 260
mov ycordf, 298
call drawKap
mov ax,xcordf
mov ycordf,ax
mov ax,xcordi
mov ycordi,ax
mov ax, hifc1
mov xcordi, ax
mov ax, hfc1
mov xcordf, ax
mov colorOf, 07
call boxKap
;--3
mov si, offset Helth ;draw health of canon2
mov xcordi, 110
mov xcordf, 118
mov ycordi, 260
mov ycordf, 298
call drawKap
mov ax,xcordf
mov ycordf,ax
mov ax,xcordi
mov ycordi,ax
mov ax, hifc2
mov xcordi, ax
mov ax, hfc2
mov xcordf, ax
mov colorOf, 07
call boxKap
;----------side health box/ status bar----
;1
mov xcordi, 230
mov xcordf, 320
mov ycordi, 0
mov ycordf, 3
mov colorOf, 8
call boxKap
;2
mov xcordi, 230
mov xcordf, 233
mov ycordi, 0
mov ycordf, 160
mov colorOf, 8
call boxKap
;3
mov xcordi, 317
mov xcordf, 320
mov ycordi, 0
mov ycordf, 160
mov colorOf, 8
call boxKap
;4
mov xcordi, 230
mov xcordf, 320
mov ycordi, 160
mov ycordf, 163
mov colorOf, 8
call boxKap
;5
mov xcordi, 230
mov xcordf, 320
mov ycordi, 120
mov ycordf, 123
mov colorOf, 8
call boxKap
;------------------strings of heath box-------
mov ch,2 ;write robot
mov cl,73
mov si, offset cman
call stringKap
mov ch,7 ;write canonA
mov cl,71
mov si, offset canon1
call stringKap
mov ch,12 ;write canonB
mov cl,71
mov si, offset canon2
call stringKap
mov ch,24 ;write neechy wali line
mov cl,0
mov si, offset ename
call stringKap
mov ch,24 ;write neechy wali line
mov cl,5
mov si, offset uname
call stringKap
;---bullet--
; mov si, offset BulletC ;draw bullet
; mov xcordi, 110
; mov xcordf, 121
; mov ycordi, 70
; mov ycordf, 76
; call drawKap
cnonn:
;------------------------------------------------------------------------------------------------------------------move canons--
;mov ah, 02h
; mov bh,00h
; mov dh,10 ;row k liye
; mov dl,3 ;column k liye
; int 10h
;mov dx, score
;mov ah, 02
;int 21h
;----------------- score display--------------------
mov ch,16 ;write score
mov cl,71
mov si, offset scor
call stringKap
mov ah,2 ;setting cursor to show score
mov bx,0
mov dh,69
mov dl,18
int 10h
mov ax,score
call scoreKaP
; ;/////////////////////////////
; mov ah,2 ;setting cursor to show score
; mov bx,0
; mov dh,70
; mov dl,20
; int 10h
; mov ax,hscore
; call scoreKaP
; ;///////////////////////////////
mov ah,0ch
mov al, 0h
int 21h
; Adding Time Delay
mov cx, 01H
.if(level > 0)
mov cx, 0
.endif
mov dx, 2120H
.if(level > 0)
mov dx, 9090H
.if(level > 1)
mov dx, 6060H
.endif
.endif
mov ah, 86H
int 15H
;--------shooting---
mov ah,2Ch
int 21h
mov time, dh
mov ah,0
mov al,dh
mov dl,5
div dl
.if(ah == 4 && movvcb1 == 0)
mov movvcb1,1
mov sound, 9121
mov cx, 0
call beep
.endif
mov ah,2Ch
int 21h
mov time, dh
mov ah,0
mov al,dh
mov dl,5
mov bx, level
sub dl, bl
div dl
.if(ah == 0 && movvcb2 == 0)
mov movvcb2,1
mov sound, 9121
mov cx, 0
call beep
.endif
;----------------------------extra life gand------------------------
.if(level < 2)
.if(helttimr == 0)
.if(heltcontr == 0)
mov ah,2Ch
int 21h
mov time, dl
mov ah,0
mov al,dh
mov dl,20
div dl
.endif
.if(ah == 9 && heltcontr == 0)
mov ah,2Ch
int 21h
;mov time, dl
mov ah,0
mov al,dh
mov dl, 3
mul dl
mov ycordi,ax
mov ycordf, ax
add ycordf, 9
mov helthx, ax
mov si, offset exHelth ;draw health of robot
mov xcordi, 132
mov xcordf, 138
;mov ycordi, 160
;mov ycordf, 169
call drawKap
mov heltcontr,1
.endif
.if(heltcontr == 60)
mov ax, helthx
mov xcordi, ax
mov xcordf, ax
add xcordf, 9
; mov xcordi, 160
; mov xcordf, 169
mov ycordi, 132
mov ycordf, 138
mov colorOf, 07
call boxKap
mov heltcontr, 0
.elseif(heltcontr > 0)
inc heltcontr
mov si, yxi
mov di, yxf
.if(helthx <= di && helthx >= si)
.if(hlos <= 10)
;add hfr, 4
add hifr, 4
;mov heltcontr, 0
mov helttimr, 60
mov helthx, 0
inc hlos
mov ax, hifr
mov xcordi, ax
mov xcordf, ax
sub xcordi, 3
mov ycordi, 30
mov ycordf, 38
mov colorOf, 04
call boxKap
.if(hlos > 7)
add hfr, 4
.endif
.else