home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / apple2 / gno / 690 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  2.7 KB

  1. Path: sparky!uunet!utcsri!newsflash.concordia.ca!sifon!charnel!jamesb
  2. From: jamesb@ecst.csuchico.edu (James L. Brookes)
  3. Newsgroups: comp.sys.apple2.gno
  4. Subject: Re: cc ...
  5. Date: 21 Dec 1992 21:16:48 GMT
  6. Organization: California State University, Chico
  7. Lines: 43
  8. Message-ID: <1h5c80INN9ba@charnel.ecst.csuchico.edu>
  9. References: <behrenss.724869178@hphalle6> <1992Dec21.160930.1472@r-node.gts.org>
  10. NNTP-Posting-Host: hairball.ecst.csuchico.edu
  11.  
  12. In article <1992Dec21.160930.1472@r-node.gts.org> taob@r-node.gts.org
  13. (Brian Tao) writes:
  14.  
  15. >    Soenke, I tried out your new 'cc' on the agrep (approximate grep) source
  16. >files I downloaded from comp.sources.unix.  Just as an exercise, I unpacked
  17. >all the files and then did 'cc -O -v *.c'.  To my surprise, all the source
  18. >files (about a dozen of them) compiled without a single error under GNO/
  19. >ORCA 1.2, but that's it.  Nothing was linked so I didn't get an 'agrep'
  20. >executable.  I tried 'cc *.o' afterwards (which started to link them),
  21. >but it gave an error about a code segment being larger than a bank.  It
  22. >gave me a 1.2-meg (!) binary anyway.  I can run it, but nothing happens 
  23. >(doesn't crash the machine either).  I should also point out the resulting
  24. >binary is very sparse (only takes up about 80K or so of disk space).
  25. >
  26. >    Is there some flag I should be setting?  Or maybe just get a newer version
  27. >of ORCA?  :)
  28.  
  29. Brian, your problem actually has nothing to do with cc, it's the fault of
  30. Orca/C.  With the current (1.2/1.3) Orca/C, if code size will exceed one
  31. bank (64k) you have to segment the code into managable chunks yourself.
  32. This means inserting a 'segment "BLAH      ";' (always good to pad
  33. the segments to a full 10 chars, makes 'em look more readable on a dump)
  34. at the beginning of the source file.  The code in that source file will
  35. now be placed in a seperate load segment.
  36.  
  37. You also seem to have anther problem, which is a LOT of static space
  38. allocated by agrep.  If you have a 1.2mb binary of which 1.1mb or so
  39. is empty, that means you have a LOT of static space being allocated.
  40. What that means is you need to use the large memory model (#pragma 
  41. memorymodel 1) so you can have arrays and such that are greater than 64k.
  42.  
  43. Hope this helps.
  44.  
  45. >-- Real name: Brian Tao (Dept. of Exobiology, University of Toronto)
  46. >-- Preferred: 90taobri@chasm.scar.utoronto.ca (checked daily)
  47.  
  48. As soon as I finish dmake, porting stuff should be quite a bit easier,
  49. what with dmake and cc ... 
  50. -- 
  51. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  52. |          James Brookes            | Inet: bb252@cleveland.freenet.edu |
  53. |``What, me worry?'' - A. E. Neuman |   jamesb@cscihp.ecst.csuchico.edu |
  54. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  55.