Monday, April 14, 2014

string copying in assembly language 8086

.model small
.stack 64
.data
str1 db 'pawan samarwal$'
str2 db 20 dup(' '),'$'

.code
main proc far
mov ax,@data
mov ds,ax
mov es,ax
cld
mov cx,20
lea di,str1
lea si,str2
rep movsb
mov ah,09h
lea dx,str1
int 21h
mov ah,4ch
int 21h
main endp
end main

No comments:

Post a Comment

Contributors

Translate