SHARE
TWEET

Assembly Summation of 5 inputs

naeem043 Feb 28th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .MODEL SMALL
  2. .STACK 100H
  3.          
  4. .CODE
  5. MAIN PROC    
  6.     INCLUDE 'EMU8086.INC'
  7.      
  8.     DEFINE_SCAN_NUM  
  9.     DEFINE_PRINT_NUM
  10.     DEFINE_PRINT_NUM_UNS
  11.  
  12.     PRINTN 'ENTER THE FIVE NUMBERS : '    
  13.    
  14.     CALL SCAN_NUM
  15.     MOV AX,CX
  16.     PRINTN ''
  17.            
  18.     ADD BX,AX
  19.            
  20.     CALL SCAN_NUM
  21.     MOV AX,CX
  22.     PRINTN ''
  23.    
  24.     ADD BX,AX
  25.    
  26.     CALL SCAN_NUM
  27.     MOV AX,CX
  28.     PRINTN ''  
  29.    
  30.     ADD BX,AX
  31.    
  32.     CALL SCAN_NUM
  33.     MOV AX,CX
  34.     PRINTN ''    
  35.    
  36.     ADD BX,AX
  37.    
  38.     CALL SCAN_NUM
  39.     MOV AX,CX
  40.     PRINTN ''    
  41.    
  42.     ADD AX,BX
  43.                
  44.    
  45.      
  46.     PRINTN 'THE SUMMATION OF FIVE NUMBERS IS: '
  47.    
  48.    
  49.     CALL PRINT_NUM
  50.        
  51.    
  52. 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