Advertisement
rafid_shad

String input print

Dec 22nd, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. .model small
  2. .stack 100h
  3. .data
  4.  
  5. v1 db 100 dup('$')
  6.  
  7. .code
  8. main proc
  9.    
  10.     mov ax,@data
  11.     mov ds,ax  
  12.     mov si,offset v1  
  13.  
  14.  l1:
  15.    
  16.  
  17.     mov ah,1
  18.     int 21h
  19.    
  20.     cmp al,13
  21.     je stop
  22.    
  23.     mov [si],al
  24.     inc si
  25.    
  26.     jmp l1
  27.    
  28.    
  29.  stop:
  30.   mov dx,offset v1
  31.   mov ah,9
  32.   int 21h
  33.    
  34.    
  35.    
  36.    
  37.    
  38.    
  39.     exit:
  40.     mov ah,4ch
  41.     int 21h
  42.     main endp
  43. end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement