Wacky_rubia

str

Dec 7th, 2015
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         model tiny
  2.         .code
  3.         org 80h
  4. len db ?
  5. par db ?
  6.         org 100h
  7. e:
  8.         jmp start
  9. buffer db 255(?)
  10.  
  11. start:
  12.         mov si, offset par
  13.         xor cx, cx
  14.         xor dx, dx
  15.         mov cl, len
  16.         mov di, offset buffer
  17. l:
  18.         lodsb
  19.         cmp ax, ' '
  20.         je l1
  21.         inc dx
  22.         stosb
  23. l1:
  24.         loop l
  25.  
  26.         mov ax, '$'
  27.         stosb
  28.  
  29.         mov cx, dx
  30.         mov ah, 09h
  31.         mov dx, offset buffer
  32.         int 21h
  33.         ret
  34. end e
Advertisement
Add Comment
Please, Sign In to add comment