Here is the solution, I got it. Make the following changes in print subroutine
print:
;printing the line
mov bl,2 ;color attribute
mov ah, 9
mov al,0 ;avoding extra characters
int 10h ;printing colors
int 21h
ret