[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Low-level vs. High-level programming



In article <bd6g35$tte$1@barad-dur.nas.com>,
White Flame \(aka David Holz\) <whiteflame52@y.a.h.o.o.com> wrote:
 
> "Paul Schlyter" <pausch@saaf.se> wrote in message
> news:bd696r$15en$1@merope.saaf.se...
>>     unsigned int memory_address = <address_of_memory_mapped_HW-device>;
> 
> That's fairly ugly, and isn't guaranteed to work, since there's no
> requirements that ints be as wide as pointers.
 
In such a situation, use a long int instead.....
 
> If memory_address were a void*, it would be quite kosher.
 
Wouldn't help much, since the value of the address would still have
to be specified as a constant, and there are no (void *) constants in C.
 
-- 
----------------------------------------------------------------
Paul Schlyter,  Grev Turegatan 40,  SE-114 38 Stockholm,  SWEDEN
e-mail:  pausch at stockholm dot bostream dot se
WWW:     http://www.stjarnhimlen.se/
         http://home.tiscali.se/pausch/