🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #13387

Re: multiple SEGMENTS, i need to split up my code

#13387
From: Dennis Foster
Date: Fri, 16 Dec 1988 21:02
27 lines
1702 bytes
In article <14484@genrad.UUCP> cig@genrad.UUCP (Charles I. Ganimian Jr.) writes:
>
>	thanks, I knew about making my functions FAR and I will do
>	that but the real problem is the C runtime library functions.
>
>	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
>
>

It sounds like what you want is to use medium model featues in the
small memory model!  Why not just switch to the medium model.  It
really is the best for writing all but the most simple windows
applications.

In using the medium model for windows apps,
you should make all functions called from outside their module of
definition FAR (they will be by default) and all functions that are
called only within the module they are defined in NEAR (it's even
better to make them static NEAR so that you don't accidently call
them from somewhere else).  Link to the medium model versions of
the windows libraries and all your runtime calls will then work
(from whatever segment the call was located in).

Does this help?
Technical Details
Message-ID: <1706@se-sd.sandiego.ncr.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ncrlnk!ncr-sd!se-sd!dennis
References: <14349@genrad.UUCP> <8392@bloom-beacon.MIT.EDU> <14484@genrad.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ncrlnk!ncr-sd!se-sd!dennis
From: dennis@se-sd.sandiego.ncr.com (Dennis Foster)
Newsgroups: comp.windows.ms
Subject: Re: multiple SEGMENTS, i need to split up my code
Keywords: segments
Message-ID: <1706@se-sd.sandiego.ncr.com>
Date: 16 Dec 88 21:02:42 GMT
References: <14349@genrad.UUCP> <8392@bloom-beacon.MIT.EDU> <14484@genrad.UUCP>
Reply-To: dennis@se-sd.sandiego.NCR.COM (Dennis Foster(AEP))
Organization: NCR Corp. Systems Engineering, San Diego
Lines: 27