Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- start:
- mov ah, 9h
- mov dx,Head ; write txt
- int 21h
- cld
- mov cx,5 ; length
- mov si,FromString+6 ; otkuda
- mov di,ToString ; kuda
- rep movsb
- mov ah,9h
- mov dx, ToString
- int 21h
- mov ah, 9h
- mov dx,Exit
- int 21h
- mov ah,8h
- int 21h
- ret
- Head db "String transfer example", 0dh, 0ah, '$'
- Exit db 0dh, 0ah,"Press any key to exit...", 0dh, 0ah, '$'
- FromString db '01234567890','$'
- ToString db 10,0,10 dup('$')
- -----------------------------------------------------------------
- org 100h
- start:
- mov ah, 9h
- mov dx,Head
- int 21h
- cld
- mov cx,10
- mov si,FromString
- mov di,ToString+9
- metka:
- movsb
- sub di,2
- loop metka
- mov ah,9h
- mov dx, FromString
- int 21h
- mov ah,9h
- mov dx, ToString
- int 21h
- mov ah, 9h
- mov dx,Exit
- int 21h
- mov ah,8h
- int 21h
- ret
- Head db "Transfer string example", 0dh, 0ah, '$'
- Exit db 0dh, 0ah,"Press any key to exit...", 0dh, 0ah, '$'
- FromString db '0123456789', 0dh, 0ah,'$'
- ToString db 11,0,11 dup('$')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement