Tuesday, May 19, 2020

[Solved] Creating Nested Loops in ascending order in Assembly Language

The following code demonstrates nested loops in ascending order example in 8086 Assembly Language Programming. Related program can be found here




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 
 
NESTED LOOPS IN ASCENDING ORDER IN ASSEMBLY LANGUAGE PROGRAMMING
 

3 comments:

Unknown said...

•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

The Lame Programmer said...

This question has been solved already try watching nest loops example in our blog or youtube channel Thanks.

Anonymous said...
This comment has been removed by a blog administrator.

Complete Video Tutorials