Advertisement
NB52053

ASS. Lab#3.1 star print

Jun 30th, 2018
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; SIMPLE LOOP
  2.  
  3.                            
  4. .STACK 100H
  5.  
  6. .DATA
  7.  
  8.  MSG1 DB "A$"
  9.  ;MSG2 DB "PASS$"
  10.  ;MSG3 DB "FAIL!"
  11.  
  12.  i DB ?
  13.  
  14.  
  15.  
  16. .CODE
  17.     PROC MAIN
  18.  
  19.     MOV DX, @DATA
  20.     MOV DS, DX
  21.    
  22.     ;loop limit/initialization
  23.     MOV i,0
  24.    
  25.    
  26.     ;condition
  27.     CONDITON_CHECK:
  28.     CMP i,10
  29.     JGE EXIT
  30.     JMP PRINTA
  31.  
  32.        
  33.     PRINTA:
  34.    
  35.     MOV AH,9
  36.     LEA DX,MSG1
  37.     INT 21H
  38.    
  39.    
  40.      ;INCREMENT
  41.      inc i ; adding i, 1
  42.      
  43.      JMP CONDITON_CHECK
  44.    
  45.    
  46.    
  47.     EXIT:
  48.     MOV AH,4CH
  49.     INT 21H
  50.    
  51.    
  52.    
  53.    
  54.    
  55.  ENDP MAIN
  56. END MAIN
  57.  
  58.  
  59. RET
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement