Advertisement
apl-mhd

nested loop

Jul 24th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mov bh,0
  2. mov bl,0
  3. mov ch,0
  4.  
  5.  
  6. lop:
  7. mov bl,0
  8. mov ch,0
  9. cmp bh,10     ;bh<5
  10. JL innerlop
  11. hlt
  12.  
  13.  
  14.  
  15. innerlop:
  16. cmp bl,bh
  17. jl print
  18.  
  19.  
  20. add bh,1
  21.    
  22. mov ah,2
  23. mov dl, 0AH
  24. int 21h
  25.        
  26.        
  27.  
  28. mov ah,2
  29. mov dl, 0DH
  30. int 21h
  31.  
  32.  
  33.  
  34.  
  35. jmp lop
  36. hlt
  37.  
  38.  
  39. print:
  40. mov ah,2
  41. add ch,30h
  42. mov dl, ch
  43. int 21h
  44.        
  45.        
  46. sub ch,30h
  47. add ch,1      
  48. add bl,1
  49. jmp innerlop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement