delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/14/04:54:18

From: "Javier Calleja" <dismuntel AT apdo DOT com>
To: <djgpp AT delorie DOT com>
Subject: Interrupt, interrupt,... why am I using DOS?
Date: Thu, 14 May 1998 10:55:24 +0200
Message-ID: <01bd7f16$08ce7c80$0100a8c0@dismuntel.ctv.es>
MIME-Version: 1.0

This is a multi-part message in MIME format.

------=_NextPart_000_0004_01BD7F26.CC574C80
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello all the world (specially people are going to answer my questions):

  Well , this is the story. I am writting a control aplication in real =
time, but I am so stupid that I am using a PC with DOS to manage the =
aplication.

  I need to send 10 messages every 50 ms to some cards distributed along =
a machine. The bus I am to use is the CAN bus (if someone doesn't know =
this bus, this bus is specially designed to control aplications; you can =
use this bus with a safe lattency -1 Mbps- and it's physically strong). =
And I'm using this bus with an ISA card inside the PC, so I must read =
some ports of this card when a hardware interrupt notify that there is a =
message to me.

  I've written the interrupt handler in C with farpoke and farpeek =
functions, and I'm allocating the handler with the go32_ functions in =
protected mode. But, I've got a dude. When I write this interrupt =
handler in C and I use the go32_ funcions (like =
go32_dpmi_set_protected_mode_interrupt_vector and similar) to place it =
and I use farpoke and farpeek , does the program change to real mode or =
it always work in protected mode?=20

    And, what lattency can this handler work safely?

  And, there is another problem. I use the CAN bus card to communicate =
with the control sensors, but I'm also using a LAN car with the =
PacketDriver to send some messages to another PC that works under W95. =
These messages haven't priority, so I haven't guarantee the lattency. =
The PacketDriver works with a software interrupt associate; when a LAN =
frame arrive, I think, a software interrupt is activated, and my =
interrupt handler gets the messages. But I've got another dude. If I'm =
inside a hardware interrupt handler (like my CAN interrupt handler), can =
a software interrupt be activate and break the working of my CAN =
handler? If it's possible, could I mask a software interrupt, and so =
this interrupt can=B4t break the hardware interrupt action?
 =20
  And, what lattency can a real mode interrupt handler work?

  Ah, I can't find examples of hardware interrupt  handler writes in =
assembler and  examples of programs that works with PacketDriver. Could =
someone, someone really good person, send me examples and information =
about how I must write a assembler interrupt handler (what information I =
must keep and how do it)?

  Bye world.=20

Javier Calleja Garc=EDa
Av. Pais Valenciano 155, E
46680-Algemes=ED (Valencia)
Espa=F1a
Tlf:+34-96-2481217

=20
email:dismuntel AT apdo DOT com

------=_NextPart_000_0004_01BD7F26.CC574C80
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.71.1712.3"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>Hello all the world =
(specially people=20
are going to answer my questions):</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>&nbsp; Well , this is =
the story. I am=20
writting a control aplication in real time, but I am so stupid that I am =
using a=20
PC with DOS to manage the aplication.</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>&nbsp; I need to send =
10 messages=20
every 50 ms to some cards distributed along a machine. The bus I am to =
use is=20
the CAN bus (if someone doesn't know this bus, this bus is specially =
designed to=20
control aplications; you can use this bus with a safe lattency -1 Mbps- =
and it's=20
physically strong).</FONT><FONT color=3D#000000 face=3DArial size=3D2> =
And I'm using=20
this bus with an ISA card inside the PC, so I must read some ports of =
this card=20
when a hardware interrupt notify that there is a message to =
me.</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; I've written the interrupt =
handler in C with=20
<EM>farpoke</EM> and <EM>farpeek </EM>functions, and I'm allocating the =
handler=20
with the <EM>go32_</EM> functions in protected mode. But, I've got a =
dude. When=20
I write this interrupt handler in C and I use the <EM>go32_</EM> =
funcions (like=20
<EM>go32_dpmi_set_</FONT><FONT face=3DArial =
size=3D2>protected_mode_interrupt_vector=20
</EM>and similar) to place it and I use <EM>farpoke </EM>and <EM>farpeek =
</EM>,=20
does the program change to real mode or it always work in protected =
mode?=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;</FONT><FONT face=3DArial =
size=3D2>&nbsp;=20
And, what lattency can this handler work safely?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; And, there is another problem. I =
use the CAN=20
bus card to communicate with the control sensors, but I'm also using a =
LAN car=20
with the <EM>PacketDriver</EM> to send some messages to another PC that =
works=20
under W95. These messages haven't priority, so I haven't guarantee the =
lattency.=20
The <EM>PacketDriver </EM>works with a software interrupt associate; =
when a LAN=20
frame arrive, I think, a software interrupt is activated, and my =
interrupt=20
handler gets the messages. But I've got another dude. If I'm inside a =
hardware=20
interrupt handler (like my CAN interrupt handler), can a software =
interrupt be=20
activate and break the working of my CAN handler? If it's possible, =
could I mask=20
a software interrupt, and so this interrupt can&acute;t break the =
hardware=20
interrupt action?</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>&nbsp; </FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>&nbsp; And, what =
lattency can a real=20
mode interrupt handler work?</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; Ah, I can't find examples of =
hardware=20
interrupt&nbsp; handler writes in assembler and&nbsp; examples of =
programs that=20
works with <EM>PacketDriver</EM>. Could someone, someone really good =
person,=20
send me examples and information about how I must write a assembler =
interrupt=20
handler (what information I must keep and how do it)?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><EM></EM></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; Bye =
world.<EM>&nbsp;</EM></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>Javier Calleja=20
Garc&iacute;a</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>Av. Pais Valenciano =
155,=20
E<BR>46680-Algemes&iacute;=20
(Valencia)<BR>Espa&ntilde;a<BR>Tlf:+34-96-2481217<BR><BR> <BR><A=20
href=3D"mailto:email:dismuntel AT apdo DOT com">email:dismuntel AT apdo DOT com</A></FO=
NT></DIV></BODY></HTML>

------=_NextPart_000_0004_01BD7F26.CC574C80--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019