VOLUME IV, NUMBER 6 $2.50

INSIDE:

TEACHING FORTH I FORTH as a Teaching Language ...... Albert S. Woodhull, Ph.D ...... 5 . Teaching FORTH on a VAX ...... Vernor Vinge ...... 8

FEATURES: Algebraic Expression Evaluation in FORTH ... Michael Stolowitz ...... 14

DEPARTMENTS: Letters ...... 3 Standards Corner ...... Robert 1. Smith ...... 12 . A Techniques Tutorial; Meta Compiling I ..... Henry Laxen ...... 19 L New Products/Reviews ...... 22 . Technotes ...... 25 FIGChapter News ...... 29 J

1 4 i

I i

I I i

i TEACHING FORTH : j i L 8080/280 FIG-FORTH for CP/M & CDOS systems FULL-SCREEN EDITOR for DISK & MEMORY $50 saves you keying the FIG FORTH model and many published FIG FORTH screens onto diskette and debugging them. You receive TWO diskettes (see below for formats available). The first disk is readable by Digital Research CP/M or Cromemco CDOS and contains 8080 source I keyed from the published listings of the FORTH INTEREST GROUP (FIG) plus a translated, enhanced version in ZILOG 280 mnemonics. This disk also contains executable FORTH.COM files for Z80 & 8080 processors and a special one for Cromemco 3102 terminals. The 2nd disk contains FORTH readable screens including an extensive FULL-SCREEN EDITOR FOR DISK & MEMORY. This editor is a powerful FORTH software development tool featuring detailed terminal profile descriptions with full cursor function, full and partial LINE-HOLD LINE-REPLACE and LINE- OVERLAY functions plus line insert/delete, character inserVdelete, HEX character display/update and drive-track-sector display. The EDITOR may also be used to VIEW AND MODIFY MEMORY (a feature not available on any other full screen editor we know of.) This disk also has formatted memoryand I/O portdump words and many items published in FORTH DIMENSIONS, including a FORTH TRACE utility, a model data i' base handler, an 8080 ASSEMBLER and a recursive decompiler. The disks are packaged in a ring binder along with acomplete listing of the FULL-SCREEN EDITOR and a copy of the FIG-FORTH INSTALLATION MANUAL (the language model of FIG-FORTH, a complete glossary, memory map, installation instructions and the FIG line editor listing and instructions). This entire work is placed in the public domain in the mannerand spirit of the work upon which it is based. Copies may be distributed when proper notices are included. USA Foreign 0 FIG-FORTH & Full Screen EDITOR package AIR Minimum system requirements: 80x24 video screen w/ cursor addressability 8080 or 280 or compatible cpu CP/M or compatible wl32K or more user RAM Select disk format below, (soft sectored only)...... $50 $65 0 8" SSSD for CP/M (Single Side, Single Density) Cromemco CDOS formats, Single Side, S/D Density 0 8" SSSD 0 8" SSDD 0 5%'' SSSD 0 5%" SSDD Cromemco CDOS formats, Double Side, S/D Density 0 8" DSSD 0 8" DSDD 0 5%" DSSD 0 5%" DSDD Other formats are being considered, tell us your needs. 0 Printed 280 Assembly listing w/ xref (Zilog mnemonics) ...... $15 $18 0 Printed 8080 Assembly listing ...... $15 $18 TOTAL $- - Price includes Dostaqe. No Durchase orders without check. Arizona residents add sales tax. Make check or money order in US Finds on US bank, payable to: Dennis Wilson c/o Aristotelian Logicians 2631 East Pinchot Avenue Phoenix, AZ 85016 (602) 956-7678

FORTH Dimensions 2 Volume d .rc 6 er is flexible and moveable, starting sounds misleading, a FORTH that letters .... above the dictionary (like PAD), and runs as its own operating system does ending just below DOS itself (or wher- not run in some other operating sys- Yes on Operating Systems ever you tell it to end). tem, it replaces it. Similarly it doesn’t In William Graves’ FORTH I1 for need “an entire and separate disk all Dear FIG, the Apple 11, programs are saved to itself.’9-Editor On the subject of operating systems through DOS with the command and FORTH, I must admit that I DWRITE and returned to the buffer More! much prefer Dr. Delwood’s or Mr. with the command DREAD. You com- Dear FIG, Arkley’s approach of using the operat- pile an application with the command After having received volume IV of ing system that you are currently run- LOAD (nothing on the stack), which FORTH Dimensions we would like to ning in, rather than creating an entire LOADS the entire buffer. Alternately, purchase the three previous volumes. new one in FORTH. They are right- you can load directly from the disk This is an excellent publication! operating systems are designed to with the command DLOAD. Standard Richard Beers manipulate files; let them! This solves DOS commands are prefaced with the Alpha Computer Services several problems that have arisen in word DOS: (i.e. DOS CATALOG). Virgin Islands that FORTH would no longer need to What could be simpler? You can insert have an entire and separate disk all to a file into another file, thus allowing itself, nor would it necessarily be cut you to save small files of standard ap- No Point in Fixed Thinking plications (as you now do screens) that off from the wealth of utilities that Dear FIG, have been developed in almost any would be useful in many programs, or There exists a hardware trend which operating system. Why should the user you can DLOAD a file directly from is possibly making the “Philosophy of have to worry about (and remember!) another file (a file can even DLOAD itself!?!). Fixed Point” obsolete. which screens contain which things. I recently purchased from FORTH, Everyone I know has a sequence of These structures do not sully or defile FORTH, or turn it into some- Inc.; Polyforth 2 with 8087 support blocks off somewhere that are set for my IBM PC. Polyforth uses the aside for a listing and description of thing it Was Never Meant To Be. Rather, these file systems are just 8087 register stack as an extra FORTH what is where on this disk. What is the stack. I believe that this efficient use difference between having to list that another example of the tremendous of the 8087 architecture makes 4 block and just typing “DIR” or versatility and extensibility of FORTH an unbeatable number ‘‘CATALOG? ” FORTH. This is already being done to some I think it would not be out of line Continued extent. There are versions of FORTH for the Standards Committee to look that set aside a file under CP/M that into adding words like those above to contains all the screens, thus allowing a future release of FORTH, not as a FORTH to co-exist on a standard replacement to blocks, but as an alter- FORTH Dimensions CP/M disk (though not to interact native. It would make FORTH very Published by FORTH Interest Group with other things on that disk), ver- little less dependent than it now is- Volume IV, No. 6 sions of FORTH that contain screens just as certain words (KEY, EMIT, March/April 1983 for saving and retrieving files under ?TERMINAL, etc.) must change from Editorial the operating system of that particular installation to installation, so to would Leo Brodie machine, etc. these words need to change. Publisher The lack of a block-oriented file is, FORTH will never really gain ac- Roy C. Martens in my opinion, not a big problem. The ceptance in the Real World if you have IISpesetting/Production standard block structure is nice for to tell people they have a choice: they LARC Computing, Inc. many things, but a real pain for can either use FORTH with their hard others. There is no reason that it could disk, or everything else in the world. FORTH Dimensions solicits editorial not co-exist peacefully with the oper- Please keep up the excellent work! material. comments and letters. No re- ating system’s file structure. Then you The only complaint I have is that sponsibility is assumed for accuracy of could use whichever one best suited FORTH Dimensions comes out far material submitted. Unless noted other- wise, material published by the FORTH your needs at the time. Applications too infrequently to suit me! Interest Group is in the public domain. are created as standard DOS files, Nick Francesco Such material may be reproduced with which are read into a buffer area for Rochester, New York credit given to the author and the editing. One of the primary benefits of FORTH Interest Group. this is that you are not limited to an While I personally prefer “native Subscription to FORTH Dimensions is free with membership in the FORTH I artificial 1K range for a definition, so FORTH” directly controlling disk and Interest Group at $15.00 per year you can spread it out as much as you other systems, I agree that running un- ($27.00 foreign air). For membership, like, indenting and commenting to der an operating system can be useful. change of address and/or to submit material, the address is: FORTH Inter- your heart’s content. The resulting I definitely agree to the need for stan- est Group, P.O. Box 1105, San Carlos, readability lays to rest forever the dardization, but this is unlikely to CA 94070. argument that FORTH code is un- come from the Standards Team for a readable to the uninitiated. This buff- good long while. Just to clear up what

FORTH Dimensions 3 Volume IV, No. 6 Letters ... (Continued) cruncher. Consider the following ex- who haven’t got those back issues and having seen Mr. Cholmondeley’s work ecution times that I measured. don’t possess a word processor must (IIIM), I repeated a lot of it. My ex- SWAP 23 microsec. find them. . .Your life may depend on perience, however, indicates that a * 47 microsec. it if you ever have to write anything FORTH-based microassembler is the FSWAP 14 microsec someday. The week it took to translate only thing that makes sense for this F* 24 microsec Brodie’s code into FORTH-77 for my sort of work if you haven’t got AMD’s The floating point numbers are 64 homebrew word-addressing machine System 29 or such. I had to write bit (80 internal to the 8087). Besides was damn well worth it! about 256 x 40 of microcode and had being fast, by storing floating point Don Colburn’s letter (IV/4) was ex- access to a 2-80 CP/M system and numbers on a stack that is separate cellent. One thing he missed, tho. As I 8080 fig-FORTH. Despite some has- from the stack on which integers are have pointed out in Guy Kelly’s group sels over having to say SMUDGE after stored, a major programming incon- (The San Diego FIG Chapter), people CREATE, I was able to produce as- venience is avoided, i.e. there are no who promulgate “standards” should sembly listings and PROM dumps in operations between the two numerical call them “alleged standards,” as in Intellec format for the PROM blaster types so putting both on the same “IEEE-488 Alleged Standard.” The in about 24 hours work-which in- stack requires excessive stack existence of FORTH standards, ala cluded coding up the microassembler manipulation. FORTH-79 or FORTH-83 does not from scratch! The performawe Clearly, in view of the above results, necessarily mean compatibility. That brought frowns of dismay from the a fixed point philosophy is already would be nice, but it doesn’t stand up PASCAL- and C-freaks around the completely inappropriate with an 8087 in the real world. As EFUG pointed shop. equipped machine. Now the question out to the Standards Committee, peo- Glenn A. Toennes arises whether in ten years or so most ple do (but apparently not in the U.S.) DECOM Systems, Inc. microcomputers will be equipped with implement FORTH on other than San Marcos, California similar numeric processors. If so, and machines that address 8-bit bytes. A no floating point FORTH standards casual glance at FORTH-79 or the are in vogue at that time, FORTH will draft FORTH-83, however, shows Thanks for your thoughts. Regard- ing the flag setting words, Laxen spec- remain an unpopular number crunch- that a “Standard System” is effective- ing language in spite of its potential ly impossible on a machine that has ifically recommended your proposed superiority in this regard. I therefore other than 8-bit addressing granular- definitions in his article, except he recommend that you fixed point phi- ity! The FORTH community must called them SET and RESET. As for 1. losophers revise your thinking. realize that “standards” should serve me, in this particular application I Steven A. Ruzinsky primarily as a medium of exchange. find T ?ESC ! to be quite readable, Cicero, Illinois The very nature of FORTH and its and also more symetric with ?ESC @. applications dictate this. This has The real problem is FORTH’S use of @ and 1. -Editor Potpourri always been a sore point with me. Dear FIG, When I was exposed to FORTH ini- First off, I must compliment Leo tially, it was a word-addressing sys- Brodie on his superb QTF application tem. I liked it better that way. Kansas Canvass (IV/3 and IV/4) upon which I am Laxen’s article on choosing names Dear FIG, composing this!!! Those new members . . .Both he and Brodie missed an im- I would like to locate some FIG portant point. This is especially true if members in the Eastern Kansas area. you look at the source for the QTF According to your FIG chapter listing Editor where flags are being set and from Vol. IV, No. 4 there is only one Renew cleared all over the place. Beyond: chapter in Kansas and it is a special in- Your terest group (Nova Group). If you 1 CONSTANT T(RUE) would publish this letter maybe a few Subscription 0 CONSTANT F(ALSE) members in my area would like to start They missed: a chapter. It sure would be nice to talk with someone else interested in To :ON TSWAP!; FORTH. As far as I know I’m the :OFFF SWAP!; only FIG member east of Wichita. FORTH Which gives: Also Vol. IV, No. 4 was quite inter- esting. I received the issue just as I was Dimensions ! : ESCAPE PESC ON ; developing a piece of telecommunica- tions test gear in my job. Some of the Which makes much more sense than: ideas will save me at least 2K of ROM : ESCAPE T ?ESC ! ; space. Keep up the good work. Use The E.J. McKernan IV Envelope ! Early in 1982 I needed a microas- Datalog sembler for a project at work. Not Emporia, Kansas

~~~~ ~ ~ FORTH Dimensions 4 Volume IV, No. 6 FORTH as a Teaching language

Albert S. Woodhull, Ph.D. Hampshire College in scanning for keywords and parsing tem is to change the order of the dic- Amherst, Massachusetts 01002 expressions. The initial assignments tionary links. were simple exercises simulating these The last part of the month was de- processes, which students were expec- voted mostly to investigation of how At Hampshire College we take a ted to complete using the languages FORTH’s inner interpreter worked. pause between the regular semesters with which they were already most Exercises included writing, in for a “January Term.” During Janu- familiar. Individual presentations of FORTH, routines that could “decom- ary the expectation is that students solutions in each of these four lan- pile” the address lists into which and faculty will engage in intensive ac- guages gave me a chance to evaluate FORTH definitions are compiled, and tivities of the sort that are difficult to the starting levels of the students and which could trace the flow of execu- manage during the regular semester. provided them all with practice in ex- tion of FORTH words. These exer- This year, with help from my col- plaining and translating algorithms. cises were aimed at development of an league Bill Marsh, 1 undertook to in- We moved on fairly quickly to an understanding of how the FORTH troduce a number of undergraduates examination of various ways of repre- “virtual machine” works and of what to the FORTH language. I think senting expressions, and the relation- would be required to implement a FORTH has some features that could ships between string and tree represen- FORTH system on a new target make it very useful as a teaching tool, tations. These equivalent representa- machine. but there are drawbacks as well. I will tions became a theme later, as I went The three class weeks which con- describe below the course and some of into tracing the flow of control during stitute the January Term proved to be my conclusions regarding the pos- program execution, but initially the too short a time for carrying through sibilities for FORTH as a teaching goal was just to introduce postfix on the cross-compiler project I orig- language. notation. At this point studems were inally proposed. I knew this was likely The course was called “Building a assigned a few exercises to familiarize to be the case even before the course Small Compiler,” and was publicized themselves with the systems available, began, but I was not displeased with as being about the techniques used in three S-100 CP/M systems of different what did develop. In particular, I implementation of high level lan- hardware configurations. An ex- found it very interesting to gain a per- guages. I proposed a goal of complet- panded version of 8080 fig-FORTH spective on the usefulness of FORTH ing, as a cooperative project, a cross- with a screen editor designed for stu- as an educational tool. compiler to allow high level develop- dent use was available. All students I have taught assembly language ment of programs to be run on smaller had Brodie’s Starting FORTH text, programming before, and I appreciate systems. The description listed famil- and after this orientation all showed assembly language from a teacher’s iarity with at least one computer lan- themselves able to learn the language point of view as much for its impor- guage as a prerequisite. on their own, although some formal tance in helping people to understand A varied assortment of students ap- presentation of the control structures what the underlying machine is doing peared at the first class. The entry BEGIN . . . UNTIL and BEGIN . . . as for its usefulness in increasing speed level programming courses at Hamp- WHILE . . REPEAT was necessary or decreasing memory requirements. I shire have been taught in either APL for those without Pascal experience. think FORTH can serve a similar pur- or Pascal, and there was an expert pro- With the cross-compiler project as pose in teaching computer scientists, grammer with little experience in the the focus I shifted the emphasis to- but the goal can be reached more other language representing each. ward gaining an understanding of how quickly, given that (as I find is usually There were also a student with con- FORTH works internally. For the less true) the students already have done siderable experience in several lan- sophisticated students the necessary some high level programming. guages, an intermediate Pascal stu- explanations of stacks and linked lists FORTH has some other educational dent, and students who had learned constituted an introduction to the advantages as well. Because it has a FORTRAN and BASIC outside of general idea of data structures. It direct interpretation capability pro- Hampshire College. A few of the par- seemed to me there was a nice kind of gram modules can be debugged much ticipants had some microcomputer as- symbiosis in the way the developing more easily than in a “compile-only” sembly language experience; none had understanding of the linked list idea language like Pascal. Yet FORTH is ever before used FORTH. reinforced and was reinforced by the also a compiler and in a course for ad- I started out with an exploration of FORTH concept of vocabularies. I vanced students such as I have de- the techniques used by microcomputer pushed this particularly, as one of the scribed FORTH can be used to gain an implementations of BASIC and Pascal easier ways to a cross-compiling sys- insight into the compilatioa process it- Continued

FORTH Dimensions 5 Volume IV, No. 6 FOR TRS-60 MODEL I OR 111 FORTH as a Teaching language (Continued) IBM PERSONAL COMPUTER

self. With most high level languages puter language. Particularly at a lib- the operation of the compiler or inter- eral arts college like Hampshire I The MMSFORTH preter are not accessible to the user, could see a course of this sort serving a System. nor can one count on similar prin- valuable role for science and other stu- ciples of operation in different im- dents who want to go farther than just Compare. plementations. In FORTH it is very learning to program, but who stop The speed, compactness and easy to follow the transformations short of becoming computer science extensibility of the that take place after a new definition is majors. MMSFORTH total software entered from the keyboard. Rules FORTH is above all a small system environment, optimized for about declaration of variables take on language, and teaching about com- the popular IBM PC and TRS- new meaning when they can be shown puters has until now been based on 80 Models 1 and 3. to be necessary for the proper com- large systems and the languages writ- An integrated system of pilation of definitions that refer to the ten for them. For example, as I men- sophisticated application pro- grams: word processing, data- variables. Comparisons with other tioned above, APL and Pascal have base management, communi- languages, particularly Pascal, can be been used, through time-sharing on cations, general ledger and made that point up clearly which rules the University of Massachusetts more, all with powerful capa- are necessary because of machine CYBER, for almost all the introduc- bilities, surprising speed and restraints (i.e., variable declaration tory language teaching at Hampshire ease of use. before use) and which rules go beyond College. The arrangements for this are With source code, for custom what the machine requires for the sake under a great deal of strain, however. modifications by you or MMS. of imposing discipline on the pro- The microcomputer revolution has The famous MMS support, in- grammer (i.e., Pascal’s requirement generated enormous pressure on the cluding detailed manuals and that all variables be declared at the large system from students who want examples, telephone tips, beginning). to learn about computers. As equip- additional programs and FORTH has its problems as a teach- ment becomes more affordable faculty inexpensive program updates, User Groups worldwide, the ing language, as well. Its extreme flexi- members are obtaining their own com- MMSFORTH Newsletter, bility makes it possible to do almost puters for personal work and colleges Forth-related books, work- anything desired in FORTH, but this are considering buying self-contained shops and professional can cause confusion. As an example, it systems instead of buying or renting consuIti ng. seemed essential for my purposes to be time-sharing terminals. able to define a word recursively, and Most experienced teachers of com- it is rather easy to do this by toggling puter languages agree that the BASIC the smudge bit in a dictionary header which comes with small computers is at compile time. I found the use of the not a good language for teaching pro- [ and J words, which allow for execu- gramming. Some languages, like tion while a definition is being com- APL, do not adapt well to the micro- A World of piled, one of the most difficult things computer. Pascal seems to be making for students to grasp. Another feature the transition, and in fact next year the Difference! of FORTH that seems to cause fre- introductory Pascal course at Hamp- Personal licensing for TRS-80: quent errors is the difference in the be- shire College will use a new microcom- $129.95 for MMSFORTH, or havior of VARIABLE and CONSTANT puter laboratory across the hall from “3/4TH” User System with words, which return in one case the the old terminal room. Those of us FORTHWRITE, DATA- address the variable and in the who are familiar with the advantages HANDLER and FORTHCOM of for $399.95. other the value of the constant. of FORTH and its particular ability to My conclusions at this point are make efficient use of limited machine Personal licensing for IBM PC: $249.95 for MMSFORTH, based on a very small sample of stu- resources ought to be giving some or enhanced “3/4TH” User dents in a specialized teaching situa- consideration to the question of how System with FORTHWRITE, tion, but I am very much interested in FORTH might fit into the college DATAHANDLER-PLUS and the possibilities of a language like curriculum. Very little has been writ- FORTHCOM for $549.95. FORTH for use as a teaching tool. I ten on the use of FORTH as a teaching Corporate Site License Exten- think at this point I would not offer a tool, and I would like to encourage sions from $1,000. FORTH course as an introduction to others who have experience in teach- programming, but I might change my ing FORTH in undergraduate colleges opinion on this point if I had available to share their observations. If yourecognize the difference a good package of utility words that and want to profit from it, ask us or your dealer about the world would make it easy for students to do of MMSFORTH. extensive numerical computations. I Albert S. Woodhull, Ph.D. is an As- am seriously considering offering a sistant Professor at the School of I MILLER MICROCOMPUTER SERVICES course in FORTH as a second com- Natural Science, Hampshire College. 61 Lake Shore Road, Natlck, MA 01760 I (61 7)65341 36 6 Volume IV, No. 6 FORTHPROGRAMMING- AIDS- from Curry Associates FORTHPROGRAMMING A/m is TRANSLATOR provides a DECOMPILER generates a software package containing one-to-one translation of structured FORTH source code high-level FORTH routines that FORTH run-time code. from RAM and inserts program allow you to write more efficient control words (e.g.,IF, ELSE). programs in less development time. It is also useful for CALLFINDER finds calling SUBROUTINE DECOMPILER maintaining existing FORTH words, i.e. calls to a specific finds called words, i.e., words programs. The FPA package word. called by a specific word, to all includes four modules: nesting levels.

FORTHPROGRAMMING AIDS The DECOMPILER alone is control words such as IF, ELSE, enables you to: worth a second look. This is a THEN, BEGIN, etc. If you ask Minimize memory require true decompiler which converts FPA to DECOMPILE the nucleus ments for target systems by the FORTH words in RAM into word INTERPRET, you get the finding only those words used compilable, structured FORTH following output displayed on in the target application. source code, including program your terminal within 3 seconds: rn Tailor existing words (includ- ing nucleus words) to specific ( NFA%FFA: 4795 481~)) needs by decompiling the : INTERPRET word to disk, editing, and BEGIN -FIND IF STATE *3 ' recompiling. IF CFA . Build on previous work by ELSE CTF4 EXECUTE extracting debugged FORTH 1HEP.I "STACI routines (including constants El-SE HERE NlJMBER DF'L a3 I+ and variables) from RAM to IF C CWlF 1 LE 3 DL1 TERX disk. ELSE DROP CCOMF'ILEJ LITERAL THEN "STACt Patch changes into existing THEN compiled words in seconds. AGAlN :

FORTHPROGRAMMING AlDs You can decompile one word, DECOMPILE is useful for look- comes with complete source or a range of words at one ing up words, or for obtaining code and a 50-page, indexed time - even the whole FORTH variations of words by decom- manual. system! This decompiled output piling to disk, editing, and may be sent by FPA options to recompiling. the console, printer, or disk.

System Requirements: FORTH nucleus based on the fig-FORTH model or 79-STANDARD; a minimum of 3K bytes and a recommended 13K bytes of free dictionary space. For more information, call Ren Curry 415/322-1463 or Tom Wempe 408/378-2811 ______------Yes, send me a copy of FORTHPROGRAMM~NG Aim, including all source code and the 50-page manual. 0 fig-FORTH model $1 50 Calif. residents add 6.5% tax. 0 FORTH-79 STANDARD (specify system) $1 50 Foreign air shipments add $15. 0 Manual alone (credit toward program purchase) $25 0 Send more information

0 Master Charge 0 Visa Account Number------Exp. Date

Name ______~__~__ ~ ~ Indicate disk format 0 8" sslsd fig-FORTH screens Company ______~ 0 8" sslsd CPIM" 2 2 file 0 Apple 33 Street ~~ 0 PCFORTH CityIStatelZip ~- ______--__- 0 Other

Send to: Curry Associates, P. 0. Box 11324, Palo Alto, CA 94306 41 5/322-1463 or 408/378-2811

FORTH Dimensions 7 Volume IV, No. 6 Teaching FORTH on a VAX

by Vernor Vinge only modification I had made in the of TEACHER.DAT when the Department of Math Sciences past was to vector the definitions of instructor is messing around there.) San Diego State University words like KEY, EMIT, QUIT, I decided early on that I wanted to San Diego, California 92182 CREATE . . . use Starting FORTH [l] as my text. Once the James system was in my Let me sing some praises: Of all the in- VAX account it was easy to get it run- troductory FORTH books I’ve seen, During the Fall semester of 1982, I ning there. If every student’s file con- Brodie’s is the only one that gets all taught an introduction to FORTH at tained a copy of the nucleus, then this the way through CREATE . . . San Diego State University. In this ar- version could be used for instruction. DOES> and the compiler words. The ticle, I discuss the programming en- There would be inconveniences, how- explanations and examples are extra- vironment I devised and the resulting ever: (1) the disk allocation for each ordinarily clear. Differences between course. student would be greater than is nor- dialects are carefully noted. Brodie The Hardware mally given to students, (2) the fig- skillfully treads the line between say- Ideally, FORTH should be taught FORTH dialect is different from that ing too much and becoming imple- to students who each have their own of my text, (3) system modifications mentation specific, and not saying FORTH system on their own com- would be difficult for me to make enough and becoming vacuous. puter-all in communication with the during the semester. (And with the praise, some brick- instructor’s system. This ideal will be Therefore, I rewrote the nucleus to bats: The lack of an index is a continu- achievable in the future, but for the allow two sets of screens, one in a file ing inconvenience. It is very difficult moment any FORTH course at SDSU called TEACHER.DAT and the other to discover the level of deferral of the will have to run on (very crowded) in STUDENT.DAT. TEACHER.DAT system and user variables described on University equipment. If the ideal is and the runnable nucleus, pages 236-240.) impossible, it might seem that the best FORTH.EXE, reside in the Once I had decided to use Starting alternative would be to supply the instructor’s account and can be read/ FORTH, the question was whether to class with a lab of FORTH systems. run by the students. Each student has follow its dialect or FORTH-79. At SDSU we have about 50 Apples for his own STUDENT.DAT. The names Shortly before the semester began, I instructional labs, but there is no way of these files are invisible to users. saw James’ article [6] describing pro- for the instructor’s system to com- Screens 1 through 70 are really posed changes in the Standard. These municate with these machines. I re- TEACHER.DAT and screens 71 changes where almost all in the direc- garded such communication as espe- through 140 are STUDENT.DAT. The tion of the Starting FORTH dialect. cially important in this course, since system behaves like a standalone So, with a more or less clear con- much of my software was untested. I FORTH with two disk drives (but science, I decided to go with the dia- decided to teach the course with the where one of the drives is read-only). lect of the text. University’s timesharing VAX. This By reassembling the nucleus, the I wrote twelve screens on TEACH- machine communicates at 300 baud instructor can change the ER.DAT to redefine fig-FORTH with terminals scattered across cam- characteristics of the system for every- words whose meanings are different in pus. (It can also be reached by phone one. By editing screens 1 through 70 Starting FORTH, and to add words from off campus.) It supports many (TEACHER.DAT) the instructor can that exist in Starting FORTH but not courses in all departments and at all deliver announcements and software in FIG. I also installed the “forgiving levels. When used in compatibility to the students. In particular, the in- FORGET” [8], and defined a word mode, the VAX is a fast and accurate structor can install a FORTH front (ZAP) to make unfindable many of emulator of a PDP-11 running the end that will tailor the system to the the FIG words that don’t exist in RSX-11 operating system. This made dialect he wishes to teach. (My method Starting FORTH. (I did not ZAP it easy to install an instructional of operation was a little more compli- those utility words-such as FORTH on it. cated: I did almost all program NFA-which would exist in some form The Software development on an LSI-11 system and on any development system.) Writing For several years I have been using then used a terminal emulator to up- this front end was routine, but only John S. James’ implementation of fig- load debugged materials to TEACH- because of the information in Haydon FORTH [5] on a small LSI-11 system. ER.DAT in my VAX account. This [4] and Ting [12]. The nucleus of this (public domain) permitted me to use a screen editor The next step was to install Daniel’s system is written in MACRO-11 as- and other fast-terminal tools. It also version of the FORTH, Inc. line editor sembler language, and can be reas- reduced the amount of time TEACH- [3] (slightly revised for Starting sembled to run standalone, under ER.DAT was opened to the instructor; FORTH) on TEACHER.DAT. RT-11, or under RSX-11. Reassem- this was important during the semest- bling the nucleus is easy, though the er, because the students are locked out Continued

FORTH Dimensions 8 Volume IV, No. 6 leaching FORTH on a VAX (Continued) Given this environment, a typical About 24 students attended regular- memory approach to disk, I demon- student work session begins with log- ly throughout the semester. Only two strated that vectoring the I/O primi- ging on the VAX and typing the com- students had FORTH on their own tives could be used to make the disk mand “FORTH.” Once in FORTH, systems. (They were welcome to do the look like a terminal device. the student types 1 LOAD and the assignments on those systems.) The Chapter 11 took another two or Starting FORTH front end (together general level of competence was high; three lectures. Both CREATE . . . with the editor) is loaded. Thereafter I suspect that my requiring assembler DOES > and the compiler words were the environment is almost identical to language was responsible for this. covered in detail. I found the compiler that described in Brodie’s book. The Topics words a tricky topic. (Things would (There are big structural differences, The course was to consist of 15 lec- have been a lot trickier if I had had to however. The underlying architecture tures, each 100 minutes long. (This explain the “smart” versions of words -things like vocabulary linkage and time there were only 14 lectures; one like .” and ’. After teaching this the layout of the bottom of the stack day was lost when the campus was un- course, I am definitely an opponent of -is still fig-FORTH. These differen- expectedly closed.) It was easy to “smart” words .) ces are rarely noticed in high level pro- proceed directly through Starting I finished the semester with recur- gramming, and did not cause much FORTH. The first eight chapters were sion, FORTH assemblers, job pros- confusion even when we got to the covered at the rate of one or two per pects, and a survey of further sources later chapters.) lecture. (I skipped the details of fixed of information. Occasionally the VAX intrudes on point scaling and mixed length When I teach the course again, I ex- the illusion that the system is single- arithmetic .) pect to be able to cover more material. user FORTH: When the VAX is heav- The pace slowed dramatically when In addition to the (few) topics I skip- ily crowded, disk access becomes we reached Chapter 9, which took ped in Starting FORTH, I hope to much slower than on a single-user sys- four lectures. I discussed vectored ex- cover compiler security, local vari- tem. If the student’s program crashes ecution at length. New features were ables [7], and a few ideas from his system, it’s necessary to get out of illustrated with improvements that the metacompilation. FORTH, unlock STUDENT.DAT, students could make to their systems. The Programs come back, and repeat the 1 LOAD For instance, I showed how to develop Of course, programming is one of step. (I could have reduced this the LOCATE facility (page 245), and the most important parts of a lan- inconvenience by making ZAP revers- how QUIT could be revectored to give guage course. I made three formal as- ible, and by precompiling the front diagnostics with each “OK.” signments. The first was to write a for- end.) The only PDP-11 specific prob- The nesting and unnesting diagrams matted dumper word that showed lem I noticed was the necessity of were discussed and elaborated on. One both octal and ASCII representations keeping HERE even. of the few places where I used assem- of memory. This word was used The Students bler language was to demonstrate the throughout the rest of the course. The Some say FORTH can be taught as implementation of these features in second project was to write a vocabu- a first language to persons with no James’ FORTH. lary for studying Conway’s “Life” computer background. I believe that I did the FIG implementation of vo- [2]. I supplied the design for this pro- with a friendly front end, FORTH cabularies in detail. In fact, I probably ject. (I believe instructor-enforced could compete with languages like went too far with this, though it did designs are a good practice where the Logo for elementary school applica- give me a chance to discuss sealed students don’t have design tions. I understand that such projects vocabularies. experience.) The application included are afoot [9]. However, if the goal is An added topic was a comparison a two-dimensional wrap-around array to learn FORTH to write serious ap- of Direct Threaded, Indirect Thread- for the universe of Life, words for dis- plications, then the students must be ed, Token Threaded, and Subroutine play and time-stepping, and words for fairly sophisticated. The prerequisite Threaded code. This led to a discus- the definition and placement of new for my course was assembler language sion of the hardware implementation Life creatures in the universe. It was a (CPU irrelevant). This was not be- of FORTH [lo]. This lecture would good example of how FORTH can be cause I used much assembler in the probably have been unintelligible if extended to provide a special purpose course, but because of the background the class didn’t have an assembler language. (The Znfoworld version of which knowing assembler implies. language background. “Life in FORTH” [ 11J came out the Teaching FORTH in depth involves Chapter 10 took two lectures. After week I made this assignment, and number systems, pointers, data struc- going through the text material, I made an interesting contrast with what tures, and binding times. Without showed how FORTH could accom- I was asking the class to do.) The third previous exposure to such things, the plish Pascal-like read and write state- assignment was an anthology of short average student would have a very ments. (I don’t think the power of projects with defining and compiling hard time. (If I had been sufficiently FORTH’s I/O constructs is immedi- words. expert as a FORTH teacher, and if the ately obvious. By showing how easily In addition to real programming, course had been three hours per week standard I/O from another language we had a 25 minute quiz at the end of instead of two, it might have been could be accomplished in FORTH, I each lecture. (I provided them with a possible to teach the same range of hoped to give the class a starting point Starting FORTH version of the topics with somewhat weaker pre- for appreciating that power.) In addi- requisites.) tion to presenting the usual virtual Contin ued I FORTH Dimensions 9 Volume IV, No. 6 TRANSPORTABLE SOFTWARE Teaching FORTH on a fig-FORTH and FORTH-79 Model Systems for: VAX (Continued) DEC PDP-11 FORTH-79 Handy Reference for RSX-11M these exams.) This many quizzes may Multi-User seem excessive, but there were two Multi-Tasking good effects: We only met once a week Re-entrant Resident Library and it was very easy for students to get Shared Commons behind. The quizzes helped them stay RSX-11M Directive Support current. Furthermore, the quizzes RT-11 amounted to short programming as- Compatible with RSX-11M System signments (although of the “virtual” RT-11 Programmed Request Support kind). Far more than with convention- IBM PC al languages, it is possible in FORTH PC-DOS to ask short questions whose answers CP/M-86 do something significant. For in- ROM BlOS Support stance, on an early quiz I asked the Stand-Alone students to write words to translate TRS-80 Morse code into readable text. (I didn’t ask that they handle the Morse TRSDOS code “dot.”) This is a project that 0 ROM Support would involve a main program and Stand-Alone various peipheral complications in conventional languages. In FORTH, it Data Base Support is trivial. Data Language including: The Bottom Line Base Relative Variables Fifteen of the 24 students became 0 Advanced String Package adequate to good FORTH program- Many Classes of Arrays mers, and at least 20 learned a signifi- cant amount about FORTH. The Key File Support time-shared approach is attractive, un- Hashed Search less you or your students have plenty 0 Binary Search of standalone FORTH systems. Add iti o na 1 features : Acknowledgment The discussions and presentations at 0 Input and Output Forms Support the weekly meetings of the San Diego Screen Editors FIG have been very valuable to me. Execute Variable Support Bibliography Extended Memory Support 1. L. Brodie, Starting FORTH, Rentice-Hall, Additional Control Structures 1981. Trace Support with Stack Snapshot 2. [Various authors], Byte, December 1978. Decompiling 3. S. Daniel, “The FORTH, Inc., Line Edi- tor,” FORTH Dimensions, vol. 3, nr. 3, Text Formatting p. 80. Time and Date Support 4. G. Haydon, All about FORTH, Mountain Double Integer Support View Press, 1982. Floating Point Support 5. J. James, PDP-I1 FORTH User’s Guide, January 1980. [This document is copyright, Transportable System Development but the software it describes is public domain.] 0 Consulting Services 6. J. James, “FORTH-83 Review,” FORTH Systems Analysis and Design Dimensions, vol. 4, nr. 1, p. 29. 0 Communications 7. R. Jekel, “Local Variables for FORTH,” Networking 1980 FORML Conference, p. 59. 8. D. Kilbridge, “Forgiving FORGET,” 0 Encryption FORTH Dimensions, vol. 2, nr. 6, p. 154. 0 Full Sources Available 9. G. Stevenson, private communication, Oc- tober 1982. Contact: Transportable Software, Inc. 10. K. Suralis, “Principles for a CODE-less FORTH Machine,” 1981 FORML Pro- P.O. Box 1049 ceedings, vol. 1, p. 5. 11. M. Swaine, “Life in FORTH: Simple Hightstown, NJ 08520 Sample Program,” Infoworld, 11 October 1982, p. 33. 5g.FOilTH and FORTH-79 are trademarks of Forth Interest Group 0 DEC PDP-I 1 RSX.11 M RT-11 are trademarks 12. C. ling, Systems Guide to fig-FORTH, Ihgita EgLiiprnent Co 0 IBM PC PC-DOS are trademarks of International Business Machines Co 0 CPIM-86 IS a i+ 1st ed., Offete Enterprises, 1981. Tacerai 3f Digital Research Co 0 TRS-80 TRSDOS are trademarks 01 Tandy Co

FORTH Dcmensions 10 Volume IV, No. 6 COMPLETE FORTH OPERATING SYSTEM: $200. FEATURES: an assembler, full screen editor, CP/M@ file transfer utility, time-of-dayldate stamping, shadow screen printing utility, and line editor, fully compatible with STARTING FORTH by Leo Brodie, as well as many other useful extensions.

All CompuPro products meet the most demanding mechanical and electrical standards, and are backed with one of the best warranties in the business (1 year limited warranty on all BOARD LEVEL products, 2 year limited warranty with exchange program for products qualified under our Certified System Component pro- gram). Call CompuPro at (415) 562-0636 for additional information or to order.

COMPLETE 68K SYSTEM - $8995 INCLUDES:

0 ENCLOSURE 2 DESK TOP 0 8 MHz CPU 68K 0 SYSTEM SUPPORT 1 0 INTERFACER 4 0 256K BYTES OF 16-BIT MEMORY 1.5 MBYTES OF M-DRIVE/H 0 DISK 1 CONTROLLER 0 DISK ENCLOSURE WITH 2 QUME DRIVES (2.4 MBYTES) 0 ALLCABLES 0 mapFORTH & CP/M-68KTM

CPiM IS a registered trademark of Digital Research.

AUTHORIZED SYSTEMS CENTERS offer complete installation and implementation of our CPU 68K SYSTEM, Call (415) 562-0636and ask us for the name of the SYSTEMS CENTER nearest you. Price shown does not include dealer installation and support services.

CompuPro division Godbout Electronics - Oakland Airport, CA 94614

FORTH Dimenssons 11 Volume IV, No. 6 FORTH Standards Corner Com pilation Addresses and Parameter Fields Perkel Software System; presents Robert L. Smith address while the inverse is very dif- ficult. Even with indirect threaded MARX FORTH V1.4 code, some of the new approaches put $1 50 the compilation addresses (usually For the At the last meeting of the FORTH with the heads) in one “address space” and the parameters in another ATAR I Standards Team, probably no subject RADIO SHACK generated more heated debate than the address space. “Token code” systems NORTH STAR DOS questions relating to compilation ad- generally completely separate the com- CPM dresses, parameter field addresses, pilation addresses and the parameter POLYMORPHIC and which one should be used by fields. Direct threaded code systems, Marx Forth is not just another warmed EXECUTE or returned from FIND directly compiled and “JSR” systems over Fig Forth. This 79*83 standard and ‘ (tick). In FORTH-79, ‘ returned may have a variable separation be- Forth has been completely rewritten to tween the two addresses. Indeed, for include advanced coding techniques not a parameter field address and FIND available in most systems. returned a compilation address. The some classes of words in some systems the parameter field address has no Marx Forth package includes: main use for the compilation address Complete source code was for use with EXECUTE, and meaning at all. .Screen editor Within the context of the rest of the Double number word set possibly with COMPILE. The parame- Forth style macro assembler ter field returned by ‘ could only be proposed standard the main use of the Standard Marx Forth extension word set used with constants and variables. The parameter field (as determined from, Extensions include: say, ‘ or FIND) is as a secondary refer- .Case File system parameter field of a DOES> word Arguments - Results Disk directories could only be obtained from the ex- ence to DOES> words. The subteam Printer control .String word set on “addressing” took into account Cursor control - Recursion ecution of the word which was created Internal advancements include: by the CREATE DOES> pair. Under the above facts and objections and Links in front of names FORTH-79 there is no way to obtain suggested to the team as a whole that .Fast math No names on internal words the parameter field address of a word the fundamental address is the com- Super fast compiler from its compilation address (or vice- pilation address. This is the address to - New 83-standard circular DO-LOOP DO-LOOP executes 0 times if arguments versa). However, many implementa- be returned by FIND, ’, and [’I. This is are equal LEAVE leaves immediately tions of FORTH use simple indirect the address to be used by EXECUTE. Multiple WHILES threaded code in which the parameter When the parameter field is needed, a . Vocabulary trees without vocabulary links Compiler security field address is two bytes greater than conversion word named BODY is to be 1 byte relative branches for conditionals Smart CMOVE the compilation address. In such sys- used. This performs the same action as * Machine code where it counts tems the user may use only the param- the fig-FORTH word PFA. After All Marx Forths are compatible and most code eter field, for example, and the system much debate the team decided to Nritten on one system will run on any other with no accept the recommendation of the nodifications converts internally to compilation ad- Also available. the Marx Forth target compiler Th dresses when needed. This presents a subteam. Under the proposed stan- ~OWSyour program to be compiled into a stand alone certain simplicity to the user. This dard the programmer has access only bject file that doesn’t need Forth in the system to run to the parameter field of variables and The Marx Forth application software development scheme is one form of “mono- /stem is available to software houses. This package in- DOES> type words. The use of udes Marx Forth for all systems we support including addressing,” and was provisionally ie target compilers. This allows software to be devel- accepted by the Standards Team at the BODY for any other type of word does ped for many computer systems simultaneously as ell as having the most powerful compiler available. Washington D.C. meeting. This was not seem to be useful as part of a hese applications can be target compiled to run on all Standard Program. lmputers for which Marx Forth is available and mar incorporated in the first draft (A) of eted without the end user ever knowing it was written the proposed FORTH-83 Standard. i Forth Call for details. Marx Forth model license is available for Forth ven- After distribution of Draft A, a ors who want to improve their product or implement number of people and groups objected arx Forth for another machine. Call for marketing scentives. strongly to the mono-addressing COMING SOON. Marx Forth for the IEM PC and scheme presented. Many objections Editor’s Note: pple and Marx Multi-tasking Forth for the larger ‘stems were the result of implementation Robert Smith is the current Secretary problems. The compilation address is the FORTH Standards Team and PerRel Software Systems of more fundamental than the parameter was a member of the original FORTH 1452 NORTH CLAY SPRINGFIELD, MO. 65802 field address, and in many implemen- Implementation Team for FIG. He is (417) 862-9830 or (4171 883-3709 tations it is very easy to convert a com- employed by ESL Inc. in Sunnyvale, Consulting Services available pilation address to a parameter field California.

FORTH Dimensions 12 Volume IV, No. 6 I 2=80@and8086 FORTH PCIFORTH" for IBM@Personal Computer available now!

FORTH Application Development Systems include interpreterlcompiler with virtual memory management, assembler, full screen editor, decompiler, demonstration programs, utilities, and 130 page manual. Standard random access disk files used for screen storage. Extensions provided for access to all operating system functions. 2-80 FORTH for CPIM@ 2.2 or MPIM ...... $ 50.00 8086FORTHforCPIM-86...... $100.00 PClFORTH for IBM Personal Computer ...... $100.00 Extension Packages for FORTH systems Software floating point ...... $100.00 Intel 8087 support (PCIFORTH, 8086 FORTH only)...... $100.00 AMD 951 1 support (2-80,8086 FORTH only) ...... $100.00 Color graphics (PCIFORTH only) ...... $100.00 Databasemanagement ...... $200.00 Symbolic Interactive Debugger (PCIFORTH only) ...... $100.00 Cross Reference Utility ...... $ 25.00 Curry FORTH Programming Aids ...... $150.00 PCIGENTM(custom character sets, IBM PC only) ...... $ 50.00 Nautilus Cross-Compiler allows you to expand or modify the FORTH nucleus, recompile on a host computer for a different target computer, generate headerless code, and generate ROMable code with initialized variables. Supports forward referencing to any word or label. Produces load map, list of unresolved symbols, and executable image in RAM or disk file. No license fee for applications created with the Cross-Compiler! Prerequisite: one of the application development systems above for your host computer. Hosts: 2-80 (CPIM 2.2 or MPIM), 8086188 (CPIM-86), IBM PC (PCIDOS or CPIM-86) Targets: 2-80, 8080,8086188, IBM PC, 6502, LSI-11, 68000, 1802, 2-8 Cross-Compiler for one host and one target...... $300.00 Eachadditionaltarget ...... $100.00 AUGUSTATMfrom Computer Linguistics, for CPIM 2.2 ...... $ 90.00 LEARNING FORTH, by Laxen & Harris, for CPIM ...... $ 95.00 Z-80 Machine Tests Memory, disk, console, and printer tests with all source code in standard Zilog mnemonics...... $ 50.00

All software distributed on eight inch single density soft sectored diskettes, except PCIFORTH on 5% inch soft sectored single sided double density diskettes. Micropolis and North Star disk formats available at $10.00 additional charge.

Prices include shipping by UPS or first class mail within USA and Canada. Overseas orders add US$lO.OO per package for air mail. California residents add appropriate sales tax. Purchase orders accepted at our discretion. No credit card orders. Laboratory Microsystems, Inc. 4147 Beethoven Street Los Angeles, CA 90066 (213) 306-7412

2-80 is a registered trademark of Zilog, Inc. CPlM is a registered trademark of Digital Research, Inc. Augusta is a trademark of Computer Linguistics IBM is a registered trademark of International Business Machines Corp. PClFORTH and PClGEN ere trademarks of Laboratory Microsystems

__ FORTH Dimensions 13 Volume IV, No 6 Algebraic Expression Evaluation in FORTH

Michael Stolo witz fix and postfix versions of the expres- key on an algebraic calculator) to sion. As the operands are encountered dump the balance of the operators Editor’s Note: in a left to right scan of the expression, from the stack completing the transla- The approach that Mr. Stolowitz takes each will push its value onto the data tion. here resembles that used by Charles stack. The next thing to note is that Let’s evaluate the expression in the Moore in his BASIC compiler the appearance of each of the opera- example using this algorithm. The A (FORTH Dimensions IIII4, p. 175), tors from the algebraic expression has operand would pass through to the although the two approaches were been delayed until a point in the RPN data stack. The + would be pushed developed independently. We asked expression where all of the required onto the operator stack since there is Mr. Stolowitz to refer back to Mr. operands will be available on the no operator there with a higher prece- Moore’s implementation for com- stack. This allows the operators to be dence. The 6 operand would then go parison. He notes that Mr. Moore’s immediate, i.e. they execute as soon as to the data stack. At this point the - is approach is somewhat simpler since they are encountered in the RPN ex- encountered which has the same prece- his algebraic parser only had to work pression. The final point to note is dence as the + which is already on the in compile mode, and operators could that it is possible to obtain an RPN ex- stack. The + is removed and executed be maintained on the data stack. Mr. pression with the above properties leaving A + 6 on the data stack and Stolowitz ’s parser runs interpretively without the use of parentheses. the - is pushed onto the operator as well; therefore it requires an addi- The algorithm for infix to postfix stack. The C goes to the data stack. tional “‘operatorstack. ” conversion uses an additional stack on The * has a higher precedence than the Description of the Algorithm which to hold operators while they are - so it may be pushed onto the opera- Almost all systems which handle al- being delayed as described above. The tor stack. Now we come to the ( so a gebraic expressions do so by first con- algorithm is simply to place each oper- floor is placed on top of the - and the verting the infix notation to postfix ator on the operator stack as it is en- . The D goes to the data stack and the notation for evaluation. Since postfix countered in a left to right scan of the / is pushed on top of the floor. The or RPN arithmetic is built into algebraic expression; however, an final A goes to the data stack. Now FORTH, only a process for conver- operator may not be pushed on top of comes the ) which causes the / to be sion of the notations is required. another which has a precedence equal dumped and executed and the floor to Before jumping into the algorithm in to or greater than its own. If neces- be removed. The / produces the inter- detail, let’s consider an example: sary, operators are removed until the mediate result D / A on the top of the A + 6-C’(D/A) new one may be pushed. Operators data stack. At this point the = causes The algebraic rules tell us that the removed from the stack are output by the rest of the operator stack to be expression in the parentheses must be the algorithm. Since there is no change flushed. The * and + are executed in evaluated before the multiplication in their sequence, the algorithm passes the sequence in which they are re- may be performed. The multiplication operands directly to the output. moved producing the same execution must precede the subtraction. The ad- When a ( is encountered, a special sequence as the RPN expression. dition and subtraction operators have operator called a floor is placed on the It should be clear from the above the same “precedence” so that the al- stack. The floor, while having a very example that the complexity of the ex- gebraic result is independent of the low precedence, may be placed on top pressions which may be evaluated is order in which they are performed. On of whatever is already there. The floor limited only by the depths of the oper- real machines with round off errors, it will allow additional low precedence ator and data stacks. is probably best to execute them in operators to be pushed. The effect of a While the preceding discussion re- some consistent fashion in order to ) is to dump the operator stack down fers to the “evaluation” of an expres- obtain reproducible results. We will to and including the most recent floor. sion, the actual calculation need not use left to right evaluation in the fol- Unless the entire expression had be performed at the same time as the lowing discussion. Let’s now examine been enclosed in parentheses, there translation to RPN. The resulting an RPN statement of the same expres- will be one or more operators remain- RPN sequence of operators and oper- sion: ing on the stack when the end of the ands could be recorded for later execu- AB+CDA/*- expression is reached. This is because tion. This process is, of course, “com- There are several significant items there is no way of anticipating the pilation” and permits rapid evaluation to note. First, the operands appear in presence or absence of additional of the expression for different com- exactly the same order in both the in- operators. A signal is required (the = Continued

FORTH Dimensions 14 Volume IV, No. 6 Algebraic Expression Evaluation in FORTH (Continued)

SCR # 66 0 \ ALGEBRAIC 30NOV82MCS 1 CREATE OP 44 ALLOT 2 3 : ?INTERP ( pfa -- ) CFA STATE @ IF , ELSE EXECUTE THEN ; 4 5 : OPP@ ( -- addr ) OP DUP @ + ; 6 7 : >OP ( pfa lev -- ) 4 OP +! OPP@ 2! ; 8 9 : OP> ( -- ) OPP@ 2@ -4 OP +! DROP 3INTERP ; 10 11 : LEV? ( -- lev ) OPP@ @ ; 12 13 : ]A BEGIN LEV? WHILE OP> REPEAT 14 [COMPILE] FORTH ; IMMEDIATE 15 -->

SCR # 67 O\ ALGEBRAIC 30NOV82MCS 1: INFIX ( lev -- ) ( old rpn op new infix op ) 2 CREATE SWAP , , IMMEDIATE 3 DOES> 2@ BEGIN DUP LEV? > NOT WHILE 4 >R >R OP> R> R> REPEAT >OP ; 5 6 VOCABULARY ALGEBRAIC IMMEDIATE ALGEBRAIC DEFINITIONS 7 8 7 INFIX * * 7 INFIX / / 9 6 INFIX + + 6 INFIX - - 10 5 INFIX > > 5 INFIX < < 5 INFIX = = 11 4 INFIX NOT NOT 12 3 INFIX AND AND 13 2 INFIX OR OR 14 15 -->

SCR # 68 0 \ ALGEBRAIC 30NOV82MCS 1:( ['I CR 1 >OP ; IMMEDIATE 2 3:) FORTH BEGIN 1 LEV? < WHILE OP> REPEAT 4 L LEV? = IF -4 OP +! 5 ELSE 1 ABORT" Missing (" THEN ; IMMEDIATE 6 7 FORTH DEFINITIONS 8 9 : A[ 0 OP ! [COMPILE] ALGEBRAIC ; IMMEDIATE EXIT 10 11 Examples: A[ A+B-C* (D/A) ]A 12 13 or :EPXR A[ A+B-C*(D/A) ]A ; 14 15 OBWRO'CONY ANGIELSKI is Polish for "Reverse English"! Continued

FORTH Dimensions 15 Volume IV, No. 6 INTRODUCING CONTROL TECH Algebraic Expression Evaluation CT 16132 in FORTH (Continued) 68000 BASED NETWORK binations of variables without return- address and precedence from the ing to the original expression. particular words parameter field as ar- WORK STATION The Implementation guments. This code implements the al- FEATURES An implementation of the above al- gorithm described previously. The ex- 68000 (6 mhz) CPU gorithm is given in the appendix. The ecution address and precedence for the 128K BYTES RAM program begins with the definition of operator are pushed onto the operator 32K BYTES EPROM a data structure, in this case an opera- stack with operators of lower prece- RS232C SERIAL PORT 110 - tor stack. The word OP is defined to dence being popped first. The opera- 9600 BAUD JUMPER return the address of a block of RAM tors created by INFIX are kept in a SELECTABLE CENTRONICS PARALLEL allocated for this purpose. separate vocabulary so that they might PRINTER PORT The stack is used to store double have names which would otherwise 6840 TRIPLE 16-BIT word (four byte) entities consisting of conflict with standard FORTH words. TIMER operator/precedence pairs. The dou- This vocabulary has been named 7 LEVELS OF AUTO- ble word at the base of the stack is ALGEBRAIC. VECTORED INTERRUPTS 358 KBAUD NETWORK PORT used for the top of stack pointer and The definitions for ( and ) are also 16K BYTE NETWORK contains the byte offset from the base segregated from the FORTH diction- FIRMWARE FOR MONITOR, of the stack to the top element, a zero ary because these delimiters are com- DEBUG, ASSEMBLY/- value indicating stack empty. The monly used for comments. The new ( D ISASS EM B LY other half of the pointer double word simply pushes a dummy operator with 16K BYTE FIRMWARE NETWORK BASED 68000 contains a precedence of zero. a precedence of 1 (to distinguish it FORTH BY CONTROL TECH The word >OP, pronounced “to from an empty stack which has a op” is the stack push operation. It ex- precedence of 0) onto the operator INTRODUCTORY PRICE pects an operator and precedence level stack. The ) dumps the stack until it $1 695.00 on the data stack, bumps the operator finds the level 1 operator or issues an stack pointer by four and stores the error message if there is not one to be CONTROL TECH FORTH for double word at the new TOS location. found. the 68000 CPU is similar to FIG- >OP uses a primitive OPP@ (“op The final two definitions are placed forth for 8 bit computers but pointer fetch”) to obtain the absolute in the FORTH vocabulary. The first is uses 32 bit addresses. It is sup- location of TOS in memory. A[ which is used to enter algebraic plied in 2 2764 EPROMS but is OP> pronounced “from op” is the mode. It selects the ALGEBRAIC copied into RAM on system stack pop operation. The precedence vocabulary and clear the operator boot-up. level is discarded at this point since it stack. The second word is ]A. This CONTROL TECH FORTH NET- is not required in RPN. OP> is “state word is used to exit algebraic and to WORK transfers Forth screens smart” because it uses the conditional reselect the FORTH vocabulary, but between one or more disk bas- interpretation word PINTERP which first, it performs the “end of expres- ed host computers and any looks at the system variable STATE to sion” function by dumping any opera- number of work stations at 358 determine if the system is currently in- tors remaining on the operator stack. kbaud. A network protocol is terpreting or compiling. If compiling, Tho factors allow all of the above used to verify data integrity and it compiles the operator’s execution code to work in either execution or prevent network collisions. Boards are available to inter- address in the dictionary. If interpret- compilation modes. First, the words face the network with Ohio ing, it executes the operator immed- created by INFIX and the parentheses Scientific and S-100 systems. iately. operators are all IMMEDIATE words, Another bus independent The word INFIX does the bulk of meaning that they execute even though board plugs into a DIP socket the work. INFIX is given a precedence the system might be compiling (like to replace any 6850 AClA (aux- level, the name of an existing RPN compiler directives in other systems). illiary serial port required). Host operator and the name to be given to Thus all of the operator stack activity network software is in high the new corresponding infix operator. will occur as the expression is scanned level FIG-Forth except for a It looks up the execution address of independent of the state of the ma- short network driver routine. the existing word and then creates the chine. PINTERP will take care of the Contact us with your specific new word placing both the execution state difference as the operators come requ irements. address and precedence level in its pa- off of the stack by compiling or ex- CONTROL TECH rameter field. When any of the words ecuting as appropriate. DISTRIBUTORS, INC. created by INFIX are invoked, the The other factor allowing state in- 5625 Lawton Drive code following the word DOES> will dependence is that the operands used Sarasota, FL 33583 be executed using the execution are all self fetching at run time. Oper- (81 3) 924-141 7 Contin ued

FORTH Dimensions 16 Volume IV, No. 6 Algebraic Expression LEAST EXPENSIVE c FORTH SYSTEM AVAILABLE Evaluation in MULTI-FORTH for the SlNCLAlR ZX/81 (TIMEX/SINCLAIR 1000) BY TREE SYSTEMS FORTH (Continued) Compiler Directive (not Interpretive) Data Compilers (DO LOOP, IF ELSE THEN, ands of this type include literals and etc.) need not be put in a definition to constants. Both may be compiled and run. return values when executed. This is Single user Multi-tasking Event Scheduling (32 Bit clock, 2-yrs.) not a restriction as constants may be Box *Schedule with AT, IN, EVERY conveniently used as variables. There commands are many references in the literature maximum resolution 160th second A comprehensive set of Task Options: To VARIABLES. on data base management tools. LOCK, UNLOCK, START. STOP A final significant observation must Tasks can dynamically reschedule Professionally written manual themselves be made in regard to the operands. Up to 10 tasks scheduled at one time While it was convenient to think of the with complete installation guide, Tasks can be linked to run in the tutorial, glossary. and background operands as sixteen bit integers since application examples. Each task has its own 32 bit clock this is what most FORTH systems Task execute according to priority 64 screens of fully commented Wait execution in 31 deep event que have arithmetic operators for, in no structured FORTH-79 standard Unique Editor: way does any of the above code de- code.. .fig-FORTHcompatible. User defined split screens pend on that fact. The operands could Complete visual editor Records and files stored in FORTH Run editor while execution screen is just as well have been double words or screen blocks.. .fully compatible running program floating point words which fetched with any FORTH system...easily Cursor oriented Delete lines themselves to a floating point stack in adapted to any block size. Delete characters an arithmetic chip. The only require- Free format...records can be as Store line in pad ments are that the operands be self Insert line from pad large or small as you wish ... mixed Automatic character insert fetching to some stack and that the record sizes in the same file.. . Compile Lines RPN operators be appropriate for the with NO wasted space.. .. Technical Information: data types and stack used. The gener- no fixed-lengthfields! extremely fast, run 30000 0 DO LOOP in 1 second. ality of the above code and the range Store ANY kind of data.. . . (real time 32 bit clock with user of applications possible through no data types! defined periods) high priority task runs constantly changing only those words created by Ideal for relational data bases. for detection of stack underflow. INFIX takes some time to appreciate. Keep you files on the same disk has separate character stack, user In summary, a relatively minor ex- stack, and processor stack. as your programs. tension to FORTH’s compiler has RESIDENT ON 64K EPROM. HOUSED Full protection of files and INSIDE YOUR ZX/81 SWITCH BE- been presented for the compilation of TWEEN BASIC AND FORTH RE- algebraic expressions. A mechanism is dictionaries from overwriting QUIRES only 2K RAM TO OPERATE Simple to use.. .easy to Workswith 16Kand 64K RAM modules. provided for the definition of infix Turns the SlNCLAlR into: operators in terms of their RPN equiv- impement on your FORTH system excellent real time controller home environment controller (tem- alents and a precedence. The resulting $29.95 perature zones, time zones). code consists entirely of RPN opera- All documentation and source screens. real time data acquisition of analog tors previously existing in the system Add $5.00 for MicroMotionApple and digital signals. ]I+ even use it to control your model so that none of the compiler exten- compatible disk (source screens only). railroad. sions are required for execution. The has DELAY Variables, and CLAMP Variables as in most real time control techniques are easily extended to in- languages. clude additional operations or data Complete instruction booklet describ- types. While this system provides a ing the language and applications. convenient tool for many kinds of ap- Pathway EPROM Extension ...... $49.95 plications, the user is cautioned Complete System Projections (including Sinclair)...... $149.95 against permanently isolating the Prices include shipping. natural arithmetic of his machine. 8408 18th Ave. West, 8203 Free information available. After all, algebraic has been described Everett, WA 98204 as OBWRO’CONY ANGIELSKI which is of course Polish for “Reverse English. ’’ Guarantee: If you don’t agree this is quality worthwhile software for you, Write to: return it in 30 days and we’ll refund your check. Tree Systems No questions...... Suite 233 Michael Stolowitz is a Consulting 364528th St.: S.E. Engineer based in Dandle, Gal$ no copy protection... we trust you. Grand Rapids, Mi. 49508 ornia. (616) 949-8506 I

,- I FORTH Dimensions 17 Volume IV, No. 6 Develop FORTH code for any target No downloading - No trial PROM burning. 8080/280 system on your current 8080/280 This port-addressed RAM on your S-lo0host or Cromemco CDOS based system is the ROM of your target system

8080/280 METAFORTH WORD/BYTE CROSSCOMPILER WIDE ROM SIMULATOR 0 Produces code that may be downloaded to any 280 or 0 Simulates 16K bytes of memory (8K bytes for 2708 and 2758) 8080 processor 0 Simulates 2708, 2758, 2516, 2716, 2532, 2732, 2564 0 Includes 8080 and Z80 assemblers and 2764 PROMS 0 Can produce code without headers and link words for up to 0 The simulated memory may be either byte or 16-bit 30% space savings word organized 0 Can produce ROMable code 0 No S-100 memory is needed toihold ROM data 0 79 Standard FORTH 0 Driver program verifies simulated PROM contents 0 Price $450 0 Price $495 each I CONSULTING SERVICES Inner Access provides you with Custom Software Design. We have supplied many clients with both Systems and Application Software tailored to their specific needs. Contact us for your I special programming requirements. FORTH WORKSHOPS ONE-WEEK WORKSHOPS - ENROLLMENT LIMITED TO 8 STUDENTS FORTH Advanced FORTH Advanced FORTH Fundamentals Applications Systems

0 Program Design 0 FORTH Tools FORTH lnternals 0 Program Documentation 0 Engineering Applications Assemblers and Editors 0 FORTH Architecture 0 Floating Point Other Compilers 0 FORTH Arithmetic 0 Communications Cross-Compilation Theory 0 Control Structures 0 Sorting & Searching 0 Romability, Multitasking, 0 Input/Output Project Accounting System Timesharing 0 The Vocabulary Mechanism 0 Process Control 0 File Systems/ 0 Meta-Def ining Words 0 Simulations Database Systems OCT. 4-8 NOV. 8-12 NOV. 15-19 OCT. 1115 JAN. 3-7 FEB. 7-11 FEB. 14-18 JAN. 10-14 $395 Incl. Text $495 Incl. Text $495 Incl. Text Instructors: LEO BRODIE, GARY FEIERBACH and PAUL THOMAS (For further information, please send for our complete FORTH Workshop Catalog.) Inner Access Corporation P.0. BOX 888 BELMONT, CALIFORNIA 94002 (415) 591-8295

FORTH Dimensions 18 Volume IV, No. 6 Tech ni q u e s Tu to ria I Meta Compiling I of storage allocation. We will leave the Let’s take a quick look at what we can Henry Laxen issue of context for the next article. do with these words. Perhaps you Think of a Meta Compiler as a ma- recall how FORTH Assemblers work. chine in which FORTH Source Code is (If not wait for a future issue and I will Meta Compiling is an often heard cranked in and Target Object Code is discuss them in this column.) The term in FORTH, and yet most people cranked out. In any software project main idea behind FORTH Assemblers approach it with fear and anxiety. one of the main resource allocation is that you define a set of FORTH This is unfortunate since it is really not problems is how to allocate memory. words whose names are op codes for that difficult and it is extremely The same is true in Meta Compiling, your particular machine. When these powerful. Many purposes have been and this article will address the issue of words are executed they assemble their attributed to Meta Compiling, such as memory allocation for Meta Com- machine language binary op code into generating new FORTH systems, pilers. The problem then is to con- the dictionary along with whatever creating a custom application, cross struct a mapping in which the Target parameters are required. For example compiling code for a different target Image can reside, and to find a con- the jump instruction on the 8080 is a machine, removing the names venient way of manipulating that Tar- hex C3 followed by the 16 bit address (headers) from the code, and get Image. Instead of reinventing the of where to jump to. The JMP word generating ROMable code. All of wheel, let’s do it the way FORTH does in the FORTH Assembler is thus de- these are different benefits of the Meta it. FORTH has a set of words that fined as: Compiling process, but they may or read and write memory, as well as al- : JMP C3C, ,; may not be the only way to accomplish locate and initialize space in the dic- The C, assembles the op code into the the task. For example FIG allowed tionary. Presumably we will need the dictionary and the , assembles the people to create new FORTH systems same functions in the Target Image. address that must have been left on the by supplying assembly language list- This difference is that while the ordi- stack. Notice that the compiled code is ings of FORTH which people could nary FORTH words that read and inline in the dictionary. Now, using enter into their computer and assem- write memory, namely @ and I, oper- the -T definitions we defined above, ble with their assembler. No Meta ate on addresses, our new read and we can now assemble code which will Compiler ever entered the picture. write memory words will have to oper- execute from a different address than Before exploring Meta Compiling in ate on Target addresses. What we need where it was assembled. The detail, let’s first look at the dictionary is a word which will map Target ad- corresponding definition for jump definition of the word META. dresses into Host addresses. Let’s call would be: META a prefix meaning this word THERE and it must behave :JMP C3 C,-T ,-T ; I. changed, transposed [meta- as follows: This would assemble the op code in morphosis, metathesis]; 2. after, target-address THERE host-address the next available location in the Tar- beyond, higher [metaphysics] Using THERE, we can define the read get System, not in the Host System. Meta Compiling in FORTH com- and write memory words as Furthermore, it will jump to the speci- bines attributes of both of the above : @-T THERE @ ; fied Target address when it is execut- definitions. It occurs on a “higher : !-T THERE ! ; ed, not to the Host address. What we level” from ordinary compiling and We append the -T suffix to indicate have done is turned a FORTH Assem- involves a change from one environ- that we are fetching and storing into bler that can assemble inline code ment to another. In one sentence, Target address. We can define C@-T words into a cross assembler that can Meta Compiling in FORTH is a pro- and C!-T in a similar way. Next we assemble code that will execute in an cess in which FORTH code is com- want to implement something analo- environment other than FORTH. piled in one environment and executed gous to a dictionary in the Target Sys- If the significance of what has just in another. The environment in which tem. The amount of space that has been discussed has escaped you, don’t the code is compiled is called the been allocated in an ordinary FORTH feel bad. It escaped me the first six HOST system. The environment in system is held in a variable called DP. times also. Don’t be fooled by the which the code compiled by the Meta We can analogously define a vari- simplicity of the implementation. The Compiler will finally execute is called able called DP-T to hold the amount mere fact that we can assemble or the TARGET system. One of the main of space allocated in the Target Sys- compile code in a different memory difficulties encountered in Meta Com- tem. Armed with that definition we area than the one we are executing out piling is the confusion that naturally can define the dictionary words as of is very powerful. It is one of the arises out of the interactions between follows: cornerstones of the Meta Compiling the different environments. Many : HERE-T DP-V @ ; process. words in the Meta Compiler have to- : ALLOT-T DP-V +I ; It now only remains to define the tally different meanings depending on : ,-T HERE-T ! -T 2 ALLOTT ; mapping word THERE, which takes a the context in which they are used. (Why is there an ordinary @ in the Target address and returns a Host ad- In the first part of this exposition we definition of HERE-T and a !-T in the dress. The simplest approach, if you will look in detail at one of the central definition of ,-T?) Why have we gone have enough user memory, is to sim- issues of Meta Compiling, namely that through such an elaborate ritual? Continued

FORTH Dimensions 19 Volume IV, No. 6 Meta Compiling I (Continued) remainder. The quotient is the block I will leave it to you to rewrite THERE number and the remainder is the byte to avoid this 32K problem. ply define THERE as a constant offset index into that block. All we have to The second bug is far more subtle, as follows: do is add in the beginning block num- and in fact does not lie in the word 20000 CONSTANT TARGET-OFFSET ber, TARGET-BLOCK, and call our THERE at all. You don’t discover this :THERE TARGET-OFFSET + ; friend BLOCK to perform the map- one until you have crashed many You can’t get much simpler than that. ping of a block number into a buffer many times. Recall the definition of However, there are times when mem- address. Finally, we add in the byte @-T and I-T was: ory is tight or the application program index into the returned address and we : @-T THERE @ ; is just too large to fit. What do you do are done. Or are we? There are two : I-T THERE ! ; then? In most other programming lan- bugs in the above code, as it relates to Well, 1023 out of 1024 times this will guages you either give up or start the Meta Compiling. See if you can find work just fine. You see if we call entire application over from scratch. what they are. THERE with a Target address that is We in FORTH have the luxury of The first bug will probably not bite congruent to 1023 modulo 1024, then redefining a few words and the rest of you, but when it does it will produce THERE will return the address of the the application will never know the very dramatic results and it will be ob- last byte in a block buffer. Since @ difference. Let’s take a look at how we vious how to fix it. The problem is and ! act on 2-byte, 16-bit entities, the can provide a mapping from Target to that when dealing with addresses, you wrong results will be read or written. Host addresses without taking up any should be very careful what kind of Rule of usage for THERE is that it room in the Host dictionary. The an- arithmetic you perform. Addresses are takes a Target Byte Address and re- swer is of course to use BLOCK as a unsigned quantities, while division turns a Host Byte Address. Only a means of mapping memory addresses and multiplication deal with signed single byte address is returned. There into disk addresses. Consider the quantities. The above code works fine is no guarantee that Target Address + following: as long as the Target address is less 1 maps into Host Address + 1. That is 10 CONSTANT TARGET-BLOCK a false assumption on the user’s part. :THERE ( target-addr -- host-addr ) than 32K. As soon as it is larger, 1024 /MOD TARGET-BLOCK + BLOCK + ; /MOD returns a signed quotient and Anyway, how do we fix it? It really is We first divide by 1024 bytes per remainder, and we will be passing block, and get back a quotient and a BLOCK a very strange block number. Continued

Proceedings of the Rochester Forth Applications Conferences

0 The Institute for Applied Forth Research, Inc. now has available the first two, in a series, of conference proceedings on Forth and its application. Many of these papers, especially in the areas of floating point, data structures and relational data bases, have been cited by other authors. The 1982 Rochester Forth Conference on Data Bases and Process Control includes papers on data bases, process control, machine independence, project management, data structures, and mathematics. Working group reports cover Forth techniques, file management, virtual machines, and memory mapping. Applications range from music synthesis to the real time control of a satellite data base, and a manager’s view of Forth in industrial process control. The Forth programming style used in non-Forth environments is also covered. The Proceedings is 31 7 pages with over 40 papers. The 1981 Rochester Forth Standards Conference contains papers commenting upon the 79-Standard. Some of these papers were precursors to the Forth-83 proposed standard. Additional sections describe implementing Forth, data structures, vocabularies, and applications. The working group reports discuss Forth techniques, file systems, floating point, virtual machines and multitasking. The Proceedings is 378 pages with over 50 papers.

0 These Proceedings may be purchased for $25 apiece, which includes shipping, or $35 overseas which covers handling and shipping by Air, from: Mountain View Press, Inc., P.O. Box 4656, Mountain View, CA 94040, (4151-961-4103

0 rd eri ng information: Check, Moneyorder (payable to MOUNTAIN VIEW PRESS, INC.),VISA, Mastercard orCOD’saccepted. No billingorunpaid PO‘S.California residents add sales tax. Foreign orders, pay in US funds on US bank.

0 The Proceedings are also available from the University of Rochester Bookstore.

FORTH Dimensions 20 Volume IV, No. 6 1983 ROCHESTER FORTH APPLICATIONS CONFERENCE June 7 through June 11, 1983 University of Rochester Rochester, New York

The third Rochester Forth Applications Conference will be sponsored by the Institute for Applied Forth Research, Inc., and hosted by the University of Rochester’s Laboratory for Laser Energetics. This year’s conference has a format similar to that of previous Rochester conferences, with invited speakers focusing on an area of particular interest. This year’s topic is robotics, which embraces many areas, including mechanical and electrical engineering, vision, artificial intelligence, computer networking, and automated manufacturing. Six invited lecturers will address the use of Forth in factoryautomation, the design of a useful robotic control language, teaching robotics and Forth, and expert systems which provide direction to autonomous robots. The series will cover the evolution of Forth from telescope control through the precision multi-axis camera controllers used in Hollywood to state-of-the-art robotics and applied artificial intelligence research. In addition to one day of invited lecturers, there will be three days of oral presentations, posters, and demonstrations, as well as working groups on specific topics of interest. All sessions will be held in the Wilson Commons at the University of Rochester. The registration fee of $300. covers all sessions, activities, meals, and the 1983 Conference Proceedings. Students may register for $1 50. Attendees have the option of student dormitory housing, at the rate of $58 double and $80 single for the duration of the conference. A list of nearby motels is also available. However, those people staying on campus will find a car unnecessary, as there will be a shuttle to the airport and the train station. Campus parking permits are available for $.75/day. The University Health Service facilities are also available for a single fee of $4 at registration. For more information, please contact: Diane Ranocchia Institute for Applied Forth Research, Inc. 70 Elmwood Avenue Rochester, New York 14611 71 6-235-01 68 REGISTRATION FORM Please return by May 15, 1983

Name: Telephone:

Are you planning on giving a: 10-20 minute talk? poster? demon st rat ion? If you are, we should have your 200-word abstract by April 15.

Registration fee: $300 ($1 50 for students)

University housing: yes no single $80, double $58 To stay over the night of the 11 th, add $1 5

If you chose double, who is your roommate? (Roomates will be assigned if not indicated.)

Amount enclosed: (Please make checks payable to the Rochester Forth Conference.)

There is a vegetarian meal option. Check if desired.

Mail registration to: Rochester Forth Conference 70 Elmwood Avenue Rochester, New York 14611

FORTH Dimensions 21 Volume IV, No. 6 two disks and a copy of the fig- Meta Compiling I New FORTH Installation Manual are $65. (Continued) Product Contact: Dennis Wilson, Aristo- telian Logicians, 2631 East Pinchot quite simple; namely, we must con- Announcements Avenue, Phoenix, AZ 85016 (602)956-7678. struct @ and ! out of C@ and C!, A FULLSCREEN EDITOR for DISK which only operate on byte addresses, and MEMORY not word address. CP/M is a copyright of Digital Research, Inc. PLUS CDOS is a copyright of Cromemco, Inc. At this point we get into a small 8080/280 flg-FORTH for CPlM ZILOG is a couyrinht of ZILOG, Inc. mess because many microcomputers and CDOS Systems are “byte-swapped,” meaning that for FORTHlCOMM a 16-bit word, the low order 8-bit half The full screen editor allows use of is stored first. The 8080 and 6502 are terminals that transmit and receive FORTH/COMM is a software prime examples of byte-swapping ma- ESCAPE sequences. Reverse video, package of high level FORTH routines chines. The newer 68000 computer is blinking and half-intensity are also which transfer information to and ‘I an example of a nonbyte-swapping used, but provisions are made for ter- from FORTH systems while insuring ! machine. Anyway, to construct @ and minals lacking these features. the integrity of data. The features in- ! out of C@ and C! we must be aware All control characters show as “ ” cluded in the package are of the byte-swapping. Let’s suppose and any character higher than 7E Pre-installed drivers for IBM/PC, we are on a byte-swapped machine, HEX shows as “ ”. (You may change Apple Comm Card, CP/M and let’s take a look at how to imple- these defaults if you prefer.) lbo levels of capability: ment @. I will leave the implementa- This editor also has the unique abil- Level 1-Tkansmit FORTH text tion of ! as an exercise. Consider: ity to VIEW AND MODIFY MEM- screens with handshaking : @-T ( target-addr -- value ) ORY using all the full screen edit func- Level 2-Tkansmit FORTH text or DUP C@-T ( addr low ) tions, (except “LINE-INSERT” and raw binary screens with error detec- SWAP 1 + C@-T ( low high ) “LINE-DELETE” which are disk tion and retransmission 256 a ( hilo ) ; + related .) Using the “NEXT-PAGE, ’’ Routines for both sending and Notice that only C@-T is used, so our “PREV-PAGE” and “PAGE-EDIT” receiving rule of useage is not violated. This is function keys you may skip or browse Programs will not “hang” during rather slow on most machines because thru memory (including the running data transfer of the multiply, but it will certainly operating system) a full page at a time, Dumb terminal program included work. What would be nicer is to define and change any memory location to Remote operation can be achieved a CODE word, say FLIP, which ex- any value desired. with the dumb terminal program changes the high and low halves of a The system consisting of the full These routines have proven to be 16-bit word. Then we could replace screen editor along with the fig- very reliable under a wide variety of the 256 a phrase with FLIP and it FORTH model and many additional conditions. Extra care has been taken would be much faster. If the machine fig-FORTH screens is delivered on to minimize the number of control were not byte-swapped then we would TWO diskettes. The first disk, read- characters to avoid interference with place the FLIP or the 256 a after the able by CP/M or Cromemco CDOS, operating system codes. For example, first C@-T instead of the second. See contains the 8080 FIG source listing the check word and screen sequence if you can implement I-T in an and an enhanced version in ZILOG number are sent as a string of 4 ASCII analogous way. 280 mnemonics, with FORTH.COM hex digits. Idle time is minimized by What we have really done is imple- files for 280 & 8080 processors and a having the sending routine fetch the ment a disk resident virtual memory special one for Cromemco 3102 next screen to be transmitted while the system. It turns out to be very useful terminals. receiving routine is storing the last in many applications, not just Meta The second disk contains FORTH screen on disk. Compilation. Any time you need a readable screens including the exten- FORTH/COMM includes all source very large array that will not fit in sive full-screen editor for disk and code, manual, and program disk post- memory, the same technique will memory. This disk also has 110 port paid for $75. work. Next time we will look deeper dump and traditional formated mem- Specify one of the following disk into the Meta Compiling process and ory dump words plus many items pub- formats: address the issue of how to actually lished in FORTH Dimensions, includ- (FORTH-79 and fig-FORTH with generate the Target Image Code, now ing a FORTH TRACE utility, a model 1024-byte buffers) that we have a place to put it. Until database handler, an 8080 8” CP/M-FORTH screens and then, good luck and may the FORTH ASSEMBLER and a recursive decom- file of FORTH screens be with you. piler. 5 ” PC-DOS-FORTH screens and Henry Laxen is Chief Software This entire work is placed in the file of FORTH screens Engineer for Universal Research, public domain in the manner and 5 ’’ Apple 3.3-FORTH screens 150 North Hill Drive, #lo, Brisbane, spirit of the work upon which it is Contact: Ren Curry, Curry Associ- CA 94005, specializing in the develop- based. Copies may be distributed ates, P.O. Box 11324, Pa10 Alto, CA ment of portable computers. when proper notices are included. The 94306, (415)322-1463. I

FORTH Dimensions 22 Volume IV, No. 6 Large Address Space Environments: 32-bit addressing, segmentation, memory mapping, extended ad- Call For Papers dressing, bank switching. Multiprogramming Architectures: Approaches, multiuser, multitasking, interrupt handling, memory i 5th FORML Conference management, task control, intertask communication and coor- dination, UNIX-like pipes. Nucleus Variations: November 23-25, 1983 Virtual machine, threaded code techniques, virtual execution, b Asilomar Conference Center relocation. Pacific Grove, California, U.S.A. Operating System Environments: Native architectures, device drivers, guest of other operating sys- The 5th Annual FORML (FORTH Modification Labora- tems, file system interfaces. tory) Conference will be held November 23-25, 1983 at the System Generation Techniques: Asilomar Conference Center, Pacific Grove, California, Defining words, compiler writing systems, metacompilation varia- U.S.A. FORML is a forum for sharing and discussing new tions. proposals intended to benefit FORTH. It is not intended for Program Development Methodologies: beginning or casual FORTH programmers. Problem analysis techniques, design criteria, style, coding stan- Registration includes a comfortable room, meals, confer- dards, tools, team programming, documentation, training, quality ence attendance and notebooks containing the papers submit- control and evaluation. ted. Attendees who are also contributors to the conference will Applications: receive first priority. A limited number of guests (family or Process control, real-time techniques, robotics, scientific calcula- friends not attending the conference) can be accomodated. tions, matrix operations, simulation, business applications, file Topics presented should focus on guiding the evolution of systems, relational data base systems, other languages. FORTH. Compliance to a standard FORTH is recommended Abstracts for presentations should be no longer than 100 but not required. The following list suggests topics for presen- words and must be received by September 6, 1983. To obtain tations: registration information and an author's kit please write to: Hardware FORTH Implementations; FORML FORTH engines, architecture, instruction sets, single chip integra- P.O. Box 51351 tion, p.c. board processors, microprogramming, coprocessors, Palo Alto, CA 94303 hardware stack add-ons, ROMchip projects. U.S.A.

1 proFORTH COMPILER 8080/8085,280 VERSIONS SUPPORTS DEVELOPMENT FOR DEDICATED APPLICATIONS INTERACTIVELY TEST HEADERLESS CODE IN-PLACE COMPILATION OF ROMABLE TARGET CODE MULTIPLE, PURGABLE DICTIONARIES FORTH-79 SUPERSET AVAILABLE NOW FOR TEKTRONIX DEVELOPMENT SYSTEMS - $2250

2 MICROPROCESSOR-BASED PRODUCT DESIGN SOFTWARE ENGINEERING DESIGN STUDIES - COST ANALYSIS ELECTRONICS AND PRINTED CIRCUIT DESIGN PROTOTYPE FABRICATION AND TEST REAL-TIME ASSEMBLY LANGUAGE/proFORTH MULTITASKING DIVERSIFIED STAFF

FORTH Dimensions 23 Volume IV, No. 6 THE FORTH SOURCE'" MVP-FORTH - A Public Domain Product 0 MVP-FORTH Meta Compiler for CPIM Programmer's kit. MVP-Forth is fig-FORTH updated to the FORTH-79 Standard Required Use for applicatons on CPlM based computer. Includes Word Set. The source is public domain. Included are an editor, FORTH public domain source $1 50 assembler, tools and utilities, making it compatible with the instructional 0 MVP-FORTH Fast Floating Point for APPLE Rogrammer's book, Starting FORTH. Except for hardware dependencies, all high level Kit. Includes 951 1 math chip on board with disk and FORTH is transportable between all systems. Modifications and exten- documentation. $400 sions can be simplified through the use of MVP-FORTH Programming Aids and Meta and Cross Compilers. 0 MVP-FORTH Programming Aids for CPIM, IBM or APPLE Programmer's Kit. Extremely useful tool for decompiling. MVP-FORTH Books - A Series callfinding. and translating. $1 50 0 Volume 1, All about FORTH by Haydon. MVP-FORTH 0 MVP-FORTH by ECS Software for IBM-PC or ATARID glossary with cross references to fig-FORTH, Starting 4001800. Standalone with screen editor License required. FORTH and FORTH-79 Standard. 2nd Ed. $25 Upgradeable $1 00 C Volume 2, MVP-FORTHAssembly Source Code. Includes 0 MVP-FORTH by ECS Software for IBM-PC or ATARI CP/@ IBM-PC@, and APPLED listing for kernal $20 4001800. Enhanced with color animation, multitasking, sound, utilities, and unlimited run time license. $1 75 C Volume 3, MVP-FORTH Math & Floating Point Extensions by Koopman $25 0 MVP-FORTH Professional Application Development System (PADS) for CPIM. IBM-PC, or APPLE. A three level MORE COMING! integrated system with complete documentation, Complete system for IBM. CPIM. or APPLE. Includes 3 below $400 MVP-FORTH Software - A Transportable FORTH 0 MVP-FORTH PADS enhanced virtual system $1 50 0 MVP-FORTH Programmer's Kit including disk, documen- tation, Volumes 1 & 2 of MVP-FORTH Series (All About 0 MVP-FORTH PADS Programming Aids $1 50 FORTH. 2nd Ed & Assembly Source Code), and Starting MVP-FORTH PADS Meta Compiler $1 50 FORTH. Specify CPIM. IBM-PC, TRS-80/Im or 3, TRS Color Computer or APPLE $1 50 *** MVP-FORTH operates under a variety of CPUs, computers, and operating systems. CPIMD disks can be supplied 8': SSISD, 3740 3 MVP-FORTH Cross Compiler for CPIM Programmer's Kit format or 5V4 for Osborne" Northstar" Micro Decisions@ Kayprom or Can also generate headerless code for ROM or target H89IZBP Specify your computer and operating system. *** CPU $300 FORTH DISKS FORTH MANUALS, GUIDES & DOCUMENTS FORTH with editor assembler and manual 0 ALL ABOUT FORTH by 0 1982 Rochester FORTH Haydon. See above. $25 Roc. $25 C APPLE by M M $100 0 NOVA by CCI $1 00 0 APPLE by Kuntze $90 0 TRS-80/1° by N S $90 0 FORTH Encyclopedia by 0 A FORTH Primer $25 Derick & Baker. A complete Threaded interpretive IJ ATARIO valFORTH $60 0 280 by L M $50 0 programmer's manual to fig- Languages $21 0 CP/W by M M $100 0 8086188 by L M $1 00 FORTH with FORTH-79 AIM FORTH User Man $1 2 _1 HP-85 by Lange $90 VIC FORTH byHES, VIC20 references. Flow charted, 2nd APPLE User's Manual IBM-PC@ by L M $100 cartridge $60 Ed. $25 i1 MicroMotion $20 FORTH Encyclopedia Enhanced FORTH with F-Floating Point G-Graphics, T-Tutorial 0 METAFORTH by Cassad Pocket Guide $7 Y. S-Stand Alone M-Math Chip Support, MT-Multi-Tasking. X-Other Meta compiler in 8080 Extras 79-FORTH-79 0 And So FORTH by Huang. A code $30 college level text. $25 0 APPLE by M M 0 Extensions for L M Systems Guide to flg- FG &79 $1 40 IBM.ZB0. and 8086 0 FORTH Programming by FORTH $25 Scanlon $17 n ATARI by PNS FG & X $90 0 Software Floating Caltech FORTH Manual $1 2 $1 00 FORTH on the ATARI by E. 0 CPlM by M.M., F & 79 $140 Point 0 Invitation to FORTH 8087 Support Floegel $8 $20 Apple, GraFORTH by 0 0 (IBM-PC or 8086) $1 00 PDP-11 User Man. $20 lnsoft 0 Starting FORTH by Brodie. $75 0 9511 Support Best instructional manual 0 CPlM User's Manual, 0 IBM-PC, PolyFORTH by F.I. (Z80 or 8086) $1 00 available. (soft cover) $18 MicroMotion $20 F. G. S. M, MT, & X $300 0 color GraDhics 0 Starting FORTH (hard 0 FORTH-79 Standard $1 5 Multi-Tasking FORTH by (IBM-PC) ' $1 00 cover) $22 FORTH-79 Standard S L.. CP/M, X & 79 $395 Data Base 0 0 1980 FORML ROC. $25 Conversion $1 0 0 TRS-8011 or 111 by M.M.S. Management $200 0 F, X, & 79 $1 30 Requires LM FORTH disk, 1981 FORML ROC2 voi $40 0 Tiny pascal fIg-FORTH $1 0 0 TUTORIAL by L & ~,8"CP/M specify IBM, 280, 01 8086 0 1982 FORML Roc. $25 0 NOVA fIg-FORTH CCI $15 includes Starting FORTH $95 0 I981 Rochester FORTH 0 lnstallatlon Manual ROC. $25 fIg-FORTH $1 5 CROSS COMPILERS Allow extending, modifying and compiling for speed and memory savings, can also produce ROMable code. wce Listings of fig-FORTH, for specific CPUs and computers. The *Requires FORTH disk. ;tallation Manual is required for implementation. Each $15 0 CPIM $300 0 IBM* $300 0 1802 0 6502 0 6800 0 AlphaMicro 0 TRS-80/1 $300 0 Z80* $300 0 8080 0 8086I88 0 9900 0 APPLE I1 0 Northstar@ $300 0 Apple 11/11 + $300 0 PACE 0 6809 NOVA PDP-11 ILSI-11 0 8086. $300 0 0 0 68000 0 Eclipse 0 VAX 0 Z80 0 fIg-FORTH Programming Aids for decompiling. callfinding, and translating. Specify CPIM, IBM-PC, 8086, Z80, or Ordorlng Informallon: Check, Money Order (payable to MOUNTAIN VIEW PRESS, Apple $1 50 INC.). VISA, Mastercard or COD'S accepted. No billing or unpaid Po's California residents add sales tax. Shipping costs in US included in price. Foreign orders, pay Key to vendors: M.M. MicroMotiOn in US funds on US bank, include lor handling and shipping by Air: $5 for each item F.I. FORTH Inc. M.M.S. Miller Microcomputer Services under $25, $1 0 for each item between $25 and $99 and $20 for each item over L & H Laxen and Harris N.S. Nauticus Systems $100. Minimum order $10. Ail prices and products subject to change or withdrawal L.M. Laboratory Microsvstems S.L. Shaw Labs without notice. Sinaie-. system andlor single user license agreement required on some products Jupiter Ace Computer - Z80 FORTH micro code - $1 50 DEALER 6 AUTHOR INQUIRIES INVITED MOUNTAIN VIEW PRESS, INC. PO BOX 4656 MOUNTAIN VIEW, CA 94040 (415) 961-4103

FORTH Dimensions 24 Volume IV, No. 6 Tee hnotes

+ BUF BUG The main program is in Screen 117 bytes (32 bits) TEST bit array, even I with comments a la Henry Laxen. You though the last 5 bits in the array's last David Cromley should not have any problem under- byte are insignificant. Also, at execu- Cheyenne, Wyoming standing or using it. The only suppor- tion time [time 31, there is no range I tive word is 2 , which is defined in check. It is supposed to be the pro- I have found a bug in FLUSH (fig- high level in Screen 116. This word can grammer's responsibility to know 1 FORTH Re1 I, Nov. 1980). be and should be re-written in low what he/she is doing. I I suggest for SCR#92 line 4: level, because it is quite useful and Screen 118 provides four bit mani- [ LIMIT / 1 + ] (No.of BUFFS + 1) time critical. pulation words. The only comment The present definition fails when The only comment that should be that I would like to add here is the PREV points to the buffer after USE, added to the defining word BIT- name of these words. BIT-ON , BIT- 1 and this PREV buffer has been ARRAY is that at compiling time [time OFF , and BIT-TOGGLE are perhaps Y updated. 21, if the c number-of-bits > not as good as ON , OFF , and For example: I#1 I #2 I #3 I MI cannot be evenly divided by 8, then it TOGGLE. You really should read Mr. 44 will reserve up to the next byte. For Henry Laxen's article (FORTH Di- USE PREV example: mensions, Vol. 4/4). Good naming Presently, FLUSH will call BUFFER 27 BIT-ARRAY TEST principles are an essential part of good 4 times. USE will be, for these four will reserve and initialize to zero 4 FORTH. times: 1, 3, 4, and 1. Buffer 2 will be Continued missed. Yes, this is a design error. In the in- SCR # 116 TDH250CT82 terest of trying to keep the most re- 0 \ 2- cently referenced block in RAM buff- 1 2 : 2- (n --- 2-1-11 \raise to 2's n-th power er, it may occasionally not be correctly 3 DUP O= IF DROP 1 FLUSHED. The culprit is + BUF and 4 ELSE 1 SWAP 0 DO 2* LOOP THEN ; 5 ;s it's used in BLOCK and BUFFER. 6 (P 2- will yield a number which is the n-th power of 2.) Your solution is one of several now in 7 use. 8 Most vendors who follow the FIG SCR # 117 Model have corrected this and several 0 \ BIT-ARRAY TDH250CT82 other problems (carry problems in 1 U II and Ul, expanding buffer size to 2 : BIT-ARRAY \defining word 1024 bytes and Y register range in 3 (index --- #.of.bit.offset addr ) 7 SWAP 8 /MOD ROT + ; with vendor support, additional test- 8 ;s ing and review. The self installed FIG 9 (P BIT-ARRAY defines a family of bit arrays. At the bit system has had remarkable accep- 10 array creation time [time 21, it takes the form: 11 number.of.bit.wanted BIT-ARRAY tance, but it cannot supplant the 12 At the execution time [ use the bit array; broader resources of commercial 13 time 3 1, it takes the form: 14 index [index --- #.of.bit.offset addr I) offerings. -Bill Ragsdale 15

Bit Array and Manipulations SCR #118 0 \ BIT-ON BIT-OFF BIT? BIT-TOGGLE TDH250CT82 i'imothy Huang 1 : BIT? ( index --- 1/0 ) \ 1 = on 0 = off 2 C@ SWAP 2- AND O= O= ; 3 Bit manipulation is one of the most 4 : BIT-ON ( index --- \ set index bit on 5 DUP >R C@ SWAP 2 OR R> C! ; useful techniques in microcomputer 6 programming, particularily for hard- 7 : BIT-OFF ( index ---^) \ turn index bit off ware controls and graphics, for which 8 DUP >R C@ SWAP 2 255 XOR AND R> C! ; 9 FORTH is especially good. However, 10 : BIT-TOGGLE ( index --- ) \ toggle index bit when I looked back through all the 11 2DUP BIT? IF BIT-OFF ELSE BIT-ON THEN ; 12 is FORTH Dimensions issues, I failed to 13 (P BIT? yields the bit status. BIT-ON sets the bit. BIT-OFF find any such program published. 14 sets the bit off. BIT-TOGGLE toggle the bit. Use the form: Well, here is one that I wrote a couple 15 index BITxxxxxx ) of months ago. Victor-FORTH By Timothy Huang 30 September 1982

FORTH Dimensions 25 Vdume IV No 6 Technotes (Continued)

Circular Lists 120 LIST

C.L. Stephens 0 ( CIRCULAR LIST WORDS CLS 30/ 9/81 ) COMSOL Ltd. 1 CODE C+! W POP H POP W LDAX L ADD W STAX NEXT JMP 2 Editor’s Note: The following technote 3 CTOP 2+ @ 1+ ; (current top) 4 NXTBOT 2+ @ 3 + ; (next bottom) was originally published in England as 5 STOL 2+ e 5 + ; (start of list) Computer Solution Ltd. ’s ‘poly- 6 ENOL DUP C@ OVER 1+ C@ 1- SWAP STOL + ; (end Of list) 7 FORTH Note 19.” As such it contains 8 +LIST SWAP 2+ @ C+! ; (changes the list count) a few references to a multiprogram- 9 ?SPACE DUP 1+ C@ SWAP 2+ @ C@ - ; (how many left in?) med system. These references may be 10 11 CLIST CREATE 2DUP SWAP 256 * + , (creates a list) omitted. 12 HERE 2+, (must be change to THERE, for target compile) 13 5 + ALLOT (reserves space) DOES> ; 14 Circular lists are a very convenient 15 91 LOAD 92 LOAD mechanism and once implemented can be used to generate stacks or FIFO buffers. The programs specified here 121 LIST are designed to set up and manipulate 0 ( CIRCULAR LIST WORDS CLS 17/ 9/81 ) any number of circular lists. Each list 1 : ILIST 0 OVER 2+ @ C! DUP STOL SWAP ZDUP NXTBOT ! CTOP! ; may have up to 255 entries (or slots) 2 (initialise the list) 3 and each slot may be up to 255 bytes 4 : WSPACE (wait for space in the list) long. 5 BEGIN DUP ?SPACE NOT IF PAUSE AGAIN DROP ; The word CLlST creates a named 6 7 : WENTRY (wait for an entry in the list) list with the following structure and 8 BEGIN DUP 2+ @ C@ NOT iLlST initializes it. 9 IF PAUSE AGAIN DROP ; 10 RAM in Host or ROM in Target 11 : +CIRCLE OVER C@ + 2DUP SWAP ENOL > 12 IF DROP DUP STOL THEN SWAP ; 13 1 HEADER (Not in Target Systems)l 14 : -CIRCLE OVER C@ - ZDUP SWAP STOL < 15 IF DROP DUP ENOL THEN SWAP ; SLOT SIZE n (1 byte)

NUMBER OF SLOTS (1 byte) 122 LIST 0 ( CIRCULAR LIST WORDS CLS 18/ 9/81 1 1 : TLIST DUP WSPACE 2 DUP CTOP @ -CIRCLE 3 ZDUP CTOP ! 1 +LIST ; 4 5 : -TLIST DUP WENTRY 6 DUP CTOP @ ZDUP +CIRCLE 7 CTOP ! SWAP -1 +LIST ; NUMBER OF ENTRIES .* (M) 9 : +BLIST DUP WSPACE 10 DUP NEXTBOT @ 2DUP +CIRCLE ADDRESS OF CURRENT TOP - 11 NXTBOT ! SWAP 1 +LIST ; 12 13 : -BLIST DUP WENTRY ADDRESS OF NEXT BOTTOM - 14 DUP NXTBOT @ -CIRCLE 15 ZDUP NXTBOT ! -1 +LIST ; SLOT 1 nbytes

SLOT 2 n bytes 123 LIST

0 ( CIRCULAR LIST WORD TESTS CLS 29/ 9/81 ) 1 10 4 CLIST LOG 2 LOG ILIST SLOTM nbvtes 3 VARIABLE LOCAL 2 ALLOT 4 : DL CR LOG 1+ C@ DUP . 3 SPACES LOG C@ DUP . 3 SPACES The words +TLlST and + BLIST 5 LOG 2+ @ . * ( leaves number of entries for dump ) 6 CR LOG ?SPACE . 3 SPACES LOG CTOP ? 3 SPACES LOG NXTBOT ? add entries at the top of the list, 7 CR LOG STOL SWAP DUMP -TLIST and -ELIST remove entries. 8 : FILL 4 0 DO ZDUP I + C! LOOP 2DROP ; In all cases the words return the ad- 9 : V+T LOG +TLIST FILL ; 10 : V+B LOG +BLIST FILL ; dress of the first byte in the slot allo- 11 : SHOW LOCAL 4 MOVE ( moves the data to a local buffer cated or to be released. The user must 12 4 0 DO LOCAL I + C@ . LOOP ; 13 : V-T LOG -TLIST SHOW ; then move the required data into or 14 : V-B LOG -BLIST SHOW ; from the slot. 15 Continued

FORTH Dimensions 26 Volume IV, No. 6 Technotes (Continued)

FORTH Classes These words assume a multi-task the next block suffers from the disad- at system and will wait if there is no vantage of consuming six bytes of Humboldt State University space or no entry respectively. In return stack each time it is used. It also Eureka, California single-task systems or emergency over- distributes the loading information by rides ?SPACE can be used to stop across a range of blocks making Kim Harris lockouts. changes difficult. In a multi-task system it is impor- The preferred mechanism consists People, Computers, And tant that a slot once allocated or re- of an initial “Load Block” which acts FORTH Programming leased should be filled or emptied as a directory to the application and as 5 Day Introductory Class before the task executes a PAUSE, MS a central point for substitutions. How- Date: June 20-24, 1983 or I/O as other tasks might otherwise ever, this block, if it uses LOAD, will Cost: $100 including 3 quarter hours overwrite the areas. have to be extensively edited if moved of academic credit Block 123 is a demonstration pro- to another system in which those Daily hands-on exercises gram that manipulates a list called blocks are already in use. LOG which has 10 entries with 4 bytes The word RLOAD takes a value Outline: per entry. from the stack, adds it to the number I. The Forth development system DL displays the whole contents of of the block in which the RLOAD is 11. Developing applications this list. (May not be used multi situated and then loads the resulting For people who want enough knowledge tasking.) FILL and SHOW are used to block and experience with Forth to write applica- fill the slots and display their contents : RLOAD BLK @ + LOAD ; tion programs and understand some of the respectively. This allows load blocks such as internal workings of a Forth system. Stu- V+T and V+B take a value off the dents should have some experience with stack and put it into each of the bytes 1 RLOAD 2 RLOAD (Device drivers) one other computer language. Knowledge 3 RLOAD 4 RLOAD (Control programs) allocated to a slot requested at the top 5 RLOAD (Test programs) of assembly language is not required. and bottom of the list. V-T and V-B take a slot off the top An additional benefit of this word is or bottom of the list and prints its that it allows position independent Using FORTH Effectively contents. documentation. A description of the 5 Day Advanced Class A typical application of these words package can be in terms of the relative Date: June 27 - July 1, 1983 is to have a terminal task driving a block numbers with a minor change to Cost: $150 including 3 quarter hours slow device such as a printer taking its the program listing words allowing of academic credit data from the top of a circular list. them to print relative rather than ab- Daily hands-on exercises including a Any tasks that wish to output mes- solute block numbers. meta-compilation workshop. sages to the printer may either add Outline: their lines to the bottom of the list or I. Forth system internals in a emergency may add them to the 11. Program development techniques top of the list. This is a very useful technique. I’ve : RUN-LOG TTY ACTIVATE For people who want an in-depth under- also seen the name +LOAD, which I BEGIN CR LOG-FILE think came from Kim Harris. Al- standing of the generation and internal -TLIST 64 -TRAILING operation of Forth systems. Students though I speak out against abbrevia- should have mastered an introductory TYPE 0 END; tions, I have a word in my own system Forth course or have 6 months experience And in the other tasks this puts a local called FH (for ‘Yrom here”) which with Forth, have mastered Starting Forth, buffer into the list. performs BLK @ + but not LOAD. and have knowledge of some assembly lan- BUFFER LOG-FILE The syntax therefore is guage and operating system principles. +BLlST 64 CMOVE 1 FH LOAD 2 FH LOAD as in “onefrom here, load.” I fac- Registration: RLOAD Program Package Load tored out LOAD because there are Send check or money order to: other things you may want to do, like Office of Continuing Education C.L. Stephens type text strings from disk. In any Humboldt State University case, note that the argument may be Arcata, CA 95521 COMSOL Chertsey, England positive or negative. Include the course title(s) and the number Finally --> doesn’t have to keep of people registering. Enrollment will be anything extra the return stack be- filled on a first-received, first-served basis. A problem frequently encountered on Your payment will be returned if a course when producing program packages is cause it doesn’t have to re-invoke is full. You will receive a registration pac- the need to move blocks to different LOAD. It merely must go ket with additional information. Direct areas of the disk in order to avoid con- ZERO >IN! 1 BLK +! questions to the above office; their phone flicts with blocks already occupied. to jump the interpreter pointers to the is (707) 826-371 1. Ask for Claire Duffey. The FORTH word --> which loads top of the next block. -Leo Brodie

FORTH Dimensions 27 Volume IV, No. 6 PWSlOlO 8 Bit CPU Card (6801), 8K FORTH Firmware PWS2030 Expansion Memory Board, JEDEC standard 6K EEPROM, 2K RAM, 16 llL110, RS 232C, programma- memory sockets ble timer, 2K monitor, 8K FORTH firmware includes: edi- Maximum of 64K EEPROM, EPROM or RAM. tor, assembler, high-level interrupt linkage and communications protocol. PWS3010 Color Video Graphics Card (T19918) 8K FORTH graphics firmware, 256x192 pixels, 15 Color PWSlO80 16 Bit CPU Card (68008) 16K FORTH Firmware graphic RS 170 video output, 16K video RAM, ability to 2K or 8K EEPROM, 8K RAM, RS 232C, 4 pro- GENLOCK to external video, JEDEC Stan- grammable timers. Non-multiplexed dard socket for additional firmware. memory expansion and waitstate gener- ator. 16K FORTH firmware includes: moni- PWS9010 STD BUS Card Cage tor, editor, assembler, high-level 6 Slots, mother board, integral interruDt linkage and communica- NEW power supply, 5 volts at 6 amps 2 tions protocol. - 12 volts at 1 amp, on/off and cir- cuit breaker switch. PWS2010 Interface Card, 8K extended FORTH firmware FORTH CUSTOM MADE BOARDS 2 16-bit I/O ports, compatible We will custom make boards to with industry standard optical your exact application if none of isolation boards, battery back- the aforementioned boards up calendar and clock, 2 28-pin meet your needs. JEDEC standard memory sock- ets for 2K or 8K CMOS, NMOS or CONSULTING EPROM memories, software Our FORTH Team people are ex- readable 8-bit switch. Firm- perts in FORTH based application ware options: P-FORTH Stan- development and are excited to dard Utilities, P-FORTH PLC be able to share their special with Ladder Diagrams or P- knowledge with you on a person- FORTH Multi-Tasking. STUFF al basis. We're racing into tomorrow to give you PWS2020 Interface Card a new family of control system prod- Watch for new products to come 2 16-bit I10 pods ucts today. Our innovative FORTH team in 1983 Compatible with industry continues to introduce versatile, pow- 5190 West 76th Street standard optical isolation erful and unique firmware with impor- Minneapolis, MN 55435 boards. tant advantages: low cost system development, interactive FORTH lan- guage to speed software creation, EE- PROM nonvolatile memory and STD BUS interfacing. Look through our new P€OPl€uJAR€ FORTH firmware, we know you'll discov- er an amlication for your current or /WT€M/ INC. (612)831-0827 TWX 910-576-1735

FORTH Dimensions 28 Volume IV, No. 6 FIG Chapter News Potomac Chapter work with FORTH for data collecting tors in 1982. We find it difficult to At the December 7th meeting we and shared his recollections and ideas hold new members as there is little heard how Ted Beach, using just a about FORTH. serious FORTH activity here, and we baker’s dozen of FORTH words, has are sometimes embarassed by the created a simple-minded disk directory Las Vegas Chapter question, “But what real applications system that anyone can install in their The third formal meeting of the Las are you running in FORTH?” Fortun- FORTH environment. The word DIR Vegas FIG was held Monday, 8 No- ately, this is changing and 1983 looks will list out the entire directory of vember 1982 at 7 P.M., Valley Bank most promising for FORTH in screens on a FORTH disk, while Center, 101 Convention Center Drive, Australia. FREE will print out the number of Suite 900. The availability of FORTH books unused screens available on the disk. The main subject of this meeting and software is limited here and the One of the most powerful features was coding forms. There were free Chapter has established a comprehen- of the directory system is a redefini- handouts of introductory FORTH lit- sive library of FORTH books for the tion of the FORTH word ’ (tick). The erature, and many FORTH tutorial use of our members. We also make new tick performs exactly as the stan- books and articles were available for available FORTH software, and the dard tick, but will also search all avail- browsing. Also featured was a demon- secretary is an agent for Mountain able disk drive directories for the word stration of MVP-FORTH on the IBM View Press. We have a catalog we send before issuing an error message. If tick Personal Computer. to enquirers which describes mainly finds the word on any disk, it will load commercial books and software, as we the associated screen@) for you! Australia Chapter have not yet found the resources to Ted demonstrated the system on the Lance Collins, Secretary classify and package the mass of pub- Radio Shack Color Computer. The Australian Fig Chapter meets in lic domain FORTH items we are At the January 4th meeting, Steven Melbourne at the home of the secre- accumulating. Knowles discussed “FORTH in As- tary on the first Friday of each month. By the time this is published there tronomy.” Steve is an astronomer We have been going since mid-1981 may be a Sydney group under way. who for many years has used FORTH and have a core membership of about Contact Peter Pegeagle (02)524 7490 on minicomputers. Steve described his 10. We have welcomed about 30 visi- for details. JOIN THE APPLICATION MIGRATION! PRODUCE MACHINE TRANSPORTABLE CODE. GENERATE ROMABLE/HEADERLESS CODE. FORWARD REFERENCING ALLOWED. PUT FORTH ON OTHER COMPUTERS. PRODUCE EXECUTABLE IMAGE IN RAM OR ON DISK. PRODUCE ADDRESS MAP OF APPLICATION. NO LICENSE FEE OR ROYALTIES ON APPLICATIONS.

fig-FORTH CROSS-COMPILERSby NAUTILUS SYSTEMS Apple, Atari, TRS-80 Model I, Zenith, and Northstar fig-FORTH CROSS-COMPILER by LABORATORY MICROSYSTEMS CP/M-80, CP/M-86, IBM P.C., and 68000 (requires LAB FORTH at additional cost) 79-Standard Systems by MOUNTAIN VIEW PRESS CP/M-80 $300.00 + tax and $5.00 shipping and handling

Apple is a trademark 01 Apple computer Inc Atari IS a trademark of Atari Computer TRS-80 IS a tradernark of Tandy Corp Zenith isatrademark of Zenith Radio Corporation Northstar isatrademarkof NorthstarComputerS IBM IS a trademark of International Business Machines Inc Nautilus Systems > P.O. Box 1098 SANTA CRUZ, CA 95061

FORTH Dimensions 29 Volume IV, No. 6 DESIGNED BY EXPERTS IN THE FIELD OF MICRO-COMPUTERS RICHARD ALTWASSER AND STEVEN VlCKERS

Steven Vickers Steven gained his degree in Math at King’s College, Cambridge, England, and his Ph.D in Algebra at Leeds University. His first assignment after school was to create the Sinclair ZX-81 or Timex 1000 8K ROM, and to write the ZX-81 manual. Subse- quently he wrote most of the ROM for the Sinclair Spectrum or Timex 2000.

Richard Altwasser Richard gained his honors degree in Engineering at Trinity College, Cambridge, England. He joined Sinclair in September 1980, and was instrumental in the research that led to the development of the Spectrum or Timex 2OOO.

Recently these two experts started their own company and developed the Jupiter Ace range of hardware which is based on the exciting new language for micro-computers “FORTH”.

For the FORTH enthusiast The Jupiter Ace closely follows the FORTH 79 standard with extensions for floating point, sound and cassette. It has a unique and remarkable editor that allows you to list and alter words that have been previously compiled into the dictionary. This avoids the need to store screens of source, allowing the dic- tionary itself to be saved on cassette. Comprehensive error checking removes the worry of accidentally crashing your programs.

The Jupiter Ace also features a full-size moving-key keyboard, high resolution graphics, sound, floating point arithmetic and 3K of RAM. Expandable to 51 K.

Order Form: Product Price Qty. Send To - - Computer Distribution Assoc. Jupiter Ace $150 56 South 3rd Street 16K Ram Pack $ 50 Oxford, Penna. 19363 48K Ram Pack $125 Par/Ser Interface $100

Credit Card No. Exp. Date Shipping and Handling $4.95

Signature

FORTH Dimensions 30 Volume IV, No. 6 Start Your Own FIG Chapter

What is a FIG Chapter? Why Have a FIG Chaptefl at bulk rates; local chapters can sell them to raise money, and to provide There are two kinds of FIG chap- A chapter lets you share informa- immediate local access to the material. ters: local, and special-interest. Local tion with other FORTH users in your (E) Chapters can apply to FIG for chapters are centered in a city or re- geographical or application area. In one-time funding for activities. gion. Special-interest chapters may be addition, FIG provides several specific non-geographical; they focus on an in- benefits: How to Start a FIG Chapter terest area such as an application (e.g., (A) FIG will list your chapter in robotics, telecommunication), or on FORTH Dimensions, so that others To be recognized as a chapter, a FORTH for a particular computer. can find your group. group must have (1) a contact person, All chapters must provide a contact (B) FORTH Dimensions will give (2) regular public access (usually by point, and some form of regular pub- priority to publishing chapter news, meetings which are open to the lic access (usually meetings). Non- which can help you make professional public), and (3) at least five members geographical chapters will normally contacts in the areas of your particular of FIG. If you don't know five mem- provide other forms of access, such as interests. bers in your area, FIG can help you a newsletter or telecommunications, (C) FIG will occasionally supply contact them. If you want to start a instead of meetings. material, such as meeting handouts or chapter, send a request for a FIG tapes, which can serve as a discussion Chapter Kit to the Chapter Coor- topic at local meetings. dinator, FORTH Interest Group, P.O. (D) FIG will supply its publications Box 1105, San Carlos, CA 94070.

Ver. 2 For your APPLE II/II+ Version 2 For 2-80, CP/M (1.4 & 2.x), The complete professional software system, that meets & Northstar DOS Users ALL provisions of the FORTH-79 Standard (adopted Oct. The complete professional software system, that meets 1980). Compare the many advanced features of FORTH- ALL provisions of the FORTH-79 Standard (adopted Oct. 79 with the FORTH you are now using, or plan to buy! 1980). Compare the many advanced features of FORTH- FEATURES OURS OTHERS 79 with the FORTH you are now using, or plan to buy!

79 Standard system gives source portability YES FEATURES OURS OTHERS Professionally written tutorial & user manual 200 PG. 79 Standard system gives source portability YES - Screen editor with userdefinable controls YES Professionally written tutorial & user manual 200 PG - Macro-assembler with local labels YES Screen editor with userdefinable controls YES - Virtual memory YES Macro assembler with local labels YES - Both 13 & 16-sector format YES Virtual memory YES - Multiple disk drives YES BDOS BlOS & cbnsole control functions (CP/M) YES - Double-number Standard & String extensions YES FORTH screen files use standard resident Upper/lower case keyboard input YES file format YES LO-Res graphics - YES Double-number Standard & String extensions YES 80 column display capability - YES Upper/lower case keyboard input YES - 2-80 CP/M Ver 2 x & Northstar also available YES APPLE I l/l I+ version also available YES Affordable1 - $99.95 Affordable! $9995 Low cost enhancement option - Low cost enhancement options Hi-Res turt le-graphics YES Float ing point mathemat ics YES Floating-point mathematics YES - Powerful package with own manual. Tutorial reference manual 50 functions (AM9511 compatible format) 50 functions in all, AM951 1 compatible Hi Res turtle graphics (NoStar Adv only) YES - FORTH-79 V.2 (requires CP/M Ver. 2.x). FORTH-79 V.2 (requires 48K & 1 disk drive) $ 99.95 $99 95 ENHANCEMENT PACKAGE FOR V.2 ENHANCEMENT PACKAGE FOR V.2: Floating point & Hi-Res turtlegraphics 49.95 Floating point $ 49.95 $ COMBINATION PACKAGE (Base & Floatins point) COMBINATION PACKAGE $139.95 $139.95 (CA res. add 6% tax. COD accepted) (advantage users add $49 95 for HI Res) (CA res add 6% tax, COD & dealer inquiries welcowe)

- I MicroMotion- - _._ J, ,? MicroMotion 12077 Wilshire Blui # 506 12077 Wilshire 81d # 506 L A , CA 90025 (213) 821 4340 LA,CA 90025 (213) 821 4340 Specify APPLE CP/M or Northstar Specify APPLE, CP/M or Northstar Dealer inmitrips invited Dealer inquiries invited

FORTH Dimensions 31 baume l'i Yc 6 Quest Research, Inc.

P.O. Box 2553 Huntsville, AL 35804 W 205-533-9405 Toll Free 800-558-8088

L

FORTH Dimensions 32 Volume IV, No. 6 FIG Chapters

MISSOURI DaUas/Ft. Worth Chapter ENGLAND St. Louis Chapter Monthly, 4th Thurs., 7 p.m. Software Automation English Chapter Call David Doudna FORTH Interest Group U.S. 3 141867482 1005 Business Parkway Richardson, TX 38 Worsley Road Call Marvin Elder Frimley, Camberley NEVADA 2141231-9142 or Surrey, GU16 5AU, England ARIZONA Las Vegas Chapter Bill Drissel Phoenix Chapter Suite 900 2141264-9680 JARAN Dennis L. Wilson 101 Convention Center Drive Las Vegas, NV 89109 Japanese Chapter Samaritan Health Services UTAH Masa Tasaki 2121 E. Magnolia 7021737-5670 Sdt Lake City Chapter Baba-Building 8F Phoenix, Az 3-23-8 Nishi-Shimbashi 6021257-6875 Call Bill Haygood NEW JERSEY 8011942-8000 Minato-ku, Tokyo New Jersey Chapter 105 Japan CALIFORNIA Call George Lyons VERMONT Los Angeles Chapter 2011451-2905 eves. NETHERLANDS Vermont Fig Chapter Monthly, 4th Sat., 11 a.m. HCC-FORTH Interest Allstate Savings Monthly, 3rd Mon., 7:30 p.m. NEW YORK Vergennes Union High School Group Chapter 8800 So. Sepulveda Boulevard F.J. Meijer Los Angeles New York Chapter Room 210, Monkton Road Call Tom Jung Vergennes, VT 05491 Digicos Phillip Wasson Aart V.D. Neerweg 31 2 131649-1428 2121746-4602 Contact Hal Clark RD #1 Box 810 Ouderkerk A.D. Northern California Chapter Starksboro, VT 05487 Amstel, The Netherlands Monthly, 4th Sat., 1 p.m. OKLAHOMA 8021877-2911 days; FORML Workshop at 10 a.m. nlsa Chapter 8021453-4442 eves. WEST GERMANY Palo Alto area. Monthly, 3rd Tues., 7:u) p.m. Contact FIG Hotline West German Chapter The Computer Store VIRGINIA 415/%2-8653 4343 South Peoria Klaus Schleisiek Tulsa, OK Potomac Chapter FIG Deutschland Orange County Chapter Postfach 202264 Monthly, 4th Wed., 12 noon. Call Bob Giles Monthly, 1st Tues.. 7 p.m. 9181599-9304 or Lee Center D 2000 Hamburg 20 Fullerton Savings West Germany 18020 Brookhurst Art Gorski Lee Highway at Lexington St. Fountain Valley 91817434113 Arlington, VA 71415234202 Call Joel Shprentz 7031437-9218 eves. San Diego Chapter OHIO Weekly, Thurs., 12 noon. Dayton Chapter Call Guy Kelly Monthly, 2nd nes. 7 141268-3100 ext .4784 Datalink Computer Center SPECIAL GROUPS 4920 Airway Road MASSACHUSEns Dayton, OH 45431 Call Gary Granger Boston Chapter Apple Corps FORTH 5131849-1483 Chapter Monthly, 1st Wed., 7 p.m. Users 'hice Monthly, 1st & Mitre Corp. Cafeteria 3rd 7:30 pm Bedford, MA OREGON Tues., AUSTRALIA 1515 Sloat Boulevard, #2 Bob Demrow Portland Chapter San Francisco, CA 6171688-5661 after 5 p.m. Call Timothy Huang Australia Chapter Call Robert Dudley Ackerman 9529 Northeast Gertz Circle Contact Lance Collins 41516266295 Portland, OR 9721 1 65 Martin Road MICHIGAN Detroit Atari FORTH Detroit Chapter 5031289-9135 Glen Ins, Victoria 3146 (03)292600 Monthly, 1st Wed. Call Dean Vieau Call Tom Chrapkiewicz 3131493-5 105 PENNSYLVANIA 3131524-2100 or Philadelphia Chapter CANADA 3 131772-8291 MINNESOTA Continental Data Systems Southern Ontario Chapter Nova Group Chapter MNFIG Chapter 1 Bala Plaza, Suite 212 Contact Dr. N. Solntseff Contact Mr. Francis Saint Monthly, 1st Mon. Bala Cynwid, PA 91004 Unit for Computer Science 2218 Lulu MNFIG Call Barry Greebel McMaster University Witchita, KS 67211 1156 Lincoln Avenue Hamilton, Ontario L8S 4K1 3161261-6280 days St. Paul, MN 55105 4161525-9140 ext. 2065 TEXAS MMSFORTH Users Chapter Call Mark Abbot (days) Quebet Chapter Monthly, 3rd Wed., 7 p.m. 6121854-8776 or Austin Chapter Call Gilles Paillard Cochituate, MA Fred Olson Call John Hastings 4181871-1960 or Dick Miller 6121588-9532 5121327-5864 41 81643-2561 61 71653-6136

FORTH Dimensions 33 Volume IV, No. 6 FORTH System Vendors (by Category)

(Codes refer to alphabetical listing e.g., A1 signifies AB Computers, etc.)

Cromemco ...... As, M2. M6 Processors DEC PDP/LSI-11 ...... C2. F3. L2, S3 1802 ...... Cl, C2, F3, F6. L3 Heath-89 ...... M2, M6 Hewlett-Packard 85 , 6502(AIM, KIM, SYM) . . . , . R1, R2, S1 ...... 6800 ...... C2, F3, F5, K1, L3, M6, T1 Hewlett-Packard 9826/36 . . . . C4 6801 ...... P4 IBMPC ...... A8. C2, F3. L1. M5, M6, 42, S9. 6809 ...... C2, F3, L3, M6, S11. T1 w2 68000 ...... C2, C4, D1, El, K1 IBMOther ...... , ...... L3, W1 Kaypro II/Xerox 820 . . . . . 68008 ...... , ...... P4 . . . M2 8080/85 ...... As, C1, C2, F4, 15, L1. L3. M3, Micropolis ...... A2, M2. S2 M6, R1, T3 Northstar ...... 15, M2, P1, S7 Z80/89 ...... A3, As, C2, F4, 13, Ll, M2. M3. Nova ...... C5 M5, Nl, T3 OhioScientific . . . , ...... A6. B1. C3. 01, S6, T2 Z8oooO ...... I3 Osborne ...... M2 8086/88 ...... C2, F2, F3, L1, L3, M6 PetSWTPC ...... Al. A6. B1. C3. 01, S6, T2, T5 9900 ...... E2, L3 Poly Morphic Systems ...... A7 TRS-8011.11,111 ...... 15, M2, M5, M6, S4, S5. S10 Operating Systems TRS-80Color ...... A3, AS, F5, M4, S11, T1 CP/M ...... A3, As, C2, F3, 13, L3, M1, M2, Vector Graphics ...... M2 M6, T3 CP/M86 ...... C2 Other Products/Services Applications ...... P4 Computers Boards, Machine ...... F3. M3. P4, R2 AlphaMicro ...... P3, S3 Consultation ...... C2, C4, N1, P4, T3, W1 Apple ...... , ...... A4, F4. 12. 14, J1, LA, M2. M6, CrossCompilers ...... C2. F3. 13, M6. N1, P4 02, 03 Products, Various ...... As, C2. F3, IS, S8, W2 Atari...... M6, P2, Q1, V1 Training ...... , ... C2. F3, 13, P4, W1

FORTH System Vendors (Alphabetical) The following vendors offer FORTH systems, applications, or con- keep us informed on availability of the products and services listed. sultation. FIG makes no judgement on any product, and takes no Vendors may send additions and corrections to the Editor, and must responsibility for the accuracy of this list. We encourage readers to include a copy of sales literature or advertising.

C F 3. Inner Access FORTH Systems 1. CMOSOFT 1. Fantasia Systems, Inc. P.O. Box 44037 1059 The Alameda 517K Maxine View 1. AB Computers Sylmar, CA 91342 Belmont, CA 94002 Belmont, CA 94002 4151593-5700 41 5/591-8295 252 Bethlehem Pike 2. COMSOL, Ltd. Colmar, PA 18915 Treway House 3. FORTH, Inc. 4. Insoft 215/822-7727 Hanworth Lane 2309 Pacific Coast Highway 10175 S.W. Barbur Blvd. 2. Acropolis Chertsey, Surrey Hermosa Beach, CA 90254 Suite #UnB 17453 Via Valencia England KT16 9LA 2131372-8493 Portland, OR 97219 503/244-4181 San Lorenzo, CA 94580 3. Consumer Computers 4. FORTHWare 4151276-6050 8907 La Mesa Blvd. 639 Crossridge Terrace 5. Interactive Computer 4. Applied Analytics Inc. La Mesa, CA 92041 Orinda, CA 94563 Systems, Inc. 8910 Brookridge Dr., #300 714/698-8088 6403 Di Marco Rd. 5. Frank Hogg Laboratory Tampa, FL 33614 Upper Marlboro, MD 20870 4. Creative Solutions, Inc. 130 Midtown Plaza 5. Aristotelian Logicians 4801 Randolph Rd. Syracuse, NY 13210 2631 E. Pinchot Ave. Rockville, MD 20852 31514747856 J Phoenix, AZ 85016 5. Capstone Computing, Inc. 6. FSS 1. JPS Microsystems, Inc. 7. Abstract Systems, etc. 5640 Southwyck Blvd., #TE P.O. Box 8403 361 Steelcase Rd., W. RFD Lower Prospect Hill Toledo, OH 43614 Austin, TX 78712 Markham, Ontario Chester, MA 0101 1 4 1918664503 5 12/477-2207 Canada L3R 3V8 8. Armadillo Int’l Software E I 4161475-2383 P.O. Box 7661 1. Emperical Research Group 1. IDPC Company Austin, TX 78712 P.O. Box 1176 P.O. Box 11594 K 512/459-7325 Milton, WA 98354 Philadelphia, PA 191 16 206/631455 21516763235 1. Kukulies, Christoph B Ing. Buro Datentec 1. Blue Sky Products 2. Engineering Logic 2. IUS (Cap’n Software) Heinrichsallee 35 729 E. Willow 1252 13th Ave. 281 Arlington Ave. Aachen, 5100 Signal Hill, CA 90806 Sacramento, CA 95822 Berkeley, CA 94704 West Germany 41 5625-9452 FORTH Dimensions 34 Volume IV, No. 6 I FORTH System Vendors

L 2. Pink Noise Studios 11. Stearns, Hoyt Electronics Consultation & mining only 1. Laboratory Microsystems P.O. Box 785 4131 E. Cannon Dr. See System Vendor Chart 4147 Beethoven St. Crockett, CA 94525 Phoenix, AZ 85028 for others Los Angeles, CA 90066 41 5/787- 1534 6021996-17 17 Boulton, Dave 21 31306-7412 3. Professional Mgmt. Services T 581 Oakridge Dr. Redwood City, CA 94062 2. Laboratory Software 724 Arastradero Rd., #lo9 1. Talbot Microsystems Palo Alto, CA 94306 Systems, Inc. 1927 Curtis Ave. Brodie, Leo 4O8/252-22 18 3634 Mandeville Canyon Redondo Beach, CA 90278 9720 Baden Ave. Los Angeles, CA 90049 4. Peopleware Systems Inc. Chatsworth, CA 91311 2. Technical Products Co. 2131472-6995 5190 West 76th St. 2131998-8302 P.O. Box 12983 Minneapolis, MN 55435 3. Lynx Gainsville, FL 32604 Eastgate Systems Inc. 612/831-0872 3301 Ocean Park, #301 90413724439 P.O. Box 1307 Santa Monica, CA 90405 Q Cambridge, MA 02238 2131450-2466 3. Thin Engineering Co. 1. Quality Software 6044 Erlanger St. Girton, George 4. Lyons, George 6660 Reseda Blvd., #lo5 San Diego, CA 92122 1753 Franklin 280 Henderson St. Reseda, CA 91335 714/455-9008 Santa Monica, CA 90404 Jersey City, NJ 07302 21 3/829-1074 201/451-2905 2. Quest Research, Inc. 4. ’Itansportable Software P.O. Box 2553 P.O. Box 1049 Go FORTH M Huntsville, AL 35804 Hightstown, NJ 08520 504 Lakemead Way 1. M & B Design 800/558-8088 60914484175 Redwood City, CA 94062 4151366-6124 820 Sweetbay Dr. R V Sunnyvale, CA 94086 Harris, Kim R. 2. Rockwell International 1. Valpar International Forthright Enterprises 2. MicroMotion Microelectronics Devices 3801 E. 34th St. 12077 Wilshire Blvd., #506 P.O. Box 50911 P.O. Box 3669 lbcson, AZ 85713 Palo Alto, CA 94303 Los Angeles, CA 90025 Anaheim, CA 92803 800/528-7070 21 3h21-4340 4151858-0933 7 141632-2862 W 3. Microsystems, Inc. S Laxen, Henry H. 2500 E. Foothill Blvd., #lo2 1. Ward Systems Group 1259 Cornell Ave. 1. Saturn Software, Ltd. Pasadena, CA 91 107 8013 Meadowview Dr. Berkeley, CA 94706 2131577-1477 P.O. Box 397 Frederick, MD 21701 415/525-8582 New Westminister, BC 4. Micro Works, The V3L 4Y7 Canada 2. Worldwide Software McIntosh, Norman P.O. Box 1110 2555 Buena Vista Ave. 2908 California Ave., #3 Del Mar, CA 92014 2. Shaw Labs, Ltd. Berkeley, CA 94708 San Francisco, CA 941 15 P.O. Box 3471 7141942-2400 4151644-2850 415/563-1246 Hayward, CA 94540 5. Miller Microcomputer 4151276-6050 Z Metalogic Corp. 61 Lake Shore Rd. 4325 Miraleste Dr. 3. Sierra Computer Co. 1. Zimmer, Tom Natick, MA 01760 292 Falcato Dr. Rancho Palos Verdes, CA 90274 617/653-6136 617 Mark NE 21315 19-7013 Albuquerque, NM 87123 Milpitas, CA 95035 ‘ Petri, Martin B. 6. Mountain View Press Boards & Machines Only P.O. Box 4656 4. Sirius Systems 15508 Lull St. 7528 Oak Ridge Highway See System Vendor Chart Mountain View, CA 94040 for others Van Nuys, CA 91406 41 5/%1-4103 Knoxville, TN 37921 21 3/908-0160 615/693-6583 Controlex Corp. N 16005 Sherman Way Redding Co. 5. Software Farm, The P.O. Box 498 1. Nautilus Systems P.O. Box 2304 Van Nuys, CA 91406 2131780-8877 Georgetown, CT 06829 P.O. Box 1098 Reston, VA 22090 2O3/938-938 1 Santa Cruz, CA 95061 Datricon 6. Software Federation Schleisiek, Klaus 408/475-7461 7911 33rd Dr., #u)o 44 University Drive NE Eppendorfer Landstr. 16 0 Arlington Hts., IL 6ooo4 Portland, OR 9721 1 503/284-8277 D uxx) Hamburg 20 1. OSI Software & Hardware 3 12/259-1355 West Germany 3336 Avondale Court 7. Software Works, The Golden River Corp. (040)480 8 154 Windsor, Ontario 1032 Elwell Ct., a10 7315 Reddfield Ct. Falls Church, CA 22043 Schrenk, Dr. Walter Canada N9E 1x6 Palo Alto, CA 94303 Postfach 904 5 19/%9-2500 41 5/%0-1800 7500 Karlstruhe-41 2. Offete Enterprises 8. Supersoft Associates Application Packages Only West Germany 1306 S “B” St. P.O. Box 1628 See System Vendor Chart for others Software Engineering San Mateo, CA 94402 Champaign, IL 61820 317 W. 39th Terrace 3. On-Going Ideas 2171359-2112 Curry Associates Kansas City, MO 641 11 RD #1, Box 810 9. Satellite Software Systems P.O. Box 11324 8161531-5950 Starksboro, VT 05487 288 West Center Palo Alto, CA 94306 4151322-1463 Technology Management, Inc. 802/453-4442 Orem, UT 84057 1520 S. Lyon St. P 801/224-8554 InnoSys Santa Ana, CA 92705 2150 Shattuck Ave. 7141835-9512 1. Perkel Software Systems 10. Spectrum Data Systems 5667 Phelps Luck Dr. Berkeley, CA 94704 1636 N. Sherman 415/843-8114 Springfield, MO 65803 Columbia, MD 21045 3011992-5635

FORTH Dimensions 35 Volume IV, No. 6 FORTH INTEREST GROUP

MAIL ORDER

FOREIGN LSA AIR ~h%?mbershipin FORTH Interest Group and $15 $27 Volume V of FORTH DIMENSIONS $15 $18

Ofig-FORTH Installation Manual, containing the language model $15 $18 of fig-FORTH, a complete glossary, memory map and installation instructions UAasembly Language Source Listings of fig-FORTH for apecific CPLh and machines. The above manual is required for installation. Check appropriate box(es). Ripa each. $15 $18 Oleo2 06502 06800 06809 OVAX 0280 ntmo O8086/6088 09900 DAPPLE II OECLIPsE UPACE ;I]NOVA npDp-11 068000 UALPHA MICRO U'Starting FORTH" by Brodie. BEST book on FORTH. (Paperback) $18 $22 O'Starting FORTH" by Brodie. (Hard Cover) $22 ' $27 UPROCEEDINGS 1980 FORML (FORTH Modification Lab) Conference $25 $35 UPROCEEDINGS 1981 FORML Conference, Both Volumes $40 $55 [ZIVo~umeI,.Language Structure $25 $35 UVolume II, Systems and Applications $25 $35 PROCEEDINGS 1982 FORML Conference $25 $35 OPROCEEDlNGs 1981 FORTH uliv. of Rochester Conference. $25 535 OPROCEEDlNGs 1982 FORTH uliv. of Rochester Conference $25 $35 OFORTH-79 Standard, a publication of the FORTH Standards Team $15 $18 UKitt Peak Primer, by Stevens. An in-depth self-study primer. $25 $35 OBYTE Magazine Reprints of FORTH articles, 8/60 to 4/81 $5 $10 OFlG T-shirts: OSrnall UMedium OLarge 0X-Large $10 $12 UPoster, August 1980 BYTE cover, 16" x 22" $3 $5 UFORTH Programmer's Reference Card. If ordered separately, FREE rend a stamped, addressed envelope. $7 $10 nor.- Dobb's Journal, Two FORTH Isauee, 9/81 6 9/82 TOTAL t -I_-_------NAME----- MAIL STOPIAPT- ORGANIZATION PHONE( 1 A-ESS------CITY_--- STATE ZIP COUNTRY_--- VISA # MASTERCARD # - Expiration Date- (Minimum of $15.00 m charge cards)

Make check or mmey order in US Funds on US bank, payable to: RG All prices include pastage. No purchaw &without check. California resident8 add destax. 1/83 ORaR PHON. (415) 9628653

FORTH INTEREST OROUP*PO BOX llOS*SAN CARLOS, CA 94070

FORTH INTEREST GROUP BULK RATE PO. Box 1105 U.S. POSTAGE PAID San Carlos, CA 94070 Permit No. 261 Mt. View, CA ... PLEASE ADVISE CORRESPONDENT OF YOUR CURRENT MAILSTATION #.