Home

Dimensions

image

Contents

1. FORTH Dimensions Volume VII No 2 Name Link Code machine Field Field Field code PFA JSR NEXT JMP ae RM Figure One CCOMPILE ASSEMBLER CREATE SMUDGE LATEST PFA CFA END SUB ASSEMBLER HERE OVER COMPILE ASSEMBLER 2 JSR NEXT JMP END CODE EXAMPLE SUB TEST 41 LDA PRINT JSR RTS END SUB CALLED FROM COLON gt PRINT 1 TEST CALLED FROM CODE CODE PRINT 1 TEST JSR MEXT JME END CODE 25 FORTH INTEREST GROUP PRESENTS Forth National Convention September 20 21 1985 Complete conference program educational seminars and commercial exhibits Hyatt Rickeys in Palo Alto California USA euroFORML Conference October 23 1985 November 3 1985 International Technical conference at Stettenfels Castle SYSTEMS Trade Fair in Munich Guest and Tour Program in Germany Complete group travel arrangements from USA to Germany and return Forth Modification Laboratory November 29 1985 December 1 1985 A technical conference for advanced Forth practitioners Asilomar Conference Center Monterey Peninsula overlooking the Pacific Ocean Pacific Grove California USA Complete information available from the Forth Interest Group The Mirth Dimension PROJECT DIRECTOR EXPECT UPDATE VERSION WARNING IF SILENT TOGGLE WRITE CHECK AND EXPECT COLD HANDSHAKE ELSE COMPILE AGAIN AND B SILENT FORTH_PROGRAMMER TRAVERSE COLD SILENT OUTER SPACE A
2. Ultra Fast Text Search Using Probabilistic Dictionaries John James Santa Cruz California Suppose you have a large database of text files such as the documents in a lawyer s office perhaps one or 100 megabytes or more in dozens or hund reds of separate files You want to search the whole database for any files which contain certain words phrases or AND and OR combinations of words and phrases And you want the search to be very fast almost instantaneous I haven t implemented this proce dure and don t know of anyone who has So it s impossible to know for sure how well it will work Despite the uncertainty this tutorial seems worth publishing because it illustrates important data structures and concepts as well as offering the promise of important practical benefits Background The Probabilistic Dictionary Used in some spelling checkers the probabilistic dictionary is a most inter esting data structure and one which opens new approaches to a number of problems explain it first with an example Suppose a spelling checker needs a dictionary of about 40 000 English words but only has 100K bytes to store them in RAM and can t afford the speed penalty of keeping the words on disk which could require a separate disk access for each word being checked A probabilistic dictionary can comfortably store the words in two and a half bytes each no matter how long the actual words are To build the dicti
3. Bryte Computers Inc P O Box 46 Augusta ME 04330 207 547 3218 SMS 8 Volume VII No 2 Journey to the We recently returned from the an nual Rochester Forth Conference The lively event was sponsored by the In stitute for Applied Forth Research in cooperation with the Laboratory for Laser Energetics and the IEEE Com puter Society That says something interesting about the times if anything does The directors and staff of the Forth Institute assembled a stimulating program that is reviewed elsewhere in this issue in necessarily brief terms there were about sixty presentors In this issue we make good on promises past Due to a last minute error our last cover promised Menus in Forth but it was nowhere to be found inside the article had been re scheduled This time you ll find it East honest Also included herein are screens to accompany Morton s Mathquiz Thanks to the readers who wrote to request them As a side note columnists John Hall and Henry Laxen are absent at least for the time being Add to the list of FIG membership benefits a new one major medical insurance In the U S only FIG mem bers their families and possibly their employees are now eligible for group rates Current members will be receiv ing notice in the mail with specifics about the health care plan Those of you who work independently or who run a small business may be particular ly interested
4. PRODUCTS BY DR C H TING INSIDE F83 New edition perfect binding Everything you want to know about the Perry Laxen F83 system but afraid to ask 288 packed pages divided into four parts tutorial on F83 system Forth kernel utilities and 8086 specific tools It is based on F83 Version 2 1 for the but useful as a reference manual for all other F83 Systems 25 00 FORTH NOTEBOOK New edition perfect binding Large collection of examples of Forth programming style in solving moderate to complicated problems Topics include games instrument control image processing and analysis microassembler and many more 25 00 SYSTEMS GUIDE TO fig FORTH The most authoritative treatise on how s and why s of the fig Forth Model developed by Bill Ragsdale The internal structure of Forth system 25 00 fig FORTH FOR NOVA COMPUTER 8 disk 50 00 Source listing 15 00 FORTH 79 ROM CARD FOR APPLE ROM card 50 00 Source listing 15 00 3C 9 TE 3 Te HE EIE IE EIE IE DOG GO A GA 9 EXE 9E PERRY LAXEN F83 SYSTEM DISKS F83 V 2 1 as dist ubuted by No Visible Support Ine Please carefully specify your CPU 0 5 and desired disk format 25 90 per disk PC DOS DD Format 1 F83 8086 for IBM PC CP M 8 SSDD Format 2 F83 8080 for CP M 3 F83 8086 for CP M d6 4 F83 68000 for CP M 68K IBM PC CP M 86 DD Format 5 F83 8080 for CP M 6 F85 8086 for CP M 86 7 F83 68000 for CP M
5. MVP FORTH PADS Professional Application Development System for IBM PC XT AT PCjr or Apple Il 1 or lle An integrated system for customizing your FORTH programs and applications The editor in cludes a bi directional string search and is a word processor specially designed for fast development PADS has almost triple the compile speed of most FORTH s and provides fast debugging techniques Minimum size target systems are easy with or without heads Virtual overlays can be compiled in object code PADS is a true professional development system Specify Computer 500 O MVP FORTH MS DOS file interface for PC PADS 80 C MVP FORTH Floating Point amp Matrix Math see above 85 C MVP FORTH Graphics Extension see above 65 O MVP FORTH EXPERT 2 System for learning and developing o knowledge based programs Both IF THEN procedures and analytical W subroutines are available Source code is provided Specify LJ Apple C1 IBM or O CP M Includes Books Vol 4 amp 6 100 D FORTH Writer A Word Processor for the IBM PC XT AT with 256K MVP FORTH compatible kernel with Files Edit and Print systems Includes Disk and Calculator systems and ability to compile additional FORTH words 150 MVP FORTH Fast Floating Point Includes 9511 math chip on board with disks documentation and enhanced virtual MVP FORTH for Apple Il I and Ile 450 Ordering Information Check Money Order payable to MOUNTAIN VIEW PRESS INC VIS
6. 2 50 Dimensions Menus p 5 the F orthCard STAND ALONE OPERATION STD BUS INTERFACE EPROM EEPROM PROGRAMMER RS 232 VO PARALLEL I O ROCKWELL FORTH CHIP The Forthcard provides OEMs and end users with the ability to develop Forth and assembly language programs on a single STD bus compatible card Just add a CRT terminal or a computer with RS 232 port connect 5 volts and you have a self contained Forth computer The STD bus interface makes it easy to expand Download Forth source code using the serial port on your PC Use the onboard EPROM EEPROM programming capability to save debugged Forth and assembly language programs Standard UV erasable EPROMs may also be programmed with an external Vpp supply Ask about our ForthBox Evaluation Unit 299 Part amp STD65F4 1 05 includes ForthCard Development ROM 8Kbyte RAM Manuals OEM Version as low as Part STD6SF11 00 4 99 does not include memory or manuals NEW Options and Application Notes Electrically Eraseable PROMs EEPROMs FREEZE the dictionary in EEPROM save in non volatile memory to be restored on power up Download Software for your IBM PC or CP M Non Volatile CMOS RAM with battery 2K 8K optional Clock calendar Fast 2MHz clock 4MHz crystal Disk Controller Card 5 Self Test Diagnostics Parallel printer interface A complete STD bus oriented system including the ForthCard Disk Controller Disk Drive s
7. And finally we would like to wel come five new chapters of the Forth Interest Group Members are now holding official meetings and other Forth related activities at MAD Apple FIG Chapter Madison Wisconsin Cache Forth FIG Chapter Oak Park Illinois Permian Basin FIG Chapter Odessa Texas Japan FIG Chapter Tokyo and Kyoto Japan and Rock land County FIG Chapter Pearl River New York Welcome to each group may your meetings prosper For a complete listing of all international FIG Chapters turn to the back pages of this magazine Marlin Ouverson Editor I ve used a file and editor system for three years and in spite of dire warn ings the only lightning I ve been struck by is my own programming speed I think it is vital that we move toward elimination of the restrictions repre sented by screens Unless it can adapt to the progress around it the Forth may not always be with us Sincerely Laughing Water Helena Montana Division Floors Him Dear Marlin I have never been one to pride myself on an understanding of divisional mathematics and the debates between floored to zero versus floored to negative infinity have escaped me Well you can imagine my delight when I recently had occasion to use division in a situation that illustrates the useful ness of the latter method In an appointment scheduler the day has been divided into five periods It is necessary to access prior and later pe
8. lack scr unlock kew exits a M a d Volume VII No 2 27 FORTH Dimensions Mass Transit Forth From June onwards some bus stops in the resort and retirement town of Weston super Mare Somerset U K will never be at a loss for words Waiting passengers will hear a quiet beeping and if they then press a button at the source of the sound a personable female voice will announce the time of day what buses are using that stop and when they are due When a bus is running off schedule inductive loop sensors buried in the road interrogate circuitry in the bus cab to identify it The microprocessor controller in the speech synthesizer scans the sensor detects the oncoming bus and a voice will announce something like The bus now approaching is a No 10 Meanwhile the controller figures out when the next one is due London based Triangle Digital Ser vices Ltd a one man outfit set up by Peter Rush developed the prototype hardware for the system Formerly a product manager with General Instru ment Microelectronics Ltd Rush set up shop to provide a systems service to potential users of voice systems He has developed a custom speech chip using a digital logic array This is mounted on a self contained Eurocard sized board To go with it there is a Forth language microcomputer board Rush s
9. For data on the DynaCom VMS VoiceStar contact John Cassady at 339 15th Street Oakland California 94612 415 763 6636 MVP Forth is distributed by Moun tain View Press Post Office Box 4656 Mountain View California 94040 415 961 4103 F83 the Laxen amp Perry Model is available on diskette at 25 for IBM PC CP M 8080 and 68000 from No Visible Support Software P O Box 1344 2000 Center Street Berkeley California 94704 The Rochester Forth Conference is held in June organized by the Institute for Applied Forth Research Inc 70 Elmwood Avenue Rochester New York 14611 716 235 0168 About the Author Bill Ragsdale has been using Forth since 1977 for personal and business projects He is married to Anne and they have children Mary three and Michael one The family recently com pleted a Caribbean cruise with 250 magicians The ship offered computer classes on twelve IBM PCs which Bill chose to skip However he was pleased to find MVP Forth in the ship s soft ware library Menus in Forth Frans Van Duinen Toronto Ontario Programs that display menus to show the various options available can be made very easy to use especially for the novice user This is particularly significant where the user gets minimal training and documentation if any at all such as with public domain software The menu program shows all options available at any specific point i e now that you ve selected opt
10. STD Card Cage Cabinet and power supply CALL TODAY FOR COMPLETE INFORMATION HiTech Equipment Corporation 9560 Black Mountain Road San Diego CA 92126 619 566 1892 FORTH Dimensions Published by the Forth Interest Group July August 1985 Di 1 Volume VII Number 2 mens ons Editor FEATURES Marlin Ouverson Production 15 Menus in Forth Cynthia Lawson by Frans Van Duinen Make life easier for users of application programs this article includes defini tions that make it simple for you to develop menus Forth Dimensions solicits editorial material comments and letters No responsibility is assumed for accuracy of material submitted Unless noted 25 Another Subroutine Technique by Donald Simard Want to call code subroutines from either colon or other code definitions but can t afford the run time penalty of earlier methods This one may come closer to the mark for you otherwise material published by the Forth Interest Group is in the public domain Such material may be repro duced with credit given to the author and to the Forth Interest Group Subscription to Forth Dimensions is free with membership in the Forth 27 The Hacker s LOCKER Interest Group at 15 00 per year by Cecil McG 27 00 foreign air For membership y Ceci cGregor change of address and to submit If a terminal supports line lock one can use it from Forth to preserve useful data material for publication the address is on the screen
11. Forth Applications 25 28 35 Forth in robotics graphics high speed data acquisition real time problems file management Forth like languages new techniques for implementing Forth and working group reports 324 ROCHESTER 1984 Forth Applications 25 28 35 Forth in image analysis operating systems Forth chips functional programming real time applications cross compilation multi tasking new techniques and working group reports ppp Ma M FORTH Dimensions Volume VII No 2 THE JOURNAL OF FORTH APPLICATION amp RESEARCH A refereed technical journal published by the Institute for Applied Forth Research Inc 401 JOURNAL OF FORTH RESEARCH V 1 1 15 16 18 Robotics 402 JOURNAL OF FORTH RESEARCH V 2 1 15 16 18 _ Data Structures 403 JOURNAL OF FORTH RESEARCH V 2 1 15 16 18 Forth Machines 404 JOURNAL OF FORTH RESEARCH V 2 2 15 16 18 Real Time Systems 405 JOURNAL OF FORTH RESEARCH V 2 3 15 16 18 _ Enhancing Forth 406 JOURNAL OF FORTH RESEARCH V 2 4 15 16 18 Extended Addressing REPRINTS 420 BYTE REPRINTS 5 6 7 Eleven Forth articles and letters to the editor that have appeared in Byte magazine 421 POPULAR COMPUTING 9 83 5 6 7 Special issue on various computer languages with an in depth article on Forth s history and evolution kx_ 3 DR DOBB S This
12. Ist Fri 8 p m Contact Lance Collins 65 Martin Road Glen Iris Victoria 3146 03 29 2600 Sydney Chapter Monthly 2nd Fri 7 p m John Goodsell Bldg Rm LG19 Univ of New South Wales Sydney Contact Peter Tregeagle 10 Binda Rd Yowie Bay 02 524 7490 BELGIUM Belgium Chapter Monthly 4th Wed 20 00h Contact Luk Van Loock Lariksdreff 20 2120 Schoten 03 658 6343 Southern Belgium FIG Chapter Contact Jean Marc Bertinchamps Rue N Monnom 2 B 6290 Nalinnes Belgium 071 213858 CANADA Nova Scotia Chapter Contact Howard Harawitz 227 Ridge Valley Rd Halifax Nova Scotia B3P2ES5 902 477 3665 Southern Ontario Chapter Quarterly Ist Sat 2 p m General Sciences Bldg Rm 312 McMaster University Contact Dr N Solntseff Unit for Computer Science McMaster University Hamilton Ontario L8S4K1 416 525 9140 ext 3443 Toronto FIG Chapter Contact John Clark Smith P O Box 230 Station H Toronto ON M4C5J2 COLOMBIA Colombia Chapter Contact Luis Javier Parra B Aptdo Aereo 100394 Bogota 214 0345 ENGLAND Forth Interest Group U K Monthly ist Thurs 7p m Rm 408 Polytechnic of South Bank Borough Rd London D J Neale 58 Woodland Way Morden Surry SM4 4DS FRANCE French Language Chapter Contact Jean Daniel Dodin 77 Rue du Cagire 31100 Toulouse 16 61 44 03 06 GERMANY Hamburg FIG Chapter Monthly 4th Sat 1500h Contact Horst Gunter Lynsche Common Inte
13. Phone TITLE AUTHOR UNT TOTAL a eee MuR EH SEE MEMBERSHIP se IP BELOW SUBTOTAL 10 MEMBER DISCOUNT MEMBER Check enclosed payable to FORTH INTEREST GROUP CA RESIDENTS SALES TAX O VISA D MASTERCARD HANDLING FEE 2 00 Card Expir Date MEMBERSHIP FEE 20 27 33 Signature NEW OR RENEWAL TOTAL PAYMENT MUST ACCOMPANY ALL ORDERS MAIL ORDERS PHONE ORDERS PRICES POSTAGE amp HANDLING SHIPPING TIME SALES TAX Send to Cail 408 277 0668 to place All orders must be prepaid Prices are Prices include shipping A Books in stock are shipped California deliveries Forth Interest Group credit card orders or for subject to change without notice Credit 2 00 handling fee is within five days of receipt add 6 San Francisco P O Box 8231 customer service Hours card orders will be sent and billed at required with all orders of the order Please allow Bay Area add 7 San Jose CA 95155 Monday Friday 3am 5pm current prices 15 minimum on charge 4 6 weeks for out of stock PST orders Checks must be in US drawn books delivery in most on a US Bank A 10 charge will be cases will be much sooner added for returned checks 7 85 FORTH Dimensions 24 Volume VII No 2 Another Subroutine Technique Donald Simard Severn Maryland David Held s article and subsequent letter Forth Dimensions V 3 and V 5 concerning code definitions callable by colon and code definitions provided a very useful techni
14. 1 2 3 4 5 5 7 8 3 0 2 3 4 5 0 1 2 3 4 5 5 7 8 9 0 1 2 3 4 3 13 Y spreadsheet display word definitions display spreadsheet senu of options on right side of display gt dis 74 Dat Menu 74 4 at Chol 74 amp at Data 74 8 at Flora 74 10 Mode 74 12 at Order 14 at Duit 74 5 Aigain 74 at E qu 74 9 Goto 74 ll at 74 13 at 74 15 at Row 14 spreadsheet display word definitions dis row labels cur row 8 dup 5 swap do i row max leave 18 i cur row 8 3 at i2 r loop label the rows on display V label fros cur row for 15 lines or until row aax V format in decisal 45 dis row names cur row 8 dup 15 swap do i aax leave V display 0 i cur row 8 3 at V place cursor at location i row nases row name len type required chars type Y display nases from array V only show nases that fit on loop 15 spreadsheet display ward definitions dis col labels cur col dup 4 swap do i col leave i cur col 8 13 27 2 at i ascii A eait Y label the coluans on display V label fros cur col Y for 4 cols or until col aax V forsat in alphabetic chars A thru 2 loop i dis col names That Title cur col dup 4 swap do i col aax leave cur col 15 21 V place cursor at location lat i col names col name len type Y type require
15. 1 FORTH Dimensions 1979 80 15 16 18 102 Volume 2 FORTH Dimensions 1980 81 15 16 18 103 Volume FORTH Dimensions 1981 82 15 16 18 104 Volume 4 FORTH Dimensions 1982 83 15 16 18 __ 105 Volume 5 FORTH Dimensions 1983 84 15 16 18 106 Volume 6 FORTH Dimensions 1984 85 15 16 18 0 5S 5 5 55s 0s REFERENCE 305 FORTH 83 STANDARD 15 16 18 The authoritative description of 83 Standard Forth For reference not instruction 300 FORTH 79 STANDARD 15 16 18_ The authoritative description of 79 Standard Forth Of historical interest 316 BIBLIOGRAPHY OF FORTH REFERENCES 2nd edition Sept 1984 15 16 18 Volume VII No 2 21 An excellent source of references to articles about Forth throughout microcomputer literature Over 1300 references ASSEMBLY LANGUAGE SOURCE CODE LISTINGS Assembly Language Source Listings of fig Forth for specific CPUs and machines with compiler security and variable length names 513 1802 MARCH 81 15 16 18 514 6502 SEPT 80 15 16 18 515 6800 MAY 79 15 16 18 516 6809 JUNE 80 15 16 18 817 8080 SEPT 79 15 16 18 _ 518 8086 88 MARCH 81 15 16 18 519 9900 MARCH 81 15 16 18 __ 520 ALPHA MICRO SEPT 80 15 16 18 521 APPLE II AUG 8
16. 30 Volume VII No 2 4 1 0 V spreadsheet word definitions 1 IBM key key dup 0 if key 128 then input special IBM keys Voc d in pad 1 20 2dup blank expect span 8 pad pad number V input double from keyboard Vf d fin d in drop input single nuaber Crem c fr CD em C4 RJ 8 spreadsheet eisc word definitions gt posi 0 21 2dup at 0 blot at position cursor on cad line pos2 0 22 2dup at 0 blat at position cursor on cad line VCo T if yes F i ac posi Are You Sure Y display msg key pc ascii Y Y return flag omark celi V mark cell on display 2dup at ascii amp emit swap 11 4 rows col swap at ascii gt emit mark cell like lt ungark cell 2dup at space swap 11 swap at space j unaark cell af display row colt reaove lt gt aarks from display 9 H 1 3 4 3 amp 7 8 9 0 1 2 3 4 3 3 spreadsheet aisc word definitions 1 cell Cur row row disp tur co 8 col disp celis j V return address of celi pointed Vat 5 display Barker V cell addr Cal call disp lot col disp 13 col org row disp row Drg i V calculate location on display af cell display markers col row place cell marker tal cell disp loc mark cell X place cell marker around cell 1 erase cell marker V erase celi marker around cell tal cell dis
17. 68K Listing for IBM PC F83 10 00 WIL BADEN S F83X FOR APPLE F83 adapted to Apple computer 5 25 disk with documentation 25 00 E AE Ae HE EE AE E ETE aE aE Send check or money order to Offete Enterprises Inc 1306 S B St San Mateo Ca 94402 Mailing amp Handling 10 of order Californians please add 6 5 sales tax CE JE IE 4 XE AE Volume VII No 2 FORTH Applications by Weber THE FORTH SOURCE MVP FORTH Stable Transportabie Public Domain Tools You need two primary features in a software development package a Stable operating system and the ability to move programs easily and quickly to a variety of computers MVP FORTH gives you both these features and many extras This public domain product includes an editor FORTH assem bler tools utilities and the vocabulary for the best selling book Starting FORTH The Programmer s Kit provides a complete FORTH for a variety of computers Other MVP FORTH products will simplify the development of your applications MVP Books A Series Vol 1 All about FORTH by Haydon MVP FORTH glossary with cross references to fig FORTH Starting FORTH and FORTH 79 Standard 2nd Ed 25 Vol 2 MVP FORTH Assembly Source Code Includes IBM PC CP M and APPLE listing for kernel 20 CJ Vol 3 F
18. 79 stand DEPARTMENTS Code and examples con form to fig FORTH 5 Letters 9 Editorial Journey to the East 12 Ask the Doctor Forth on the Front by William F Ragsdale 42 FIG Chapters Deals with new propos als and modifications to standard Forth sys tems Volume VII No 2 FORTH Dimensions MOVE UP TO 16bit FORTH COMPUTING ENTER THE POWERFUL WORLD OF 68008 PROCESSING TODAY FOR ONLY 399 HC120 8MHz 68008 CPU CARD SINGLE EUROCARD FORMAT HIGH SPEED CMOS LOGIC FOR HIGH NOISE IMMUNITY amp LOW POWER CONSUMPTION 1 MEGABYTE LINEAR ADDRESSING 2 SERIAL PORTS RS232 422 423 20 PROGRAMMABLE I O LINES REAL TIME CLOCK HARDWARE WATCHDOG ON BOARD BATTERY BACK UP TRIAL OFFER e INCLUDES n pars POWERFUL 16K ROM BASED LAXEN amp PERRY S F83 eu COMPREHENSIVE 16K DEBUG PACKAGE BATTERY BACKED 24K RAM amp CLOCK W sow us COMPLETE 80 PAGE MANUAL WITH CIRCUITS X FULL MULTI TASKING F83 FORTH SOURCE LISTING YOUR ORDER CAN RUN TOTALLY STAND ALONE ALL THIS FOR JUST 399 AND WIN A PRIZE DISC BASED FORTH SYSTEMS ALSO AVAILABLE FROM THE HC RANGE EXAMPLE HC100 8 SLOT BACKPLANE 99 HC110 POWER SUPPLY 110 220 240v please ganar 199 HC130 DMA DISC CONTROLLER WITH 8K BYTES CACHE FOR SUPERFAST COMPILATIONS 299 F83 FULL SOURCE CODE ON 5 3 DISC please indicate 29 AND MORE WRITE FOR DETAILS ADD 10 FOR SHIPPING 8
19. Here s a simple way to do it Forth Interest Group P O Box 8231 San Jose California 95155 28 Mass Transit Forth Symbol Table Bus passengers in this English city don t have to wonder when a late bus will arrive or whether an approaching bus is the correct one to board A Forth Simple introductory tu application tells them at the touch of a button torials and simple appli cations of Forth 30 Forth Spreadsheet Part II by Craig A Lindl Intermediate articles y aig L ey ans and code for more com This source code accompanies the article and pseudo code in the preceding issue plex applications and giving Forth users a customizable application program For a machine readable tutorials on generally dif version turn to the end of the listing i i ficult topics 38 Rochester Forth Conference 1985 Advanced requiring stu dy and a thorough under Forth programmers project managers and visionaries from several countries standing of Forth convened recently to discuss software engineering management and productivity The result was an exciting display of Forth and its adherents at their best Code and examples con 40 Probabilistic Dictionaries form to Forth 83 stand by John S James ard 5 5 Have you wondered how a 60 000 word spelling dictionary can be compressed into RAM Ultra fast text searches can be performed using techniques pertinent Code and examples con to a variety of applications form to Forth
20. INTERPRET call a component word INTERPRET to process each line Null can then be simply EXIT as in fig FORTH it exits INTERPRET at the end of a line Semicolon can be defined simply as an exit one more level to the caller of INTERPRET which will be a defining word The other work now done by semicolon compiling EXIT etc to finish a colon definition can actually be done in colon Semicolon then can be used to terminate any compiler construct not just those using colon Henry s version of semi colon lacks this generality Henry described the compiling as an outgrowth of Forth 83 which eliminates state smart words I still like state smart words but they really are irrelevent here Besides Forth 83 does not define as processing text like Forth 79 it defines both brackets vaguely as setting state so that text is subsequently compiled or sub sequently interpreted Code using Henry s therefore may not work on some quite standard systems On another subject credit should be given to D Val Schorre for his paper on Adding Modules to Forth in the proceedings of the 1980 FORML Con ference He presented the same tech nique described by Carol Pruitt in your March April issue under the title Local Definitions Sincerely yours George Lyons Jersey City New Jersey FORTH Dimensions 10 AE ME DE SE E IE DE BE BE IE AE BE JE AE GIO REI IE AE AE DE
21. LBR Thanks Henry Thanks Michael FVD28Apr84 MX8GX MX80 GRAFTRAX MX10GX 100 GRAFTRAX MX8NGX MX80 NOGTRAX MXlONGX 100 NOGTRAX MX80 100 2 NEW SEL TITLE AX MX8NGX ASet MX80 Set Printer Type CR CR AX MX8GX BSet MX80 with Graftrax AX MXlONGX CSet MX100 AX MX10GX DSet MX100 with Graftrax MENU SELX Note that E used will not skip leading blanks hence only one blank before menu text applies to A and AX N Menus Line spacing Page size SPACING 3 NEW SEL TITLE FVD28Apr84 Set Line Spacing CR CR AX 15 6 ASet 6 lines per inch AX 15 8 BSet 8 lines per inch AX 15 72 CSet line spacing in 1 72 inch increments GTR IF Ax LS 10 BSet 10 3 lines per inch AX 15 216 DSet line spacing in 1 216 inch increments AX LS 216 1 ESet 1 line spacing in 1 216 inch increments ENDIF MENU SELX PAGE 4 NEW SEL TITLE Set Page Size CR CR AX PG LN page length in lines AX PG IN BSet page length in inches AX PG WDTH CSet page width in characters MENU SELX Figure Six Sample of Execution Version of Menu Words Volume VII No 2 19 Multiuser Multitasking for 8080 Z80 8086 Industrial A Strength FORTH TaskFORTH The First Professional Quality Full Feature FORTH System at a micro price LOADS OF TIME SAVING PROFESSIONAL FEATURES w Unlimited number of tasks Multiple thread diction
22. Y word Creates col ids 1 V expect a on the TOS and Y pushes the cell value onto Y the paraaeter stack 34 28 Y spreadsheet algebraic functions cl 07 04 84 gt assign id col mai 0 da i col id loop Y loop used ta assign values ta the alphabetic coluans assign id AB COEFSHIJEKLMNDP BRSTUYVH XYZ is for example 1 A returns the double int value of celi 1 Coluan ids 1 return values of 0 25 respectively 23 spreadsheet algebraic functions oppe op stack dup B cl 06 31 84 return aprand stack position V ist location is stack ptr V addr Y store cfa and precedence top of oprand stack V cfa prec pop cfa and prec off oprand stack and compile into dict return precedence from top top of oprand stack V preci V end algebraic compilation pop remaining oprands off stk and compile then select forth vocabulary again 4 op stack opp8 2 opp 28 4 op stack drop 3 prec 8 Ja begin prec while op repeat forth immediate 30 spreadsheet algebraic functions cl 07 04 84 create high level definition that perforas algebraic compilation See text for detaiis of operation create new algebraic operator compile cfa of forth operator and assigned precedence at compile time execute if prec is lower then oprand on X tap of oprand stack z infix create swap iasediate does 28 begin dup p
23. cur col 0 col disp 0 row disp dis screen else drop then else drop then spreadsheet high level commands get operator response Vif then true to forsat flag Y otherwise false to format flag V show data in new forgat cl 07 04 84 Y replicate colusn data bring cell data to 105 data Y get of coluans Y if answer lt gt 0 V move right and store data clean up the stack and display the new data V else ignor if col 0 cl 07 04 84 goto specified row col X prompt for row check for praper range if ok store it V prompt far col letter A W get it and check its range V if ok goto data window Y store col V piace cell marker at origin show new screen drop 5 if out of range FORTH Dimensions Volume VII No 2 i 2 3 4 E 5 7 En ud c4 Cv a3 DO 199 of top row 200 of up arra 201 of left 4 cals 203 of left arrow 205 of right arrow 207 af bottoa row 208 of dawn arrow 209 of right amp cols 243 of first col 244 of last col L C4 5 gt 0 CX c de C4 BO Cc c LA 4 c else comaand in 4 0 3 no formulas amp no formulas dict mark c 4 spread sheet operator input processing cl 07 04 84 romaand in case ascii A of again repl ascii C of input col names ascii D of input cell data ascii E of input equ ascii F of foraat ascii 6 of ga
24. directional print on off A MSet bit 8 handling A NSet graphics mode A OHome print head ELSE A KSelect character set ASCII DUP 2DUP ANS ANS ANS ANS Allign posn ENDIF Graftrax dependent features gt FVD29Apr84 MAIN S gt Main Menu ASet printer type BSelect character font CSet line spacing DSet page size ESet to top of form FSet perforation skip GSet out of paper signal A HPrint test A IKeyboard to printer MNGTR A ZTo return to CP M CR CR AP Options specific to GTRAX not Position dependent N Menus MAIN FVD28Apr84 10 CASE MX80 100 FONT SPACING PAGE KEYBOARD BYE RESET CHAR UNI 8BIT GRAPHIC ONE WAY 1 MAIN 0 NEW MENU BEGIN 0 NEW SEL MAIN 1B ANS N Intercept Esc MENU SEL MAIN AGAIN Figure Four Examples Using Version Two Menu Words Volume Vil No 2 17 FORTH Dimensions positional CASE statement Every item in the menu had better always be in the same spot The ELSE clause in MNGTR enters dummy responses in PAD to ensure its length does not change If Exit is the fifteenth word in the CASE then MENU SEL had better always return a 15 when Exit is selected The escape mechanism too was troublesome As a general facility it should clean up the stack as well as exit Since we are talking about return ing to a calling routine menu a simple solution is to keep track of the positio
25. dis cussed NEON an object oriented lan guage making waves in the greater Macintosh community Pierre Moreton presented HFORTH an English like business application language and Arnold Epstein in trigued listeners with his MAGIC L which incorporates a Pascal like syntax for ease of maintainence For an afternoon session the con ference divided into about a dozen working groups special interest gath erings ranging in size from six to twen ty members Topics included educa tion Forth under Unix robotics image processing and artificial intel ligence state machines Forth in hard ware standards and others Brief reports from the groups indicated a variety of progress with at least one working group determining to continue research and to report back at next year s conference One evening was devoted to a tour of the University of Rochester s Labora tory for Laser Energetics with whose cooperation the conference was held For two hours conference attendees inspected the Forth controlled fusion research facility whose multiple beam laser can be fired at half hour inter vals LLE workers were kind enough not only to tolerate the presence of more than one hundred visitors crowd ing an evening shift but to answer many questions and generally humor us The lecture program concluded with FORTH Dimensions 38 Volume VII No 2 a presentation by Lawrence Forsley conference chairman His paper on
26. edit means forget it Besides offering greater power ease and flexibility a real editor conserves disk space I know big deal while encouraging commenting and high readability With a good file system it offers self documenting file names for code modules of whatever size the programmer chooses excess baggage screen number in decimal and hex initials date index line and line numbers Screen editors themselves are horribly weak so even interactivity can suffer There is hardly a virtue claimed by Forth that screens do not work against When resources are limited screens offer an easily implemented interac tive way to write programs in an in Any problems One is indexing without it well organized code in well named files is important a good idea in any case Another problem is navi gation between Forth and the editor to which fast operating systems multi tasking desktop utilities or non screen editors within Forth are all solutions Lastly compilation speed may suffer depending on how politely Forth re cremental fashion Fortunately re lates to its host the trend is toward sources are no longer that limited and politeness which eliminates the prob file systems with powerful editors have lem POs COST 130 page manual 30 00 8K EPROM with manual 100 00 Postage paid in North America inquire for license or quantity pricing tenti
27. else only change the display col names cl 07 04 84 get double scale if needed get double int from operator pllars cents format if so scale accordingly no DP value 100 0 OF value 106 1 DP value 10 2 005 no scaling 3 DPs value 10 if normal format no scaling perforsed ci 07 04 85 v input data to cell prompt for data entry get data and store it get mode flag if auto calculate mode i selected then caiculate v all zell data show the new data FORTH Dimensions 0 1 2 3 4 5 b 7 8 9 0 1 2 3 4 9 4 4 N Oe O 4 c4 A C4 M o OO mS D od C4 BRI c 37 spreadsheet input words input equ posi Input Cell Equation pos2 Equation tib 127 blank i formula al tib swap cmove tib 13 dup 127 expect span Ja cell ptr 2 3 literal 2 rot swap rot caove span 8 70 tib blk off din off algebra interpret forth input equation into dict prompt for equation clear tib preasble to aove to tib move it to tib get equation to tib V pt at end of input last 8 nage cell ptr V move to tib alsa make forth think it all V cane fron the keys V select algebra vocabulary compile equation inta dict V Back to forth vocabulary 38 spreadsheet high level commands quit calc Y exit spread sheet y n abort BYE V ask again if YES the
28. get gt 0 quotient screens are note their perfect analogy f RESULT CR develop dividend 8 RESULT to the numbered lines of BASIC Like 9 DIVIL 8 amp 9 format the problem line numbers Screen numbers are in 10 ANSHEN DINI e f comparte quotient with player s ans herent Wingless ti 11 IF CORRECT 1 SCORE rently meaningiess presenting 12 ELSE CR WRONG THE CORRECT housekeeping chores and working 13 ANSWER IS DIVIZ 8 against self documentation The pro 19 i E Continued cess of copying moving and inserting Screens is tedious even hazardous Volume VII No 2 7 FORTH Dimensions SCR 81 GREETING MODULE BRYTE FORTH fer the INTEL 8031 MICRO CONTROLLER CREATE NAME 40 ALLOT GREET PAGE WELCOME TO MATHQUIZ VERSION 1 3 GETNAME CR ENTER YOUR FIRST NAME CR QUERY 1 TEXT get players name PAD NAME 40 CMOVE move string from PAD to PLAYER NAME 40 TRAILING TYPE REGREET PAGE PLAYER you 10 MAY CHOOSE FROM THE CR Il FOLLOMING MENU CR GREET GETNAME 12 COMMENCE 13 SCR 82 LOOP amp SCORE MODULE DISPLAY CR PLAYER YOU WERE CORRECT SCORE DUP 2DUP TIMES CR QUT OF 10 INVERSE 8 gt IF VERY GOOD ZDROP ELSE b gt IF NOT BAD DROP ELSE BETTER WORK HARDER THEN THEN NORMAL 10 ADD 0 SCORE 10 0 DO these set up blocks of 10 ADD
29. magazine produces an annual special Forth issue which includes source code listings for various Forth applications 422 DR DOBB S 9 82 5 6 7 423 DR DOBB S 9 83 5 6 7 424 DR DOBB S 9 84 5 6 7 area HISTORICAL DOCUMENTS 501 KITT PEAK 25 27 35 One of the first institutional books on Forth Of his torical interest 502 FIG FORTH INSTALLATION MANUAL 15 16 18 1 Glossary model editor We recommend you purchase this manual when purchasing the source code listings Le Sn MISCELLANEOUS 601 T SHIRT SIZE 10 11 12 small medium large extra large 602 POSTER BYTE Cover 15 16 18 616 HANDY REFERENCE CARD FREE 683 FORTH 83 HANDY REFERENCE CARD FREE Volume VII No 2 23 M NER 7000 SELECTED PUBLICATIONS The following publications are recent additions to the Forth Interest Group Order Form as selected by the FIG Publications Committee LEARNING FORTH A Self Teaching Guide by Margaret A Armstrong Learning FORTH takes you step by step through the various stages of programming using a payroll program as an example In addition to developing a basic working knowledge of the language Learning FORTH teaches good programming style and easy debugg
30. to ascii M of aade ascii N of new ascii 0 of order ascii P of perfora calc ascii of quit talc ascii R of input row naaes endaf endof endof endaf endaf endof endof endof endof spreadsheet main pragraa endof replicate cell data endof X input column names endof Y input cell data endof input cell equation endof input display forsat endof gota cell andof set calc gode endof clear spreadsheet endof set calc order endof force calculations endof quit spreadsheet endof input row nases ee command key input if none pf the above cl 07 04 84 gato top row of sheet up cell X go left 4 coluans V left one cell y right one cell gota bottom row of sheet V down one cell Y go right 4 columns goto first column of sheet Y goto last column of sheet if none of above cl 09 21 84 main prograa word show screen get key convert te UE control or command key control key input show new status da forever dict aark has cfa of word to delete forsulas Warning msgs back on Availability of Spreadsheet Source Code and F83 To save some rather tough typing the source code for this program is available postage paid from the author for 25 6 Sutherland Place Manitou Springs Colorado 80829 It is however only available on 5 25 disk format for MS DOS or PC DOS The public domain F83 program should be availa
31. variable foraat flag variable cur col variable cur row variable col disp variable row disp variable dict mark variable op stack 44 allot 3 spreadsheet high level array definitions cl 07 04 84 Y auto calculate flag V calculation order flag X nuaber output format flag V top left display colum t i top left display row i coluan displacement from cur col on display row displaceaent from cur row an dispiay beginning of formula area operator stack for algebraic equation coapilation 05 21 04 create 2D array depth bytes deep 1 array V 5 cols depth colt element addr run compile tise time create 2dup swap C C dup here swap erase allot does dup c 3 roll 2 roll aver 1 2 create 1D string array depth characters deep farray rows depth row string addr compile tise run tine create dup c amp dug here swap blank allat does dup cB rot 1 b spreadsheet array definitions ci 05 28 84 define a 2D array for spreadsheet data structure 2 for formula execution address if any 4 for double nusber value storage each cell contains b bytes _ max bytes cell array cells V define a string array for holding the row naaes TOW Max row name len array row names V define a string array for holding the column names col aax col naae len array col names
32. 0 PAGE SYSTEMS MANUAL 25 SEND MONEY ORDER CHEQUE WITH ORDER ALL MAIN CURRENCIES ACCEPTED DELIVERY 2 4 WEEKS J 39 HIGH STREET COWBRIDGE SOUTH GLAMORGAN U K TEL 04463 2409 amp 4661 TELEX 498215 CF7 7AE Standard Bearers Dear Mr Ouverson The Financial Services Division of Computone Systems has developed an applications language specific to in surance using the Forth 83 Standard We think the remarkable thing about our language is that it runs on 8086 8088 6502 and Z80 based mach ines There is a lot of talk about lan guages being transportable but we found that most of it really is nothing but talk Without the new standard it is not likely that we could have ac complished the level of transportability that we have Computone has been developing software in Forth for the past two and one half years Initially Forth was dic tated by the machine we chose to mar ket We began our support of addition al machines by purchasing Forth pack ages from outside vendors One fact became clear early in our development phase there was no gen erally accepted standard and little con tinuity in vocabularies and functions among the Forth versions we were working with These differences be tween versions prevented our applica tions code from being as transportable as we needed Eventually we had to decide whether or not to continue our development exclusively in Forth When evaluating other languages as possi
33. 1 15 16 18 822 ECLIPSE OCT 82 15 16 18 523 IBM PC MARCH 84 15 16 18 1 FORTH Dimensions 524 NOVA MAY 81 15 16 18 525 PACE MAY 79 15 16 18 526 PDP 11 JAN 80 15 16 18 527 VAX OCT 82 15 16 18 528 Z80 SEPT 82 15 16 18 E _ BOOKS ABOUT FORTH 200 ALL ABOUT FORTH 25 26 35 11 Glen B Haydon An annotated glossary for MVP Forth a 79 Standard Forth 205 BEGINNING FORTH 17 18 221 Paul Chirlian Introductory text for 79 Standard 215 COMPLETE FORTH 16 17 20 1 Alan Winfield A comprehensive introduction including problems with answers Forth 79 220 FORTH ENCYCLOPEDIA 25 26 35 ___ Mitch Derick amp Linda Baker A detailed look at each FIG Forth instruction 225 FORTH FUNDAMENTALS V 1 16 17 20 1 Kevin McCabe A textbook approach to 79 Standard Forth 230 FORTH FUNDAMENTALS V 2 13 14 16 Kevin McCabe A glossary 233 FORTH 5 19 21 28 Gary Feierbach amp Paul Thomas The standard tools required to create and debug Forth based applications 237 LEARNING FORTH 17 18 21 Margaret A Armstrong Interactive text i
34. 1980 D 1981 Vol 1 1981 Vol 2 11982 1984 each 25 hester Proceedings 1982 1983 each 25 Ibliography of FORTH 17 he Journal of FORTH pplication amp Research Vol 1 1 Vol 1 2 Vol 2 1 Vol 2 2 Vol 2 3 each 17 METAFORTH by Cassady 30 Threaded Interpretive Languages Systems Guide to fig FORTH by Ting 25 Inside F83 Manual by Ting 25 FORTH Notebook by Ting 25 Invitation to FORTH 20 PDP 11 User Man 20 6502 User s Manual by Rockwell Intl FORTH 83 Standard FORTH 79 Standard 20 25 gt 10 15 15 15 15 by Air 5 for each item under 25 10 for each item between 25 and 99 and 20 for each item over 100 All prices and products subject to change or withdrawal without notice Single system and or single user license agreement required on some products MOUNTAIN VIEW PRESS INC PO BOX 4656 MOUNTAIN VIEW CA 94040 415 961 4103 William F Ragsdale Hayward California Ask the Doctor is Forth Dimen sions health maintenance organization devoted to helping you understand and use Forth Questions of a problem solving nature on locating references or just regarding contemporary tech niques are most appropriate When needed your good doctor will call in specialists Published letters will re ceive a preprint of the column as a direct reply This month your faithful practition er deviates from h
35. 40 track drive Personal License additional modules FORTHCOM communications module 49 UTILITIES GAMES EXPERT 2 expert system DATAHANDLER DATAHANDLER PLUS PC only 128K req FORTHWRITE word processor Corporate Site License Extensions Bulk Distribution trom 500 50 units eSome recommended Forth books STARTING FORTH programming THINKING FORTH technique BEGINNING FORTH re MMSFORTH 2 Shipping handling amp tax extra No returns on software Ask your dealer to show you the world of MMSFORTH or request our free brochure MILLER MICROCOMPUTER SERVICES 61 Lake Shore Road Natick MA 01760 617 653 6136 ing of the standards team s expression is if your application is done in a prior standard let it run If you are consid ering new effort and want it to have the longest life use the latest standard available As a professional you have a choice Next Issue The clinic will resume addressing reader inquires in the next issue Ma chine specific problems such as how to install fig FORTH on a VAX under UNIX aren t of general interest Ques tions should revolve around Forth in the manner of When BUILDS is re placed with CREATE does it have to be preceded by COMPILE Until next time I remain your obedient servant For More Information For information on the NC4000P processor contact John Golden at Novix 10590 N Tantau Ave Cuper tino California 95014 408 996 9363
36. A MasterCard American Express COD s 5 extra Minimum order 15 No billing or unpaid PO s California residents add sales tax Shipping costs in US included in price Foreign orders pay in US funds on US bank include for handling and shipping FORTH DISKS FORTH with editor assembler and manual APPLE by MM 83 S O Macintosh by MM 83 ATARI valFORTH O CP M by MM 83 HP 85 by Lange HP 75 by Cassady IBM PC by LM 83 CO IBM PC by MM 83 280 by LM 83 Enhanced FORTH with F Floating Point 100 125 60 100 90 150 100 125 100 D NEW BOOKS FORTH GUIDE by Haydon exploration of the intricacies of MVP FORTH 20 00 13 00 EGET DERECIMGUURCSDNUNDHECKOENCNENUIREMEISRSARGNUCEEMEREDIOHUCZINIEIGSDNIRMENC RM NEA MCCC RN IENGMETI KENN ERG ON CHEULZUCEFUOVOMESUE ee 8086 88 by LM 83 68000 by LM 83 100 250 VIC FORTH by HES VIC20 cartridge 20 C64 by HES Commodore 64 cartridge Timex by HW cassette LJ T S 1000 2X 81 2068 40 25 30 G Graphics T Tutorial S Stand Alone M Math Chip Support MT Multi Tasking X Other Extras 79 FORTH 79 83 FORTH 83 a m APPLE by MM F G amp 83 180 ATARI by PNS FG amp X 90 CPIM by MM F amp 83 140 TRS 80 I or Ill by MMS EX amp 79 C64 by PS MVP F G amp X 96 Key to vendors HW Hawg Wild Software LM Laboratory Mic
37. FIG Chapter meeting on July 28 Too bad our publication date means you will receive this issue of Forth Dimensions the following week FIG even has its own voice mail box For information on the next Silicon Valley Chapter meeting call 415 763 2002 and tone in 44414 For a demonstration key in 564 The Rochester Conference The Fifth Rochester Forth Confer ence continues to recieve rave reviews from attendees During early June over 180 people were hosted by Thea Martin and Larry Forsley Participants traveled from all over the U S Cana da the Netherlands Germany and the U K The program featured ten papers on Forth computers with three from Novix Novix Bob Murphy packed the house with the best rundown yet on the internals of the NC4000 Major firms are using Forth and appear to be making a significant commitment in their project work High visibility attendees at Rochester included Standard Oil Bell Canada and the GM Delco Division The working group on standards presided over by Mahlon Kelly no relation to Guy Kelly Forth Standards Team chairman got into the topic of transitions from Forth 79 to Forth 83 A significant attitude was expressed about the burden and value of shifting to Forth 83 from an earlier dialect Some opinion was offered that system and application changes weren t jus tified by the small perceived benefit Switch or Fight Forth 79 s five year lead has fi nally produced a comfortabl
38. Feel free to use this code for any purpose that is legal and moral Acknowledgments The Forth dialect used is Forth 83 as implemented by Henry Laxen and ANSX FVD28Apr84 Save allowed response Update count byte P ANSX stores menu char amp rtn addr in pad updates offset AX 5 gt R gt DUP SWAP 2 COUNT 2DUP gt R SWAP DUP DUP EMIT ROT 1 SWAP l CR IANSX Display menu item gt word text addr Step return addr past text Get lead char VN addr char count addr Display rest X amp save as allowed response gt word addr char P Displ menu item amp store its select char amp rtn addr in PAD S gt t N Define menus Version 3 MENU SELX ay S gt BEGIN UKEY 0 Compile menu word amp text item leaves AX IMMEDIATE word text FVD28Apr84 Get key amp set index Scan allowed responses char index flag gt char index Index past end yes Drop index check specials Terminate on C ELSE little more complicated but much more readable It actually works In version three the menu items and the corresponding execution word are combined There is no CASE statement Have a look at the sample in figure six first A is now called AX and is fol lowed by the name of a Forth word first and then by the text AX now not only puts the response code in PAD but also the address of
39. Get menu selection FVD28Apr84 Must be completed with CASE Figure Two Version One Example 15 FORTH Dimensions DASH FIND amp ASSOCIATES Our company DASH FIND amp ASSOCIATES is in the business of placing FORTH Program mers in positions suited to their capabilities We deal only with FORTH Programmers and companies using FORTH If you would like to have your resum included in our data base or if you are looking for a FORTH Programmer contact us or send your resum to DASH FIND amp ASSOCIATES 808 Dalworth Suite B Grand Prairie TX 75050 I ve included three versions of menu words Each successive version is more elaborate and somewhat more difficult to understand This progression from simple to reasonably complete is how I developed the various ideas This code is available on various RCP M bulletin boards The file MXSET BLK is a pro gram written in F83 to configure the N Menu support words Version ANS S char gt A S gt R gt COUNT 2DUP gt R Epson printer Note that it is not a complete program but rather a Study in Menus There is also EDITOR BLK a WordStar compatible screen editor that I adapted to F83 from the original version published by Laxen in Dr Dobb s Journal September 1981 Figure one shows the first approach It is concerned primarily with display 2 A ANS FVD28Apr84 Save allowed response PAD DUP C8 1 2DUP SWAP C C N Updat
40. ITION LOOP DISPLAY 10 SUB 0 SCORE 10 0 DO SUBTRACTION LOOP DISPLAY and zero the score at the 10 MULT SCORE 10 DO MULTIPLICATION LOOP DISPLAY beginning of each block 10 DIV 0 SCORE 10 DO DIVISION LOOP DISPLAY o ennt MM hence we create spaghetti loads that already been implemented The most make source code harder to follow natural least restrictive way to pro FEATURES FORTH 79 Standard Sub Set Access to 8031 features Supports FORTH and machine code interrupt handlers System timekeeping maintains time and date with leap year correction Supports ROM based seif starting applications Indeed the LOAD command is BASIC s GOTO expressed at a different level In addition to spaghetti loads screen boundaries encourage meatball code Long horizontally formatted uncommented definitions are a natural result of a screen boundary that takes effort to cross and the fact that blank areas get wasted By the way index lines manually added redun dance are another space waster So far said that screens work against flexibility space economy and self documentation Readability suf fers from spaghetti and meatballs plus duce code is with good text editors or word processors I won t dwell on their advantages over Forth editors To anyone who has tried them the dif ference is obvious in New York FIG
41. ND CREATE RANDOM DEFINITIONS FORTH_SOURCE_CODE EMIT RANDOM WORD AND REPLACE ERROR UNTIL SPACE MAX LIMIT OR TIME OVER Scott Heiner amp Steve Gledhill FORTH Dimensions 26 Volume VII No 2 Hacker s LOCKER Cecil McGregor Santa Clara California Many times when debugging Forth code it is convenient to use small throw away parts that will not be used in the later bug free version This could include a few lines of output that would be handy to keep on the display or portions of a dump to compare with something else It is not always desir able to edit this onto a screen and reload from that for changes nor is it always convenient to print it as hard copy These small gems then scroll off the top of the screen Or perhaps you are looking at the stack and would like to keep it around while you scrounge about analyzing a bug A few lines of 110 LOCKER HEX LINE LOCK 1B EMIT SCR LUNLOCE 1B EMIT Screen N LOCKER REGIN DUF TUF KEY ONDASUN pi pa r m 4 CL Sm Ct lack unlock 21 EMIT 71 EMIT OB CONSTANT UP ARRCUW LIF ARROW typing and it too goes off the top of the screen If you have a terminal that permits line lock such as a TeleVideo 950 and many others you can simulate a win dow that will lock the contents of the line until you release it Scrolling w
42. One is a Speech synthesizer board that can be operated directly from relay contacts asynchronous links over twisted pairs or parallel binary coded decimal inputs Forth Talk Triangle has also developed a Forth development board based on a Hitachi 6303 a complementary MOS variant of a Motorola part and running Triangle s own Forth system The board is a useful tool for real time applications since multi tasking programs can be written in a high level language Moreover users can extend the language as they go along building their own expertise into their systems Rush has used this feature to develop progressively more sophisticated speech control algorithms The result has been speech with very acceptable quality The Department of Transport system shows off the microcomputer s multi tasking capability First it keeps a calendar that tracks the minute hour day and month It responds to changes in summer and winter schedules and switches to the appropriate timetable Second it scans the inductive loop sensors and decodes the detected sig nal Next it controls the speech synthesizer chip s vocabulary and adjusts the volume to compensate for ambient noise levels lady shouts when a lorry goes by says Rush There is also a switched capacitor filter board with a twelve decibel per octave cut off Kevin Smith Reprinted from Electronics May 31 1984 Copyright O 1985 McGraw Hill Inc A
43. R Power of Languages Constructs SuperForth 64 is more powerful than most other computer languages Ordering Information Check Money Order payable to MOUNTAIN VIEW PRESS INC VISA MasterCard American Express COD s 5 00 extra No billing or unpaid PO s California residents add sales tax Shipping costs in US included in price Foreign orders pay in US funds on US bank include for handling and shipping 10 Parsec Research Commodore 64 TM of Commodore Programming Time SuperForth 64 Saves You Time and Money INTRODUCTORY OFFER Interactive Interpreter Forth Virtual Memory Full Cursor Screen Editor Full String Handling Trace amp Decompiler Conditional Macro Assembler Great Documentation Easy to Read 350 pg Manual with Tutorials Source Screen Provided Meets all MVP Forth 79 Industrial Standards Personal User Support A Total Integrated Package for the Commodore 64 SPECIAL only 9900 203 Value Limited Time Offer nteractive Compiler e Romable Code Generator e 40K User Memory All Commodore File Types Conversational User Defined Commands Call 415 961 4103 MOUNTAIN VIEW PRESS INC PO Box 4656 Mt View CA 94040 Dealer for PARSEC RESEARCH Drawer 1776 Fremont CA 94538 Part Two Forth Spreadsheet 2 dark Spreadsheet Compiling Craig A Lindley Manitou Springs Colorado 1 a 4 spreadsheet loa
44. SA MAJOR UPDATE MMSFORTH V2 4 A total software environment custom drivers for printer video and keyboard improve speed and flexibility New TRS 80 M 4 version too Common SYS format gives you a big 395K 195K single sided per disk plus a boot track Common wordset 79 Standard plus MMSFORTH extensions on all sup ported computers Common and powerful applications pro grams available most with MMSFORTH Source code so you can use them com patibly with the same data disks across all supported computers Very fast compile speeds and advanced program development environment A fantastic full screen Forth Editor Auto Find or Repiace any word for ward or back compare or Pairs Edit any two ranges of blocks much more Temporary dictionary areas QUANS vectored 1 0 many more of the latest high performance Forth constructs Manual and demo programs are bigger and better than ever Same thorough support Users Newslet ter User Groups worldwide telephone tips Full consulting services Personal Licensing person on one computer is standard Corporate Site Licensing and Bulk Distribution Licens ing available to professional users IT S BETTER THAN EVER The total software environmentfor IBM PC XT TRS 80 Model 1 3 4 and close friends Personal License required MMSFORTH V2 4 System Disk x TRS 80 1 requires lowercase 1
45. SWAP sequences we use with a range of addresses LOOP EXIT performs the functions of DROP LOOP and EXIT as the F83 word does I typically keep them separate in my programs as I have found times when program flow is clearer if I do Regards Henry J Fay Cazenovia New York Missing Mathquiz Dear Marlin Id like to look at the Mathquiz program on pages 13 14 of Forth SCR 1 WONCGCUFSUWUNKS DROP LOOP EXAMPLE HES 64FORTH HJF OLMAYBS DKOP LOOP COMPILE R gt COMPILE R gt COMPILE 2DROP IMMEDIATE BRING LOOP INDICES BACK HOME GET RID OF THEM NATURALLY VARIABLE TABLE 2 3 4 5 LOOK UP VALUE TABLE ADDR ENTRIES ADDR OVER SWAP DO DUP I IF DROF I LOOP FALSE OR O DROP LOOP S ENDIF SCK 2 O IMMEDIATE FUN a d ur a d Joutuu wne 0 1 2 3 4 5 5 7 8 g t 10 11 x neo HES 64F RTH HJF 1 5 LOGP EXIT CCOMPILE DROFP LOOP COMPILE S IMMEDIATE DO START ADDR WENTRIES COMPILE OVER COMPILE COMPILE SWAP CCOMPILE DO IMMEDIATE Mathquiz 72 PROGRAM VARIABLES VARIABLE CHOICE 4 CHOICE VARIABLE RESULT 90 RESULT VARIABLE SCORE 0 SCORE VARIABLE LEVEL 0 LEVEL LDM 08 84 Get and store players choice Store result for amp Maintain players of correct ans Store difficulty level Delay routines LDM 08 84 DELAY 15000 0 DO LOOP Null loop
46. ary superfast compilation tw Novice Programmer Protection Diagnostic tools quick and simple debugging xe Starting FORTH FORTH 79 FORTH 83 compatible Screen and serial editor easy program generation Hierarchical file system with data base management Starter package 250 Full package 395 Single user and commercial licenses available If you are an experienced FORTH programmer this is the one you have been waiting for If you are a beginning FORTH programmer this will get you started right and quickly too Available on 8 inch disk under CP M 2 2 or greater also various 51 4 formats and other operating systems FULLY WARRANTIED DOCUMENTED AND SUPPORTED DEALER INQUIRES INVITED master charge Shaw Laboratories Ltd 24301 Southland Drive 216 Hayward California 94545 415 276 5953 October 23 1985 November 3 1985 FORML Forth Modification Laboratory presents EuroFORML Conference Stettenfels Castle Heilbronn Federal Republic of Germany Followed by SYSTEMS Trade Fair Munich Computers and Communications 9th International Trade Fair and International User s Congress and Selected sightseeing tours and entertainment in Germany International technical conference October 25 27 1985 Stettenfels Castle Software Metrics Programs and methods to measure program performance complexity structure programmer prod
47. ations would run on virtually all our machines We elimi nated the eventual need for retraining our staff and extended the useful life of the tools and applications we had developed Ultimately our decision to develop exclusively in Forth allowed us to cut our programming costs and develop ment time drastically We were able to simplify software development by re ducing the number of systems we had to learn and use We increased produc tivity by reducing the number of ap plication variations that had to be developed and supported We were able to deliver the software faster and with far fewer problems The final result was an increase in our bottom line and after all the real value of a language is in how it impacts profits We are convinced that without the 83 standard our integration of language and systems could not have been achieved The standard proved to be a rallying point from which individuals were willing to work to produce sys tems which were compatible over a wide range of machines and available to the Forth community at low cost The presence of a standard for high level code only serves to make the language more transportable and use ful to developers who work with an ever increasing number of machines The presence of standards within the community need not curtail the adap tability of the language but rather serves as a bridge to new solutions tools and ideas The new standard and its wide acceptance
48. ays he chose Forth because its high level language capability speeds development work Using the speech synthesizer board and the microcomputer board which serves as its own development system Rush can quickly meet a customer s requirements even tailoring the voice to the applications For Britain s National Physical Laboratory for example Triangle has developed a handheld keypad with sixteen digit alphanumeric display It is used to check readings as they are entered into the laboratory computer With the synthesizer speaking in a brisk manner with truncated enunciation it can keep up with the user as he keys in a long numeric string The terminal can be used both for entering data and instructions and for receiving prompts from the laboratory computer For example it could give the operator a cue about what reading to make next or indicate that a reading is out of range The terminal communicates with the laboratory computer systems through an RS 232 C interface at 9 600 bits per second or through an IEEE 488 port Triangle has now acquired rights to the terminal from NPL and is also negotiating with the Department of Transport for the rights to the passeng er advisory service which clearly has potential applications in road rail and airplane terminals just for starters For those companies with sufficient expertise to assemble their own sys tems Triangle also sells its various board products directly
49. bit of the sum But note that this bit will be the same for all ten hash values of a given word 4 Phrases can be handled as an AND of the words with false hits excluded later in the full text search 5 This method won t find parts of words But common prefixes and suffixes can be treated For example to avoid missing plurals of words just drop the final s or es before Volume VIt No 2 entering or searching for any word Some false hits will occur but they will be resolved during the full text search at a modest cost in performance Let users know that irregular plurals must still be searched explicitly with an AND 6 In the full text search you can do better than looking at every letter For example when you are searching text for a word look at the last letter position in the text first A quick lookup in a small table specially prepared for the word being sought will usually show that that particular letter is not contained anywhere in the word and in that case the inter mediate character positions don t need to be examined at all since they could not possibly be part of the word being sought Many other refinements have been developed since text searching has such practical importance 7 Include each file s last modification date and time with its dictionary Then the search program can examine the directory of files to automatically regenerate the dictionary for any new or changed
50. ble from No Visible Support Software Mike Perry 1125 Bancroft Way Berkeley California 94702 This is an incredible implementation of Forth 83 Everyone even remotely interested in Forth should buy a copy of it The entire Forth community should give thanks to Laxen and Perry for donating such an excellent piece of software to the public domain The Mirth Dimension 2SWAP DROPY With apologies to Lewis Carroll Twas SYSOUT and the SFILL toves Did SRW in the wabe FOUTPUT were the borogoves And the BOOT COLD outgrabe Beware the 25SWAP DROP my son The ROLLS that bite the DOs that catch Beware the DLIT LOOP and shun The NORETCOND Bandersnatch He took his OUTER PICK in hand Long time the PCOND PORT he sought So rested he by the IF ELSE tree And FLUSH PMODE in thought And as in PIXBLT thought he stood The 2SWAP DROP with ROTs of flame Came TONED through the MOD wood And BUILDS DOES as it came One two One two And through and through The OUTER PICK went snicker snack He left it WARNING and with its head He went CPATH back And hast thou slain the 2SWAP DROP Come 1 my QUSER boy A TYPED day Callooh cailay He RANDOM in his joy Twas SYSOUT and the SFILL toves Did SRW in the wabe All FOUTPUT were the borogoves And the BOOT COLD outgrabe Wayne Cox Volume VII No 2 37 FORTH Dimensions Rochester Forth Conference 1985 Forth programmers pr
51. ble substitutes for Forth we found that several of them offered more complete development systems and more liberal licensing agreements Many of the packages offered better speed and more thorough floating point tools On the other hand there was still no language available that we could alter so that the applications code would be identical on all the machines we were supporting We found that the better supported sys tems were expensive and had their own drawbacks link compile time non standard extensions speed or size limitations and highly variable support for machine specific devices I O etc Forth was one language that could be altered at the machine level If the Volume Vit No 2 right version could be found for each processor we were supporting adjust ments could be made to the kernel via the metacompiler to develop the multi machine applications language we needed After some investigation we found that several individuals had produced public domain versions based on the new Forth 83 Standard These versions were similar in philosophy and came complete with the source for their compilers and had most of what we needed for development Using the public domain versions we were able to extend the machine specific code and duplicate the current language that our applications team was using We found that by simply transferring the high level code from one machine to another and recompil ing our applic
52. covered by Infoworld columnist John Dvorak Mr Dvorak you will recall is fondly remembered for his quote that he has never seen a credible application done in Forth He has met his match as John Cassady recently introduced the Dyna Com Voice Mailbox System It is pro grammed in Forth and is a honey of a product Dvorak devoted an entire column in the San Francisco Chronicle to Cassady s product and then gave it another hit in his Infoworld column You may try the system and leave remarks for John Dvorak at his voice mailbox by calling 415 763 2002 When the system answers tone in 454 The system supports twenty five users each with his own addressable box Callers leave messages which may be interactively reviewed by the boxholder But each boxholder may grant up to thirty of his friends their own guest mail boxes for replies Im agine 750 people with selective use of digitally controlled voice communica FORTH Dimensions Volume VII No 2 tions The box is an IBM PC look alike processor board with a hard disk speech digitizer and Touch Tone sig nalling From the outside it looks like just another industrial box But on the inside the VMS has a heart of pure Forth John Cassady was previously best known as the implementor of fig FORTH on the 8080 He published the 8080 assembler in widest use and is the author of the book Metaforth The DynaCom system is to be de monstrated at the Silicon Valley
53. d of chars loop display coluan naaes display Nm C4 c 0e Oe C4 B3 o c M M M M M H ar e M M FORTH Dimensions only show names that fit on Cl 07 04 84 spreadsheet display word defintions 1 dis status cl 07 04 84 dis row change cl 07 03 84 V 32 dis screen 16 cl 05 31 84 display spread sheet status 48 19 at Row V display current row col tur row 8 row disp 60 19 at Coluan cur co B col disp 8 ascii A esit 47 20 at Mode mode flag 8 if Auto else Noraal then 51 20 at Order order flag 8 if C R else R C then 2 posi Command place cell aarker display calc aode V display calc order output coasand proapt place cell aarker on display 17 spreadsheet display word definitians cl 05 31 84 Y display infn that changes with row change Y row names labels and data dis row naaes dis row labels dis data dis col change dis col naaes dis col labels dis data V display info that changes with Y a col change Y col nases labels and data 18 spreadsheet display word definitions cl 07 04 84 Y display spreadsheet screen dark 351 0 at Forth Spreadsheet dis boarder display title draw boarders dis_aenu dis col labels dis cal nases dis row labels dis row nases dis data 0 row disp 0 col
54. der block warning off 45 thru 5 7 load the spreadsheet into the forth dictionary Cn 4 HJ C 49 4 U Ch c4 F3 c FORTH Dimensions if you wish to save the spreadsheet do so as follows spreadsheet is boot cr save systeg filenane com cr this will save the entire forth systea along with the spread sheet as an executable file named filename When the file is executed your spreadsheet will execute automatically 2 spreadsheet case statement cl 06 28 84 state 8 not abort Coapilation only pairs lt gt abort Bad CASE statesent case csp csp 4 j immediate of 4 pairs compile over compile cospile branch here 0 compile drop 5 imaediate 5 pairs coapile branch here 0 swap resolve 4 immediate 4 pairs compile drop begin spB csp lt gt while gt resalve repeat csp iamediate endof endcase 3 Y spreadsheet constant amp variable declarations cl 06 24 84 26 constant row max 26 constant col_max 12 constant col name len 0f spreadsheet rows of spreadsheet coluans max length of colusn name V length of row Y coluan origin of data on display row origin of data an display V of bytes per cell 17 constant row n se len 21 constant col org 3 constant row org b constant bytes cell 4 cl 09 21 84 spreadsheet constant amp variable declarations variable mode flag variable arder flag
55. disp dis status V display operation menu V label coluans A Z X display coluan names label rows 0 25 V display row names V display appropriate data V for data window being V displayed V set aark at origin V display status Volume VII No 2 19 21 spreadsheet cell calculation words cl 06 31 84 spreadsheet cell sarker positioning words cl 07 02 84 0 1 2 calculate Y calc forsula of cell if it has right arrow V aove cell marker right 1 cell 3 8 dup if execute then j V cell addr col disp 3 V marker in right aost cell 4 if cur col 4 col sax gt Vif so is it the last cell 1 S calc calc coluans then rows if 1 cur col V aove display coluan right one b max 0 dis col change scroll right 7 do col 0 then if sark at column 2 ignor 8 do j i cells calculate loop get foraula and execute it else if sark not at right sost 9 1900 erase cell aarker V coluan of display sove it 0 1 col disp right one cell without 1 calc r c cal rows then coluans then Y scroll 2 3 4 5 col aax 0 place cell aarker draw new cell sarker do row max 0 do i j cells calculate loop get formula and execute it loop 20 23 spreadsheet cell calculation words cl 07 04 84 X spreadsheet cell marker positioning words cl 07 02 84 calc cells V deteraine which to calc first up arrow Y aove cell marker up 1 cell order flag V by state of order flag row di
56. e Forth 83 Standard compilers for microcomputers For Development Interactive Forth 83 Interpreter Compilers e 16 bit and 32 bit implementations Full screen editor and assembler Uses standard operating system files 400 page manual written in plain English Options include software floating point arithmetic coprocessor support symbolic debugger native code compilers and graphics support For Applications Forth 83 Metacompiler Unique table driven multi pass Forth compiler e Compiles compact ROMable or disk based applications Excellent error handling Produces headerless code compiles from intermediate states and performs conditional compilation Cross compiles to 8080 7 80 8086 68000 and 6502 No license fee or royalty for compiled applications Support Services for registered users Technical Assistance Hotline e Periodic newsletters and low cost updates e Bulletin Board System Call or write for detailed product information and pr ces Consulting and Educational Services available by special arrangement a Laboratory Microsystems Incorporated 6 Office Box 10430 Marina del Rey CA 90295 Phone credit card orders to 213 306 7412 Overseas Distributors Germany Forth Systeme Angelika Flesch D 7820 Titisee Neustaat UK System Science Ltd London EC1A 9JX France Micro Sigma S A R L 75008 Paris Japan Southern Pacific Ltd Yokohama 220 Australia Wave onic Associates 6107 Wilson W A
57. e response list Display menu item Step past text SWAP DUP C DUP EMIT Display lead char X amp save as allowed response 1 SWAP TYPE CR S gt A N Menu response words HELP UKEY Help word for response DEFER HELP UKEY S gt A Display rest Campile menu item IMMEDIATE FVD28Apr84 KEY DUP ASCII a ASCII z BEIWEEN IF ODF AND ENDIF VARIABLE HELP Get upper case key Reference no for Help N Menu support words Version 2 NEW MENU FVD28Apr84 VARIABLE M STK OE Stack of Menu RP amp SP The Menu Stack M STK maintains exit RP amp SP addr for 6 levels of menus This is used by M EXIT to abort current menu STK MENU S gt R gt RP SP M STK DUP 2 2 4 M STK OR USTK MENU S gt RP SPP 4 M STK M STK DUP 2 28 NEW SEL S help gt 0 PAD Set new selection not return addr HELPS Set help reference S help gt Clear screen amp valid responses Where to return to on Esc 214 642 5495 Committed to Excellence for calling wi NEW MENU NEW SEL STK MENU N Menu M EXIT Version 2 END MENU USTK MENU 2DROP FVD29Apr84 X End of menu clear stack item M EXIT S USTK MENU OVER RP 1 ABORT Bug in unstacking menus U ABORT Menu unstack error SP RP S exit current menu amp return to calling level menu X Note Sh
58. e user Volume Vil No 2 base Working group members asked Why update to Forth 83 Is the ef fort worth the improvement What will be the common model of a full implemention fig FORTH was the common model prior to Forth 79 MVP Forth carried the FIG model forward and has be come the de facto model for Forth 79 F83 the Laxen Perry model is only now coming into its own as the leading contender for the Forth 83 Model sweepstakes Your faithful servant of fers a few opinions Who said Any body can have the facts but it takes real character to have opinions First it takes four years for a lan guage standard to become accepted and popular Do you remember the hue and cry about Forth 79 It was supposed to be the worst disease since the plague Refer to your back issues of Forth Dimensions to check it out We are two and a half years into Forth 83 It will catch full swing in another eighteen months Just wait Second the Forth Interest Group must abandon fig FORTH The system design and listings are four years be hind the times unsupported impos sible for the novice to self install and at cross purposes to the learning pro cess The only viable replacement for the revenue that would be lost is a disk based applications library but this has its own set of complications Third some complaining occurred at Rochester that the shift to Forth 83 was being pressured upon those com plaining This
59. er Monthly Ist Tues 7 p m Thornhill Branch Library Contact Robert Washam 91 Weis Dr Ellisville MO 63011 NEVADA Southern Nevada Chapter Call Gerald Hasty 702 452 3368 e NEW HAMPSHIRE New Hampshire Chapter Monthly Ist Mon 6 p m Armtec Industries Shepard Dr Grenier Field Manchester Call M Peschke 603 774 7762 NEW MEXICO Albuquerque Chapter Monthly Ist Thurs 7 30 p m Physics amp Astronomy Bldg Univ of New Mexico Call Rick Granfield 505 296 8651 NEW YORK FIG New York Monthly 2nd Wed 8 p m Queens College Call Ron Martinez 212 517 9429 Rochester Chapter Bi Monthly 4th Sat 2 p m Hutchinson Hall Univ of Rochester Call Thea Martin 716 235 0168 Rockland County Chapter Call Elizabeth Gormley Pearl River 914 735 8967 Syracuse Chapter Monthly 3rd Wed 7 p m Call Henry J Fay 315 446 4600 OHIO Athens Chapter Call Isreal Urieli 614 594 3731 Cleveland Chapter Call Gary Bergstrom 216 247 2492 Cincinatti Chapter Call Douglas Bennett 513 831 0142 Dayton Chapter Twice monthly 2nd Tues amp 4th Wed 6 30 p m CFC 11 W Monument Ave Suite 612 Dayton OH Call Gary M Granger 513 849 1483 OKLAHOMA Central Oklahoma Chapter Monthly 3rd Wed 7 30 p m Health Tech Bldg OSU Tech Call Larry Somers 2410 N W 49th Oklahoma City OK 73112 OREGON Greater Oregon Chapter Monthly 2nd Sat 1 p m Tektronix Industrial Park B
60. erase celi marker V erase cell aark 1 col disp aove left without scroll 1 row disp V aove down one cell then of display then place tell aarker Y draw new cell marker place rell marker j Y draw new cell aarker o C4 MJ e O DO Ue d c4 c Volume VII No 2 33 FORTH Dimensions 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 3 25 spreadsheet cell marker positioning words cl 07 04 84 gt first col 0 cur col dis col change Y go ta coluan A immediately V cur col to 0 and scroll last col cal max 4 cur col dis col change Y go to column W immediately V cur cal to W and scroll 1 top row 9 cur dis raw change j Y go to row Q insediately cur row to 0 and scroll bottom row 15 cur dis row change go to colusn 11 iamediately cur row to 11 and scroll 26 spreadsheet cell marker pasitioning words cl 07 04 04 left 4 cols 4 0 do left arrow V move marker left 4 coluans loop Vat tine right 4 cols 4 0 do right arrow loop move marker right 4 coluans at a tine 27 spreadsheet algebraic functions vocabulary algebra cl 07 04 84 algebra alsa definitions V col id function assigns n to id at coapile tiae n V expects row on TOS at run tine Y subsequent usage of id fetches double value of cell ta stack col id create does 8 cells 2 28 j V coluan id high level defining
61. esponses are those in PAD C break to abort for help and Esc to exit to the calling menu We still have the word s to display the menu MENU SEL to get a valid response and then a CASE to execute the selection based on the index re turned by MENU SEL Have a look at figure four This is the main menu for the Epson set up program How many items are dis played depends on the variable GTRAX There are more options on the printer with Graftrax than on the one without The problem is that now we have a variable length list of codes and a fixed N Define menus Version 2 MENU SEL PUR S gt index BEGIN UKEY 0 Get key amp set index PAD COUNT OVER SWAP Scan allowed responses DO OVER IC X gt char index flag LEAVE 1 LOOP gt char index PAD 1l OVER lt Index past end yes FVD28Apr84 WHILE DROP Drop index check specials DUP 3 ABORT Break Terminate on C DUP ASCII IF HELP ELSE 1B IF M EXIT ENDIF exit calling menu BEEP ENDIF No BEEP after Help REPEAT SWAP EMIT CR index P Accept input key amp match against acceptable list returns in dex If not matched abort on C HELP on exit on ESC Exit only on valid response Figure Three Enhanced Menu Words TITLE DARK MXSET Printer Setup CR CR MNGTR S GTR IF Is this graftrax A KReset printer to defaults A LSet uni
62. ffers its members publication discounts group health and life insurance an on line data base a job registry a large selection of Forth literature and many other services Cost is 20 00 per year for USA Canada amp Mexico all other countries may select surface 27 00 or air 33 00 delivery San Jose CA 95155 MEMBERSHIP IN THE FORTH INTEREST GROUP 408 277 0668 The annual membership dues are based on the membership year which runs from May 1 to April 30 When you join you will receive issues that have already been circulated for the current volume of Forth Dimensions and subsequent issues will be mailed to you as they are published You will also receive a membership card and number which entitles you to a 10 discount on publications from FIG Your member number will be required to receive the discount so keep it handy HOW TO USE THIS FORM 1 Each item you wish to order lists three different Price categories Column 1 USA Canada Mexico Column 2 Foreign Surface Mail Column 3 Foreign Air Mail 2 Select the item and note your price in the space provided 3 After completing your selections enter your order on the fourth page of this form 4 Detach the form and return it with your payment to The Forth Interest Group u o FORTH DIMENSIONS BACK VOLUMES The six issues of the volume year May April bound in a single text 101 Volume
63. hen reading from the terminal the in F83 compiles only one line of text Colon definitions in F83 can have multiple lines because compilation is continued by repeated calls in QUIT No return into the definition of colon is made but none is necessary Yet such a return into the defining word is just what is wanted from as it is used in Henry s CASE for example This restriction seems inherent in trying to use as a callable compiler instead of some other word The is used not just to begin compilation but is used with to enclose an interpreted expression embedded in the source text of a compiled definition Such embed ded expressions really require a single interpreter vectored back and forth from compiling to interpreting by brac kets rather than calling and returning This interpreter actually the word INTERPRET already does everything Henry s does if called with state set to compile Like Henry s though INTERPRET only compiles one line from the ter minal Rather than change therefore I would want to change INTERPRET The repeated loop over QUERY INTERPRET in QUIT should be moved into INTERPRET so that a single call will process all the lines The loop must repeat only when input comes from the terminal instead of disk The null word executed at the end of a line should return into this loop while exiting from INTERPRET is done by at the end of a definition One way to do this is by having
64. ill then ignore these locked lines While the appearance is rather odd at first the usefulness is great To implement this you must look in your terminal manual for the codes that will lock a line unlock a line or Screen move up and down a line As can be seen in the accompanying code the word LINE LOCK locks and the word SCR UNLOCK unlocks the entire screen The constants UP ARROW and DN ARROW move the cursor up and lines on Pase TVv50 contre 31 EMIT 3 TVvm0 centra EMIT j amp CONSTANT selectively lock lines on t x DENN gt to unlac IF EMIT IF EMIT IF PROF LINE LC ULCHE IF DROP SERN OCE DROP QUIT any THEN THEN THEN THEN AGAIN 5 NEC IMAL ELSE ther down a line respectively Each of these is terminal dependent and must be tailored to your terminal The word LOCKER gets a keystroke and moves up or down a line if the up and down arrows are input UP ARROW and DN ARROW allow positioning of tne cursor onto the line to be locked Strik ing an L will cause the current line to be locked a U will unlock the entire screen and any other key will exit LOCKER This screen will compile under fig FORTH and Laboratory Microsys tems 83 Forth and it should be easily transportable to almost any standard Forth If your terminal has line lock capabilities you will like this utility CHMI 1 1 2 4 a line k entire screen crt move down
65. implemented elements of LISP and Prolog in their LMI Forth system which was then used to develop a context sensitive editor and critical constraint checking to define permissible instrument movements Dr Harris asserted that because of its modularity Forth excels in large programs It is good for jabs with criti cal deadlines such as a launch date and where interactive control can help meet changing conditions as when it was used to save the shuttle experiment during hardware failures Harris then presented three myths that have been dispelled by recent accomplishments that Forth is only good for small pro grams that no good software has ever been written in Forth and that if a program is larger than 64K it isn t right By way of one example JPL s Forth on an IBM XT more accurately predicted the space shuttle s position than did the mainframe at Johnson Space Center All told the Rochester Forth Con ference provided a platform for about sixty speakers to address an audience of nearly two hundred Several de Scribed their experiences with creating significant extensions to Forth for pur poses of education artificial intellig ence and adding object orientation for example It became apparent that Forth is a natural seedbed for the best features of contemporary computer languages which can be easily imple mented in Forth without the possible restrictions of the environment in which they originate Charles Duff
66. ing techniques There s also a section on how to teach children to use Forth 1984 FORML CONFERENCE PROCEEDINGS The sixth annual FORML Conference was held November 23 25 1984 at the Asilomar Conference Center in Monterey California USA Excellent articles in this volume include two papers on Expert Systems which won the acclaim ofthe participants Many papers contain code you can use immediately and some are philosophical papers which present challenges for the future of Forth FORTH 83 REFERENCE CARD The Forth 83 Handy Reference Card is now available free of charge with any order If you arenot placing an order and wish to receive a card please send a self addressed stamped envelope and we will be happy to send you one Many thanks to Robert Berkey and Dave Kilbridge for compiling designing and produc ing the card PUBLICATIONS SURVEY If you would like to suggest any other publication for review by the FIG Publications committee for inclusion in the Forth Interest Group Order Form please complete the information below and return to FIG Title Author Publisher Comments Your comments on any of the publications we currently carry are most welcome please complete information below Title Comments MM M M _ _ FORTH Dimensions FORTH INTEREST GROUP P O BOX 8231 SAN JOSE CALIFORNIA 95155 408 277 0668 Name Company Address City State Prov Country
67. ion reset oprand stack and select algebra vocabulary cl 07 03 84 input row names Y display command prompt Y get starting row store in cur row Fron there tiil last row input names display row get address in row name array clear it and then input if just CR then exit Loop every 5 names scroll display new cur row change display eise oniy change the display row nases cl 05 51 84 3 cl 07 04 84 X spreadsheet input words input col names pos Input Col Nases pos2 Starting with Col key upc ascii cur col col sax cur col 8 do pos Col i ascii emit i col naaes col name len 2dup blank expect span 8 0 leave i 4 god 0 if i cur col dis col change else dis col names then loop 38 spreadsheet input words gt geti d in format flag 8 if dp 8 3 ain tase 1 of 100 d endof 0 of 100 dt endof i of 10 dt endof 2 af noop endof 3 of 10 d endof endcase then 3 36 spreadsheet input words input cell data posi Input Cell Data pos Data get cell ptr 2 2 mode flag 8 if pos2 Calculating talt cells then dis data j cl 07 03 84 input coluan nases display command get starting col store in cur col From there till last col input names A display col get address in col name array clear it and then input if just CR then exit loop every 4 nases scroll display new cur col change display
68. ion A these the available sub options Menus also tend to lead the program mer along in how he organizes his material Hierarchical structuring is a powerful way of organizing one s thinking Think about the most impor tant items first and ignore the details then go down to a lower level and concentrate on the aspects of only one item etc Menus limit the number of options presented at any one time With a single item per line and after allowing for headings and such you typically put on the screen no more than eight to fifteen items and eight is better with an entire line to describe each item more if needed That too makes for easier use i e better programs Even the expert user who does not need all this detail can be accommo dated Simply implement a key ahead facility If the user knows he wants item A on this menu then 1 on the next sub menu and then sub sub item C let him key Then simply skip direct ly from the A level menu down to whatever it is that AIC means or does Building Menus Three things are involved in menus 1 Display the text of the menu 2 accept the menu option selected and 3 execute the code corresponding to that selection Those are must haves For good measure we ll also throw in 4 a Help facility and 5 the ability to back out of a menu without selecting any of its items Volume Vil No 2 N Menu Utility words version 1 VARIABLE X No
69. is a touchy topic Some standards are required Building code standards for example are enforced by local governments But Forth usage remains voluntary The Forth Stan dards Team went to special lengths to make this clear Read the copyright notice on Forth 83 to wit The existence of a Forth Standard does not in any respect preclude any one from implementing market ing purchasing or using products processes or procedures not conform ing to the Standard The complainers probably are react ing to their perception of the transition around them and divert attention to the ogre of enforced change when try ing to cling to the past My understand 13 PolyFORTH Il the operating system and programming language for real time applications involving ROBOTICS INSTRUMENTATION PROCESS CONTROL GRAPHICS and more is now available for IBM PC PolyFORTH II offers IBM PC users Unlimited control tasks Multi user capability e 8087 mathematics co processor support e Reduced application development time e High speed interrupt handling Now included at no extra cost Extensive interactive GRAPHICS SOFTWARE PACKAGE Reputed to be the fastest graphic package and the only one to run in a true multi tasking environment it offers point and line plotting graphics shape primitives and interactive cursor control PolyFORTH II is fully supported by FORTH Inc s Extensive on line doc
70. is usual format In the last three issues we examined aids to learning Forth Interest shifts this month to news and commentary on the latest events impacting the Forth com munity The first stop on our morning rounds occurs at the Forth nursery otherwise known as the Chip Hatching Department Novix NC4000 Processor The hottest topic of interest in the Forth world must be the Novix NC4000P Processor Charles Moore s embodiment of Forth in silicon This sizzler of a processor gives about 10 000 000 Forth instructions per se cond 10 mips Up to four Forth instructions like DUP 1 can execute at each 125 ns clock cycle A call takes one clock cycle and a return takes none This rewrites the book on soft ware obviating interest in linear code and macros To bring this topic into focus we peek behind the scenes to witness a bit of the genesis of the Forth processor The courtship began in October of 1980 The moment of conception was on January 19 1981 First things first Forth Inc had decided to expand its Board of Direc tors Bill and Anne Ragsdale enter tained Mr John Peers at dinner in Palo Alto in October 1980 with the ultimate result of Mr Peers being invited to join the Board John Peers was the founder of Logical Machines which had an innovative extensible language called Adam He was involved in robotics and in the quest for aware machines The spark that set the Forth proces sor development into mo
71. l Convention room rates are available at Hyatt Rickeys Telephone direct to Hyatt reservations by calling 800 228 9000 and request special Forth Interest Group rates for September 20th and 21st More information Call FIG Hotline 408 277 0668 Be a conference speaker Call FIG Hotline 408 277 0668 Exhibitor information Call FIG Hotline 408 277 0668 BULK RATE FORTH INTEREST GROUP US POSTAGE P O Box 8231 T San Jose CA 95155 San Jose CA Address Correction Requested
72. l kids LEVEL CHOOSE ADD use CHOOSE to select addends d li CR ADD1 Q and I d like to study it to learn some ADD2 0 8 amp 9 format problem thing about keyboard input 10 ANSWER Klaus Schleisiek has picked a wond 11 001 ADD2 DUP RESULT add the addends amp store it erful place as site of the euroFORML MEC Co TE non COLE P u 13 ELSE CR WRONG THE CORRECT conference I ve been in Heilbronn and through the Neckar valley a couple of times I ll be at the European FORML conference for sure ANSWER IS RESULT C THEN 76 Best 0 SUBTRACTION MODULE 1 Nathaniel Grossman 2 VARIABLE SUB1 0 SUB1 minuend Los Angel liforni 3 VARIABLE SUB2 0 SUE2 subtrahend s Angeles California 4 SUBTRACTION MAKE PROB GET ANS E LEVEL DUP CHOOSE add random number to LEVEL Editor s note Sincere apologies go to b SUB to make a minuend gt subtrahend our readers and to author Lyle D d DE UR CHOOSE TUBE Tiene a ubtcanendes Morton who wrote Mathquiz In 3 SUB2 B amp 9 format problem 10 ANSWER issue VI 6 we unintentionally 11 SUB1 SUBZ DUP RESULT get difference and store printed only four screens numbered 12 IF CORRECT 1 SCORE 71 79 80 and 83 The accompanying 13 ELSE CR WRONG THE CORRECT 14 ANSWER IS RESULT screens 72 78 81 and 82 are published here to complete the pr
73. ldg 50 Beaverton Call Tom Almy 503 692 2811 PENNSYLVANIA Philadelphia Chapter Monthly 4th Sat 10 a m Drexel University Stratton Hall Call Melonie Hoag 215 895 2628 TENNESSEE East Tennessee Chapter Monthly 2nd Tue 7 30 p m Sci Appl Int l Corp 8th Fl 800 Oak Ridge Turnpike Oak Ridge Call Richard Secrist 615 693 7380 TEXAS Austin Chapter Contact Matt Lawrence P O Box 180409 Austin TX 78718 Dallas Ft Worth Metroplex Chapter Monthly 4th Thurs 7 p m Call Chuck Durrett 214 245 1064 Houston Chapter Call Dr Joseph Baldwin 713 749 2120 Permian Basin Chapter Call Carl Bryson Odessa 915 337 8994 UTAH North Orem FIG Chapter Contact Ron Tanner 748 N 1340 W Orem UT 84057 VERMONT Vermont Chapter Monthly 3rd Mon 7 30 p m Vergennes Union High School Rm 210 Monkton Rd Vergennes VT Call Don VanSyckel 802 388 6698 VIRGINIA First Forth of Hampton Roads Call William Edmonds 804 898 4099 Potomac Chapter Monthly 2nd Tues 7 p m Lee Center Lee Highway at Lexington St Arlington VA Call Joel Shprentz 703 860 9260 Richmond Forth Group Monthly 2nd Wed 7 p m 154 Business School Univ of Richmond Call Donald A Full 804 739 3623 WISCONSIN Lake Superior FIG Chapter Call Allen Anway 715 394 8360 MAD Apple Chapter Contact Bill Horzon 129 S Yellowstone Madison WI 53705 FOREIGN AUSTRALIA Melbourne Chapter Monthly
74. le In the example we need to transform an English word into a number from 0 to 799 999 Of course different words may transform into the same number a collision but we try to select a computational procedure such that the numbers don t tend to bunch up so there won t be too many collisions common hashing computation is to divide by an appropriate number throw away the quotient and take the remainder In the example above this divisor would be a little less than 800 000 so that the remainder will be the right size to select one of the bits The divisor should be a prime number for more background on picking a good one see Knuth In the above example ten different divisors would be used to select the ten bits in the table of 800 000 Note that before division the English word whose ASCII string wil be the dividend should be left justified or rearranged in some other way otherwise for short words the dividend would be less than 800 000 and all ten divisions would give the same remainder Picking a good hashing function can be tricky Dictionary for Text Search Now let s use the probabilistic dic tionary for another purpose text searching The trick is to prepare a separate small dictionary for each file in the database All these little dictionaries might fit into RAM or ina small file on disk Then to search for a word in the entire text database just look it up in all of the dic
75. linois Chapter Urbana Call Sidney Bowhill 217 333 4150 Fox Valley Chapter Call Samuel J Cook 312 879 3242 Rockwell Chicago Chapter Call Gerard Kusiolek 312 885 8092 INDIANA Central Indiana Chapter Monthly 3rd Sat 10 a m Call John Oglesby 317 353 3929 Fort Wayne Chapter Monthly 2nd Wed 7 p m Indiana Purdue Univ Campus Rm B71 Neff Hall Call Blair MacDermid 219 749 2042 IOWA Iowa City Chapter Monthly 4th Tues Engineering Bldg Rm 2128 University of Iowa Call Robert Benedict 319 337 7853 Central Iowa FIG Chapter Call Rodrick A Eldridge 515 294 5659 Fairfield FIG Chapter Monthly 4th day 8 15 p m Call Gurdy Leete 515 472 7077 KANSAS Wichita Chapter FIGPAC Monthly 3rd Wed 7 p m Wilbur E Walker Co 532 Market Wichita KS Call Arne Flones 316 267 8852 LOUISIANA New Orleans Chapter Call Darryl C Olivier 504 899 8922 MASSACHUSETTS Boston Chapter Monthly 1st Wed Mitre Corp Cafeteria Bedford MA Call Bob Demrow 617 688 5661 after 7 p m MICHIGAN Detroit Chapter Monthly 4th Wed Call Tom Chrapkiewicz 313 562 8506 MINNESOTA MNFIG Chapter Even Month 1st Mon 7 30 p m Odd Month Ist Sat 9 30 a m Vincent Hall Univ of MN Minneapolis MN Call Fred Olson 612 588 9532 MISSOURI Kansas City Chapter Monthly 4th Tues 7 p m Midwest Research Inst Mag Conference Center Call Linus Orth 816 444 6655 St Louis Chapt
76. ll rights reserved FORTH Dimensions 28 Volume VII No 2 Now You Can Add ARTIFICIAL INTELLIGENCE To Your Programs Using a Powerful Combination By Elliot Schneider amp Jack Park Heres Your Chance to Profit by being on the Forefront Write 5th Generation Software Easy Graphics amp Sound Words e Hires Plotting e Turtle Graphics e Windows e Koala Pad Graphics Split Screen Integrator Printer Plotter Ctrl Hires Circle Line Arc Sprite amp Animation e Music Editor Editor Sound Control Learn How To Create Intelligent Programs Build Expert Systems Write Stand Alone License Free Programs Construct Rule Bases Do Knowledge Engineering Use Inference Engines Write Intelligent Programs For Home Use Data Analysis Easy Control of all I O Robotics e Business e RS232 Functions Interrupt Routines Medical Diagnosis Real Time e Access all C 64 Peripherals Education Process Control Intelligent CAI Fast Games Utilities Scientific Analysis Data Acquisition Extended Math Functions Graphics Financial Decisions Fast ML Floating Point amp Integer Math Double Precision 2E 38 with Auto Sci Not n e Logx Loge Sin Cos SQR 1 Matrix and Multidimensional Lattice Math Algebraic Expression Evaluator SUPERFORTH 64 LISP arn uouoo LOGO__ c S PASCAL o BASIC 5 FORTRAN ASSEMBLE
77. loating Point Glossary by Springer 10 Vol 4 Expert System with source code by Park 15 Vol 5 File Management System with interrupt security by Moreton 25 Vol 6 Expert Tutorial for Volume 4 by M amp L Derick 15 a MVP FORTH Software A Transportable FORTH O MVP FORTH Programmer s Kit including disk documentation Vol umes 1 amp 2 of MVP FORTH Series All About FORTH 2 d Ed amp Assem bly Source Code and Starting FORTH CP M D CP M 86 O Z100 APPLE STM PC IBM PC XT AT O PC MS DOS 0 Osborne Kaypro MicroDecisions DEC Rainbow Ti PC NEC 8201 C1 TRS 80 100 150 e MVP FORTH Enhancement Package for IBM PC XT AT Program ES mer s Kit Includes full screen editor MS DOS file interface disk display and assembler operators 110 MVP FORTH Floating Point amp Matrix Math for IBM PC XT AT with 8087 or Apple with Applesoft 85 MVP FORTH Graphics Extension for IBM PC XT AT or Apple 65 MVP FORTH Programming Aids for CP M IBM or APPLE Program mer s Kit Extremely useful tool for decompiling callfinding translat ing and debugging 200 MVP FORTH Cross Compiler for CP M Programmer s Kit Gener ates headerless code for ROM or target CPU 300 MVP FORTH Meta Compiler for CP M Programmer s kit Use for applications on CP M based computer Includes public domain source 150
78. n on the stack before calling the lower level routine Should that lower level routine abort error exit etc simply restore the stack pointer to that known value I generalized this to cover both stacks and set up a little menu stack On this is kept the value for the two regular stack pointers This is to allow nesting of menus and returning one level at a time I never did get it to work It should the concept is sound but it is fragile code Messing with the return stack must be done just right or it will crash the system The Ultimate Version Fortunately by this time I had sol ved the problem Version three is a execute any word merely return to the calling word menu The Help concept is shown here in its more rudimentary form a word called from MENU SEL when is pressed It uses the variable HELP as set in each menu by NEW MENU or NEW SEL The number in HELP would indicate what help information is relevant for that specific menu The one limitation I am aware of and have fixed since is that after a Help message is displayed the screen Menu support words Version 3 AX 1 S addr char gt PAD COUNT 2DUP 3 SWAP l C DUP lt ROT should be cleaned up and the menu restored I ve done this by passing the address of the word that displays the menu to MENU SELX which will re execute it after Help has been invoked There it is I hope it is of use to others as well
79. n quit new y n if 0 9 cells row sax col sax bytes cell erase 0 row_nases row aax row len erase erase array 0 col naaes col Bax col naae len erase erase col name array dict aark perfora Y erase all foraulas 0 raw disp 0 col disp set aarker to origin dis screen display cleared screen then Y clear existing spreadsheet ask again if yes clear it erase cells array 39 spreadsheet high level comsands posl Bet auto pos2 Noraal 0 key ascii 1 if true else false then mode flag Y set auto calculation aode calculation mode or Auto t proapt operator get response set sode_flag accordingly perfora calc calc cells dis data j V force calculations V execute foraulas Y 5 result cl 07 04 84 40 cl 09 21 84 spreadsheet high level cossands format cl 97 04 84 Y select foraat post Select input nuaber format 2 Noraal 0 or Dollars Centszi key ascii i if true else false then format flag dis data 4i gt again cell ptr 2 28 posi Coluan replicate cell pose Nusber af columns lin dup if 0 do right arrow 2dup cell ptr 2 2 loop 2drop dis data then 42 cl 07 03 84 X spreadsheet high level commands go to posi Row 0 25 Win dup 0 row sax within if cur row pos2 Column A W key upc ascii dup 0 col max 3 within if
80. nth Order Defining Words discus sed clearly a subject that is somewhat abstract for many the definition of words that will define other words Although limited by time Larry also managed with the help of an assis tant to demonstrate programming on the fly and the difficulties of de bugging an overhead projector Need less to say the audience was delighted The final day consisted of a number of well attended exhibits including Forth Inc Miller Microsystems Forth machines from Novix and Metaforth the Institute for Applied Forth Re search the Forth Interest Group and Dash Find Assoc a Forth specific employment referral service Concur rent tutorials attracted members of the community as well as conferees In addition to the caliber of presen tations integral to the success of the Rochester conference was the inspira tion and efficiency of its organizers Congratulations and thanks go to Lawrence P Forsley conference chair man Thea Martin conference coor dinator and to Jonathan Ross and Sherry Snyder of the institute Their friendly and patient efforts were a reward to all who attended Marlin Ouverson For details of the approximately sixty presentations watch for the published Proceedings of the 1985 Rochester Forth Conference yr ee A S Volume VII No 2 TOTALCONTROL with LMI FORTH For Programming Professionals an expanding family of compatible high performanc
81. ntroduction to the basic concepts of Forth Includes section on how to teach children Forth 240 MASTERING FORTH 18 19 22 1 Anita Anderson amp Martin Tracy MicroMotion A Step by step tutorial including each of the commands of the Forth 83 International Standard with utilities extensions and numerous examples 245 STARTING FORTH soft cover 20 21 22__ Leo Brodie FORTH Inc A lively and highly readable introduction with exercises 255 THINKING FORTH soft cover 16 17 20 260 THINKING FORTH hard cover 23 25 28 Leo Brodie The sequel to Starting Forth An intermediate text on style and form 285 THREADED INTERPRETIVE LANGUAGES 23 25 28 ___ R G Loeliger Step by step development of a non standard Z 80 Forth 270 UNDERSTANDING FORTH 3 50 5 6 Joseph Reymann A brief introduction to Forth and overview of its structure EE o FORML CONFERENCE PROCEEDINGS FORML PROCEEDINGS FORML the Forth Modification Laboratory is an informal forum for sharing and discussing new or unproven proposals intended to benefit Forth Proceedings are a compilation of papers and abstracts presented at the annual conference FORML is part of the Forth interest Group 310 FORML PROCEEDINGS 1980 25 28 35 Technical papers on the Forth language and extensions 311 FORML PROCEEDINGS 1981 2V 40 43 45 1 Nucle
82. objection raised to the kind of maneuver presented here typically FORTH Dimensions comes from the Wirth school of pro gramming the solution used does not have end And so the argument goes without a common end another person reading a long program will get lost and be unable to follow the flow of the program Argu ing from first principles a la Dijkstra it sounds sound Evidence however has a way of modifying principle LOOK UP is in fact totally unambiguous A stranger to the code but not to Forth of course would understand immediately the action of the word The difference which matters here is the size of the word when the program is trivially small and program elements are self descriptive it is demonstrably good programming for a word with two distinct outcomes to have two distinct ends A key distinction is whether the program is trivially small and is made of self descriptive program elements whose own elements have the same characteristics Which as I think about it isn t a bad description of what a Forth program should and can be I have included screen 2 to show some more uses of those interesting words COMPILE COMPILE and IMMEDIATE It was my fifth time through Starting Forth before I began to grasp them Useable examples some times teach better than either words or pictures The word DO saves a little typing and eliminates the clutter of all those OVER
83. of menu item amp max RDEC BASE DECIMAL R BASE Display decimal no OME OFF Reset menu no to zero S gt Define numbered menu entry 1 M M 3 RDEC Show item no R gt COUNT 2DUP gt R Step Return addr past text following TYPE CR amp display FVD28Apr84 S gt Compile numbered menu item COMPILE 0 S gt 0 RDEC R gt COUNT 2DUP gt R Step past text following TYPE CR amp display 0 S gt Compile menu item zero COMPILE IMMEDIATE IMMEDIATE Show menu entry 0 Show item no zero N Menu Utility words 2 Version 1 M S gt X Show un numbered menu entry R gt COUNT 2DUP gt R Step past text following TYPE CR amp display M STATE IF Campiling COMPILE M ELSE ASCII WORD COUNT TYPE CR Show item text ENDIF IMMEDIATE M S max min gt no Get menu selection 0 9 max ASCII 0 SWAP ASCII 0 Set max amp min as digits BEGIN KEY gt R Get selection amp save Infuture Check for 2 or Esc 2DUP R ROT BETWEEN 0 Validate selection WHILE R gt DROP REPEAT X While not valid 2DROP R gt ASCII 0 Return number FVD28Apr84 Figure One First Version of Menu Word Menus Version 1 example MHDR DARK M MXSET Program MNMEN S gt N Main Menu OM MHDR M Main Menu CR Set printer CR Double density CR 0 Exit program CR m 0 M
84. ogram THEN 7 You Screen I Scream MULTIPLICATION MODULE 0 4 2 VARIABLE MULTI 0 MULTI multiplicand Dear Marlin 3 VARIABLE MULT2 0 MULT2 multiplier The Forthodoxy commands that we 4 MULTIPLICATION get problem and players answer Forth our programs into screens the 5 LEVEL CHOOSE MULT1 randomly choose multiplicand b LEVEL CHOOSE MULT2 domly choose multiplier natural unit of thought As a con 2 AULT 8 Pe E E a aaa firmed heterodox I think it is time to 8 MULTZ 0 7 amp format the problem i 7 ANSWER Fxam ne what screens offer and do not 10 MULT1 MULTZ DUP RESULT get product and store offer in contrast to their alternative 11 IF CORRECT 1 SCORE Right off let s admit that screens are 12 ELSE CR WRONG THE CORRECT not a natural unit of anything except 1l RESULTES computer memory or CRT display The mind doesn t inherently work with 1024 byte units certainly not when any number of those bytes can be blank To the extent that screens keep 78 DIVISION MODULE 1 us 1K bound they make it difficult to 7 VARIABLE DIVIL 0 DIVIL divisor deal with our code at flexible levels of PEE DIMO T SUD detail and generality 1 5 LEVEL CHOOSE 1 DUP DIVIL get gt 0 divisor To appreciate how disfunctional b LEVEL CHOOSE 1 DUP DIVIZ
85. oject man agers vendors and evaluators gathered in Rochester New York in June at the annual Forth conference held there The directors and staff of the Institute for Applied Forth Research assembled a broad spectrum of presentors who gave us a clear profile of the expertise being brought to bear in today s Forth community From applications on the space shuttle and automation of an entire airport to object oriented pro gramming to putting Forth in hard ware the papers were intelligent sometimes witty and occasionally mind boggling Elizabeth Rather of Forth Inc spoke on the subject of developing and im plementing a large scale application Titled Fifteen Programmers 400 Computers 36 000 Sensors and Forth the talk described work done to automate and fully integrate an in ternational airport in the Middle East Major applications such as safety security climate control personnel power distribution runway lighting etc all reside in one large system with largely common subsystems providing facilities to each Forth lends itself well to this method of using modular com mon factors to serve in diverse areas Rather described the months of strategy planning and testing required by the project Much of the work was done in Alabama where the team worked in two weeks on one week off shifts A huge hangar like room was used to house a crowded maze of cables and interconnected machines each programmable f
86. onary start by clearing all the 100K bytes 800K bits to zero Now to add each word to the dictionary use ten different hashing functions see below for explanation of hashing on the ASCII strings which represent the word Each hashing function will select one of the bits by computing a number between zero and 799 999 from the ASCII string Set each of the ten selected bits to 1 whether or not it had been set before After all 40 000 English words have been entered in this way somewhat fewer than 400 000 bits half of the 800 000 available will have been set Now to look up a word compute the ten hash functions on it and see if all ten bits are set If even one of the bits is not set then the word is definitely not in the dictionary If all ten of the bits are set the word is probably in the dictionary But with each bit having about a fifty percent probability of being set anyway there is about one chance in a thousand of a false hit meaning that a word not in the dictionary would be found For spelling program this represents a one in a thousand chance that a misspelled word would not be detected a risk which may be acceptable Hence the name probabilistic dictionary Background Hashing The point of hashing is to take a value such as an English word or a lengthy part number and transform it into an arbitrary number which is a more suitable key for indexing into a tab
87. ould work but does not Continued FORTH Dimensions 16 Volume VII No 2 ing the menu The word 4 compiles the text following it and the run time word 4 The word displays that text It also displays the menu selection number for that item M is the variable for the menu item number 04 and 0 are used for menu item zero if at all M accepts a single digit zero up to the maximum in M amp The word M is used to display an item without a number It s like but with a built in cR The 4 word is actually more complex than neces sary It does not have to be state depen dent That was done for some other experiments This version does nothing to execute the code for the selected option You have to define a CASE construct with words for each option Version one works but it did not satisfy me I did not like the numeric selection difficult to remember and 1 wanted more features A Better Version Enter version two see figure three Instead of using a counter I used and A the successors to and 47 to build a list of valid response codes in PAD By convention the first character of the item text would be displayed separately as the selection character and would be added to the list in PAD The first byte in PAD counts the number of entries In this version I also added a Help exit and an escape mechanism MENU SEL accepts the input and validates it Valid r
88. p lor unmark cell j 4 tllo C2 a KO U th d C4 cl Volume VII No 2 31 cl 07 04 84 cl 07 02 84 Y dis data cl 07 03 84 V 1 dis boarder 10 spreadsheet sisc word definitions d tuck dabs 4 ascii hold 45 rot sign ascii hold cl 07 04 84 Y dollar cents formating word formats double on TOS prints leading d r Or fd over spaces type j V format df in dollars cents in right justified field width w Vidu Y format double nuaber in one of V two formats as dollars cents Y normal nuaber formatt foraat flag if 10 fdr else 10 der then li spreadsheet display word definitions cl 07 04 84 display all cell data V for 4 screen coluens V if past last possible column cur_col dup 4 swap do i col max Tleave Cur row 8 dup 15 swap for 15 screen rows da i raw max leave V if past last possible row j cur col 8 13 22 calculate display cal position i cur row 8 3 at calculate display row pasitian i j cells 2 28 format Y get data and display it loop X loop for all data displayed inop 12 spreadsheet display word definitions cl 07 02 04 display spreadsheet boarders on the screen display spreadsheet boarders 18 3 a do 20 i at 49 da ascii emit 12 spaces lopp ascii i emit loop BG 0 do i 8 dco j 18 at ascii emit loop 2 at ascii emit loop FORTH Dimensions 0
89. que After understanding his ideas I came up with a variation which avoids some of the inherent execution time overhead when his method is used from a colon definition Using Mr Held s technique from a colon definition required storing the address of the subroutine that he want ed to call into the calling routine each time that word is executed This over head can be eliminated Figure one illustrates what a subroutine definition will look like after being compiled using the defining words presented here One can see that the code field points to a JSR to the parameter field address The code that is then to be executed must be a machine language subroutine and must return accordingly When the word is called from a colon definition the inner interpreter will be directed through the code field to the JSR PFA When the machine language subrou tine in the parameter field returns a JMP then NEXT is executed which is the normal exit for CODE definitions If the subroutine is to be used from a code definition first it is necessary to use to find the PFA then JSR to this address The execution overhead associated with this technique is just an extra JSR and RTS from a normal colon defini tion there is no overhead from code definitions The extra memory requir ed is the four bytes for the JSR and JMP in the definition MQ A
90. rec gt not while dr dr op r re repeat Sop 3 d dup rot rot rot um rot Y double multiplication d swap over aod r swap Y double division un mod swap drop r deod d drop 9 3 X double modulus FORTH Dimensions Volume VII No 2 Y spreadsheet algebraic functions 3 spreadsheet algebraic functions 7 infix dt infix dt infix daod aod 7 infix d 6 infix d jaissing 1 abort Missing 5 td U 1 missing 1 70 3 ianedi ate 32 gt forth begin 1 prec 4 while op repeat 1 prec if 4 np stack else 1 abort Missing then Lamediate forth definitions af 0 op stack algebra imaediate PM 0 X spreadsheet input words c4 NE o input row names posi Input Row Hames pos2 Starting with Row cur roa r w nax row d pos2 12 7 raw names row name len Zdup blank expect span 8 0 leave i 8 aod 0 if i cur row gis raw change else dis row names then loop Hoe tt Volume VII No 2 V create new algebraic operators with assigned precedence missing message V if missing then abort left paren V prec l cfa aissing message Y push on oprand stack right paren causes all ites on oprand stack to be cospiled until V left paren found left paren should have prec af 1 else error asg output start algebraic cospilat
91. rface Alpha Schanzenstrasse 27 2000 Hamburg 6 IRELAND Irish Chapter Contact Hugh Doggs Newton School Waterford 051 75757 or 051 74124 ITALY FIG Italia Contact Marco Tausel Via Gerolamo Forni 48 20161 Milano 02 645 8688 JAPAN Japan Chapter Contact Toshio Inoue Dept of Mineral Dev Eng University of Tokyo 7 3 1 Hongo Bunkyo 113 812 2111 ext 7073 REPUBLIC OF CHINA R O C Contact Ching Tang Tzeng P O Box 28 Lung Tan Taiwan 325 SWITZERLAND Swiss Chapter Contact Max Hugelshofer ERNI amp Co Elektro Industrie Stationsstrasse 8306 Bruttisellen 01 833 3333 SPECIAL GROUPS Apple Corps Forth Users Chapter Twice Monthly 1st amp 3rd Tues 7 30 p m 1515 Sloat Boulevard 2 San Francisco CA Call Robert Dudley Ackerman 415 626 6295 Baton Rouge Atari Chapter Call Chris Zielewski 504 292 1910 FIGGRAPH Call Howard Pearlmutter 408 425 8700 Volume VII No 2 43 FORTH Dimensions Seventh Annual Forth National Convention September 20 21 1985 Hyatt Rickeys Palo Alto 4219 El Camino Real Palo Alto California Forth Elements Conference Program EARTH AEROSPACE FIRE WATER Major Forth conference covering Earth resources aerospace projects fire and fusion in industry and water hydroprojects Learn about these successful Forth applications during the two day conference Convention preregistration 10 00 or 15 00 at the door Banquet 32 00 Specia
92. riods A single word perlodaway can handle the necessary calculations adjustperiod uses MOD to calculate the number of days crossed and resets perlod amp This simple math is all that is required for any number of periods The word dayinterval adjusts the date for a change of n days It is dependent on the calendar module used and serves no purpose in this discussion The periods used are 0 dawn 1 morning 2 afternoon 3 evening and 4 night If one begins with morning setting perlod to 1 Elock 1 periodaway dayinterval n VALUE periods adjustperiod period 5 MOD dayinterval floored TO periods periodaway n periodi 4 WITHIN Oz Appointments then 7 perlodaway resets period to 6 and 6 5 MOD returns 4 2 This adjusts the date two back and resets the perlod to 4 night as it should be What could be simpler I raise my hat to the standards team on this one Zaffar Essak M D Vancouver British Columbia Canada Adjusts date by n days to negative infinity ideal 4 AT period IF adjustperiod THEN Volume VII No 2 FORTH Dimensions A Case of Brackets Editor Henry Laxen s article in your March April issue VI 6 was very in teresting for his discussion of using as a callable compiler Looking into just how this works in the Perry Laxen F83 system described in C H Ting s book Inside F83 I find a difficulty W
93. rne Public Library 12700 S Grevillea Ave Call Phillip Wasson 213 649 1428 Monterey Salinas Chapter Call Bud Devins 408 633 3253 Orange County Chapter Monthly 4th Wed 7 p m Fullerton Savings Talbert amp Brookhurst Fountain Valley Monthly 1st Wed 7 p m Mercury Savings Beach Blvd amp Eddington Huntington Beach Call Noshir Jesung 714 842 3032 San Diego Chapter Weekly Thurs 12 noon Call Guy Kelly 619 268 3100 ext 4784 Sacramento Chapter Monthly 4th Wed 7 p m 1798 59th St Rn A Call Tom Ghormley 916 444 7775 Bay Area Chapter Silicon Valley Chapter Monthly 4th Sat FORML 10 a m FIG 1 p m ABC Christian School Aud Dartmouth amp San Carlos Ave San Carlos Call John Hall 415 532 1115 or call the FIG Hotline 408 277 0668 Stockton Chapter Call Doug Dillon 209 931 2448 COLORADO Denver Chapter Monthly 1st Mon 7 p m Call Steven Sarns 303 477 5955 CONNECTICUT Central Connecticut Chapter Call Charles Krajewski 203 344 9996 FLORIDA Orlando Chapter Every two weeks Wed 8 p m Call Herman B Gibson 305 855 4790 Southeast Florida Chapter Monthly Thurs p m Coconut Grove area Call John Forsberg 305 252 0108 Tampa Bay Chapter Monthly 1st Wed p m Call Terry McNay 813 725 1245 GEORGIA Atlanta Chapter Call Ron Skelton 404 393 8764 ILLINOIS Cache Forth Chapter Call Clyde W Phillips Jr Oak Park 312 386 3147 Central Il
94. rom any of the others that represented only about a third of the actual site equipment After describing the size and com plexity of this task the speaker went on to offer her observations about the requirements for success with large projects knowledgeable management and direction professional skill in all parts of the working team good com munication between the team and man agement and between management and the client the discipline to adhere to strict standards and conventions and responsibility She believes all of these points to be crucial and that the importance of each increases with the overall size of the task It would appear that those same in gredients contributed to the success of the Forth programmers and scientists who worked on experiments performed aboard space shuttle missions in November 1981 and October 1984 Dr Henry Harris of Pasadena s Jet Propulsion Laboratory described his work with JPL and the Johnson Space Center The three year project focused on instrument control and in the end was beset by in orbit hardware prob lems that would have been insurmoun table if it were not for Forth s interactiveness JPL chose to use Forth for this pro ject because of its adaptability to a wide range of needs and conditions They employed intense number crunching graphics and sophisticated arrays of geometrical attitudes com prising something like a megabyte of compiled code The team
95. rosystems MM MicroMotion MMS Miller Microcomputer Services PNS Pink Noise Studio PS ParSec C64 with EXPERT 2 by PS Extensions for LM Specify 280 or 8086 Software Floating Point 8087 Support IBM PC or 8086 9511 Support Z80 or 8086 Color Graphics IBM PC Data Base Management 100 100 100 100 200 FORTH MANUALS GUIDES amp DOCUMENTS S m Oo en Fl o en a Thinking FORTH by Leo Brodie author of best selling Starting FORTH 16 ALL ABOUT FORTH by Haydon MVP Glossary 25 FORTH Encyclopedia by Derick amp Baker 25 FYS FORTH from the Netherlands 0 User Manual 25 DJ Source Listing 25 FORTH Tools and Applic by Feierbach 19 The Complete FORTH by Winfield Learning FORTH by Armstrong Understanding FORTH by Reymann FORTH Fundamentals D Vol by McCabe Vol Glossary Mastering FORTH by Anderson amp Tracy Beginning FORTH by Chirlian FORTH Encycl Pocket Guide 7 And So FORTH by Huang A college level text 25 FORTH Programming by Scanlon 17 16 17 16 14 18 17 TES ooo0go o JO Installation Manual for fig FORTH Source Listings of fig FORTH Specify CPU Starting FORTH by Brodie Best instructional manual available soft cover 68000 fig Forth with assembler FORML Proceedings
96. sp 8 0 is cell at top display pos if calc c r V if 1 calc cols then rows if cur row 8 0 lt gt if so are we at the top of else calc V if 0 calc rows then cols if 1 cur row the spreadsheet then if not sove up a dis row change Y cell and scroll upward order Y prompt user for calc order then if already at top ignor pos Specify calculation order else Vif aark not at top of display pos2 Row Col Q or Col Row 1 erase cell aarker Y erase mark key ascii 1 get response and set flag i row disp Y aove up ane cell if true accordingly then else false place cell sarker V draw new cell aarker then order flag 0 1 2 3 4 i 4 7 8 3 0 1 2 3 4 5 21 24 spreadsheet cell aarker positioning wards cl 07 02 84 spreadsheet cell marker positioning words cl 07 02 84 gt left arrow Y aove cell marker left 1 cell gt down arrow Y move cell aarker down 1 cell col disp 8 0 cell at left of display 7 disp 8 14 V are we at bottoa of display if cur col 8 0 lt gt if sa is at at first column if cur row 8 15 row lt gt if so are we on last row if 1 cur col nave display coluan left once if i cur row V if not aove down one cell dis col change scroll display left dis row change scroll downward then if at first coluan ignor then Vif at last row ignor else cell mark not at left coluan else V if not at bottoa nf display erase cell marker erase current mark
97. t represents Then the search through the dictionaries could yield a list of file names These files would then be searched word by word full text search both to eliminate the few false hits resulting from the probabilis tic nature of the dictionary and also to locate the words or phrases sought in case the user wanted to examine them in context Miscellaneous Hints 1 Logical AND and OR searches are easily handled but NOT presents a problem because it changes false hits which are tolerable into false misses which are not So use the full text search before excluding any file from consideration 2 Searches are fast The hash func tions need only be computed once no matter how many dictionaries need to be searched so the time to compute them should be imperceptible And for any single word or AND of words a single bit mask can be prepared for high speed test against the dictionaries It s reasonable to estimate that the dic tionary search of dozens of files even long ones could be completed within a second or two Any full text searches required would take longer but usually they can be concurrent with display of the output to the user 3 The suggested 7 5K bytes diction ary size requires hash function divisors around 60K If your system doesn t have an unsigned division available consider getting one bit by another method such as adding the ASCII letters of the English word together and taking the last
98. text file This mechanism will also generate the dictionary initially the first time the program is run References 1 Bentley Jon Spelling Checker Communications of the ACM May 1985 Vol 28 No 5 This Programming Pearls article includes background on text documents and on several methods of checking spelling and has good references for further research 2 Knuth Donald E The Art of Com puter Programming Vol 3 Addison Wesley Reading Mass 1973 This classic programming text has a long section on hashing and related methods 41 SRUE 182 lt RR On October 1st 1985 the price c E e for figFORTH will be increased to S 89 95 Order NOW and you can have the complete figFORTH system for only 74 95 figFORTH from SOTA Computing Systems Limited is rapidly becoming the FORTH of choice for both the novice and experienced FORTH programmer Featuring a complete accurate implementation of the figFORTH model figFORTH from SOTA Computing Systems Limited also offers full featured string handling floating point e screen editor e assembler beginner s tutorial e comprehensive programmer s e guide exhaustive reference manual e unparalleled technical support e e source listings e no licensing requirements e no rogalty arrangements e unbeatable price e For the best implementation of FORTH that money can buy at a
99. the capacity today Silicon generation was almost anti climatic It took four years and a mil lion dollars to get to the detail design stage It took just seven months and seven hundred thousand dollars to realize the dream of an operational Forth processor in silicon EDN magazine had the privilege of introducing the NS4000 in their March 1985 cover article John Golden guid ing light of Novix says EDN article put us on the map Three hun dred inquiries were developed We found that Forth has friends through out industry just waiting to show their management the opportunities The first production run of develop ment boards is nearly sold out Mr Golden says shipments will commence in the latter part of July with full docu mentation and developmental software by Gregg Bailey Production units were demonstrated at the Silicon Valley FIG Chapter meeting and at the Rochester Forth Conference Pur chasers names read like a who s who of technology There are automobile manufacturers a computer media firm and a computer company that is into fruit The processor is even being con sidered as a controller co processor for a recent thirty two bit family When queried on their motive a spokesman replied We see this as a way to get a leg up on the rest of the world Forth and Voice Mail FIG s own John Cassady is getting no end of attention in the technical and popular press He was recently dis
100. the word that is to be executed should that code be selected The first byte in PAD still counts the entries which are now three bytes long We have removed the positional dependence of the CASE statement MENU SELX gets the answer validates it and executes the word whose address is stored immediately following We have also done away with the menu stack If the option is Esc do nothing don t PAD COUNT OVER SWAP DO OVER I C LEAVE 3 3 PAD C8 l OVER lt WHILE DROP DUP 3 ABORT Break DUP ASCII IF HELP 1B IF EXIT ENDIF exit MENU SELX BEEP ENDIF No BEEP after Help REPEAT SWAP EMIT CR gt index PAD 2 EXECUTE Get selected word addr N Define menus HELP HELP CR CR HELP See help no CR FVD28Apr84 HELP IS HELP Figure Five Execution Version of Menu Words FORTH Dimensions 18 Volume VII No 2 Michael Perry It is readily adaptable to fig FORTH etc though I don t know why anyone with an 8080 Z80 system would use anything other than Laxen and Perry s F83 For those who are not aware these two gentlemen implemented a meta compiled version of Forth per the 83 Standard and put it in the public N Menus using version 3 domain It includes all kinds of bells and whistles is one of the best Forth systems around and the price is hard to beat Most RCP M computer bul letin boards around North America carry it as library SIGM154A LBR and SIGM154B
101. time delay 2DELAY 25000 0 DO LOOP Longer time delay 73 TITLE PAGE MATH QUIZ STAR 42 EMIT STARLINE 40 0 DO STAR LOOP BLANKLINE STAR 38 SPACES STAR INFO L1 STAR 14 SPACES MATH QUIZ 14 SPACES STAR INFO LZ STAR 13 SPACES 13 SPACES STAR INFO L3 STAR 18 SPACES 18 SPACES STAR INFO L4 STAR 12 SPACES 12 SPACES STAR 3 MATHTITLE PAGE STARLINE BLANKLINE BLANKLINE INFO L1 BLANKLINE INFO L2 ELANKLINE BLANKLINE INFO L3 BLANKLINE INFO L4 BLANKLINE BLANKLINE STARLINE CR VERSION 1 3 LYLE D MORTON 74 INSTRUCTIONS FOR MATH QUIZ INSTRUCT 3 SPACES HELLO YOU ARE ENTERING THE WORLD CR OF MATH QUIZ PLEASE ENJOY YOURSELF CR BE ADVISED INVERSE THE UPPER LEVELS MAY REQUIRE CR A PENCIL AND PAPER NORMAL GOOD LUCK Continued FORTH Dimensions 6 Volume No 2 Dimensions V1 6 but some of the Screens seem to be missing Words like GETNAME and ANSWER in the text and many of the words shown in screen 83 are not defined Could I get a copy of o 75 MATH QUIZ ADDITION MODULE VARIABLE ADD4 0 1 addend 1 VARIABLE ADDZ 0 ADD2 addend 2 ANSWER QUERY BL WORD NUMBER DROP gets players answer 0o ADDITION MAKE PROB amp GET ANS the full set of screens I d like to set up LEVEL CHOOSE ADD1 get difficulty level and the program for my wife s schoo
102. tion came just two months later We owe a debt of gratitude to Christine Colburn presi dent of Creative Solutions who gave a 1000 birthday present to husband Don Don had been examining com puter architectures and had developed a passion to see the advantages of Forth directly applied in silicon Don thus funded a one day project organizing session with Charles Moore Bill Ragsdale and a chip design consultant This was the spark needed for Chuck to confirm that others were seriously in support of his idea for a Forth processor John Peers saw the beauty of ap proaching Forth from several levels He founded Technology Industries in March 1981 with the encouragement of Chuck Moore and Elizabeth Rather of Forth Inc As the story unfolds Forth Inc merged into Technology Industries in August 1981 The charter of Technology Industries was to be an umbrella for three divisions of Forth hardware software and applications Unfortunately the full scope of this plan was not reached and the merger was rescinded in October 1982 The chip development still con tinued funded with the limited resour ces of Technology Industries Charles Moore demonstrated a color simula tion of the processor in March 1983 A funding partner Sysorex Internation al became interested in July and by March of 1984 the Novix partnership commenced operation John Golden transferred from Technology Indus tries as general manager and continues in
103. tionaries Only one pass through the dictionaries is enough even for a complex search involving many words phrases and AND and OR combinations of them Different kinds of condensed dic tionaries could be used not only the probabilistic dictionary suggested here We suggested this one because it is compact easy to implement and very efficient especially when many dictionaries must be searched for the same words How big should each of the dic tionaries be A typical text document of about 10 000 words will have only about 1500 distinct words a 3000 word dictionary would accommodate much more than a 20 000 word document Two and a half bytes per word gives 7 5K bytes for each document s dictionary And note that each diction ary can actually hold more than 3000 words and in fact will never overflow although performance degrades gradually if too many words are added The actual dictionary size can be selected by the end user although for any given database of text files it s easier to keep all dictionaries the same size than to have larger ones for large documents If 500K of RAM is available over sixty dictionaries of 7 5K each could be kept there for faster searches although it wouldn t hurt much to keep these dictionaries as a file on disk since a search would need only one pass through that file Each dictionary should also contain the name of the file FORTH Dimensions 40 Volume VII No 2 which i
104. truly affordable price order figFORTH from SOTA Computing Systems Limited today ORDER FORM Gentlemen want to save money OEnclosed is my Ocheck Omoney order for 74 95 U S Funds DBillmy OVISA Mastercard 1 have indicated my card number and expiry date below Please rush me my copy of figFORTH by SOTA for OCP M Version 2 xx the TRS 80 Computer I OCP M Plus Ver 3 xx have indicated 5 1 4 format only please indicate computer type OModel UModel 4 UModel 111 QModel 4P Lp ns EXPIRY CHRD TYPE CARD No SHE M pee TUER Sion Nipper ancouver British Columbia Canada V6G 288 ORDER BY eee VZSA BY PHONE JU 688 5009 State of the Art since 1981 Computing Systems Limited Oo000000 TRS BO is a registered trademark of Radio Shack CP M end CP M Plus ere registered trademarks of Digital Research ALABAMA Huntsville FIG Chapter Call Tom Konantz 205 881 6483 ALASKA Kodiak Area Chapter Call Horace Simmons 907 486 5049 ARIZONA Phoenix Chapter Call Dennis L Wilson 602 956 7678 Tucson Chapter Twice Monthly 2nd amp 4th Sun 2 p m Flexible Hybrid Systems 2030 E Broadway 206 Call John C Mead 602 323 9763 ARKANSAS Central Arkansas Chapter Twice Monthly 2nd Sat 2 p m amp 4th Wed 7 p m Call Gary Smith 501 227 7817 CALIFORNIA Los Angeles Chapter Monthly 4th Sat 10 a m Hawtho
105. uctivity development methods models tools program verification aids and procedures Individual participation is encouraged and attendees are requested to submit a conference paper Conference proceedings will be published SYSTEMS Trade Fair October 28 November 1 1985 Munich Fair Grounds Computers and Communications This is a major international event covering computers and communications The trade fair is scheduled October 28 through November 1 1985 Guest and Tour Program A complete program will be available for guests not attending the technical conference sessions Sightseeing escorted tours are planned for the group Reservations authors instructions itinerary special group rate Write to EuroFORML Forth Interest Group Post Office Box 8231 San Jose CA 95155 or telephone the FIG Hotline 408 277 0668 East and West Coast departures are planned Advance reservations are required West Coast Departure 1995 00 East Coast Departure 1795 00 FORTH INTEREST GROUP MAIL ORDER FORM P O Box 8231 107 MEMBERSHIP in the FORTH INTEREST GROUP amp Volume 7 of FORTH DIMENSIONS No sales tax handling fee or discount on membership See the back page of this order form The Forth Interest Group is a worldwide non profit member supported organization with over 5 000 members and 80 chapters FIG membership includes a subscription to the bi monthly publication FORTH Dimensions FIG also o
106. umentation Complete set of manuals Programming courses The FORTH Inc hot line Expert contract programming and consulting services From FORTH Inc the inventors of FORTH serving professional programmers for over a decade Also available for other popular mini and micro computers For more information contact FORTH Inc 2309 Pacific Coast Hwy Hermosa Beach CA 90254 213 372 8493 RCA TELEX 275182 Eastern Sales Office 1300 N 17th St Arlington VA 22209 703 525 7778 IBM PC is a registered trademark of International Business Machines Corp NGS FORTH A FAST FORTH OPTIMIZED FOR THE IBM PERSONAL COMPUTER AND MS DOS COMPATIBLES STANDARD FEATURES INCLUDE e79 STANDARD eDIRECT I O ACCESS eFULL ACCESS TO MS DOS FILES AND FUNCTIONS eENVIRONMENT SAVE amp LOAD eMULTI SEGMENTED FOR LARGE APPLICATIONS eEXTENDED ADDRESSING eMEMORY ALLOCATION CONFIGURABLE ON LINE eAUTO LOAD SCREEN BOOT eLINE amp SCREEN EDITORS eDECOMPILER AND DEBUGGING AIDS 8088 ASSEMBLER eGRAPHICS amp SOUND eNGS ENHANCEMENTS eDETAILED MANUAL UPGRADES eNGS USER NEWSLETTER A COMPLETE FORTH DEVELOPMENT SYSTEM PRICES START AT 70 NEW HP 150 amp HP 110 VERSIONS AVAILABLE i ap NEXT GENERATION SYSTEMS P O BOX 2987 SANTA CLARA CA 95055 408 241 5909 FOR TRS 80 MODELS 1 3 4 4P IBM PC XT AT amp T 6300 ETC THE COMPLETE FORTH GET
107. us layer interactive layer extensible layer metacompilation system development file systems other languages other operating systems applications and abstracts without papers 312 FORML PROCEEDINGS 1982 25 28 35 Forth machine topics implementation topics vectored execution system development file systems and languages applications 313 FORML PROCEEDINGS 1983 25 28 35 Forth in hardware Forth implementations future strategy programming techniques arithmetic amp floating point file systems coding conventions functional programming applications 314 FORML PROCEEDINGS 1984 25 28 35 1 Expert systems in Forth using Forth philosophy implementing Forth systems new directions for Forth interfacing Forth to operating systems Forth systems techniques adding focal variables to Forth ammmm 70 ROCHESTER PROCEEDINGS The Institute for Applied Forth Research Inc is a non profit organization which supports and promotes the application of Forth It sponsors the annual Rochester Forth Conference 321 ROCHESTER 1981 Standards Conference 25 28 35 1 79 Standard implementing Forth data structures vocabularies applications and working group reports 322 ROCHESTER 1982 Data bases amp Process Control 25 28 35 1 Machine independence project management data structures mathematics and working group reports 323 ROCHESTER 1983
108. will help Forth gain the industry wide credibility it deser ves Sincerely Michael D Pollard Donald S Schrader Computone Systems Atlanta Georgia Hore Today EXITed Tomorrow Dear FIG Hore Forth Dimensions 1 6 provides a solution to the so called double loop exit problem as it has been referred to in other quarters His solution entails the derivation of an alternative DO LOOP structure Screen 1 shows yet another alter native In this solution the system dependent word DROP LOOP is created which when executed allows a normal EXIT given as S in the example as it is in a fig FORTH dialect DROP LOOP does what the sequence R gt R 2DROP would do if it were included at the equivalent point in the definition of LOOK UP For those unfamiliar with the use of EXIT it forces the end of the word from anywhere in the word with the notable exception of within a DO LOOP DO LOOPs typically leave two or more values on the return stack Since EXIT makes use of the value which sits below those two or more values we have to dispose of them before we can exit A little brute force trial and error ex perimentation will show you how your system works The only other element you may need to take care of would be a Forth 83 implementation of DO LOOP which sets a flag to indicate being in a loop Your system probably doesn t do this but the flag should be indicated in your user variables if it does The

Download Pdf Manuals

image

Related Search

Dimensions dimensions definition dimensions math dimensions of wellness dimensions synonym dimensions of queen mattress dimensions of a queen bed dimensions of a 75 inch tv dimensions of iphone 16 pro max dimensions of king bed dimensions of full size mattress dimensions of health dimensions of a king size bed dimensions of a pallet dimensions of printer paper dimensions of a twin bed dimensions cross stitch kits dimensions of a queen size bed dimensions guide dimensions of a full size bed dimensions games free dimensions a4 dimensions a3 dimensions cm dimensions a1 dimensions api

Related Contents

SPRINT QUATTRO SECURE S MRI™ SURESCAN™ 6935M  第751号【`14.03】 - 山形県医師会  33-842型 取扱説明書 保証書付 ガス瞬間湯沸器  Pour avoir une information complète et pratique, cliquez ici  FERTI-VIT - Europalomas  XIII Century Blood of Europe GOLD  Extech SDL470 UVA/UVC Light Meter/Datalogger    Hoover Domestic Appliance User Manual  RYVYR V-KARA-48DE Installation Guide  

Copyright © All rights reserved.
Failed to retrieve file