home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / dsp / 3096 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.3 KB

  1. Xref: sparky comp.dsp:3096 comp.lang.c:20185
  2. Path: sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!alan
  3. From: alan@elroy.Jpl.Nasa.Gov (Alan S. Mazer)
  4. Newsgroups: comp.dsp,comp.lang.c
  5. Subject: Re: Is this a Legal Way to Access a Specific Address?
  6. Date: 25 Jan 1993 22:24:03 GMT
  7. Organization: Image Analysis Systems Group, JPL
  8. Lines: 22
  9. Message-ID: <1k1pa3INNnl@elroy.jpl.nasa.gov>
  10. References: <1993Jan23.042626.991@verdix.com> <1993Jan24.171455.9451@bilver.uucp>
  11. NNTP-Posting-Host: cogswell.jpl.nasa.gov
  12. Keywords: DSP, C, ANSI, Fixed RAM
  13.  
  14. In article <1993Jan23.042626.991@verdix.com> scotty@verdix.com (Scott R. Chilcote) writes:
  15. >We're programming a device that has a RAM cache at address 809800H.
  16. >
  17. >Is it legal to address this memory in C as follows?
  18. >
  19. >#define ON_CHIP 0x809800
  20. >
  21. >int main(void)
  22. >{
  23. >
  24. >   float *oc_ptr = (float *) ON_CHIP;
  25.  
  26. Excuse me, but the replies to this are getting silly.  The poster doesn't
  27. have an int.  He has an integer constant.  Moreover, pointer arithmetic
  28. doesn't apply here.  There is no arithmetic.  There is simply an assignment.
  29. What he's proposing is fine.
  30. -- 
  31.  
  32. -- Alan                        # Mountain Dew and doughnuts...
  33.    ..!ames!elroy!alan          # because breakfast is the most important meal
  34.    alan@elroy.jpl.nasa.gov     # of the day.
  35.