TITLE PUCHTAA
.MODEL SMALL
.STACK 100H
.DATA
.CODE
MAIN:
MOV AX, @DATA
MOV DS, AX
MOV CL, 31H
LOOP1:
MOV DL, CL
LOOP2:
MOV AH, 02H
INT 21H
INC DL
CMP DL, 37H
JNG LOOP2
MOV DL, 0AH
MOV AH, 02H
INT 21H
MOV DL, 0DH
MOV AH, 02H
INT 21H
INC CL
CMP CL, 37H
JNG LOOP1
MOV AH, 04CH
INT 21H
END MAIN
OUTPUT OF THE PROGRAM
3 comments:
•Write an assembly code that prints the numbers from 1 to 4, 6 times on the screen. Each sequence of numbers from 1 to 4 are separated by new line.
•Output:
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
This question has been solved already try watching nest loops example in our blog or youtube channel Thanks.
Post a Comment