Advertisement
NB52053

Extra

Jul 14th, 2018
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. *SIR EDITED*
  2.  
  3. org 100h
  4. .stack 100h
  5. .data
  6.  
  7. str db "*$"
  8.  
  9. i db 0
  10. j db 0
  11.  
  12. N db 5
  13. M db 5
  14. NL DB 0AH,0DH, "$"
  15.  
  16.  
  17.  
  18. .code
  19. main proc
  20.  
  21.  
  22. mov dx, @data
  23. mov ds, dx
  24.  
  25. mov i,0        ; initialize with 0
  26. mov j,0
  27.  
  28.  
  29. condstar1:
  30.     mov cl,N
  31.     cmp i, cl
  32.     jl iterstar1
  33.     jmp exitstar
  34.  
  35.        
  36. iterstar1:
  37.     ;================
  38.        
  39. condstar2:
  40.        
  41.         mov bl, starcount     ; move to register for compare so, (bl = 5) now.
  42.         cmp star, bl          ; star < starcount  | compare 0 < 5  
  43.         jl itestar            ; jump less
  44.         jmp exitstar
  45.        
  46.    
  47.    
  48.      itestar2:
  49.      
  50.         lea dx, str
  51.         mov ah, 9
  52.         int 21h
  53.        
  54.         inc str     ;star ++
  55.         jmp condstar2
  56.                            
  57.      
  58.      
  59.      exitstar:  
  60.     ;===============
  61.    
  62.     lea dx, nl
  63.     mov ah,9
  64.     int 21h
  65.    
  66.  
  67.     inc i
  68.     jmp condstar2
  69.    
  70.    
  71.  
  72.   exitstar:
  73.  
  74.  
  75. endp main
  76. end main
  77.  
  78. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement