Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!eurifb!euraiv1!aiv From: aiv@euraiv1.UUCP (Eelco van Asperen) Newsgroups: comp.os.minix Subject: Re: Turbo C and Minix Message-ID: <568@euraiv1.UUCP> Date: Thu, 2-Jul-87 12:19:41 EDT Article-I.D.: euraiv1.568 Posted: Thu Jul 2 12:19:41 1987 Date-Received: Sat, 4-Jul-87 11:07:52 EDT References: <1716@marque.UUCP> <7035@beta.UUCP> Organization: EUR/EF/AIV,PObox 1738,Rotterdam,Neth. Lines: 41 Summary: how to use Turbo C for Minix cross-development In article <7035@beta.UUCP>, myxm@beta.UUCP (Mike Mitchell) writes: > In article <1716@marque.UUCP>, doug@marque.UUCP (harris) writes: > > Having just received my Borland Turbo C (the T shirt is swell:-), > > be misunderstood :--). In particular has anyone used Turbo C > > The answer is yes, however, I am still having problems getting the > kernel to link. I have successfully used the Turbo C to create and > maintain a Minix library of tiny/small memory model routines. When > I compile something using the tiny memory model, everything seems > to work fine. I am still having problems figuring out what the deal > is with the small memory model (separate I&D). But, from what I can > tell, the Turbo C compiler generates code which is much much smaller > than that from the Minix C compiler and a little smaller than the > code from the PC/IX C compiler. Ain't the net a wonderfull thing; this is the problem I solved late last night (this morning really). It turns out that Turbo C uses FAR CALLS (!) for the long-integer routines in the library when you compile for the Small-model; if you however use the Tiny-model (that uses the same library, only with a different startup-file), then Turbo C uses NEAR CALLS as it should. So: compile with the Tiny model (-mt for tcc) and don't worry about the total size. As you can imagine, this took a while to find out; only when I was about to give up, I compiled a test program with the -S option and studied the resulting assembler-code et voila ! If enough people are interested, we could compile a set of diff's for use with Turbo C and post them; let's count the votes.... [praise ast...] Eelco van Asperen Unix Systems Manager -----------------------------------------+------------------------------------- Erasmus University Rotterdam |uucp:mcvax!{eurifb,olnl1}!euraiv1!aiv Fac. of Economics, Computer Science Dept.|earn:asperen@hroeur5 PO.box 1738 / 3000 DR Rotterdam | T H E N E T H E R L A N D S |(this space intentionally left blank) -----------------------------------------+-------------------------------------