;Exam 2008A Question 4

.model small
.data
String1 db 'Good ', 5 dup (' ')
Length_String1 dw 5
x db '    '
String2 db 'Luck!'
Length_String2 dw 5

.stack 100h
.code

mov ax, @data
mov ds, ax
mov es, ax

mov di, offset string1
mov si, offset string2

call copy
call print1

mov ah, 04ch
int 21h

copy:
	push di
	push si
	push cx
	
	CLD
	
	add di, Length_String1
	mov cx, Length_String2
	
	REP MOVSB
	
	mov al, '$' ;adding '$' to the end of string1
	STOSB
	
	pop cx
	pop si
	pop di
	ret

print1:
	lea dx, String1
	mov ah, 09h
	int 21h
	ret

end