Advertisement
apl-mhd

loop using cx

Jul 23rd, 2018
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3.  
  4. mov bx,0
  5.  
  6. lop:
  7.  
  8. cmp bx,10
  9. jl cont
  10. hlt
  11.  
  12.  
  13. cont:
  14. add bx, 1
  15.  
  16. jmp print
  17. hlt
  18.  
  19.  
  20.  
  21.          
  22. print:        
  23. mov cx,bx
  24. mov ah, 2
  25. mov dl, '*'                    
  26. tp:
  27. int 21h
  28. loop tp
  29.  
  30. jmp newline
  31.  
  32.  
  33. hlt
  34.  
  35. newline:
  36.  
  37. mov ah,2
  38. mov dl, 0AH
  39. int 21h
  40.  
  41. mov ah,2
  42. mov dl, 0DH
  43. int 21h
  44.  
  45. jmp lop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement