SHARE
TWEET

Assembly Array input

naeem043 Apr 4th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .MODEL SMALL
  2. .STACK 100H
  3. .DATA
  4.     ARRAY DB 'A','B','C','D','E','F'
  5.     NUM DW 50 DUP(?)
  6.              
  7. .CODE
  8. MAIN PROC    
  9.     INCLUDE 'EMU8086.INC'  
  10.    
  11.     MOV AX, @DATA
  12.     MOV DS, AX
  13.    
  14.     MOV SI, OFFSET ARRAY
  15.     MOV CX, 6
  16.    
  17.     FOR:
  18.         MOV DX,[SI]  
  19.         MOV NUM[SI], DX
  20.         MOV AH,2
  21.         INT 21H
  22.         INC SI
  23.        
  24.     LOOP FOR
  25.    
  26.     PRINTN ''    
  27.     MOV SI, OFFSET NUM
  28.     MOV CX, OFFSET NUM
  29.     START:
  30.         MOV DX,[SI]  
  31.         MOV NUM[SI], DX
  32.         MOV AH,2
  33.         INT 21H
  34.         INC SI
  35.        
  36.      
  37.     LOOP START
  38.        
  39.    
  40.     MOV AH, 4CH
  41.     INT 21H
  42.        
  43.    
  44. END MAIN
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top