There are a few problems with your code.
The first problem is that there is no code to print the text. (You are using the '$' to mark the end of the string, so I'm assuming that you are using DOS function 9 for string printing.)
The second problem is that you are not allocating the proper space for STR2. You only allocated ONE BYTE and your code is trying to copy the 11 bytes from STR1 to STR2's memory address. To allocate a block of data, you can use the 'dup' assember instruction.
Examples:
STR2 db 1024 dup (?) ;allocate 1024 uninitialized bytes
STR2 dw 400 dup (?) ;allocate 400 uninitialized words
STR2 db 300 dup ('#') ;allocate 300 bytes, with the bytes set to the '#' ASCII number
STR2 dw 120 dup (0) ;allocate 120 words, with the bytes set to the value of 0
The third problem is that you are using 2 loops when you only need 1 loop to copy a string and print it. Your first loop just counts the bytes in STR1, using CX as the counter. Then the CX value is used as the
counter for the movsb loop. All you need is 1 loop to copy the string before you use DOS function 9 for printing.
I present my code (using your coding methods), but without the second loop:
;NOTE: The code below can be optimized further to make it run faster.
.model small
.stack 100h
.data
STR1 db "BANGLADESH$"
STR2 db 11 dup (0)
.code
;NOTE: You do not need to create a 'MAIN' procedure!!!!
mov ax, @data ;set DS to our data segment
mov ds,ax
mov si,offset STR1 ;I like using "mov [reg], offset [label]" method instead of LEA
mov dx,offset STR2 ;DS:DX holds address of STR2
myloop:
mov al,[si] ;AL = byte at DS:SI
cmp al, '$' ;test for end of source string
je printit ;jump if end of string reached
mov [dx],al ;copy byte to destination string STR2
inc si ;increment STR1 and STR2 pointers
inc dx
jmp myloop
printit:
mov [dx],al ;copy the '$' to end of STR2
mov dx,offset STR2 ;DS:DX = starting address of STR2
;NOTE: DOS function 9 prints a string that is terminated with '$'
; DS:DX points to the string.
mov ah,9
int 21h
mov ax,4c00h ;exit to DOS and return 0
int 21h
end