Advertisement
rootUser

(TRICK) Print a string from another string

Jun 1st, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;TRICK : PRINT A STRING FROM ANOTHER STRING
  2. ;HERE PRINT STRING 4 FROM STRING 1
  3. .MODEL SMALL
  4. .STACK 100H
  5. .DATA
  6.    
  7.     MSG1 DB 'HELLO',0AH,0DH
  8.     MSG2 DW 'WHAT IS YOUR NAME',0AH,0DH
  9.     MSG3 DB 'THIS IS A PROGRAM',0AH,0DH
  10.     MSG4 DB 'THIS IS A COMPUTER',0AH,0DH,'$'
  11.    
  12. .CODE
  13. MAIN PROC  
  14.      
  15.     MOV AX,@DATA
  16.     MOV DS,AX
  17.      
  18.     LEA DX,MSG1+47D
  19.     MOV AH,9
  20.     INT 21H
  21.    
  22.     MOV AH,4CH
  23.     INT 21H
  24.    
  25. MAIN ENDP
  26.      END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement