Str_Copy Function in Assembly

include irvine32.inc

.data
source byte "my name is usman",0
dest   byte "i am not a khan.",0

msg1 byte "1st String: ",0
msg2 byte "2nd string: ",0
msg3 byte "after Copy :: copy source string into dest : ",0

.code
Main proc
call clrscr
call crlf
mov edx,offset msg1
call writestring
call crlf

call crlf
mov edx,offset source
call writestring
call crlf

call crlf
mov edx,offset msg2
call writestring
call crlf

call crlf
mov edx,offset dest
call writestring
call crlf

call crlf
mov edx,offset msg3
call writestring
call crlf

invoke str_copy , addr source ,addr dest
;copy source string into dest

call crlf
mov edx,offset dest
call writestring
call crlf

exit
main endp
end main


0 comments:

Post a Comment

My Instagram