-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.asm
1918 lines (1656 loc) · 46 KB
/
macros.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
; FILE THAT CONTAINS ALL THE MACROS FOR THE PROGRAM
; PRINT ON THE SCREEN
print macro string
Pushear
mov ax, @data
mov ds, ax
mov ah, 09h ; PRINT
mov dx, offset string
int 21h
Popear
endm
; GET CHARACTER
getChar macro
mov ah, 01h
int 21h
endm
; CLEAN STRING
Clean macro string, numBytes, char
local RepeatLoop
Pushear
xor si, si
xor cx, cx
mov cx, numBytes
RepeatLoop:
mov string[si], char
inc si
Loop RepeatLoop
Popear
endm
; CLEAN ROWS
CleanRows macro
Clean fileContent9, 09h, 56h
Clean fileContent8, 09h, 56h
Clean fileContent7, 09h, 56h
Clean fileContent6, 09h, 56h
Clean fileContent5, 09h, 56h
Clean fileContent4, 09h, 56h
Clean fileContent3, 09h, 56h
Clean fileContent2, 09h, 56h
Clean fileContent1, 09h, 56h
endm
; DrawTable Macro
DrawTable macro
Pushear
ClearConsole
moveCursor 00h, 00h
print blacksTurn
print newLine
print f9
print f8_5
print f8
print f7_5
print f7
print f6_5
print f6
print f5_5
print f5
print f4_5
print f4
print f3_5
print f3
print f2_5
print f2
print f1_5
print f1
print f0
Popear
endm
; GET TEXT UNTIL THE USER WRITE ENTER
getText macro string
local getCharacter, EndGC, Backspace
Pushear
xor si, si
getCharacter:
getChar
cmp al, 0dh
je EndGC
cmp al, 08h
je Backspace
mov string[si], al
inc si
jmp getCharacter
Backspace:
mov al, 24h
dec si
mov string[si], al
jmp getCharacter
EndGC:
mov al, 24h
mov string[si], al
Popear
endm
; GET COMMAND THAT THE USER USE
getCommand macro string, Nrow, Ncolumn
local Case0, Case1, Case2, Case3, Case4, Case5, Case6, Case7, Case8, Case9, Case10, Case11
local A, B, C, D, E, F, G, H, I, Num1, Num2, Num3, Num4, Num5, Num6, Num7, Num8, Num9
local ErrorL, EXITcmd, PASScmd, SAVEcmd, SHOWcmd, EndGC
Pushear
mov Nrow, 00h
mov Ncolumn, 00h
xor si, si
; Cases
Case0:
; ------A------
cmp string[si], 41h
je A
; ------B------
cmp string[si], 42h
je B
; ------C------
cmp string[si], 43h
je C
; ------D------
cmp string[si], 44h
je D
; ------E------
cmp string[si], 45h
je E
; ------F------
cmp string[si], 46h
je F
; ------G------
cmp string[si], 47h
je G
; ------H------
cmp string[si], 48h
je H
; ------I------
cmp string[si], 49h
je I
; ------P------
cmp string[si], 50h
je Case4
; ------S------
cmp string[si], 53h
je Case7
jmp ErrorL
; ASSIGN VALUES TO THE COLUMN DEPENDING ON WHAT THEY WROTE
A:
mov Ncolumn, 03h
inc si
jmp Case1
B:
mov Ncolumn, 08h
inc si
jmp Case1
C:
mov Ncolumn, 0dh
inc si
jmp Case1
D:
mov Ncolumn, 12h
inc si
jmp Case1
E:
mov Ncolumn, 17h
inc si
jmp Case1
F:
mov Ncolumn, 1ch
inc si
jmp Case1
G:
mov Ncolumn, 21h
inc si
jmp Case1
H:
mov Ncolumn, 26h
inc si
jmp Case1
I:
mov Ncolumn, 2bh
inc si
jmp Case1
;
;
Case1:
; ------1------
cmp string[si], 31h
je Num1
; ------2------
cmp string[si], 32h
je Num2
; ------3------
cmp string[si], 33h
je Num3
; ------4------
cmp string[si], 34h
je Num4
; ------5------
cmp string[si], 35h
je Num5
; ------6------
cmp string[si], 36h
je Num6
; ------7------
cmp string[si], 37h
je Num7
; ------8------
cmp string[si], 38h
je Num8
; ------9------
cmp string[si], 39h
je Num9
; ------X------
cmp string[si], 58h
je Case2
; else
jmp ErrorL
; ASSIGN VALUES TO THE ROW DEPENDING ON WHAT THEY WROTE
Num1:
mov Nrow, 12h
jmp EndGC
Num2:
mov Nrow, 10h
jmp EndGC
Num3:
mov Nrow, 0eh
jmp EndGC
Num4:
mov Nrow, 0ch
jmp EndGC
Num5:
mov Nrow, 0ah
jmp EndGC
Num6:
mov Nrow, 08h
jmp EndGC
Num7:
mov Nrow, 06h
jmp EndGC
Num8:
mov Nrow, 04h
jmp EndGC
Num9:
mov Nrow, 02h
jmp EndGC
;
;
Case2:
inc si
; ------I------
cmp string[si], 49h
je Case3
; else
jmp ErrorL
;
;
Case3:
inc si
; ------T------
cmp string[si], 54h
je EXITcmd
; else
jmp ErrorL
;
;
Case4:
inc si
; ------A------
cmp string[si], 41h
je Case5
; else
jmp ErrorL
;
;
Case5:
inc si
;------S------
cmp string[si], 53h
je Case6
; else
jmp ErrorL
;
;
Case6:
inc si
; ------S------
cmp string[si], 53h
je PASScmd
; else
jmp ErrorL
;
;
Case7:
inc si
; ------A------
cmp string[si], 41h
je Case8
; ------H------
cmp string[si], 48h
je Case10
; else
jmp ErrorL
;
;
Case8:
inc si
; ------V------
cmp string[si], 56h
je Case9
; else
jmp ErrorL
;
;
Case9:
inc si
; ------E------
cmp string[si], 45h
je SAVEcmd
; else
jmp ErrorL
;
;
Case10:
inc si
; ------O------
cmp string[si], 4fh
je Case11
; else
jmp ErrorL
;
;
Case11:
inc si
; ------W------
cmp string[si], 57h
je SHOWcmd
; else
jmp ErrorL
;
;
; ENDING PART WHERE I PUT A SPECIAL VALUE TO THE ROW AND THE COLUMN TO MAKE A COMMAND
ErrorL:
mov nRow, 43h
mov Ncolumn, 43h
jmp EndGC
EXITcmd:
mov nRow, 4fh
mov Ncolumn, 4fh
jmp EndGC
PASScmd:
mov nRow, 54h
mov Ncolumn, 54h
jmp EndGC
SAVEcmd:
mov nRow, 45h
mov Ncolumn, 45h
jmp EndGC
SHOWcmd:
mov nRow, 53h
mov Ncolumn, 53h
jmp EndGC
EndGC:
Popear
endm
; PUT COIN IN A PLACE
PutCoinMacro macro char, coin
local Row1, Row2, Row3, Row4, Row5, Row6, Row7, Row8, Row9
local Column1, Column2, Column3, Column4, Column5, Column6, Column7, Column8, Column9
local CompareColumns, CompareRows
local EndGC
Pushear
; COLUMNs
CompareColumns:
cmp column, 03h
je Column1
cmp column, 08h
je Column2
cmp column, 0dh
je Column3
cmp column, 12h
je Column4
cmp column, 17h
je Column5
cmp column, 1ch
je Column6
cmp column, 21h
je Column7
cmp column, 26h
je Column8
cmp column, 2bh
je Column9
; ASSIGN VALUES FOR COLUMNS
Column1:
mov si, 00h
jmp CompareRows
Column2:
mov si, 01h
jmp CompareRows
Column3:
mov si, 02h
jmp CompareRows
Column4:
mov si, 03h
jmp CompareRows
Column5:
mov si, 04h
jmp CompareRows
Column6:
mov si, 05h
jmp CompareRows
Column7:
mov si, 06h
jmp CompareRows
Column8:
mov si, 07h
jmp CompareRows
Column9:
mov si, 08h
jmp CompareRows
; ROWs
CompareRows:
; ----1----
cmp row, 12h
je Row1
; ----2----
cmp row, 10h
je Row2
; ----3----
cmp row, 0eh
je Row3
; ----4----
cmp row, 0ch
je Row4
; ----5----
cmp row, 0ah
je Row5
; ----6----
cmp row, 08h
je Row6
; ----7----
cmp row, 06h
je Row7
; ----8----
cmp row, 04h
je Row8
; ----9----
cmp row, 02h
je Row9
; ASSIGN VALUES FOR ROWs
Row1:
CellIsEmpty fileContent1[si], char
jmp EndGC
Row2:
CellIsEmpty fileContent2[si], char
jmp EndGC
Row3:
CellIsEmpty fileContent3[si], char
jmp EndGC
Row4:
CellIsEmpty fileContent4[si], char
jmp EndGC
Row5:
CellIsEmpty fileContent5[si], char
jmp EndGC
Row6:
CellIsEmpty fileContent6[si], char
jmp EndGC
Row7:
CellIsEmpty fileContent7[si], char
jmp EndGC
Row8:
CellIsEmpty fileContent8[si], char
jmp EndGC
Row9:
CellIsEmpty fileContent9[si], char
jmp EndGC
EndGC:
PrintCoin coin
Popear
endm
CellIsEmpty macro string, char
local PutChar
cmp string, 56h
je PutChar
jmp invalidCellM
PutChar:
mov string, char
endm
CheckLiberties macro
endm
PrintCoin macro coin
moveCursor row, column
print coin
endm
; Move cursor
; The screen in text mode have 25 rows and 80 columns
moveCursor macro row, column
Pushear
mov ah, 02h
mov dh, row
mov dl, column
int 10h
Popear
endm
; CLEAN CONSOLE
ClearConsole macro
local ClearConsoleRepeat
Pushear
mov dx, 50h
ClearConsoleRepeat:
print newLine
Loop ClearConsoleRepeat
Popear
endm
ConcatenateRows macro string
local Row1, Row2, Row3, Row4, Row5, Row6, Row7, Row8, Row9
local RepeatRow1, RepeatRow2, RepeatRow3, RepeatRow4, RepeatRow5, RepeatRow6, RepeatRow7, RepeatRow8, RepeatRow9
local EndGC
Pushear
xor si, si
xor cx, cx
Row9:
xor di, di
mov cx, 0bh
RepeatRow9:
mov al, fileContent9[di]
mov string[si], al
inc si
inc di
Loop RepeatRow9
Row8:
xor di, di
mov cx, 0bh
RepeatRow8:
mov al, fileContent8[di]
mov string[si], al
inc si
inc di
Loop RepeatRow8
Row7:
xor di, di
mov cx, 0bh
RepeatRow7:
mov al, fileContent7[di]
mov string[si], al
inc si
inc di
Loop RepeatRow7
Row6:
xor di, di
mov cx, 0bh
RepeatRow6:
mov al, fileContent6[di]
mov string[si], al
inc si
inc di
Loop RepeatRow6
Row5:
xor di, di
mov cx, 0bh
RepeatRow5:
mov al, fileContent5[di]
mov string[si], al
inc si
inc di
Loop RepeatRow5
Row4:
xor di, di
mov cx, 0bh
RepeatRow4:
mov al, fileContent4[di]
mov string[si], al
inc si
inc di
Loop RepeatRow4
Row3:
xor di, di
mov cx, 0bh
RepeatRow3:
mov al, fileContent3[di]
mov string[si], al
inc si
inc di
Loop RepeatRow3
Row2:
xor di, di
mov cx, 0bh
RepeatRow2:
mov al, fileContent2[di]
mov string[si], al
inc si
inc di
Loop RepeatRow2
Row1:
xor di, di
mov cx, 0bh
RepeatRow1:
mov al, fileContent1[di]
mov string[si], al
inc si
inc di
Loop RepeatRow1
EndGC:
Popear
endm
AnalizeText macro string, Prow, Pcolumn
local Row1, Row2, Row3, Row4, Row5, Row6, Row7, Row8, Row9
local RepeatRow1, RepeatRow2, RepeatRow3, RepeatRow4, RepeatRow5, RepeatRow6, RepeatRow7, RepeatRow8, RepeatRow9
local EndGC
Pushear
; For the file
xor si, si
xor cx, cx
; Initializing the values of the row and column (Position in the table) to Move the cursor and print somethin
mov Prow, 02h
mov Pcolumn, 03h
Row9:
; Repeat 11 times the reading of the file
mov cx, 0bh
; For the content of the file that we generate
xor di, di
RepeatRow9:
mov al, string[si]
cmp al, 42h
je PrintBlackCoinRow9
cmp al, 57h
je PrintWhiteCoinRow9
ReturnRepeat9:
add Pcolumn, 05h
inc di
inc si
Loop RepeatRow9
add Prow, 02h
mov Pcolumn, 03h
jmp Row8
PrintBlackCoinRow9:
; Put the coin in the console
moveCursor Prow, Pcolumn
print blackCoin
; Put the coin in the content that we save
mov fileContent9[di], 42h
jmp ReturnRepeat9
PrintWhiteCoinRow9:
; Put the coin in the console
moveCursor Prow, Pcolumn
print whiteCoin
; Put the coin in the content that we save
mov fileContent9[di], 57h
jmp ReturnRepeat9
Row8:
; Repeat 11 times the reading of the file
mov cx, 0bh
; For the content of the file that we generate
xor di, di
RepeatRow8:
mov al, string[si]
cmp al, 42h
je PrintBlackCoinRow8
cmp al, 57h
je PrintWhiteCoinRow8
ReturnRepeat8:
add Pcolumn, 05h
inc di
inc si
Loop RepeatRow8
add Prow, 02h
mov Pcolumn, 03h
jmp Row7
PrintBlackCoinRow8:
; Put the coin in the console
moveCursor Prow, Pcolumn
print blackCoin
; Put the coin in the content that we save
mov fileContent8[di], 42h
jmp ReturnRepeat8
PrintWhiteCoinRow8:
; Put the coin in the console
moveCursor Prow, Pcolumn
print whiteCoin
; Put the coin in the content that we save
mov fileContent8[di], 57h
jmp ReturnRepeat8
Row7:
; Repeat 11 times the reading of the file
mov cx, 0bh
; For the content of the file that we generate
xor di, di
RepeatRow7:
mov al, string[si]
cmp al, 42h
je PrintBlackCoinRow7
cmp al, 57h
je PrintWhiteCoinRow7
ReturnRepeat7:
add Pcolumn, 05h
inc di
inc si
Loop RepeatRow7
add Prow, 02h
mov Pcolumn, 03h
jmp Row6
PrintBlackCoinRow7:
; Put the coin in the console
moveCursor Prow, Pcolumn
print blackCoin
; Put the coin in the content that we save
mov fileContent7[di], 42h
jmp ReturnRepeat7
PrintWhiteCoinRow7:
; Put the coin in the console
moveCursor Prow, Pcolumn
print whiteCoin
; Put the coin in the content that we save
mov fileContent7[di], 57h
jmp ReturnRepeat7
Row6:
; Repeat 11 times the reading of the file
mov cx, 0bh
; For the content of the file that we generate
xor di, di
RepeatRow6:
mov al, string[si]
cmp al, 42h
je PrintBlackCoinRow6
cmp al, 57h
je PrintWhiteCoinRow6
ReturnRepeat6:
add Pcolumn, 05h
inc di
inc si
Loop RepeatRow6
add Prow, 02h
mov Pcolumn, 03h
jmp Row5
PrintBlackCoinRow6:
; Put the coin in the console
moveCursor Prow, Pcolumn
print blackCoin
; Put the coin in the content that we save
mov fileContent6[di], 42h
jmp ReturnRepeat6
PrintWhiteCoinRow6:
; Put the coin in the console
moveCursor Prow, Pcolumn
print whiteCoin
; Put the coin in the content that we save
mov fileContent6[di], 57h
jmp ReturnRepeat6
Row5:
; Repeat 11 times the reading of the file
mov cx, 0bh
; For the content of the file that we generate
xor di, di
RepeatRow5:
mov al, string[si]
cmp al, 42h
je PrintBlackCoinRow5
cmp al, 57h
je PrintWhiteCoinRow5
ReturnRepeat5:
add Pcolumn, 05h
inc di
inc si
Loop RepeatRow5
add Prow, 02h
mov Pcolumn, 03h
jmp Row4
PrintBlackCoinRow5:
; Put the coin in the console
moveCursor Prow, Pcolumn
print blackCoin
; Put the coin in the content that we save
mov fileContent5[di], 42h
jmp ReturnRepeat5
PrintWhiteCoinRow5:
; Put the coin in the console
moveCursor Prow, Pcolumn
print whiteCoin
; Put the coin in the content that we save
mov fileContent5[di], 57h
jmp ReturnRepeat5
Row4:
; Repeat 11 times the reading of the file
mov cx, 0bh
; For the content of the file that we generate
xor di, di
RepeatRow4:
mov al, string[si]
cmp al, 42h
je PrintBlackCoinRow4
cmp al, 57h
je PrintWhiteCoinRow4
ReturnRepeat4:
add Pcolumn, 05h
inc di
inc si
Loop RepeatRow4
add Prow, 02h
mov Pcolumn, 03h
jmp Row3
PrintBlackCoinRow4:
; Put the coin in the console
moveCursor Prow, Pcolumn
print blackCoin
; Put the coin in the content that we save
mov fileContent4[di], 42h
jmp ReturnRepeat4
PrintWhiteCoinRow4:
; Put the coin in the console
moveCursor Prow, Pcolumn
print whiteCoin
; Put the coin in the content that we save
mov fileContent4[di], 57h
jmp ReturnRepeat4
Row3:
; Repeat 11 times the reading of the file
mov cx, 0bh
; For the content of the file that we generate
xor di, di
RepeatRow3:
mov al, string[si]
cmp al, 42h
je PrintBlackCoinRow3
cmp al, 57h
je PrintWhiteCoinRow3
ReturnRepeat3:
add Pcolumn, 05h
inc di
inc si
Loop RepeatRow3
add Prow, 02h
mov Pcolumn, 03h
jmp Row2
PrintBlackCoinRow3:
; Put the coin in the console
moveCursor Prow, Pcolumn
print blackCoin
; Put the coin in the content that we save
mov fileContent3[di], 42h
jmp ReturnRepeat3
PrintWhiteCoinRow3:
; Put the coin in the console
moveCursor Prow, Pcolumn
print whiteCoin
; Put the coin in the content that we save
mov fileContent3[di], 57h
jmp ReturnRepeat3
Row2:
; Repeat 11 times the reading of the file
mov cx, 0bh
; For the content of the file that we generate
xor di, di
RepeatRow2:
mov al, string[si]
cmp al, 42h
je PrintBlackCoinRow2
cmp al, 57h
je PrintWhiteCoinRow2
ReturnRepeat2:
add Pcolumn, 05h
inc di
inc si
Loop RepeatRow2
add Prow, 02h
mov Pcolumn, 03h
jmp Row1
PrintBlackCoinRow2:
; Put the coin in the console
moveCursor Prow, Pcolumn
print blackCoin
; Put the coin in the content that we save
mov fileContent2[di], 42h
jmp ReturnRepeat2
PrintWhiteCoinRow2:
; Put the coin in the console
moveCursor Prow, Pcolumn
print whiteCoin
; Put the coin in the content that we save
mov fileContent2[di], 57h
jmp ReturnRepeat2
Row1:
; Repeat 11 times the reading of the file
mov cx, 0bh
; For the content of the file that we generate
xor di, di
RepeatRow1:
mov al, string[si]
cmp al, 42h
je PrintBlackCoinRow1
cmp al, 57h
je PrintWhiteCoinRow1
ReturnRepeat1:
add Pcolumn, 05h
inc di
inc si
Loop RepeatRow1
jmp EndGC
PrintBlackCoinRow1:
; Put the coin in the console
moveCursor Prow, Pcolumn
print blackCoin
; Put the coin in the content that we save
mov fileContent1[di], 42h
jmp ReturnRepeat1