delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/28/01:01:04

From: Vinzent Hoefler <JeLlyFish DOT software AT gmx DOT net>
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: <Pine DOT SUN DOT 3 DOT 91 DOT 1000127191152 DOT 19181C-100000 AT is> <001701bf690e$754e7d40$c71b15c8 AT telecomco DOT net>
Mime-Version: 1.0
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" <jrolon AT alpha DOT telecom-co DOT net> 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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019