Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!athena.mit.edu!vpsingha From: vpsingha@athena.mit.edu (Vivek P. Singhal) Newsgroups: comp.windows.ms Subject: Re: multiple SEGMENTS, i need to split up my code Keywords: segments Message-ID: <8428@bloom-beacon.MIT.EDU> Date: 13 Dec 88 08:43:08 GMT References: <14349@genrad.UUCP> <8392@bloom-beacon.MIT.EDU> <14484@genrad.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: vpsingha@athena.mit.edu (Vivek P. Singhal) Organization: Massachusetts Institute of Technology Lines: 24 In article <14484@genrad.UUCP> cig@genrad.UUCP (Charles I. Ganimian Jr.) writes: > I need to use sprintf, atoi, etc and these i cannot modify > in a rational manner so that they are far functions. What can > I do ... I want to stay with the small model and I am at > a point where I can't move forward until I can fix this According to Petzold (on page 292): "As you can see, this mixed-model approach is more of a headache than the medium-model approach. It requires that you figure out which functions must be declared far and which can be near. It has an additional problem: You can call normal C library routines from only one segment -- the segment that gets the default segment name _TEXT when you compile without the -NT switch." Consequently, its seems that you can use the the standard library functions only from the main object file when using the mixed memory model. You might be able to use the medium model and call the library functions from anywhere, but I haven't tried it. Vivek _____________________________________________________________________________ | Vivek Singhal: vpsingha@athena.mit.edu 474 Memorial Drive | | vivek@newt.lcs.mit.edu Cambridge, MA 02139 | | (617) 225-7576 (617) 621-0405 |