From: Vinzent Hoefler Newsgroups: comp.os.msdos.djgpp Subject: Re: DMA access Date: Thu, 27 Jan 2000 22:24:52 +0100 Organization: JeLlyFish software Lines: 23 Message-ID: <86qd48$uq$1@news03.btx.dtag.de> References: <001701bf690e$754e7d40$c71b15c8 AT telecomco DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news03.btx.dtag.de 949008328 986 777000109768-0001 000127 21:25:28 X-Complaints-To: abuse AT t-online DOT de X-Sender: 777000109768-0001 AT t-dialin DOT net X-Newsreader: Forte Agent 1.7/16.534 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Julian Rolon" wrote: >I am very confused cause function is returning segments like 1FC2 and i need >to pass physical address to a chip, so what is the physical addres of a >segment like this?? Real memory adressing mode: Segment*16+Offset = physical address (offset is zero you can ignore that and this turns into a simple *16 = <<4) So a macro like this would be perfect: #define PHYSICAL_ADDRESS(realseg) realseg<<4 Vinzent. -- Real programmers don't comment their code. It was hard to write, it should be hard to understand.