Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Compiling software for OS9 classic and below
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling software for OS9 classic and below



Am 17.02.2007 um 18:47 schrieb m.zeckinger:
i am currently following the ruby mailinglist where i found a post
about if the ruby interpreter can be compiled to run on mac os 9 (see
http://www.ruby-forum.com/topic/98122 )
this made me think about how to compile software for classic os9 and
below (os 8.6 and so on)
can this be generally done? how would unix-based applications like the
ruby interpreter be ported to os9? is there any documentation out
there? which compilers to use?

There's generally two compilers for Classic MacOS: Metrowerks CodeWarrior and Apple's Macintosh Programmer's Workshop (MPW) (there were others before that, like Think C, Lightspeed C etc., but they pretty much got killed around System 7). MPW may still be available from Apple's web site and is a sort of Terminal + text editor + compiler toolchain. Very unixy, but not a straight port (it follows Unix principles, but it's different from all shipping unixes, eventually).


Note that MacOS 9 doesn't really support POSIX, nor does it have a command line or command-line tools. There are no command-line parameters that you can pass to an application, no pre-emptive scheduling, no memory protection, hardly any virtual memory to speak of... So, you'll need to write your own POSIX wrappers (CodeWarrior includes some of those), and you'll need to write a Classic MacOS application and create a real GUI using ResEdit or use some library like SIOUX that gives you a window with a text field so you can pretend you're using a terminal with input/output.

You can guess that the pre-OS X MacOSs are very different from Unixes, so be prepared to do a lot of work. Another issue is their age: Depending on what compiler you choose and what system version you want to deploy to, you may get a rather incomplete implementation of the C++ standard, simply because the C++ standard was still being worked on at that time.

Also, just as one has PowerPC and Intel today, back then there was 680x0 and PowerPC ("fat binaries"), so you'll have to learn about a lot of 68k compatibility code like Universal ProcPointers etc. You've got a steep learning curve ahead of you. Have fun! :-)

Cheers,
-- M. Uli Kusterer
http://www.zathras.de



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Student-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Compiling software for OS9 classic and below (From: "m.zeckinger" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.