Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site umn-cs.UUCP Path: utzoo!watmath!clyde!burl!we13!ihnp4!stolaf!umn-cs!smith From: smith@umn-cs.UUCP (Richard Smith) Newsgroups: net.lang.forth Subject: Re: Portable Forth for Unix - (nf) Message-ID: <411@umn-cs.UUCP> Date: Wed, 1-Feb-84 21:02:41 EST Article-I.D.: umn-cs.411 Posted: Wed Feb 1 21:02:41 1984 Date-Received: Wed, 8-Feb-84 05:44:58 EST Sender: notes@umn-cs.UUCP Organization: Computer Science Dept., U of Minn, Mpls, MN Lines: 36 #R:bunker:-32100:umn-cs:14200007:000:1546 umn-cs!smith Feb 1 09:46:00 1984 I favor having an assembler with Forth because I occasionally need an assembler. Forth is the only system I know of that allows me to deal with assembler in a reasonable fashion. An assembler in Forth lets you: 1. Work with very small pieces of machine code. It's almost impossible to write small assembler programs in any other environment (i.e. 2 or 3 instructions). You can do all of your I/O on the stack. 2. Experiment with the machine's instruction set. A fine way to learn. 3. Diagnose hardware problems. This isn't as useful on our Berkeley Unix since kumem is broken and Berkeley doesn't handle bus errors nicely. BUT... there's been many a time I've wanted/needed to tweak a device and there's no better device tweaking language than Forth. 4. Build REAL TIME stuff. I'm speaking to you via a 1200bps modem link handled by Forth running on a Z80. Most of the modem handling code is in hi level Forth, of course, but most of the words called by the innermost loop are in Forth assembler. High level Forth just didn't have the speed. The main use I see for Forth on Unix is for hacking around with small algorithms (i.e. a toy). Sure, it provides a nice variable radix calculator, but if I want it to be something more than a toy I need an assembler. Rick. p.s. Arguments that "systems administrators don't want you to execute assembly code" are bogus. If assembly code is a security breach, then you can certainly breach security with most other high level languages, too.