General Information Publisher's Column FORTH for the Motorola
Total Page:16
File Type:pdf, Size:1020Kb
~ ~~~ ~~~~~~ ~~ ~- FORTH INTEREST GROUP Volume II P.O. Box 1105 Number 1 San Carlos, CA 94070 Price $2.00 1 General Information Publisher's Column 3 FORTH for the Motorola 6809 6 Recursion - The Eight Queens Problem 7 A 'TINY' Pseudo-Code 9 FORTH in Literature 10 News & FIG Doings 12 New Products 15 Letters Published by Fath Interest Qoup June 8-13 -icm Ckmical Society Mime I1 ND. 1 Itay/June 1980 Junc 21 So. Cal. FIG Meeting, MSI Data Corp., 300 Fi&r Ave., Costa ksa, C4. "I. FUbliSher by C. Martens June 28 FIG Monthly Meeting, 1:OO pm, at Liberty Mitaial Review Board W, Hapad, CA. Cane to the FOWL Wk- sbp at 1o:oo dm and stay on. Bill Ragsdale Dave Bculton Kim Harris John James -9e Claverick !XRlW DIWICFLS solicits editorial mterial, COrmentS and letters. Eb responsibility is assured for accvacy of ilklterlal SUbnltted. 4LL MAERL4L PUBLISHED BY THE FCRIl4 IHPEREST GWP IS IN THE PUBLIC DOMAIN. InfOrmdtiOn in FatTH DIllZLJSICNS my be reproduced with credit given to PUBLISHER'S COLUMN the autha and the Fath Interest Qoup. SUbScriptiOn to FORI'H DI-IW is hee with nenbershlp in the Fath Interest Qoup at $12.00 per Far ($15.00 . m't let yw membership in FIG crash. &new today! merseas). Fcr membership, change of adhess and/a to It's easy. Just send in yw check for $12.00 ($15.00 =hut material, the address is: ovecse~)and p'11 be all set fa the next s1x issues of pu(n DLIIPISICS and the FIG mtices. If you are in dwbt Fath Interest Qoup as to whether your membership is up, just look at the P.O. Box 1105 address label. If it reads "Renew March 1980' then its San Caclos, CA 94070 tiae to get that check off. D3 it today. The next issue of FORTH DIMENSIONS is going to be super. It will be a teclnical issue with all tk. entries subnitted in the Case Cmtest. We sure that you receive this inpatant issue, renew yw nertership in FIG today. HISTORICAL PERSPECTIVE This my sound like a hard pitch for your membership hut PIG needs you. lte cnly way that we can keep m plblishirq Pccrm DWENSICS and qeading the FORRf wcrd is by having 'yar a;lppcrt. In fact, haw about getting others to sign KRlli ws created by W. Charles H. nace in 1969 at ehc rp. Matiara1 -10 AstroMmy Observatay, ~lott,eSVllle, VA. It was created out of dissatisfaction with available poqramurg tools, especially for cbervatxxy wtcamtion. rpu -tens It. nDQe and several associates famed m, Inc. in 1973 fa the purpose of lic~~ingand suppot-t of thc CORM Oprating System and Frogranaing Language, and to wly awlication pqranming to meet c(~lb311cTs unique require- mts . KIM HARRIS COURSE Ik Path Interest Qorq, is antered UI Natharn Cali- falUAr alVPuqh Ouc errhipOf 1100 iS eld-dd.. It A five day interuive mwse m gzqranming with FtXlW was fadin 1978 by PDRTH poqranrecs to enowage ua d will be held July 21-25 at Hurabolt State University in tb language by the interchange of ideas Urough dnrr Arcata, California. "he course will cover thc PORTH ud prhlications. rlp~roadr to wcducing canplter applications includiq: (1) ~yulyzinqth requirennts of a woblm, (2) &signing a logical aolution, and (3) impleaenting and testing the mluticn. lbpics will include the uaagt, extenion, ad internal8 of the FORTH language, compiler, assembler, virtual mine, wltirasking cperating wtem, mass stam IMPORTANT DATES virtual EY manager, and file system. Colprters will be available for demonstrations and class exercises. The CoULse will be taught by Kim Harris, and Humbolt State ryXil 26 PIG Monthly Meeting, 1:00 pm, at Liberty fhiversity will give 4 units of -edit though the offie of b&?e, Hapard, CA. to th loAlL Wak- Cartinuing mtion. Nition fa the cxxrse is 9112 per shop at 1o:w &a and stay on. stant. ?he wxt will be "Using FORlW: ropics will be available at the cars fa $25 each. Harsing is available hY20 National FIG Meeting, Disneyland Hotel, in very nice dcrmimy room8 fa $9 per person per night a .Anaheim, CA at the NCC Personal Caputing at several =by notels. Cafeteria meals may be prr* Festival. Dimin the evening and technical individually a at $10.25 per day. Ftc me informtim acssions all day. Contlrt: Jim Plarnry, and regisPation mtecials vrite, befae Jvle 23: (408) 779-0848. Rof. mldWmit May 24 FIG Monthly Meeting, 1:00 pm, at Liberty Physics Departwent Hcuae, Hapard, CA. Caa to th? RIIlLWak- nubolt State University shop at 1o:w dm and stay al. Arata, California 95521 Page 1 Fo#IH DIMENSIOESS II/1 FORML NEWS Camittee -ka&r netapoRIH - Nucleue kwrd -a TI7 Inc. 555 Rl Ry A=. Suuryvale, CA 94086 (408) 735-8080 FOWL (FORTH Modification Laboratory) 1s d research Ccnctrrency, Multitasking, mry Ilolma TOY,madinating individual effmts on the technical Executive Ccranication 808 Colemn, 121 ewlution of m. Waksbp mectlngs Be held the forrth synckon i zat ion knlo Pgk, CA 94025 Saturday of each mth at 1O:OO a.m. at the Liberty House, Hayuacd, UI. (Hake a day of it by staying Em the FIG seings John -saay meeting in the afternoon.) Working groups determine 11 HiramDnte R3ad and docunent: the ob]ectives (hat pxblems need to br &in&, CA 94563 solved), status of topic (what has already becn &re), (415) 254-2398 tk challenges (hat has to be done), the mpthods (th appropriate approach), the list (detailed topics and -tat ion Jotm S. J-8 problems), the specifications (requirements of valld P. 0. Ba 348 so1utim.s). You can input directly to the technical Berkeley, CA 94701 aamittees cr to FIG Chaicmn Kim Harris (see Files -1. (415) 526-8815 We wittees ad leaders are: CYaphics Hanard Fecarlmttm 1055 Ctegcm Ave. cam1t tee Pal0 Alto, CA 94303 (415) 8S644M Nmeric Extensions L bFXK StuKt Floating mint P.O. Box 1418 Piles OBllS Kim Win Sunnyvale, CA 94088 1055 Oregon Ave. (408) 296-6236 Pal0 Alto, CA 94303 (415) 85644% FaRML needs your help. Cane to the next meeting1 THIS IS THE BEGINNING! THE BEGINNING OF FIG TWO! THE BEGINNING OF FORTH DIMENSIONS 111 IT’S TIMTO RENEW! RENEW YOUR+1YIYI)ERSHIPIN FIG! RENEW YOUR SUBSCRIPTION TO FORTH DIMENSIONS! DO IT ALL FOR ONLY $12.001 00 IT TODAY! W.8 M8.W CHECK THE LAIaL IOR RENEW DATE! IF IT READS “Renew Mar. 1980” SEND A CHECK! SEND IT TO: FIG, P.O. Box 1105, San Carlos, CA 94070 RENEW NOW! FORTH DIneSSIONS II/1 Page 2 FORTH, for the Motorola 6809 Inside a word, one may use X and D without bothering to save their values on entry. If one wants a second index register (very handy for =me- thing like (EIOVE), then one or mre of Raymond J. Talbt, Jr . Y, S, or 0 registers may be swed in 7209 Stella Link, Suite 112 memory (or on one of the stacks). Houston, Texas 77025 Before listing the code which makes the FORTH machine, let me describe the 68'FORTH is an implementation of notation used to make dictionary fig-EWUH for the 6809 microprocessor. entries with the TSC assembler P4KXO It is available on 5" disk configured facili ty: for an SWTPC SS-50 Buss system with Swrpc MF-68 dual 5" disks and the TSC FLEX 9.0 disk operating system, but it is easily modifiable for other systems (write author for information). The 6809 is a greatly improved version of the Motorola 6800 8-bit microprocessor. It is almost like having a 16-bit micropocessor, since there are several 16-bit instructions. It has two 16-bit index registers X and Y, and a 16-bit accumulator register D A-I0 which may also be used as two 8-bit The &n quantities refer to parameter registers A and B. There are many to the MACRO. E.g., addressing modes , including indirect, autodecrement, and autoincrement. MACRO 4,BAS,E The two hardware stack registers will assemble as make it ideal for F'€)RTM - it is almost a FORTH machine in silicon. I have 84 42 41 53 C5 LI NK implemented FORTH by the following register assignments : Where LI NK is the link address to the previous entry. This macro coupled The FoIiTH variable with assembly of addresses allows one Stack - u stack register to write assembly language code that is essentially just colon definitions, The EDRTH return e.g., the macro definition of COLON Stack - S stack register itself below. The EDR!Ili in- Here is the assembly language str uction listing for the portion of the code pointer (IP) - Y index register which defines the 6809 FoR!IFl machine: The FORTH register W (which points to the machine code being exe- cuted) is never stored (to save an instruction which is usually unnecessary) , however , upon entry to a word's machine code, that address is in the -- X index regis ter A-11 Sane arbitrarily chosen examples of be read or written in lieu of the the great economy achieved by this use termiml. (The wurd READ switches KEY of the stack registers is given by some to read a text file, similarly WRITE words shown here (note: depending m switches EMIT to write a text file). location, some of the BRA have to be Consequently, it is possible to com- the long branch instruction LBRA). municate data between FORTH and other FLEX pxograms (Horrors - BASIC even!!). 7, LXDI3r.E '.2 '.2 X Another feature of 68' FORTH is Krn something which should be part of any l..' ..: FORTH system which operates under a D host Do5 - It has a mrd (underscore .v on some terminals, 1eFt arrow on Krr others) which is followed by a text 2.1.