how to convert these mouse coordinates into chracter coordinates used in gotoxy proceedure!!
this is my code which takes coordinates of mouse and prints them of screen..
code is working good but i want to use these coordinates as chracter coordinates used in gotoxy proceedure..

```
.model small
.stack
.data
left db "Left Mouse Button Pressed at Coordinates: ","$"
right db "Right Mouse Button Pressed at Coordinates: ","$"
move db "Mouse Moved at Coordinates: ","$"
next_line db 0DH,0AH, "$"
x_coord dw 0
y_coord dw 0
coord dw 0
.code
start:
main proc

mov ax,@data
mov ds, ax
call clrrg ; Clear Data/General Registers

; Changing Video Mode as Per Requirement
mov ah,00h  ; Change Video Mode if Required
mov al,12h  ; AL=12h, Video Mode 640*480
int 10h

; Show Mouse Cursor on Screen
mov ax,1        ; show Mouse Cursor Functionj
int 33h         ; Mouse Interrupt
call clrrg      ; Clear Registers
; ****************
; **DESCRIPTION***
; ****************
; STEP # 01: For every mouse event we want to detect,
;            ADJUST Value of CX register
; STEP # 02: Load Address of Function in ES:DX which will be 
;            executed when ANY Mouse Event Occurs 
; STEP # 03: AX=000Ch, This Interrupt Setup Interrupt Vector
;            entry for MOUSE Interrupt
; STEP # 04: Call int 33h

; Set value of CX as below to Set Interrupt Function for Specific Mouse Event
; If CX is set to all one's 11111111b, it will detect all Events
; CX=00000001b, Call Interrupt Handler if mouse moves
; CX=00000010b, Call Interrupt Handler if left button pressed
; CX=00000100b, Call Interrupt Handler if left button released
; CX=00001000b, Call Interrupt Handler if right button pressed
; CX=00010000b, Call Interrupt Handler if right button released
; CX=00100000b, Call Interrupt Handler if middle button pressed
; CX=01000000b, Call Interrupt Handler if middle button released 
; If we want to Detect two events, Take OR of CX values for Both Events.
; Example: To detect Mouse Movement and Left Button Pressed; CX = 00000110b
; Example: To detect Mouse Movement, Left Button Pressed and Right Button Pressed
;         CX will be 00001011b
; ***********
; *Important*
; ***********

; Whenever Event is Generated and Function is Invoked,
; below registers are updated
; AX = (Specific bit will get high for which Event is Generated)
; Example: If we press Left Mouse button, value of AX will become 00000010b
; BX = button state
; CX = cursor column ; **Useful, to get info about column
;              where Button was pressed**
; DX = cursor row    ; **Useful, to get info about row
;              where Button was pressed**
; DI = horizontal mickey count
; SI = vertical mickey count

; Step # 01
mov dx,seg mouse_handler    ; Load Segment Address of
;                 Function (mouse_handler)
mov es,dx           ; Store contents of dx in es
mov dx,offset mouse_handler ; Load Offset of Function (mouse_handler)
; Step # 02
mov cx, 00001011b ; CX=00001011b tells, we want to generate Interrupt
;                 if Left Mouse Button OR Right Mouse Button is Pressed
; Step # 03
mov ax,000Ch    ; Setup Interrupt Vector Entry for Specific Mouse Event
; Step # 04
int 33h         ; Call Mouse Interrupt

call clrrg      ; Clear Registers

;****************************************************************************
;***Same 4 steps can be followed to Insert Handlers for Other Mouse events***
;****************************************************************************

; To detect mouse events, we want our program NOT to terminate rapidly
; For this an infinite loop is generated
; When you are writing your code, there might not be need for this
loop1:          ; Infinite Loop
nop         ; No Operation
jmp loop1

call termprg    ; Terminate Program

main endp

; ***********************
; Mouse Interrupt Handler
; ***********************

mouse_handler proc far

.if ax==00000010b ; Means Left Mouse Button is Pressed
; You can also call any other function here
mov x_coord,dx
mov y_coord,cx
mov dx,offset left  ; Print Message
mov ah,09h
int 21h
mov dx,x_coord
mov coord, dx       ; Passing as Argument in Variable
call print_coord    ; Print X Coordinates
mov dl,","          ; Print Comma
mov ah,02h
int 21h
mov dx,y_coord
mov coord, dx       ; Passing as Argument in Variable
call print_coord    ; Print Y Coordinates
mov dx,offset next_line ; Print Next Line
mov ah,09h
int 21h
.endif

.if ax==00001000b ; Means Right Mouse Button is Pressed
mov x_coord,dx
mov y_coord,cx
mov dx,offset right ; Print Message
mov ah,09h
int 21h
mov dx,x_coord
mov coord, dx       ; Passing as Argument in Variable
call print_coord    ; Print X Coordinates
mov dl,","          ; Print Comma
mov ah,02h
int 21h
mov dx,y_coord
mov coord, dx       ; Passing as Argument in Variable
call print_coord    ; Print Y Coordinates
mov dx,offset next_line ; Print Next Line
mov ah,09h
int 21h
.endif

.if ax==00000001b ; Means Mouse is Moved
mov x_coord,dx
mov y_coord,cx
mov dx,offset move  ; Print Message
mov ah,09h
int 21h
mov dx,x_coord
mov coord, dx       ; Passing as Argument in Variable
call print_coord    ; Print X Coordinates
mov dl,","          ; Print Comma
mov ah,02h
int 21h
mov dx,y_coord
mov coord, dx       ; Passing as Argument in Variable
call print_coord    ; Print Y Coordinates
mov dx,offset next_line ; Print Next Line
mov ah,09h
int 21h
.endif
ret
mouse_handler endp

; Terminate Program
termprg proc
mov ah,4ch
int 21h
ret
termprg endp

;*******************************
; Procedure to Print Coordinates
;*******************************
print_coord proc
call clrrg          ; Clear Data Registers
mov ax,coord        ; Move "coord" in 'ax' (Numerator goes in ax)
mov bx,10           ; Move 10 in bx  (Denominator goes in bx)
; If value is ZERO
.if ax==0           
mov dl,al
add dl,48
mov ah,02h
int 21h
jmp return
.endif
; For Values other than ZERO
.while ax !=0
mov dx,0
div bx
push dx
inc cx
.endw
p:
pop dx
add dl,48
mov ah,02h
int 21h
loop p
return:
ret
print_coord endp

; *****************************
; Procedure to Clear Registers
; *****************************
clrrg proc
mov ax,0
mov bx,0
mov cx,0
mov dx,0
ret
clrrg endp

end start
end

```