🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #14493

Re: DMA

#14493
From: John Allen
Date: Wed, 19 Nov 1986 16:35
40 lines
2748 bytes
In article <1196@dataio.UUCP> bright@dataio.UUCP (Walter Bright) writes:
>In article <197@oliveb.UUCP> spud@oliven.UUCP (John Purser) writes:
>>In article <1189@dataio.UUCP> bright@dataio.UUCP (Walter Bright) writes:
>>>I am interested in copying pixel data from one page to another on the
>>>IBM EGA. This involves moving 128k bytes of data. Doing it with a
>>>REP MOVSW takes about 1/2 second (on an AT), which is too slow.
>>>Does anyone know
>>>how the DMA channel could be programmed to do this? It is not clear
>>>from the documentation how to program the DMA chip, or even if
>>>it is capable of memory-to-memory transfers.
>>
>>How did you arrive at the time of 1/2 second? The way I figure this
>>it should only take about .05 seconds. According to the 286 programmers
>>referance guide a REP MOVSW takes 5+(4*CX) clocks. In your example that would
>>be 64k words times 4 plus 5 or a total of 262,149 clocks. The clock speed
>>of the AT is 6Mhz so dividing the 262,149 by 6,000,000 leaves us with .045
>>seconds.
>
>I did some checking. First off, the EGA is 8 bit ram, so the 128kb move
>should take .09 seconds. Second, the EGA needs 4 out of 5 memory cycles
>to do refresh, so the copy winds up taking about 1/2 seconds. DMA obviously
>wouldn't help much here.
>
>Also, nobody replied with a method of doing memcpy()s with the DMA.

As you just pointed out, DMA wouldn't help much.  To address the real
question, the INTEL documentation for the 8237 outlines a method for
performing memory to memory block DMA transfers using DMA channels 0
and 1.  I've used block DMA from memory to I/O using one DMA channel,
(as does the FD controller, I believe) and can assure you that this
works just fine.  I would be surprized to hear that the memory to memory
DMA didn't work.  If you still want to give it a try, and need more
help, please send email.

John Allen
=========================================================================
NetExpress Communications, Inc.      seismo!{sundc|hadron}!netxcom!jallen
1953 Gallows Road, Suite 300         (703) 749-2238
Vienna, Va., 22180
=========================================================================
Technical Details
Message-ID: <192@netxcom.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!sundc!netxcom!jallen
References: <1189@dataio.UUCP> <197@oliveb.UUCP> <1196@dataio.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!sundc!netxcom!jallen
From: jallen@netxcom.UUCP (John Allen)
Newsgroups: comp.sys.ibm.pc
Subject: Re: DMA
Message-ID: <192@netxcom.UUCP>
Date: Wed, 19-Nov-86 11:35:36 EST
Article-I.D.: netxcom.192
Posted: Wed Nov 19 11:35:36 1986
Date-Received: Wed, 19-Nov-86 22:25:11 EST
References: <1189@dataio.UUCP> <197@oliveb.UUCP> <1196@dataio.UUCP>
Reply-To: jallen@netxcom.UUCP (John Allen)
Organization: NetExpress Communications Inc. Vienna, Va.
Lines: 40