X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "philippe meynard" Newsgroups: comp.os.msdos.djgpp Subject: Re: Accessing absolute address above 1MB Date: Wed, 8 Nov 2006 10:02:52 +0100 Organization: Guest of France Telecom's news reading service Lines: 34 Message-ID: References: <1162915098 DOT 476438 DOT 52420 AT k70g2000cwa DOT googlegroups DOT com> <4550adea DOT sandmann AT clio DOT rice DOT edu> <1162922909 DOT 133028 DOT 98340 AT f16g2000cwb DOT googlegroups DOT com> NNTP-Posting-Host: 62.161.106.155 X-Trace: s1.news.oleane.net 1162976573 5143 62.161.106.155 (8 Nov 2006 09:02:53 GMT) X-Complaints-To: abuse AT oleane DOT net NNTP-Posting-Date: Wed, 8 Nov 2006 09:02:53 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-RFC2646: Format=Flowed; Original X-Antivirus: avast! (VPS 0646-2, 07/11/2006), Outbound message X-Antivirus-Status: Clean To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com To map a physical device to linear memory you must do : _dpmi_meminfo info; ADDR=your physical adresse of device here 0x3FF00000; info.address=ADDR; info.size=size access of device (exemple frame buffer video 8 Mb) if(__dpmi_physical_adress_mapping(&info)==-1){ printf("Physical mapping of address 0x%x failed!\n",(unsigned int)ADDR); } ADDR1=ADDR+ __djgpp_conventionnal_base; //is the virtual adress to access device exemple: *ADDR1=15; //a white pixel on screen "James" a écrit dans le message de news: 1162922909 DOT 133028 DOT 98340 AT f16g2000cwb DOT googlegroups DOT com... >I tried that and still receive the same error message. > > Charles Sandmann wrote: >> > I am trying to access the memory address 0x3FFF0000 in DOS using dpmi. >> .. >> > buffer[0] = _farpeekb(selector, mi.address); >> >> mi.address should be 0 here, since the offset is built into the selector >> you just set up >