From: "Javier Calleja" To: 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 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0004_01BD7F26.CC574C80" Precedence: bulk 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
Hello all the world = (specially people=20 are going to answer my questions):
 
  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.
 
  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). = 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.
 
  I've written the interrupt = handler in C with=20 farpoke and farpeek functions, and I'm allocating the = handler=20 with the go32_ functions in protected mode. But, I've got a = dude. When=20 I write this interrupt handler in C and I use the go32_ = funcions (like=20 go32_dpmi_set_protected_mode_interrupt_vector=20 and similar) to place it and I use farpoke and farpeek = ,=20 does the program change to real mode or it always work in protected = mode?=20
 
   =20 And, what lattency can this handler work safely?
 
  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 PacketDriver 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 PacketDriver 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´t break the = hardware=20 interrupt action?
 
  And, what = lattency can a real=20 mode interrupt handler work?
 
  Ah, I can't find examples of = hardware=20 interrupt  handler writes in assembler and  examples of = programs that=20 works with PacketDriver. 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)?
 
  Bye = world. 
 
Javier Calleja=20 García
Av. Pais Valenciano = 155,=20 E
46680-Algemesí=20 (Valencia)
España
Tlf:+34-96-2481217


email:dismuntel AT apdo DOT com
------=_NextPart_000_0004_01BD7F26.CC574C80--