Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!ucbvax!agate!bionet!apple!usc!cs.utexas.edu!execu!sequoia!cb From: cb@sequoia.UUCP (Christopher D. Brown) Newsgroups: comp.sys.ibm.pc Subject: Re: HELP: with EGA/VGA page-to-page memory copy Message-ID: <602@sequoia.UUCP> Date: 28 Jul 89 14:13:07 GMT References: <1495@dukeac.UUCP> Reply-To: cb@sequoia.UUCP () Organization: Execucom Systems Corp., Austin, Texas Lines: 31 In article <1495@dukeac.UUCP> tcamp@dukeac.UUCP (Ted A. Campbell) writes: ... > for ( i = 1; i < 10; i *= 2 ) > { > outp( 0x3CE, 0x04 ); /* set read map */ > outp( 0x3CF, i ); /* to plane 'i' */ > outp( 0x3C4, 0x02 ); /* set write map */ > outp( 0x3C5, i ); /* to plane 'i' */ > memcpy( (char *) 0xa0000000, /* copy to here */ > (char *) 0xa8000000, /* from here */ > (size_t) 0x8000 ); /* this many bytes */ > } > >But this doesn't work and I'm not even sure why: some copying is being ... Close. Try the following ... for ( z = 0; z < 4; ++z ) { outp( 0x3CE, 0x04 ); /* set read map */ outp( 0x3CF, z ); /* to plane 'i' */ outp( 0x3C4, 0x02 ); /* set write map */ outp( 0x3C5, 1 << z ); /* to plane 'i' */ memcpy( (char *) 0xa0000000, /* copy to here */ (char *) 0xa8000000, /* from here */ (size_t) 0x8000 ); /* this many bytes */ } chris brown Net: cb!execu@cs.texas.edu Voice: (512) 346-4980