Mail Archives: djgpp/1997/02/12/08:24:15
Eli Zaretskii wrote:
>
> On Sun, 9 Feb 1997, Logan Bowers wrote:
>
> > The only CommPort library I could find (Svasync) doesn't let you set the
> > IRQ for the comm port that you use. I need to use COM3, but it is on a
> > non-standard IRQ of 9. The library will only work if I set the IRQ of
> > the port to 4.
>
> Why won't it work for IRQ 9? Is the number of IRQ hard-wired into the
> Svasync code?
>
> One thing that is different between IRQ 4 and IRQ 9 is that for 9 you
> need to send EOI to both master and slave interrupt controllers, whereas
> for 4 you only need to EOI the master.
>
> > In the source code, it has 4 settings for each port:
> > Port, VectorNum, EnableIRQ, and DisableIRQ. So how do I set these to
> > access my port on COM3?
Firts, use it
dosmemget(0x400+CommPort*2,2,&Port); //getting comport address
switch (CommPort)
{
case COM1:
case COM3:
VectorNum = 0x0C;
EnableIRQ = 0xEF;
DisableIRQ = 0x10;
break;
case COM2:
case COM4:
VectorNum = 0x0B; //change this value
EnableIRQ = 0xF7;
DisableIRQ = 0x08;
break;
}
[snip]
_go32_dpmi_get_protected_mode_interrupt_vector(VectorNum,
&ProtVector);
--
Regards,
Dim Zegebart,
Moscow Russia.
- Raw text -