SHARE
TWEET

Assemble SUMMATION OF GIVEN NUMBER

naeem043 Mar 22nd, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .MODEL SMALL
  2. .STACK 100H
  3. .DATA
  4.     A DB 1,2,3,4,5
  5.     B DB ?
  6.              
  7. .CODE
  8. MAIN PROC    
  9.     INCLUDE 'EMU8086.INC'  
  10.    
  11.     MOV AX, @DATA
  12.     MOV DS, AX
  13.    
  14.     MOV AL, 0
  15.     MOV CX, 4
  16.     MOV DI, 0
  17.    
  18.     SUM:
  19.         MOV AL, A[DI]
  20.         ADD AL, A[DI+1]
  21.        
  22.         MOV AH,2
  23.         ADD AL, 48
  24.         MOV DL, AL
  25.         INT 21H
  26.        
  27.         INC DI
  28.         DEC CX
  29.        
  30.         CMP CX, 0
  31.         JNE SUM    
  32.        
  33.     MOV AH, 4CH
  34.     INT 21H
  35.        
  36.    
  37. 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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top