Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!ddl From: ddl@husc6.UUCP (Dan Lanciani) Newsgroups: comp.os.minix Subject: Re: Turbo C and Minix Message-ID: <2429@husc6.UUCP> Date: Tue, 30-Jun-87 19:39:08 EDT Article-I.D.: husc6.2429 Posted: Tue Jun 30 19:39:08 1987 Date-Received: Wed, 1-Jul-87 07:13:45 EDT References: <1716@marque.UUCP> <7035@beta.UUCP> Organization: Harvard University Computer Services Lines: 26 In article <7035@beta.UUCP>, myxm@beta.UUCP (Mike Mitchell) writes: > 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). The problem with the small (or any non-tiny) model is that all the helper functions in the C library are invoked with non-relocatable, FAR calls. The tiny model substitutes a push of CS followed by a NEAR call to the same routine. One way around this is to generate .ASM files and run an editor script to change all the FAR calls either to the push CS/NEAR call sequence or simply to a NEAR call. In the latter case it will be necessary to edit the helper functions to use NEAR retruns. Now, the really interesting thing is that there appears to be NO difference between small and tiny model other than those NEAR/FAR calls. The actual control of segment grouping happens in the startup file. This means you can compile for tiny model and still generate split I&D programs at link time. (Aren't segments wonderful :-) I used this method and an appropriately hacked startup file to compile my (non-MINIX) split I&D kernel (normally compiled with MSC) and it worked fine. The code was a few K bigger than the MSC version, incidentally. Dan Lanciani ddl@harvard.*