delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/09/08:10:41

From: "Michael Schuster" <Schuster AT eev DOT e-technik DOT uni-erlangen DOT de>
Organization: LS f. Elektr. Energieversorgung
To: djgpp AT delorie DOT com
Date: Thu, 9 May 1996 14:00:19 MEZ
Subject: How to program DMA
Message-Id: <1C660601A1@merlin2.e-technik.uni-erlangen.de>

Hi !

I don't know if this is a stupid question or if I'm just stupid, but 
I really want to know: 
How can I program a Direct Memory Acess (DMA) Transfer from 
an I/O card to my DJGPP V2 C/C++ programm? The I/O card 
is in an ISA slot, and has to transfer 24 byte to my programm with a 
frequency of 36 kHz.

I know, I could also make this with an interrupt-handler, as the FAQ 
says:

"  When your program runs under a DPMI host, hardware interrupts are
   always passed to protected mode first ... However, if the interrupts
    happen at a high frequency (say, more than 10 KHz), then the
   overhead of the interrupt reflection from real to protected mode might
    be too painful, and you might consider installing a real-mode interrupt 
   handler in addition to the protected-mode one. "

So, if I am in the protected mode with the DPMI host, why is it faster 
to switch to the realmode and get there the interrupt? Or don't I 
understand that properly.

Michi

- Raw text -


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