hi all
i'm making a serial interrupt driven program.
i.e. every time a byte is received on the port, i want to perform some
action. and this program is a resident program.

do anybody know what is the interrupt fired when a data is received on
the serial port??? i mean a specific ISR performed after data is
received.

the problem is that i don't know excatly how to install an ISR.
i'm just a begginner, so plz, explain .

what i have done is that i get the 0ch ISR's address using Int 21h
function 35, then replaced it by my code using int 21h function 25h
then used int 21h function 31h to terminate and stay resident.
i enabled the UART data available interrupt and enabled IRQ4 on the PIC

i've used the same concept before to execute a procedure before Int 10h
ISR and it worked perfectly

the code is attached below .... plz help me

*******************************************************************


Codeseg segment
Main proc far
assume cs:Codeseg


start: jmp begin


old_int0C dd ?


new_int0C proc far                 ; the function to be executed


push ax
push ds
push bx


;    cli                              ;
;    mov      dx,21h           ; Disable interrupts at 8259 to
;    in       al,dx           ;  avoid reentrant interrupts
;    or       al,0efh          ;  after eoi has been issued
;    out      dx,al                   ;
;    sti                       ; i don't know exactly what this is
; but i found it on the internet


mov bx,0b800h                 ; set ds to V-RAM address
mov ds,bx


mov Byte PTR ds:0, 31h        ; code to be perfomred after data arrives
mov Byte PTR ds:160, 31h


mov al,20h                                        ;end of interrupt
out 20h,al
pop bx
pop ds
pop ax


org_int0C: jmp dword ptr cs:[old_int0C]


new_int0C endp


begin:                                  ;   Loader
mov ax,codeseg
mov ds,ax
sti


mov dx,3f9h                        ;enable data available interupt on
UART
in al,dx
or al,1
out dx,al


in al,21h                                ; enable IRQ 4 on PIC
and al,0efh
out 21h,al


mov ax,350ch                  ; get interrupt vector (int 0Ch)
int 21h
mov word ptr old_int0C,bx
mov word ptr old_int0C,es


lea dx,new_int0C                      ; set interrupt vector
mov ax,250ch
int 21h


mov cl,4               ; terminate and stay resident
mov dx, offset begin
add dx, 10fh
shr dx,cl
mov ax,3100h
int 21h


Main      endp


Codeseg   ends
end Main
*******************************************************************
thanx in advance