print macro msg
lea dx,msg
mov ah,09h
int 21h
endm
.model small
.stack 100h
.data
string1 db 'Enter a String $'
string2 dw 20 dup('$')
string4 db 'Moved String $'
extra segment
string3 dw 20 dup('$')
extra ends
.code
mov ax,@data
mov ds,ax
assume es:extra
mov ax,extra
mov es,ax
print string1
mov dx,offset string2
mov bx,00h
mov ah,3fh
int 21h
sub ax,2
mov cx,ax
print string4
cld
lea si,string2
lea di,string3
repe movs string3,string2
mov ax,extra
mov ds,ax
print string3
mov ah,4ch
int 21h
end
No comments:
Post a Comment