Xref: utzoo comp.sys.ibm.pc:38857 comp.sys.mac:43019 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!aecom!werner From: werner@aecom.yu.edu (Craig Werner) Newsgroups: comp.sys.ibm.pc,comp.sys.mac Subject: Mac 32K segmentation and program porting. Message-ID: <2627@aecom.yu.edu> Date: 28 Nov 89 02:29:59 GMT Followup-To: comp.sys.ibm.pc Distribution: na Organization: Albert Einstein Coll. of Med., NY Lines: 26 I have the unenviable task of porting a program I wrote under Unix to microcomputers. It is a simple program. Basically, it takes stdin, digests it based on command line arguments, and sends it to stdout. Porting from Unix to MSDOS involved changing several ints to long ints, and that was it. I expected some trouble going to the Mac (such as lack of stdin, a command line, and stdout) but I am absolutely stumped by the first glitch, and that is the "code segment too big" error. Apparently, the Macintosh operating system limits code segments to 32K. I've heard of segment complaints with the Intel architecture, but in that case it is the compiler's worry, not mine. The THINK C documentation is extremely unenlightening in how to get around this. So I appeal to those who may have done this before. What is the easiest way to split a program so that all the code segments are acceptable to the Macintosh. I'm asking for quick and dirty guidelines, shortcuts and tricks. Surely somebody in one of these groups has made the transition before. I don't want to become a Macintosh programmer. I just want to make a program work. -- Craig Werner (future MD/PhD, 4.5 years down, 2.5 to go) werner@aecom.YU.EDU -- Albert Einstein College of Medicine (1935-14E Eastchester Rd., Bronx NY 10461, 212-931-2517) "Someone write me a letter. I need to know that I'm still alive."