home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / std / c / 3435 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.4 KB  |  37 lines

  1. Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!rpi!uwm.edu!cs.utexas.edu!sun-barr!olivea!decwrl!pa.dec.com!engage.pko.dec.com!e2big.mko.dec.com!nntpd.lkg.dec.com!jit345.bad.jit.dec.com!diamond
  2. From: diamond@jit345.bad.jit.dec.com (Norman Diamond)
  3. Newsgroups: comp.std.c
  4. Subject: Re: TMS320C25 AND C
  5. Message-ID: <1993Jan27.020506.22321@nntpd.lkg.dec.com>
  6. Date: 27 Jan 93 02:05:06 GMT
  7. References: <1993Jan26.165328.1@sask.usask.ca>
  8. Sender: usenet@nntpd.lkg.dec.com (USENET News System)
  9. Reply-To: diamond@jit.dec.com (Norman Diamond)
  10. Organization: Digital Equipment Corporation Japan , Tokyo
  11. Lines: 24
  12.  
  13. In article <1993Jan26.165328.1@sask.usask.ca> uttamchandan@sask.usask.ca writes:
  14. >I WNAT TO READ DATA FROM A FILE AND WRITE TO MEMORY ADDRESS SAY 
  15. >BASE_IN=7000..
  16.  
  17. The standard allows integers to be cast to pointers, though the result is
  18. implementation-defined.  Consider something like:
  19.   char *BASE_IN;
  20.   BASE_IN = (char *) 7000;
  21.   fread (BASE_IN, whatever_size, 1, whatever_file);
  22. (Or if you meant 7000 as a hexadecimal address then say 0x7000.)
  23.  
  24. >THEN READ IT .. PROCESS IT... THEN WRITE TO MEMEORY AT BASE_OUT=10000
  25.  
  26.   char some_char;
  27.   char *BASE_OUT;
  28.   BASE_OUT = 10000;
  29.   some_char = *BASE_IN;
  30.   *BASE_OUT = process(some_char);
  31.  
  32. This has been a service of the comp.std-and-homework-server.c newsgroup.
  33. --
  34. Norman Diamond                diamond@jit.dec.com
  35. If this were the company's opinion, I wouldn't be allowed to post it.
  36. Pardon me?  Or do I have to commit a crime first?
  37.