Advertisement
arfin97

5. While loop pyramid.asm

Oct 24th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .MODEL SMALL
  2. .STACK 100H
  3. .DATA
  4. .CODE
  5. INCLUDE 'EMU8086.INC'
  6.  
  7. MAIN PROC
  8.     MOV AH, 2
  9.     MOV DL, '*'
  10.     MOV BL, 1
  11.    
  12.     WHILE1:
  13.         CMP BL, 50
  14.         JG END_WHILE1
  15.         MOV DL, '*'
  16.        
  17.         MOV CL, 1
  18.        
  19.         WHILE2:
  20.             CMP CL, BL
  21.             JG END_WHILE2
  22.             INT 21H
  23.             INC CL
  24.             JMP WHILE2
  25.            
  26.         END_WHILE2:
  27.             MOV DL, 0AH
  28.             INT 21H
  29.             MOV DL, 0DH
  30.             INT 21H
  31.             INC BL
  32.             JMP WHILE1
  33.     END_WHILE1:
  34.         MOV AH, 4CH
  35.         INT 21H
  36.         MAIN ENDP
  37. END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement