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