SHARE
TWEET

Assembly string input and Reverse print

naeem043 Apr 5th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .MODEL SMALL
  2. .STACK 100H
  3.  
  4.              
  5. .CODE
  6. MAIN PROC    
  7.     INCLUDE 'EMU8086.INC'  
  8.    
  9.     MOV CX, 0
  10.    
  11.     PUSHIN:
  12.         MOV AH, 1
  13.         INT 21H
  14.         MOV BL, AL
  15.    
  16.         CMP BL, 0DH ;ENTER BUTTON
  17.         JE NEWLINE
  18.         PUSH BX
  19.         INC CX
  20.         JMP PUSHIN
  21.    
  22.  
  23.    
  24.     NEWLINE:
  25.        
  26.         PRINTN ''
  27.          
  28.     POPOUT:
  29.         POP DX
  30.         MOV AH, 2
  31.         INT 21H
  32.         LOOP POPOUT
  33.              
  34.     MOV AH, 4CH
  35.     INT 21H
  36.        
  37.    
  38. 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