Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!att!mtunb!dmt From: dmt@mtunb.ATT.COM (Dave Tutelman) Newsgroups: comp.sys.ibm.pc Subject: Re: determination of free memory Keywords: PSP memory MicroSoft_C astart crt0.o Message-ID: <1502@mtunb.ATT.COM> Date: 19 May 89 12:07:31 GMT References: <1875@husc6.harvard.edu> Reply-To: dmt@mtunb.UUCP (Dave Tutelman) Organization: AT&T Bell Labs - Middletown, NJ Lines: 30 In article <1875@husc6.harvard.edu> kiely@lownlab.harvard.edu (James P. Kiely) writes: > >2) In every book I have ever seen, they are very emphatic that a user >process should not change any part of the PSP below offset 4Ch. >The startup code for MicroSoft C (crt0.o , astart:) modifies offset >2 of the PSP. Why does MicroSoft C do this seemingly illegal behavior >and is it indeed illegal?... Because MicroSoft wrote the rules for you, not for themselves :-( Seriously, folks, Microsoft is probably the single biggest violator of the MSDOS rules and programming practices. My job once included some really gut-level system programming in the DOS environment, and our test suite of ill-behaved programs was more than 50% Microsoft. Nobody does as much with their applications to take advantage of the internal implementation of the OS (and even the hardware). Consequently, nobody has as serious problems porting their applications from release to release, nor such problems running their applications on not-quite-clones. (Actually, ALMOST nobody. After all, they are one company, and the applications and OS folks do get a chance to talk to one another before releasing the product.) +---------------------------------------------------------------+ | Dave Tutelman | | Physical - AT&T Bell Labs - Middletown, NJ | | Logical - ...att!mtunb!dmt | | Audible - (201) 957 6583 | +---------------------------------------------------------------+ The opinions herein are mine, not my employer's.