home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20387 < prev    next >
Encoding:
Text File  |  1992-12-29  |  2.5 KB  |  53 lines

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