home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / forth / 3757 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  2.6 KB

  1. Path: sparky!uunet!spool.mu.edu!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!chalmers.se!news.chalmers.se!dtek.chalmers.se!d7stfax
  2. From: d7stfax@dtek.chalmers.se (Stefan Axelsson)
  3. Newsgroups: comp.lang.forth
  4. Subject: Re: Forth for Sparc and other Unix based computers
  5. Message-ID: <d7stfax.726166712@dtek.chalmers.se>
  6. Date: 4 Jan 93 16:58:32 GMT
  7. References: <1htmebINN819@bang.hal.COM> <1i20irINNecr@life.ai.mit.edu> <BEVAN.93Jan1223716@panda.cs.man.ac.uk> <1i7l8oINNcgj@life.ai.mit.edu>
  8. Sender: news@news.chalmers.se
  9. Organization: Chalmers University of Technology, Gothenburg Sweden
  10. Lines: 41
  11. Nntp-Posting-Host: hacke6.dtek.chalmers.se
  12. X-Newsreader: NN version 6.4.19
  13.  
  14. mikc@hal.gnu.ai.mit.edu (Mike Coughlin) writes:
  15.  
  16. [Discussion about SPARC native code forth vs C version deleted]
  17.  
  18. >     Right, its not native code. But the trouble is that the SPARCstation
  19. >is a Unix box. And Unix works with C. So if you want a native code
  20. >anything on a Unix box you'll have trouble with the documentation. The
  21. >documentation tells you how to write C programs, but finding what you
  22. >need for native code from an assembler is not easy. 
  23.  
  24. Hmm, what *exactly* do you mean by "finding what you need for native
  25. code from an assembler?" I've just started to look into SPARC
  26. assembler, since I didn't have any experience with RISC based
  27. processors. I found some info in Sun's manuals, some in "Structured
  28. computer organization" by Tanenbaum, and some from a friend who had
  29. just started on a SPARC compiler for Lazy ML.
  30.  
  31. But my main source of information about how to program our SUN
  32. SLC/ELCs came from the C compiler. Every Unix C compiler I've come
  33. across have an option to show the generated assembly file, and careful
  34. study of selected example C programs often reveal all there is to know
  35. about assembly programming that machine, such as procedure calling
  36. conventions and the like.
  37.  
  38. This all assumes that we want a native code forth that uses the
  39. underlying operating system. I you really want to code the naked iron
  40. of the current crop of Unix workstations you are, as you state, on
  41. your own. (As the Linux project has shown not even the PC/AT
  42. architecture is very well documented when you skip beyond the BIOS
  43. level.) I think the original question stated however, that the forth
  44. should run in a "window," or something, I interpret that as he wanted
  45. a native code forth, that used the OS.
  46.  
  47. The reason I think forth in C is the way people have gone is that that
  48. is the portable way to do it across all sorts of workstation
  49. platforms. If anyone knows better please enlighten us.
  50.  
  51. Regards,
  52. --
  53. Stefan Axelsson,            Chalmers University of Technology,
  54. d7stfax@dtek.chalmers.se        Sweden
  55.