Advertisement
deced

Untitled

Apr 27th, 2021
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. org 100h
  2. start:
  3. mov ah, 9h
  4. mov dx,Head ; write txt
  5. int 21h
  6.  
  7. cld
  8. mov cx,5 ; length
  9. mov si,FromString+6 ; otkuda
  10. mov di,ToString ; kuda
  11.  
  12. rep movsb
  13.  
  14. mov ah,9h
  15. mov dx, ToString
  16. int 21h
  17.  
  18. mov ah, 9h
  19. mov dx,Exit
  20. int 21h
  21.  
  22. mov ah,8h
  23. int 21h
  24. ret
  25.  
  26. Head db "String transfer example", 0dh, 0ah, '$'
  27. Exit db 0dh, 0ah,"Press any key to exit...", 0dh, 0ah, '$'
  28. FromString db '01234567890','$'
  29. ToString db 10,0,10 dup('$')
  30. -----------------------------------------------------------------
  31. org 100h
  32. start:
  33. mov ah, 9h
  34. mov dx,Head
  35. int 21h
  36.  
  37. cld
  38. mov cx,10
  39. mov si,FromString
  40. mov di,ToString+9
  41.  
  42. metka:
  43. movsb
  44. sub di,2
  45. loop metka
  46.  
  47. mov ah,9h
  48. mov dx, FromString
  49. int 21h
  50. mov ah,9h
  51. mov dx, ToString
  52. int 21h
  53.  
  54. mov ah, 9h
  55. mov dx,Exit
  56. int 21h
  57.  
  58. mov ah,8h
  59. int 21h
  60. ret
  61.  
  62. Head db "Transfer string example", 0dh, 0ah, '$'
  63. Exit db 0dh, 0ah,"Press any key to exit...", 0dh, 0ah, '$'
  64. FromString db '0123456789', 0dh, 0ah,'$'
  65. ToString db 11,0,11 dup('$')
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement