data segment
str1 db 'Assembler$'
str2 db 10 dup(' ')
str3 db 10 dup(' ')
data ends
stack segment
stack ends
prnt macro msg
lea dx,msg
mov ah,09h
int 21h
endm
code segment
assume cs:code,ds:data,ss:stack
start:
mov ax,data
mov ds,ax
mov es,ax
main proc near
call moveabyte
call moveaword
prnt str3
mov ax,4c00h
int 21h
main endp
moveabyte proc
cld
mov cx,10
lea si,str1
lea di,str2
rep movsb
prnt str2
ret
moveabyte endp
moveaword proc
cld
mov cx,5
lea si,str1
lea di,str3
rep movsw
ret
moveaword endp
code ends
END start