From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: Re: fread into mapped memory Date: Fri, 07 Mar 2003 10:22:36 CST Organization: Rice University, Houston TX Lines: 22 Message-ID: <3e68c74c.sandmann@clio.rice.edu> References: <17824N256 AT web2news DOT com> NNTP-Posting-Host: clio.rice.edu X-Trace: joe.rice.edu 1047054257 15134 128.42.105.3 (7 Mar 2003 16:24:17 GMT) X-Complaints-To: abuse AT rice DOT edu NNTP-Posting-Date: 7 Mar 2003 16:24:17 GMT X-NewsEditor: ED-1.5.9 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > OK, a while ago, I was making SVGA routines using > __djgpp_nearptr_enable() for linear frame buffers. But now I've > decided, for compatibility with Windows 2000 and XP I'll remake them and > map the linear frame buffer with __dpmi_physical_address_mapping and > __dpmi_allocate_ldt_descriptors. > One thing though. For a fast BMP routine, I'd copy data directly from > the file to the screen. But I can't do that if I map the memory right? > I mean, I know I could probably do something, like make a buffer, copy > the picture to that, and then copy data from the buffer to the screen, > but is there a way I could fread or in any other way copy data from a > file to a mapped memory location? Thanks. The extra memory copy is very fast and unlikely to be worth any effort to fix. But if you want to do this, you would need to make a copy of the library _read() procedure - and see that you want to copy directly from the DOS memory area with one selector to the screen area with a second selector.