lab MACRO row,col,num
push dx
mov ax,0600h
mov bh,07
mov cx,0000
mov dx,184fh
int 10h
pop dx

mov bh,00

mov ah,row
mov al,col

and al,000fh
and ah,000fh
mov dh,ah
mov dl,al

mov ah,02
mov al,0
int 10h
mov dx,num
mov ah,2
int 21h
ENDM

data segment
n dw (?)
char1 db "Enter row$"
char2 db "Enter col$"
char3 db "Enter num$"
data ends

store segment stack
db 128 dup(?)
store ends

code segment
assume cs:code,ds:data,ss:store
start proc
mov ax, data
mov ds,ax

mov dx, offset char1
mov ah, 9
int 21h
mov ah,2
mov dl,10
int 21h

mov ah,1
int 21h
mov dh,al

push dx
mov ah,2
mov dl,10
int 21h
mov dx, offset char2
mov ah, 9
int 21h
mov ah,2
mov dl,10
int 21h
pop dx
mov ah,1
int 21h
mov dl,al

push dx
mov ah,2
mov dl,10
int 21h
mov dx, offset char3
mov ah, 9
int 21h
mov ah,2
mov dl,10
int 21h
pop dx
mov ah,1
int 21h
mov ah,0
mov n,ax

lab dh,dl,n

mov ah,1
int 21h

mov ah,4ch
int 21h
retf
start endp
code ends
end start