[comp.windows.ms] Interrupt driven I/O under MS-Windows

bontekoe@idca.tds.PHILIPS.nl (M. Bontekoe) (10/18/89)

Hello,

We are trying to build a terminal emulation program, which uses interrupt driven
I/O, running under MS-Windows.
The source code is ported to MS-Windows and the code segment, containing the 
asynchronous communication routines, is defined as a FIXED code segment. But
it doesn't work.
Can anybody help. Also pointers to any publications about this subject are
welcome.

Thanks.

Meindert Bontekoe, SSP-P4000, PTDSN, Apeldoorn, Holland.
  

paul@cscnj.csc.COM (Paul Moody) (10/19/89)

In article <273@ssp7.idca.tds.philips.nl>, bontekoe@idca.tds.PHILIPS.nl (M. Bontekoe) writes:
> We are trying to build a terminal emulation program, which uses interrupt driven
> I/O, running under MS-Windows.
> The source code is ported to MS-Windows and the code segment, containing the 
> asynchronous communication routines, is defined as a FIXED code segment. But
> it doesn't work.

Fixed segments in windows 2.x are not what you think. For windows/286
it is possible to get a real fixed segment, one that does not swap.
For windows/386 this is impossible. Windows maintains an arbitrary
cutoff point above which fixed segments are swapable into lim memory.
Unless you use a fixed dll segment for the interupt code, you will
have trouble getting your code below this line. For windows/386 this
cannot be garunteed.

-- 
Paul Moody			UUCP: rutgers!cscnj!paul 
Computer Sciences Corporation
# the opinions expressed are entirely imaginary			#

rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel) (10/31/89)

In article <273@ssp7.idca.tds.philips.nl> bontekoe@idca.tds.PHILIPS.nl (M. Bontekoe) writes:
>We are trying to build a terminal emulation program, which uses interrupt driven
>I/O, running under MS-Windows.
>The source code is ported to MS-Windows and the code segment, containing the 
>asynchronous communication routines, is defined as a FIXED code segment. But
>it doesn't work.
>Can anybody help. Also pointers to any publications about this subject are
>welcome.

>Meindert Bontekoe, SSP-P4000, PTDSN, Apeldoorn, Holland.

I had the same problem and the solution was simple:

Put your interrupt handling code into a standard-DOS resident program
and load this into memory before running Windows. Make it accessible
using the Multiplex Interrupt 0x2F and then call your routines from
within your Windows application via int86(0x2F, ...).

A resident program becomes a Multiplex-Server if it hooks the INT 2F
vector and looks for a special value in register AH if INT 2F is called. If
INT 2F is called with other values in AH than the handled one, control
is passed to the previous INT 2F vector.

Look into the DOS Techn. Ref. for AH values already reserved for
existing DOS programs and into the INTER589 interrupt list for values
used with other packages to avoid conflicts if you use some of them.

Some assembly language programming is required.

Kai Uwe Rommel, Munich