-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDisplaying_patterns_of_lab_three.asm
41 lines (29 loc) · 1.34 KB
/
Displaying_patterns_of_lab_three.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
TITLE DISPLAYING_SHITS_OF_LAB_3
.MODEL SMALL
.STACK 100H
.DATA
.CODE
MAIN PROC
MOV CX, 4 ;WE ARE TAKING OUR MAIN LOOP COUNTER AS 4, BECAUSE
MOV BX, 4 ;OF THE WAY WE'VE USED OUR INNER LOOP/S
TOP:
DEC BX ;decrement BX to maintain our main loop
MOV CX, BX ;for obvious reasons...
JZ EXIT ;in case BX, CX becomes zero
MOV DL, 'X'
MOV AH, 2
INT 021H
MOV CX, 3 ;for displaying Y three times
DO:
MOV DL, 'Y'
MOV AH, 2
INT 021H
LOOP DO ;keep displaying 'Y' like a retard
MOV DL, 'Z'
MOV AH, 2
INT 021H
LOOP TOP ;go to the starting of our main loop, where we decrement
;our main counter
EXIT:
MAIN ENDP
END MAIN