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