Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!pshuang From: pshuang@athena.mit.edu (Ping-Shun Huang) Newsgroups: comp.lang.pascal Subject: Re: Turbo Pascal for UNIX platforms? Message-ID: Date: 21 Jun 91 20:05:31 GMT References: <1983@svin02.info.win.tue.nl> <8066@uklirb.informatik.uni-kl.de> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 28 In-Reply-To: kirchner@informatik.uni-kl.de's message of 19 Jun 91 07:43:13 GMT In article <8066@uklirb.informatik.uni-kl.de> kirchner@informatik.uni-kl.de (Reinhard Kirchner) writes: > It may run if it only uses the standard subset of the language, but it > is nearly impossible to write a nontrivial program on a pc without using > these extensions ( think about 64k limitations ) I agree that code written in Turbo Pascal on Intel platforms would not easily port to UNIX systems for various reasons, but I don't think this would be one of the worst problems. TP's solution for 64Kb code segments is to implement units; on UNIX systems, a TP-compatible compiler would simply compile *ALL* calls as being to 32-bit addresses, whereas the current DOS versions are supposed to be generating 16-bit calls internally to units and 32-bit calls between units. Heck, the DOS compiler could move to 32-bit calls also (thus implementing what C usually calls the large model without any problems) in my opinion, unless the programmer did something silly like count on the size of the pointers. As for the 64Kb limit on data object sizes, programmers were left to their own devices, which usually meant that these objects were broken up into pieces which are less than 64Kb. When you move to a linear memory model on UNIX, the broken-up method is less efficient but should still work. I would like to hear anyone's comments as to whether my understanding on this matter is correct, or whether I have left out something important. -- Above text where applicable is (c) Copyleft 1991, all rights deserved by: UNIX:/etc/ping instantiated (Ping Huang) [INTERNET: pshuang@athena.mit.edu]