SHARE
TWEET

Assembly use User define function(procedures)

naeem043 Apr 5th, 2019 (edited) 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .MODEL SMALL
  2. .STACK 100H
  3. .DATA
  4.     STR1 DB 'HELLO, $'
  5.     STR2 DB 'HOW ARE YOU? $'
  6.     STR3 DB 'NICE TO MEET YOU. $'
  7.              
  8. .CODE
  9.     MAIN PROC    
  10.         ;INCLUDE 'EMU8086.INC'  
  11.        
  12.         MOV AX, @DATA
  13.         MOV DS, AX
  14.        
  15.         MOV DX, OFFSET STR1
  16.         MOV AH, 9
  17.         INT 21H
  18.        
  19.         CALL PROCEDURE
  20.          
  21.         MOV DX, OFFSET STR2
  22.         MOV AH, 9
  23.         INT 21H
  24.        
  25.         CALL PROCEDURE
  26.                        
  27.         MOV DX, OFFSET STR3
  28.         MOV AH, 9
  29.         INT 21H
  30.                            
  31.                  
  32.         MOV AH, 4CH
  33.         INT 21H
  34.            
  35.     MAIN ENDP  
  36.  
  37.  
  38.  
  39.     PROCEDURE PROC  
  40.         INCLUDE 'EMU8086.INC'
  41.         MOV DX, 10
  42.         MOV AH, 2
  43.         INT 21H
  44.        
  45.         PRINTN ''
  46.        
  47.         RET
  48.         PROCEDURE ENDP
  49.  
  50. 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