Advertisement
azizulhaquealif

Pattern Print

Oct 19th, 2019
1,424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .model small
  2. .stack 100h
  3. .data
  4.  
  5. a db ?
  6. b db ?
  7. c db ?
  8. d db ?
  9. e db ?
  10.  
  11. .code
  12. main proc
  13.    
  14.     mov cx,5
  15.     mov d, 65
  16.     mov b, 5
  17.     mov c, 1
  18.     mov e, 4
  19.    
  20.     mov ah, 2
  21.    
  22.     L1:
  23.     push cx  
  24.    
  25.     mov cx, 0
  26.     mov cl, b
  27.        
  28.         L2:
  29.         mov dl, ' '
  30.         int 21h
  31.         loop L2
  32.    
  33.     dec b
  34.        
  35.     mov cx, 0
  36.     mov cl, c
  37.    
  38.     mov bl, d
  39.     add bl, c
  40.     mov a, bl
  41.        
  42.         L3:
  43.         dec a
  44.         mov dl, a
  45.         int 21h
  46.         loop L3
  47.    
  48.     mov d, bl    
  49.     inc c
  50.        
  51.     mov dl,0dh
  52.     int 21h
  53.     mov dl,0ah
  54.     int 21h
  55.        
  56.     pop cx
  57.     loop L1
  58.    
  59.     mov ah,4ch
  60.     int 21h
  61.    
  62.     main endp
  63. end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement