StoneHaos

sofa_8_asm

Jun 17th, 2021
681
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. include io.asm
  2.  
  3. segment sstack stack
  4.     db 128 dup(?)
  5. ends sstack
  6.  
  7. segment sdata
  8.  
  9. str1 db "abacaba", "$"
  10. lstr1 equ $-str1
  11. str2 db "Hello World!", 11 dup(0)
  12. lstr2 equ $-str2-11
  13.  
  14. ends sdata
  15.  
  16. segment scode
  17. assume cs:scode, ds:sdata, ss:sstack
  18. start:
  19.     mov ax,sdata
  20.     mov ds,ax
  21.     mov es,ax
  22.  
  23.     mov cx,lstr1
  24.     mov si,offset str1
  25.     mov di,offset str2
  26.     add di,lstr2
  27.     rep movsb
  28.  
  29.     mov dx,offset str2
  30.     outstr
  31.     finish
  32. ends scode
  33. end start
RAW Paste Data