Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MS-DOS Interrupt Vector

Status
Not open for further replies.

tcwong3

Junior Member level 2
Joined
Mar 29, 2004
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
182
I am writing a TSR program for MS-DOS 6.22 for trapping RS232 interrupt.

In order to do that I need to know interrupt vector for COM1 & COM2 (or 3 & 4).
For example the vector for keyboard interrupt is 0x09.

Can anyone help me on this?

Thanks in advanced.
 

these are the interrupt vectors (decimal):
#define COM2_VECT 11 /* COM2 */
#define COM1_VECT 12 /* COM1 */

and these are the interrupt numbers:
COM2 = COM4 --> IRQ3
COM1 = COM3 --> IRQ4

you'll find a list here:
https://bioscentral.com/misc/interrupts.htm


Mik
 

There is a DOS service to get and change the interrupt vectors.
Here is an example for the COM port:
com_irq db 4 ;COM port IRQ
save_ISR dw 0,0 ;saved interrupt vector

mov al,com_irq ;save COM interrupt vector
add al,8
mov ah,35h
int 21h
mov save_ISR,bx
mov ax,es
mov save_ISR+2,ax
pop bx
pop es

mov al,com_irq ;set new vector
add al,8
mov ah,25h
mov dx,offset COM_ISR
int 21h
--------------
restore_COM:
pushf
push ax
push dx
cli

push ds
mov al,com_irq ;restore interrupt vector
add al,8
mov ah,25h
lds dx,dword ptr save_ISR
int 21h
pop ds
.......
These routines are using services 25h and 35h of the DOS int21.
Hope that helps
K
 

Thank you very much. I will try it.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top