🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.dsp
Article #2117

Re: Is this a Legal Way to Access a Specific Address?

#2117
From: Alan S. Mazer
Date: Mon, 25 Jan 1993 22:24
22 lines
1320 bytes
In article <1993Jan23.042626.991@verdix.com> scotty@verdix.com (Scott R. Chilcote) writes:
> 
>We're programming a device that has a RAM cache at address 809800H.
>
>Is it legal to address this memory in C as follows?
>
>#define ON_CHIP 0x809800
>
>int main(void)
>{
>
>   float *oc_ptr = (float *) ON_CHIP;

Excuse me, but the replies to this are getting silly.  The poster doesn't
have an int.  He has an integer constant.  Moreover, pointer arithmetic
doesn't apply here.  There is no arithmetic.  There is simply an assignment.
What he's proposing is fine.
-- 
 
-- Alan                        # Mountain Dew and doughnuts...
   ..!ames!elroy!alan          # because breakfast is the most important meal
   alan@elroy.jpl.nasa.gov     # of the day.
Technical Details
Message-ID: <1k1pa3INNnl@elroy.jpl.nasa.gov>
Path: arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!alan
References: <1993Jan23.042626.991@verdix.com> <1993Jan24.171455.9451@bilver.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!alan
From: alan@elroy.Jpl.Nasa.Gov (Alan S. Mazer)
Newsgroups: comp.dsp,comp.lang.c
Subject: Re: Is this a Legal Way to Access a Specific Address?
Date: 25 Jan 1993 22:24:03 GMT
Organization: Image Analysis Systems Group, JPL
Lines: 22
Message-ID: <1k1pa3INNnl@elroy.jpl.nasa.gov>
References: <1993Jan23.042626.991@verdix.com> <1993Jan24.171455.9451@bilver.uucp>
NNTP-Posting-Host: cogswell.jpl.nasa.gov
Keywords: DSP, C, ANSI, Fixed RAM