Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!mordor!sri-spam!sri-unix!hplabs!decwrl!decvax!tektronix!uw-beaver!uw-june!entropy!dataio!bright From: bright@dataio.UUCP (Walter Bright) Newsgroups: comp.sys.ibm.pc Subject: Re: DMA Message-ID: <1196@dataio.UUCP> Date: Thu, 13-Nov-86 16:02:20 EST Article-I.D.: dataio.1196 Posted: Thu Nov 13 16:02:20 1986 Date-Received: Sun, 16-Nov-86 20:09:57 EST References: <1189@dataio.UUCP> <197@oliveb.UUCP> Reply-To: bright@dataio.UUCP (Walter Bright) Organization: Data I/O - FutureNet Corp., Redmond, WA Lines: 23 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.