Advertisement
Farhana_Zaman

Untitled

Jul 13th, 2023
1,751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .model small  
  2. .data
  3.     w dw 1,2,3,1,1
  4.        
  5. .code
  6.     main proc
  7.         mov ax, @data
  8.         mov ds,ax
  9.        
  10.        
  11.         xor ax,ax
  12.         xor bx,bx
  13.         mov cx,5
  14.        
  15.                      
  16.         addnos:
  17.             add ax,w[bx]            
  18.             add bx,2
  19.            
  20.             loop addnos
  21.        
  22.          
  23.         mov dx,ax
  24.         add dx,48        
  25.         mov ah,2
  26.         int 21h    
  27.            
  28.        
  29.         main endp
  30.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement