home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!elroy.jpl.nasa.gov!elroy!brad
- From: brad@tazboy.jpl.nasa.gov (Brad Pickering)
- Subject: Re: Sozobon C - a free C for the Mac, too?
- In-Reply-To: ngse18@castle.ed.ac.uk's message of 29 Dec 92 16:32:46 GMT
- Message-ID: <BRAD.92Dec29112739@tazboy.jpl.nasa.gov>
- Followup-To: comp.sys.mac.programmer
- Sender: news@elroy.jpl.nasa.gov (Usenet)
- Nntp-Posting-Host: tazboy.jpl.nasa.gov
- Organization: Jet Propulsion Laboratory, Pasadena, CA
- References: <29848@castle.ed.ac.uk>
- Distribution: comp
- Date: Tue, 29 Dec 1992 19:27:39 GMT
- Lines: 37
-
- I think this is a great idea. In fact, this is sort of what I have been
- playing with for the past couple of weeks. What I want to do is emulate
- TOS (the atari OS) on the mac so that all of the atari tools can work
- on the mac with no changes. I started with the source to MiNT and
- compiled it under Think C tweeking it quite a bit so that it wouldn't
- trample the mac os. So far I have been able to run some very simple
- programs like 'echo' and 'cp'. I still have lots of problems with
- more complicated programs like 'sh'. I am especially having difficulty
- with the fork calls. It has something to do with the code I modified
- so that all processes would run in supervisor mode. Any way, I just
- ordered a book on the 68040 so that I could investigate running user
- level code on my mac.
-
- Assuming we got something like this running, we could use the same sort
- of techniques that MacMINIX uses to write mac code useing a regular
- K&R compiler. In mac minix, mac traps are interfaced by code that loads
- the appropriate a5 from a global variable before calling the trap.
- Instead of pc relative code generation like most mac compilers, atari
- compilers generate relocation information so that it can be relocated
- at execution time. On the mac, we could have the first routine be
- a pc relative routine that loads and relocates the TOS formatted exectable
- from a resource. One of the biggest problems with this is in debugging.
- Macsbug expects the names of routines to be imbedded into the code at
- the end of each routine. Sozobon C doesn't put this information in
- the code, so bugs are much more difficult to track down.
-
- My opinion is that the goal of getting Sozobon C generating Mac Programs
- is very doable. I am very curious about what the atari people think
- about this. Are there any atari people out there who know a bit about
- TOS, MiNT, and/or Sozobon C who wouldn't mind a few questions from
- some mac people.
-
- Anyway, theres my comments. I would certainly like to see this discussion
- continue.
-
- Brad Pickering
-
-