data segment
str1 db 'i love xx'
len dw $-str1
data ends
extra segment
str2 db 20 dup(?)
extra ends
code segment
assume cs:code,ds:data,es:extra
main proc far
start:
mov ax,data
mov ds,ax
mov ax,extra
mov es,ax
lea si,str1
lea di,str2
mov cx,len
cld
l1:
push cx
movsb
mov ah,03h
mov bh,0
int 10h
mov ah,02h
mov bh,0
inc dl
int 10h
mov ah,09h
mov al,[si-1]
mov bh,0
mov bl,11111111b
mov cx,1
int 10h
mov dx,7
l3:
mov bx,0ffffh
l2:
dec bx
jnz l2
dec dx
jnz l3
pop cx
loop l1
mov al,3
lea di,str2
mov cx,20
cld
l4:
push cx
stosb
mov ah,03h
mov bh,0
int 10h
mov ah,02h
mov bh,0
inc dl
int 10h
mov ah,09h
mov al,es:[di-1]
mov bh,0
mov bl,11110100b
mov cx,1
int 10h
mov dx,7
l6:
mov bx,0ffffh
l5:
dec bx
jnz l5
dec dx
jnz l6
pop cx
loop l4
mov ax,4c00h
int 21h
main endp
code ends
end start