Home
5 - Forth
Contents
1. Practical Considerations for Floating Point by Richard Wilton In most high level languages whether or not to use floating point arithmetic is not even a question But a Forth programmer must know the low level details of real numbers and arithmetic operators These source code examples illustrate the design of real arithmetic in a Forth application Screenless Forth by Carl A Wenrich So you think screens would be all right if only you didn t have to edit them This piece for the IBM PC running F83 lets you escape the tyranny of the silent screen It allows creation of source modules using any ASCII text file editor Tracking the Beast by Nathaniel Grossman Evidence shows that numerology the study of numbers influence upon human affairs developed alongside the scientific study of numbers Certain numbers were thought to have special significance for humans Even if you ve rid yourself of such ancient superstitions this program presents some interesting techniques A Simple Translator Tinycase by Allen Anway Menu driven programs normally require a keystroke response but what if the desired output is other than that of the pressed key If the function is needed only once CASE is a good solution because of its clear easy to change structure If needed often save memory with the compact TINYCASE to inspect an array and output the translated number when a match is found Classes in Forth by Vince D Kimball It takes class t
2. Volume 8 Number 5 Januar y February 1987 4 00 Dimensions Floating Point AMENE The Ultimate CASE Classes in Forth Tracking the Beast ere reenless Fo rth National Forth ninia Visit the MACH 2 Product Support RoundTable on MAGH 2 MULTI TASKING FORTH 83 DEVELOPMENT SYSTEM The MACH 2 FORTH 83 Multi tasking Development System created by Palo Alto Shipping Company provides a fresh approach to FORTH programming and the FORTH language The foundation of MACH 2 is a subroutine threaded FORTH with automatic macro substitution This state of the art implementation of the FORTH language allows MACH 2 to take full advantage of the powerful 680X0 microprocessors therefore execution times of programs written in MACH 2 are comparable to the execution times of programs written in the traditional compiled languages MACH 2 s integrated programming environment consists of a standard infix Motorola format assembler which supports local labels and forward references a symbolic debugger disassembler which allows multiple task debugging with single stepping breakpoints and more The Macintosh and Atari ST systems include a mouse based multi window text editor and all systems support the use of text source files The MACH 2 system is a professional development system designed to take the programmer through all phases of product development from initial design prototyping to the creation of the f
3. NEXT GENERATION SYSTEMS P O BOX 2987 SANTA CLARA CA 95055 408 241 5909 FORTH Dimensions 28 Volume VIII No 5 ATTENTION FORTH AUTHORS Author Recognition Program To recognize and reward authors of Forth related articles the Forth Interest Group adopted the following Author Recognition Program effective October 1 1984 Articles The author of any Forth related article published in a periodi cal or in the proceedings of a non Forth conference is awarded one year s membership in the Forth Interest Group subject to these conditions a The membership awarded is for the membership year following the one during which the article was published b Only one membership per person is awarded in any year regardless of the number of articles the person published in that year c The article s length must be one page or more in the magazine in which it was published d The author must submit the printed article photocopies are accepted to the Forth Interest Group including identifica tion of the magazine and issue in which it appeared within sixty days of publication In return the author will be sent a coupon good for the following year s membership e If the original article was published in a language other than English the article must be accompanied by an English translation f Articles are eligible under this program only if they were first published after October 1 1984 Letters to the Editor
4. slow electrons Another was the temperature control of a hothouse for growing tomatoes Of the projects that were eventually put into EPROMs we can mention a PID temperature con trol and an ultra sonic radar with graphic display on a VT 100 terminal For our needs we use a modified version of Laxen amp Perry s F83 for the IBM PC congratulations for your work guys The major changes brought to it were to get rid of the view fields in the structure because it now loads from normal MS DOS level 2 text files the use of binary overlays to speed up the loading of precompiled applications and a complete set of graphics words including LOGO like commands This year we had a grant from the provincial government and bought a FORCE VME computer equipped with a 68020 16 MHz microprocessor We will drive it with a polyFORTH system We are expecting a lot of possibilities from this machine More to come Sa ee ee Volume VIII No 5 5 FORTH Dimensions But since our actual control projects are mainly done with the Z80 we are using a CP M network of STD bus stations duplicating easily the future targets and simplifying the develop ment of stand alone applications We have also modified a Nautilus meta compiler to make it F83 compatible and to build EPROM versions of code that was previously tested on the CP M workstations That is what is so fantastic about Forth you can change it to make it appropriate to
5. 09 451 2946 33 FORTH Dimensions 86 National Forth Convention Nearly one thousand people gath ered in November to explore the state of Forth Engines Crowds in the exhibition area were larger and more animated than at previous years events showing great interest in the research and large commercial ventures based on Forth software and hard ware The annual event was held at the new Santa Clara Trade and Conven tion Center in California s Silicon Val ley The spacious facility easily accom modated the large lecture hall exhibi tion hall and three separate meeting rooms where concurrent sessions were held for the two days Speakers explained several proven approaches to embedding Forth in hardware Novix s NC4000 and NC6000 chips and products incor porating them were of the expected interest to attendees as was the Hartronix engine s use as a robotics controller Other systems discussed by featured speakers were Zilog s Super Z 8 and Rockwell s R65F11 and F68HC11 chips New to most attendees were the thirty two bit Forth chip de veloped by Johns Hopkins University and the multi stack writeable instruc tion set computer WISC from Haydon Enterprises The spectrum of design approaches was well represent ed it is to be hoped that a well written set of Forth benchmarks will appear in order to efficiently compare the rela tive strengths of each Future of Forth Engines Th
6. 5 polyFORTH MVP FORTH Mac Forth and MultiForth F83 and the NC4000 Special seminars discussed managing Forth programmers and writing Forth related articles There was a report from the 1986 FORML journey to present technical papers in China a meeting of FIG Chapters representatives a FIGGRAPH caucus about Forth s use in current graphics technology and the annual fireside chat with Mr Charles Moore origi nal developer of the Forth language National FIG Meeting This year s convention saw a special meeting for FIG members chaired by President Robert Reiling Other Board members all present at this meeting include Martin Tracy Vice President Kim Harris Secretary John Hall Treasurer and Thea Martin Mr Reil ing described the Forth Interest Group as a non profit organization that is tax exempt reporting to the State of California and to the U S Internal Revenue Service It has about 4000 members one quarter of whom live outside the United States FIG services and activities are supported by mem bers dues by a modest income from the sale of publications and by adver tisers in Forth Dimensions The Forth National Convention itself has been managed so that income and expenses are about equal Early last year a small group of board members and other key figures met at their own expense in a two day think tank style retreat They addres sed issues such as membership ser vices growth and
7. Conclusion The principal benefit of the pro posed approach is that it seems to solve the perceived problems without dras tically complicating or changing the present character of Forth Marriages of Forth and Smalltalk such as Kriya Systems s Neon provide more of Smaliltalk s explicit structure at the expense of Forth s flexibility 1 find that approach to be overly complex although I should express my thanks to the implementors of Neon for provok ing me to think about this subject Ultimately in the author s opinion the responsibility for the production of elegant clear and powerful software rests with the programmer A language should provide a few simple yet power ful and carefully integrated constructs the discipline and imagination of the programmer provide the rest FORTH Dimensions 26 Volume VIII No 5 Bibliography l Duff Charles and Norman Iver son Forth Meets Smalltalk in Journal of Forth Application and Research Vol 2 no 3 pp 7 26 Goldberg Adele and David Rob son Smalltalk 80 The Language and its Implementation Reading MA Addison Wesley Publishing Company 1983 3 Lyons George Type Declara tions in 1980 FORML Proceed ings pp 72 74 Moore Charles Interview on fac torization in Leo Brodie Thinking Forth Englewood Cliffs NJ Prentice Hall Inc 1984 pp 196 197 Laxen Henry and Michael Perry l Forth 83 Implementation Mod
8. Grossman Nathaniel 5 27 H The Hacker s LOCKER 2 27 Ham Michael 3 34 4 8 5 7 6 10 Harris Kim 3 34 Hoekman Doneil 5 25 Improved Forth 83 DO LOOP 3 28 Interrupts pseudo 3 30 J James John S 2 40 4 38 5 23 James Stephen 4 28 K Kent Clifford 6 23 Keywords Where Used 1 29 Koopman Phil Jr 4 36 L LEAVE Another Forth 83 LEAVE 1 36 Libraries Code Modules and Data Structures 5 23 Forth Component Libraries 4 38 Lindley Craig A 1 14 M Macros Benchmark Readability 4 16 Forth Timer Macros 3 19 Macro Generation in Forth 1 27 Synonyms and Macros 3 11 3 14 Mailboxes Extending the Multi Tasker 4 25 Making Numbers Pretty 5 7 Mass Transit Forth 2 28 Math Making Numbers Pretty 5 7 A Universal Stack Word 5 25 McGregor Cecil 2 27 Menus Menus in Forth 2 15 The Moving Cursor Writes 6 10 Metacompilation Improved Forth 83 DO LOOP 3 28 Modules Forth Component Libraries 4 38 The Moving Cursor Writes 6 10 Multi Tasker F83 Extending the Multi Tasker Mailboxes 4 25 N Not ONLY But ALSO 1 32 Novix 2 12 Number Editing Utility 3 37 0 ONLY ALSO 1 32 Ouverson Marlin 4 41 5 35 P Pappas Nicholas 1 29 Probabilistic Dictionaries 2 40 Q Quick DP in Forth 5 14 R Ragsdale William F 2 12 Recursion An Application of the Recursive Sort 5 12 Redefining Words 4 36 Reiling Robert 6 15 Reviews 1985 Forth National Convention 4 41 eurOFORML 85 6 15 FORML at Asilomar 5 35 Roche
9. Letters to the editor are in effect mini articles and so deserve recognition The author of any Forth related letter to an editor published in any magazine except Forth Dimensions is awarded 10 credit toward FIG membership fees subject to these conditions a The credit applies only to membership fees for the mem bership year following the one in which the letter was published b The maximum award in any year to any person will not ex ceed the full cost of the membership fee for the following year c The author must submit to the Forth Interest Group a photocopy of the printed letter including identification of the magazine and issue in which it appeared within sixty days of publication The author will then be sent a coupon worth 10 toward the following year s membership d If the original letter was published in a language other than English the letter must be accompanied by an English translation e Letters are eligible under this program only if they were first published after October 1 1984 ee Ultimate CASE Statement Wil Baden Costa Mesa California Many citizens of the Forth commun ity have lamented the lack of a CASE statement in standard Forth language specifications Since the first rule of Forth programming is If you don t like it change it there have been many proposals and Forth Dimen sions even held The Great CASE Con test in Volume II Although the win ning entry o
10. 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 craps n int n switch n case 7 ll printf You win break case 2 3 12 printf You lose break default printf sd is your point n Figure Two b CASE DUP CRAPS n CASE 7 IF DROP You win EXIT THEN CASE 11 IF DROP You win EXIT THEN CASE 2 IF DROP You lose EXIT THEN CASE 3 IF DROP You lose EXIT THEN CASE 12 IF DROP You lose EXIT THEN lt is your point Figure Three OF OR n flag COMPILE IF COMPILE DROP n flag n n flag 2 PICK OR IMMEDIATE CRAPS n CASE 7 11 OR OF CASE 2 3 BETWEEN 12 OR OF is your point You win You lose EXIT THEN EXIT THEN Figure Four WHATEVER n CASE O OF Zero EXIT THEN CASE 0 lt OF Negative EXIT THEN CASE DUP 1l AND 0 OF Power of 2 EXIT THEN CASE ASCII 0 ASCII 9 BETWEEN OF Digit EXIT THEN CASE ASCII ASCII BETWEEN ASCII OR OF Punctuation EXIT THEN DROP Whatever Figure Five 0UT c 127 AND CASE O 13 return OR OF NEW LINE EXIT THEN CASE 10 linefeed 12 formfeed OR OF BLANK LINES 0 IF NEW LINE THEN EXIT THEN 0 BLANK LI
11. Oak Park 312 386 3147 Central Illinois 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 Tues 7 p m IPFW Campus Rm 138 Neff Hall Call Blair MacDermid 219 749 2042 IOWA Iowa City Chapter Monthly 4th Tues Engineering Bldg Rm 2128 University of lowa Call Robert Benedict 319 337 7853 Central lowa 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 e 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 Ist Wed Mitre Corp Cafeteria Bedford MA Call Bob Demrow 617 688 5661 after 7 p m e MICHIGAN Detroit Ann Arbor area Monthly 4th Thurs Call Tom Chrapkiewicz 313 322 7862 or 313 562 8506 MINNESOTA MNFIG Chapter Even Month Ist 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 e MISSOURI Kansas City Chapter Monthly 4th Tues 7 p m Midwest Research Institute MAG Conference Ce
12. WE NEED YOUR HELP At the FORTH Interest Group we know Forth is being used in many sophisticated and complicated projects Unfortunately the Forth community has never compiled a complete reference document summarizing how and where Forth is being used We believe this type of document would be very helpful to both the novice considering learning Forth and the professional experiencing corporate resistance to using it Would you please help us put one together All you need to do is complete the questionaire below and return it directly to us by March 15 All completed questionaires should be mailed to Forth Interest Group P O Box 8231 San Jose CA 95155 1 Company name and address 2 Name of the programmer Note for internal use only Will not be published 3 Project or product name 4 Date project or product completed 5 Was the project For sale to an end user yes no For in house use yes no For OEMs yes no 6 Indicate approximate number of users 1 50 301 400 50 100 401 600 100 200 200 300 7 Is Forth hidden from the user yes no 8 Briefly describe the project 30 words 9 Briefly describe the benefits of using this project or product Thank you for your participation If you would like a copy of the results please complete the following Name Company Address City State Zip poh RRR le Se ee etre erae OE m Voiume VIII No 5 37 FORTH 83 ST ANDARD
13. area DUP AREA radius area DUP M D gt F FPI F AREA radius area IS gt AP APDUP FMULP FLDPI FMULP AP gt FL Timing loop TEST TIMER 100 0 DO LOOP TIMER STEST 5 16 USTEST 3 46 STEST USTEST 1 16 0 71 80286 STEST Scaled arithmetic version USTEST Unsigned scaled arithmetic version 355 UM 113 UM MOD SWAP DROP FTEST Floating point version F87TEST version which uses 8087 stack 101 1 DO I AREA DROP LOOP Table One Source Code Examples FTEST SFP 75 63 FTEST SFP 18 34 2 26 1 53 SFP means Software Floating Point creased execution speed in application programs In practice neither approach to floating point stack design has proved to be unequivocably better Other con siderations including source code readability portability and the asym metry of floating point hardware with standard Forth system design lead to compromises in system complexity and in execution speed r 2 r 2 pi r pi pi r 2 0 convert to double 8087 short integer r 2 on 8087 stack pi r 2 substitute FDROP in floating point versions FTEST 8087 5 88 F87TEST 3 63 Table Two Timings for 10 000 executions of AREA IBM PC 4 77 MHz 8088 FTEST 8087 F87TEST Table
14. especially considering the finding in neural net research that a high degree of intercon nectivity can yield interesting results How do you see casting Forth into hardware engines as changing the Forth language Charles Moore By keeping the pro gram memory small but giving lots of space to the stack John Rible They are providing im proved addressing space but it won t be terribly useful except in stacks Using stack pointers into larger areas of memory becomes interesting There isn t enough experience at program ming these chips to know what kind of Operations can usefully occur in an overlapped manner Someday we will be able to write truly portable code that can be compiled into these processors to give us the full power of that proces sor without the programmer having to serve as the compiler Glen Haydon Chuck outlines the forty five or so necessary functions for Forth as it stands That should be fairly solid In the future we will look at what other functions will be simple and necessary and whether they can be combined efficiently with other opera tions The basic Forth kernel may grow by twenty or so words Concurrent Sessions Well known Forth experts conduct ed tutorials on subjects such as multi tasking target compilation vectored I O and control structure extensions Groups of users met with the vendors of Mach and Mach 2 68000 systems rr i ee FORTH Dimensions Volume Vill No
15. serve a great number of Forth users Like a number of countries however certain currency regulations make it difficult to get the five FIG members necessary to form an official FIG Chapter As a result Shanghai s pres tigious Jiao Tong University was made an Associate FIG Chapter for a period of two years Welcome The keynote speaker of the conclud ing FIG banquet was John Peers President and CEO of Novix Inc His amusing style strong convictions and philosophy combined with his exten sive high tech background made Mr Peers an informative and entertaining guest Also at this banquet Dr C H Ting was announced as the recipient of the Figgy award for volunteer ac tivities that have done much to advance the cause of Forth during the past year In addition to work that includes sever al popular books on the FIG Order Form Dr Ting was the Program Chairman for this year s convention A good job well done Marlin Ouverson Index to Advertisers Bryte 11 Computer Cowboys 7 Dash Find amp Associates 8 Forth Inc 14 Forth Interest Group 19 22 28 37 Harvard Softworks 17 Laboratory Microsystems 33 MicroMotion 16 Miller Microcomputer Services 30 Mountain View Press 35 New Micros 36 Next Generation Systems 28 Palo Alto Shipping Company 2 Software Composers 4 Talbot Microsystems 37 FORTH Dimensions 36 Volume VIII No 5 ATTENTION FIG MEMBERS
16. 3 You lose IF DROP ELSE DUP 12 IF DROP ELSE You win n is your point THEN THEN THEN THEN THEN Figure One b craps n int n switch n case 7 case ll case 2 case 3 case 12 default printf You win break printf You printf You printf You printf You printf d is your point n win break lose break lose break lose break Figure Two a Volume VI No 5 29 FORTH Dimensions FOR TRS 80 MODELS 1 3 4 4P IBM PC XT AT amp T 6300 ETC DATABASE WITHOUT THE WAIT DATAHANDLER and DATAHANDLER PLUS are fast easy database programs which accept any length of field sort and key on any fields never pad with useless blanks And they integrate with FORTH WRITE FORTHCOM and the rest of the MMS FORTH System The power speed and compactness of MMSFORTH drive these major applications for many of YOUR home schoo and business tasks Imagine asophis ticated database management system with flexibil ity to create maintain and print mailing tists with muitiple address lines Canadian or 9 digit U S ZIP codes and multiple phone numbers plus the speed to load hundreds of records or sort them on several fields in seconds Manage inventories with setec tion by any character or combination Balance checkbook records and do CONDITIONAL report ing of expenses or other calculations File any records and recall selected ones with
17. 8 KB blk fiblk O tf O 9 SHOW SCR 10 NIP CNT 11 12 LOCATE 13 14 15 LIST t cfa cnt f cfa FIND NIP CNT DUP WALL lt SFA DUP KB SHOW SCR O or amp edit f SWAP DROP IF Not found ELSE IF Not locatable DROP ELSE IF Block 0 DROP ELSE THEN THEN THEN Thomas Screen Apologia in Absentia Dear Marlin This letter is intended as an apology to all those who wrote to The Tools Group and never received a reply The reason for the lack of response was that I never got the letters About the time the first ad for The Tools Group came out I broke up with my girlfriend and sold the house in Desert Hot Springs to her Although some mail has been forwarded by the post office I am sure that I did not receive a number of responses To those writers I offer my apologies The Tools Group was formed to develop and market the Forth we had developed as the tools group for a large Forth project The most significant feature of our Forth is the large num ber of extensions library manager floating point etc Looking around at the marketplace we have decided there are enough ver sions of Forth in existence We have decided to adapt our tools to establish ed Forth packages supplementing the tools those vendors supply This con version effort is underway and should be ready for public consumption soon At that time we will run our ad in Forth Dimensions with
18. 9 5 Is 5 605 Another name YIN y Type a name of no more than 80 characters including spaces and upper and lower case letters then press lt return gt Ignia Lisa Incendiari Shall U amp u vee Y amp y eye and Wiw two vees be counted YIN y Ignia Lisa Incendiari O Ms ce 1 Ds 500 1 s 100 1 Ls 50 O Xs o O Vs 6 6 Is 6 6356 16 Volume VIII No 5 Another mame YIN y Type a name of no more than 80 characters including spaces and upper and lower case letters then press lt return gt Ignia Alexis Incendiari Shall U amp u vee Y amp y eye and W amp two vees be counted YIN y The number of Ignia Alexis Incendiari is 464 the number of The Beast of the Book of Revelation Another name YIN n DONE scree 1 The Beast of Revelation loader screen Forth 83 NG 04 18 86 MARK drop loaded prograe by FORGET MARKER 2 12 THRU 1 LOAD puts The Beast into the dictionary Startup message DARK clear screen BEEP capture user CR CR This progras will help your calculations toward CR identifying the Beast of Revelations CR CR Here is wisdom Let hia that hath understanding CR count the nuaber of the beast for it is the nuaber CR af a san and his nuaber is Six hundred threescore CR and six The Revelation of St John the Divine 13 18 CR CR CR CR Type BEAST lt return gt to begin C
19. At its other hand lay the pseudo scientific as we now call it numerology with ample evidence be ginning with the oldest surviving liter ary texts to show that this study of the influence of numbers upon human affairs developed parallel to and sometimes hand in hand with the sci entific study of numbers Up to recent times certain numbers or combina tions of numbers were thought to have special significance for humanity or for particular humans Many if not most of us retain traces of these ancient su perstitions no matter how rational we deem ourselves to be Religious writings are a fertile source of numerological lore The Bible is no exception as Hooper fully illustrates Biblical numerology has been devel oped in both the Jewish and the Chris tian traditions The Jewish Kabbalists refined Old Testament numerology into the real time numerological art of gematria Early Christian numerology developed gematria like techniques based upon the fact that the letters of the Greek alphabet like those of the Hebrew carried dual meanings as numbers Perhaps the most notorious numero logical passage in the Bible occurs in the New Testament in the Book of Revelation of St John the Divine 13 18 Here is wisdom Let him that hath understanding count the number of the beast for it is the number of a man and his number is Six hundred three score and Six Volume VIII No 5 The Beast has been considered from
20. BUF sup plies the address and B FILE supplies the number of bytes to be interpreted ERROR is again a modification of the FORTH vocabulary s version But instead of leaving parameters for the WHERE command it dumps the module buffer up to and including the word that triggered the abort Of course if you happen to be interpreting from the keyboard it just flags the error as before The only thing left to do now is revector LOAD SOURCE and ERROR Once this is done you had better not try any screen manipulations unless you first revector back to the FORTH versions because you will probably crash But now you are free to load one or more ASCII text files and they will be interpreted just as though they were screen files To demonstrate how this is done and how easily files can be chained here s a little sample session It assumes that three files of Forth code have already been created It also assumes that the last two lines of code in FILEA BLK look like this CR LOAD FILEB BLK LOAD FILEB BLK and that the last two lines of code in FILEB BLK look like this CR LOAD FILEC BLK LOAD FILEC BLK Now assuming that the UNSCREEN definitions have been loaded all you have to do is type LOAD FILEA BLK and wait If the files are large near 4K it will go down something like this The selected drive will come on and FILEA BLK will be read into memory After the drive goes off it will seem as though n
21. Horzon 129 S Yellowstone Madison WI 53705 FOREIGN e AUSTRALIA Melbourne Chapter Monthly 1st 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 Alberta Chapter Call Tony Van Muyden 403 962 2203 Nova Scotia Chapter Contact Howard Harawitz 227 Ridge Valley Rd Halifax Nova Scotia B3P2E5 902 477 3665 Southern Ontario Chapter Quarterly Ist Sat 2 p m General Sciences Bidg 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 e 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 e FRANCE French Language Chapter Contact Jean Daniel Do
22. MMS Forth User Groups More than 30 locations For further information call 617 653 6136 Sa e Volume VIII No 5 39 FORTH Dimensions NOW AVAILABLE Dr Dobb s eke efoto ae Fo rth Dr Dobb s Toolbox of Forth is a comprehensive collection of useful Forth programs and tutorials that contain expanded and revised versions of DDJ s best Forth articles along with new Forth material You ll also find appendices that will help you convert fig Forth to Forth 83 and tell you how to stay up to date on the latest developments of Forth FORTH INTEREST GROUP Sig FORTH INTEREST Sig 23 EACH FROM THE FORTH INTEREST GROUP FORTH INTEREST GROUP US POSTAGE P O Box 8231 sau Permit No 3107 San Jose CA San Jose CA 95155
23. Monthly 2nd Sat 1 p m Tektronix Industrial Park Bldg 50 Beaverton Call Tom Almy 503 692 2811 PENNSYLVANIA Philadelphia Chapter Monthly 4th Sat 10 a m Drexel University Stratton Hall Call Melanie Hoag or Simon Edkins 215 895 2628 e 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 483 7242 e TEXAS Austin Chapter Contact Matt Lawrence P O Box 180409 Austin TX 78718 Houston Chapter Call Dr Joseph Baldwin 713 749 2120 Periman Basin Chapter Call Carl Bryson Odessa 915 337 8994 e 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 Monthly 2nd Fri 7 30 p m University of Wisconsin Superior Cail Allen Anway 715 394 8360 Milwaukee Area Chapter Call Donald H Kimes 414 377 0708 MAD Apple Chapter Contact Bill
24. S DEFER T DEFER V DEFER DEFER Y DEFER 2 DEFER O NOOP IS O CHAR IS A CHAR IS B CHAR IS C CHAR IS D CHAR IS E CHAR IS F CHAR IS CHAR IS I CHAR IS J CHAR IS K CHAR IS CHAR IS N CHAR IS O CHAR IS Q CHAR IS CHAR IS S CHAR IS T CHAR IS W CHAR IS CHAR IS 2 CREATE CONTROL TABLE CONTROL TABLE CC 10 A B C D E ie BS IN I J K L CR IN N P IN Q R S SP BACK UP V BACK UP Y Z CHAR CHAR CHAR CHAR FORTHkit 5 Mips computer kit 400 Includes Novix NC4000 micro 160x100mm Fk3 board Press fit sockets 2 4K PROMs Instructions Easy assembly cCMFORTH listing shadows Application Notes Brodie on NC4000 You provide 6 Static RAMs 4 or 5 MHz oscillator Misc parts 250mA 5V Seria line to host Supports 8 Pin socket slots Eurocard connector Floppy printer video 1 0 272K on board memory Maxim RS 232 chip Inquire Chuck Moore s Computer Cowboys 410 Star Hill Road Woodside CA 94062 415 851 4362 Volume VIII No 5 7 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 FO
25. anoth er definition for a range of values There would have to be another defini tion for a set of values No earlier Forth proposal that I know of allows sets and ranges together as in case 2 3 12 What is proposed here is a single CASE statement for Forth which will include all these variations and many more that can be implemented in fig FORTH Forth 79 Forth 83 and any other Forth Figure Two a would look as shown in Figure Three Let s add two more spoons of syntactic sugar as in Figure craps n int n if n 7 Four As has been noted elsewhere too much syntactic sugar causes semantic diabetes Our CASE is sweet enough Figure Five is an example to show some of the possibilities Now for a real life example Figure Six is a recension of a word in John James Universal Text File Reader Forth Dimensions VI1 3 One of my favorite examples is Thirty days hath September April June and November See Figure Seven If NUMBER in your system is vectored you may want to replace it in some printf You win else if n 11 printf You win else if n 2 printf You lose else if n 3 printf You lose else if n 12 printf You lose else printf d is your point n Figure One a CRAPS n DUP 7 IF DROP ELSE DUP 11 IF DROP ELSE DUP 2 You win You win IF DROP You lose ELSE DUP
26. early Christian times to be an apocalyp tic enemy of mankind the Antichrist Original numerological attempts to identify The Beast with a historical man produced various candidates Most prominent among these is the Roman emporer Nero the calculation being based on the values of the letters in the Greek alphabet in which the earliest available versions of the New Testament were written During the medieval peri od calculations in Roman numerals were common Also in more recent times attempts were made to pin the label of The Beast on contemporary persons such as Martin Luther In our time the likes of Franklin Delano Roosevelt were Beastified by their enemies These identifications seem not to have had much influence on human affairs but they may have conferred some benefits on their devisers We recognize nowadays that it is more desirable to break pencil points than heads Next time you feel compelled to take up the cudgel use the boot instead boot up this program and with its help identify your adversary as The Beast Type in the twelve screens When you execute 1 LOAD a startup message will appear on your display with instructions on how to begin Follow the prompts Figure One shows how one session went L loaded the program and read the prompt then executed BEAST Re sponding to the prompt I entered the name of a friend Ignia Incendiari When I pressed the carriage return was asked whether the calculatio
27. how FIG s position addresses the general software lan guages community A good deal of information was solicited in advance from a cross section of members and Forth vendors and aided greatly in all the discussions This event and any similar meetings that may follow will serve to focus attention on key issues of congern and benefit to the entire community FIG s growth mandated this kind of intensive session for planning and definition of important directions 35 FORTH The computer language for increased EFFICIENCY reduced MEMORY higher SPEED MVP FORTH SOFTWARE Stable Transportable Public Domain Tools MVP FORTH PROGRAMMER S KIT for IBM Apple CP M MS DOS Amiga Macintosh and others Specify computer 175 MVP FORTH PADS a Professional Application Development System Specify computer 500 MVP FORTH EXPERT 2 SYSTEM for learning and developing knowledge based programs 100 Word Kalc a word processor and calculator system for IBM 150 Largest selection of FORTH books manuals source listings software development systems and expert systems Credit Card Order Number 800 321 4103 In California 800 468 4103 Send for your FREE FORTH CATALOG MOUNTAIN VIEW PRESS PO BOX 4656 Mountain View CA 94040 All the parts needed to make the SMALLEST PROGRAMMABLE FORTH SYSTEM amp 5V 9 mA typical 2 MHz TTL Serial In
28. important point to consider when you use floating point arithmetic in Forth is the problem of where to place real numbers so that they can be manipulated conveniently Because in teger arithmetic is sufficient for Forth s memory conserving threaded code in terpreter the Forth virtual machine is implicitly biased towards performing integer arithmetic Integrating real significand bit gt 31 23 30 0 22 Figure One numbers and floating point operators into the standard Forth system thus demands careful consideration There are two common solutions to this problem One is to maintain real numbers on Forth s parameter stack The other is to design a separate real number stack which is tightly integrat ed into the standard Forth interpretive system Both approaches are viable Using the Parameter Stack For most purposes there is no reason to avoid placing real numbers on the parameter stack even though they are almost certainly represented as thirty two bit forty eight bit or even sixty four bit numbers After all the usual Forth stack is already cluttered with data items of various sizes and types including eight bit characters sixteen bit signed and unsigned integers thirty two bit integers and addresses of various sizes An advantage to manipulating floating point data on the Forth param eter stack is that the usual stack and memory operators can be easily adapted to handling real numbers For
29. is made at the end of the function and no more processing comes after the recursive call Tail recursion can be caught by a smart interpreter such as LOGO and turned into iteration for efficient use of the return stack In LOGO recursion is the only way to do indefinite loops I thought why not have a smart version of RECURSE so that I can use tail recursion in Forth without worrying about my return stack overflowing See my included screen for a solu tion RECURSE starts by saving the input stream pointer gt IN so that it can look ahead If the next word is or Efficient tail recursion RECURSE JIN amp IF DUP DIN THEN LATEST NAME gt 7 i pext warg p IF COMPILE BRANCH RODY ELSE THEN JIN GCD DUP t a b poed an IF SWAP OVER MOD s FACTORIAL DUP to n DUP in NOT IF a i 4 5 amp 7 8 9 i 3 4 5 1 1 1 i i i LESO next ward THEN followed by we have a case of tail recursion and an iterative branch to the beginning of the word being de fined is called for Otherwise the word s own compilation address is compiled to allow a recursive call to take place Finally the input stream is restored and compilation continues normally The difference between the two cases is that at run time tail recursion avoids using the return stack Included are two examples taken from Michael Ham s article Recur sion Forth Dimensions V1 4 GCD
30. language includes working group reports 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 Robotics Data Structures 30 33 38 403 JOURNAL OF FORTH RESEARCH V 2 1 Forth Machines 15 16 18 404 JOURNAL OF FORTH RESEARCH V 2 2 Real Time Systems 15 1 6 18 405 JOURNAL OF FORTH RESEARCH V 2 3 Enhancing Forth 15 1 6 18 406 JOURNAL OF FORTH RESEARCH V 2 4 Extended Addressing 15 16 18 407 JOURNAL OF FORTH RESEARCH V 3 1 Forth based laboratory systems and data structures ether afte Rapier whore aga abaya 15 16 18 409 JOURNAL OF FORTH RESEARCH V 3 3 REE TEN oaa 1516 18 410 JOURNAL OF FORTH RESEARCH V 3 4 EA EE EO E EE S 15 16 18 FORTH Dimensions Volume VIII No 5 DR DOBB S JOURNAL This magazine produces an annual special Forth issue which includes source cade listing 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 425 DR DOBB S 10 85 5 6 7 426 DR DOBB S 7 86 5 6 7 0 HISTORICAL DOCUMENTS 501 KITT PEAK PRIMER 25 27 35 One of the first institutional books on Forth Of historical interest 502 Fig FORTH INSTALLATION MANUA
31. o 6809 Systems available for FLEX disk sustems 0S9 6809 ee 680x0 Systems available for MACINTOSH CP M 68K o tFORTH 20 for 68020 Single Board Computer Disk based development system under 0S39 68K 290 EpROM set for complete stand alone SBC 390 Forth Model Library List handler spreadsheet Automatic structure charts each 40 Target compilers 6809 6801 6303 680x0 8088 280 6502 Talbot Microsystems 1927 Curtis Ave Redondo Beach CA 90278 213 376 9941 68020 SBC 5 1 4 floppy size board with 2MB RAM 4 x 64K EpROM sockets 4 RS232 ports Centronics parallel port timer battery backed date time interface to 2 5 1 4 floppies and a SASI interface to 2 winchester disks 68881 fit pt option OS9 multitask amp user OS 350 FAST int benchmarks speeds are 2 x a VAX780 10 x an IBM PC FORTH Dimensions PEG Chapters US e ALABAMA Huntsville FIG Chapter Call Tom Konantz 205 881 6483 e ALASKA Kodiak Area Chapter Call Horace Simmons 907 486 5049 e 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 e ARKANSAS Central Arkansas Chapter Twice Monthly 2nd Sat 2p m amp 4th Wed 7 p m Call Gary Smith 501 227 7817 CALIFORNIA Los Angeles Chapter Monthly 4th Sat 10 a m Hawtho
32. operating system files e 400 page manual written in plain English e Options include software fioating point arithmetic coprocessor support symbolic debugger native code compilers and graphics support For Applications Forth 83 Metacompiler e Unique table driven multi pass Forth compiler e Compiles compact ROMable or disk based applications e Excellent error handling e Produces headerless code compiles from intermediate states and performs conditional compilation Cross compiles to 8080 2 80 8086 68000 6502 8051 8096 1802 and 6303 e No license fee or royalty for compiled applications For Speed CForth Application Compiler e Translates high level Forth into in line optimized machine code e Can generate ROMable code Support Services for registered users e Technical Assistance Hotline Periodic newsletters and low cost updates e Bulletin Board System Call or write for detailed product information and prices Consulting and Educational Services available by special arrangement a r Laboratory Microsystems Incorporated fig Office Box 10430 Marina del Rey CA 90295 Phone credit card orders to 213 306 7412 Overseas Distributors Germany Forth Systeme Angelika Fiesch Titisee Neustadt 7651 1665 UK System Science Ltd London 01 248 0962 France Micro Sigma S A R L Paris 1 42 65 95 16 Japan Southern Pacific Ltd Yokohama 045 314 9514 Australia Wave onic Associates Wilson W A
33. optional upper lower case match in standard or custom formats Personnel membership lists bibliogra phies catalogs of record stamp and coin collec tions you name it All INSTANTLY without wested bytes and with cueing from screen so good that non programmers quickly master its use With man ual sample data files and custom words for mail list and checkbook use DATAHANDLER is available on all MMSFORTH Systems uses 64K or less of memory and includes source code DATAHANDLER PLUS requires MMS FORTH for IBM PC uses all but 64K of available RAM for large file buffering and adds advanced features active editing window aptional spread sheet data display user trainable function keys and much more DATAHANDLER an DATAHANDLER PLUS IMS FORTH The total software environment for IBM PC XT TRS 80 Model 1 3 4 and close friends Personal License required MMSFORTH V2 4 System Disk 2 TRS 80 Model 1 requires lowercase OOEN 1 40 track drive Personal License additional modules FORTHCOM communications module 49 95 EXPERT 2 expert system DATAHANDLER DATAHANDLER PLUS PC only 128K req FORTHWRITE word processor Corporate Site License Extensions Bulk Distribution trom 500 50 units Some recommended Forth books FORTH A TEXT amp REF best text 18 95 THINKING FORTH best on technique 16 95 19 95 STARTING FORTH popular text Shipping handling amp tax extra
34. services as custom application programming polyFORTH programming courses and the FORTH Inc Hotline For more information and a free brochure contact FORTH Inc today FORTH Inc HIN Sepulveda Bivd Manhattan Beach CA 90266 Phone 213 372 8493 FORTH Inc is compared to BL Printable characters are transferred to MOD BUF and control characters are converted to blank spaces LOAD fires up the interpreter after the file has been read into memory It combines the functions of the normal OPEN and LOAD commands After LOAD is revectored to the UNSCREEN version of LOAD all you have to do is type LOAD filename ext and the file will be opened read into memory and interpreted If there are no detectable errors in the source file you will receive the all familiar ok from the interpreter Of course you will have to revector LOAD SOURCE and ERROR back to FORTH vocabulary versions if you want to play with screens for any reason Any detectable source file error will trigger a memory dump from the first byte of the source file buffer MOD BUF to the end of the offending word This will let you know exactly where the error was found If a standard message is associated with the error it will be displayed as well SOURCE is a slightly modified ver sion of same BLK is now used as a flag which indicates whether the input stream is coming from the keyboard or from the module buffer MOD
35. specify disk size when ordering FORTH Dimensions FORTH INTEREST GROUP P O BOX 8231 SAN JOSE CALIFORNIA 95155 408 277 0668 Mame OFFICE USE ONLY Member Number a o T oe Dale ype Company See a Shipped By Date Address a UPS w Dae City 28 gle USPS Wt Aml State Prov ZIP o o BO Date By Country a Wi o AMI Phone TITLE AUTHOR TOTAL fe a Sh SEE BELOW SEE BELOW 108 MEMBERSHIP NT EE HOLIDAY SPECIALS ARE GOOD ON ORDERS FOR CANADA MEXICO amp USA ONLY EUROPE ADD 40 AUSTRALIA AND ASIA ADD 60 SORRY MEMBER DISCOUNTS ARE NOT APPLICABLE WITH HOLIDAY SPECIALS x SUBTOTAL SUBTOTAL O Check enclosed payable to FORTH INTEREST GROUP O VISA O MASTERCARD Card CA RESIDENTS SALES TAX Expiration Date HANDLING FEE Signature MEMBERSHIP FEE 15 00 minimum on charge orders ONEW CRENEWAL 30 37 43 PAYMENT MUST ACCOMPANY ALL ORDERS MAIL ORDERS PHONE ORDERS PRICES r POSTAGE amp HANDLING SHIPPING TIME l SALES TAX Send to Call 408 277 0668 to place All orders must be prepaid Prices are Prices include shipping A Books in stock are shipped Deliveries to Alameda Forth Interest Group credit card orders or for subject to change without notice Credit 2 00 handling fee is within five days of receipt Contra Sed at eon P O Box 8231 customer service Hours card orders will be sent and billed at requir
36. the correct address Regards Ron Braithwaite The Tools Group Forest Falls California FORTH Dimensions Volume VIII No 5 F83 Compiles Text Dear Marlin In The requirements are MS DOS 2 1 or greater and plain ASCII text files I hope this is useful for Mr Streed and a letter to Forth Dimensions your readership VHI 2 Mr Ramer W Streed asked for a program to read and compile F83 Sincerely code for the IBM PC from a text file Alberto Pasquale The accompanying screens will do that Houston Texas WON nub WNE OC e e e Pasquale Screens 0 B TEXTLOAD BLK F83 TextLoad blk by Alberto Pasauaie 11 15 1986 TextLoad lt filename gt loads a text file and prints it on the screen Control table replaces CC Kernel amp 86 blk scr 48 open f and close f requires MS DOS 2 1 f key reads a byte from an open file into TOS replaces key to redirect input from the keyboard to a text file err O executes eof if an error is encountered during loading eof brings the system back to normal and closes the file control z indicates that all the file has been loaded and executes eof TextLoad opens a file drops line feeda J redirects key to make F83 think you are typing the file at the terminal 1 B TEXTLOAD BLK F83 TextLoad bik by Alberto Pasquale 11 15 1986 DEFER A DEFER B DEFER C DEFER D DEFER DEFER F DEFER G DEFER I DEFER J DEFER K DEFER L DEFER DEFER O DEFER Q DEFER R DEFER
37. they are in Fortran and other high level languages The disadvantages of both approaches are clear Using a parallel set of opera tors adds two or three dozen new words to a language which already demands familiarity with several hun dred words However redefining exist ing Forth integer operators to handle real numbers also creates problems A program which manipulates both data types simultaneously soon becomes littered with vocabulary changes which obscure the functional meaning of the source code Other Considerations Forth systems programmers must consider many other issues of floating point implementation including ac curacy rounding representation of values which cannot be exactly ex pressed in binary infinity error trap ping division by zero invalid argu ments to trigonometric functions and so on Such implementation details are often irrelevant to an application pro grammer However in many instances knowledge of the exact behavior of the floating point package is critical to debugging as well as to obtaining ac curate results A Simple Example At this point it is worthwhile to examine some source code Apart from superficial differences in notation it is important to observe the implicit dif ferences between integer and floating point arithmetic when each is used for computation of fractional quantities Although there are applications which by nature demand the use of either integer or rea
38. 12 f DARK BEEP CR CR CR 5 SPACES The nuaber of NAME SPAN TYPE SPACE is 646 CR the nuaber of The Beast of the Book of Revelation 11 12 0 DO CR LOOP addr n non f NG 04 18 85 Word to call the Beast DONE CR YES NOT BEAST BEGIN INIT REGS f True if the nuaber is The Beast Announcing the discovery DUP 3 R SPACE SRR j NG 04 21 84 False means another try BEGIN CR Another name YIN KEY DUP EMIT DUP YES_OR_NG NOT WHILE YIN MESSAGE REPEAT Runs the analysis User is prompted during LOADing COAX PATTERN PATTERN SCAN NUMBER DUP THE_BEAST IF DROP PROCLAIM ELSE ANALYZE THEN DONE UNTIL CR CR CR CR 27 DONE 12000 CR LOOP FORTH Dimensions NGS FORTH A FAST FORTH OPTIMIZED FOR THE IBM PERSONAL COMPUTER AND MS DOS COMPATIBLES STANDARD FEATURES INCLUDE e79 STANDARD eDIRECT I O ACCESS FULL ACCESS TO MS DOS FILES AND FUNCTIONS ENVIRONMENT SAVE amp LOAD e MULTI SEGMENTED FOR LARGE APPLICATIONS EXTENDED ADDRESSING MEMORY ALLOCATION CONFIGURABLE ON LINE AUTO LOAD SCREEN BOOT eLINE amp SCREEN EDITORS DECOMPILER AND DEBUGGING AIDS 8088 ASSEMBLER GRAPHICS amp SOUND NGS ENHANCEMENTS e DETAILED MANUAL INEXPENSIVE UPGRADES NGS USER NEWSLETTER A COMPLETE FORTH DEVELOPMENT SYSTEM PRICES START AT 70 NEW HP 150 amp HP 110 VERSIONS AVAILABLE aa aD
39. A glossary 232 FORTH NOTEBOOK Dr C H Ting Good examples and applications Great learning aid PolyFORTH is the dialect used Some conversion advice is included Code is well documented 233 FORTH TOOLS 22 23 32 Gary Feierbach amp Paul Thomas The standard tools required to create and debug Forth based applications en eee 25 26 35 25 26 35 235 INSIDE F 83 25 26 35 Dr C H Ting Invaluable for those using F 83 237 LEARNING FORTH 1 7 18 27 Margaret A Armstrong Interactive text introduction to the basic concepts of Forth Includes section on how to teach children Forth 240 MASTERINGFORTH 18 19 22 Anita Anderson amp Martin Tracy A step by step tutorial including each of the commands of the Forth 83 International Standard with utilities exten sions and numerous examples 245 STARTING FORTH soft cover 22 23 32 Leo Brodie A lively and highly readable introduction with exercises 246 STARTING FORTH hard cover 20 21 30 Leo Brodie 255 THINKING FORTH soft cover 16 17 20 Leo Brodie The sequel to Starting Forth An intermediate text on style and form 265 THREADED INTERPRETIVE LANGUAGES 25726 35 R G Loelinger Step by step development of a non standard Z 80 Forth 267 TOOLBOOK OF FORTH Br Dobb s re saa os Oe eae 23 25 35 Edited by Marlin Ouverson Expanded and revised versions of the best F
40. ASCII u 10 2 ULJj ASCII J ASCII j il ULYy ASCII Y ASCII y 12 INIT REGS Initialize the count registers to 0 s ULWw ASCII W ASCII w 13 Om OD O OM OM OW OB 3 14 15 SCRE 5 SCRE 6 Fudge for extended Roman nuaerals NB 04 18 86 0 Count occurences of the nuserals i NB 04 18 84 The next variable is true if the fudges J and Y to I U to V W to V are on VARIABLE FUDGE 2 PROMAN n n count an occurence of a roman 3 DOUP ULMa PASCII IF M i ELSE 4 DDUP ULDd PASCII IF 8D i ELSE 5 DOUP ULCe 7ASCII IF C i ELSE s FUE f f 6 DDUP ULLI PASCHI IF 1 ELSE 7 8 9 FUDGE DDUP ULXx 2ASCII IF X 1 ELSE DDUP ULVv 2ASCIT IF L i ELSE FUDGE nf count occurences of fudged nue ls DDUP ULIi ASCII IF 1 1 ELSE IF 10 THEN THEN THEN THEN THEN THEN THEN DDUP ULUu ASCII IF V it ELSE 11 DDUP ULYy 7ASCIY IF I 1 ELSE 12 XTENDED_ROMANE n n also count U Y W DDUP ULWw ASCII IF 2 V ELSE Wis two vees 13 ROMANE THEN THEN THEN t4 DUP FUDSE u y w too IF FUDGE THEN THEN 15 scRe 7 SCRE 8 Values of nuserais calc value of nase NG 04 18 86 0 Letter discriainators NG 04 21 86 1 PATTERN MESSAGE PATTERN SCAN 2 CR Type a name of no aore than 80 characters SPAN 0 DO for each character in the pattern 3 CR including spaces and upper and lower case letters NAME I CO fetch it from the NAME buffer 4 CR then pres
41. DINGS 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 30 33 40 Technical papers on the Forth language and extensions 311 FORML PROCEEDINGS 1981 45 48 55 Nucleus layer interactive layer extensible layer metacom pilation system development file systems other languag es other operating systems applications and abstracts without papers 312 FORML PROCEEDINGS 1982 30 33 40 Forth machine topics implementation topics vectored execution system development file systems and lan guages applications 313 FORML PROCEEDINGS 1983 30 33 40 Forth in hardware Forth implementations future strategy programming techniques arithmetic amp floating point file systems coding conventions functional programming applications 314 FORML PROCEEDINGS 1984 30 33 40__ Expert systems in Forth using Forth philosophy im plementing Forth systems new directions for Forth inter facing Forth to operating systems Forth systems tech niques adding local variables to Forth 315 FORML PROCEEDINGS 1985 35 38 45 Also includes papers from the 1985 euroFORML Con ference Applications expert systems data collection networks Lan
42. HANDY REFERENCECARD FREE 683 FORTH 83 HANDY REFERENCE CARD FREE C FORTH MODEL LIBRARY The mode applications disks described below are new additions to the Forth Interest Group s library These disks are the first releases of new professionally developed Forth applications disks Prepared on 5 1 4 disks they are IBM MSDOS 2 0 and up compatible The disks are compatible with Forth 83 systems currently available from several Forth vendors Macintosh 3 1 2 disks are available for MasterFORTH systems only Forth 83 Compatibility IBM MSDOS Laxen Perry F83 LM PC FORTH 3 0 MasterFORTH 1 0 TaskFORTH 1 0 PolyFORTH Il Forth 83 Compatibility Macintosh MasterFORTH ORDERING INFORMATION 701 A FORTH LIST HANDLER V 1 by Martin J Tracy Forth is extended with list primitives to provide a flexible high speed environment for artificial intelligence ELISA and Winston amp Horn s micro LISP are included as ex amples Documentation is included on the disk 702 A FORTH SPREADSHEET V 2 40 43 45 by Craig A Lindley This model spreadsheet first appeared in Forth Dimensions Volume 7 Issue 1 and 2 These issues contain the documentation for this disk 703 AUTOMATIC STRUCTURE CHARTS V 3 40 43 45 by Kim R Harris These tools for the analysis of large Forth programs were first presented at the 1985 FORML conference Program docu mentation is contained in the 1985 FORML Proceedings 40 43 45 Please
43. KEY 73 EOF IS O CONTROL Z IS 2 7 ERR O IS ERROR ELSE TRUE ABORT FILE NOT FOUND THEN ae FORTH Dimensions 8 Volume VIII No 5 A Sense of Place Last November was one of the busi est months in our history A tour to exchange technical papers in China anational Forth convention and a FORML conference all occurred dur ing production of this issue We try to keep you informed but details of these events would fill at least two entire issues Look for convention coverage herein a brief review of FORML will appear in the following issue but the entire proceedings will be published separately as usual to keep you abreast of useful new findings and techniques At several Forth conferences I ve met representatives from Bell Canada Stanford University Johns Hopkins University British Telecom and East man Kodak to name only a few large sites where Forth is used Some of those who cannot attend these events personally may still feel that Forth has yet to come into its own in terms of public recognition They may have outdated notions of Forth s place in the world The question Why isn t Forth recognized more widely has been with us too long Certainly we cannot hope for from others what we do not grant ourselves Some very large names indeed have designated Forth as their language of choice for major projects investing money and manpower in its use And they receive ta
44. L 15 16 18 Glossary model editor We recommend you purchase this manual when purchasing the source code listing 503 USING FORTH 20 21 22 FORTH Inc oS a REFERENCE 305 FORTH 83 STANDARD 15 16 18 The autoritative 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 i TE i REPRINTS 420 BYTE REPRINTS 5 6 7 Eleven Forth articles and letters to the editor that have appeared in Byte Magazine ASSEMBLY LANGUAGE SOURCE CODE LISTINGS Assembly Language Source Listings of fig Forth for Specific CPUs and machines with compiler security and variable length names 14 6502 SEPT 80 15 16 18 515 G800 MAY 79 15 16 18 516 G809 JUNE 80 15 16 18 517 8080 SEPT 79 15 16 18 518 8086 88 MARCH 81 15 16 18 519 9900 MARCH 81 15 16 18 521 APPLE I AUG 81 15 16 18 23 IBM PC MARCH 84 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 Volume VHI No 5 O MISCELLANEOUS 601 T SHIRT SIZE_ _ Small Medium Large and Extra Large White design on a dark blue shirt 10 11 12 602 POSTER BYTE Cover 5 6 7 616
45. NES CASE 32 lt OF Do nothing EXIT THEN EMIT Figure Six a a FORTH Dimensions 30 Volume VIII No 5 LEAPYEAR tf true when the year is a leap year YEAR CASE 400 MOD 0 TRUE EXIT THEN CASE 100 MOD 0 FALSE EXIT THEN CASE 4 MOD 0 TRUE EXIT THEN DROP FALSE DAYS month days in month CASE 9 4 OR 6 OR 11 OR OF 30 EXIT THEN CASE 2 NOT OF 31 EXIT THEN DROP LEAPYEAR IF 29 ELSE 28 THEN Figure Seven CBASE CASE ASCII CASE ASCII CASE ASCII CASE ASCII DROP w Q t t HEX 1 EXIT THEN OCTAL 1 EXIT THEN BINARY 1 EXIT THEN DECIMAL 1 EXIT THEN m dP wD Mm noun i BASE NUMBER a d BASE gt R DUP 1 C CBASE NUMBER R gt BASE 0 ABORT Figure Eight HEX CLASSIFY n CASE 20 lt 7F OR OF Control character EXIT THEN CASE 20 2F BETWEEN OVER 3A 40 BETWEEN OR OVER 5B 60 BETWEEN OR OVER 7B 7E BETWEEN OR OF CASE 30 39 BETWEEN OF Punctuation EXIT THEN Digit EXIT THEN CASE 61 7A BETWEEN OF Lower case letter EXIT THEN DROP Not a character Figure Nine zn an CASE 41 5A BETWEEN OF Upper case letter EXIT THEN n n CREATE CASE DUP CFA CASE CFA Figure Ten a tf n n tf 3 PICK Figure Ten b OR ntf n ntf gt R OVER R gt OR Figure Ten c WITHIN nl n2 tf true when nl lt n amp n lt n2 OVER gt R R gt U lt BETWEEN nl n2 tf true when nl lt n amp n l
46. No 5 Dictionary Lookup The final change to Forth to provide classes would be to modify its diction ary lookup sequence in order to enable the use of class names as prefix opera tors which modify the search order only on a temporary basis The im plementation of this new lookup se quence would seem to require that there be an ACTIVECLASS vocabulary to be searched before CONTEXT and CURENT The execution of a class name would patch the ACTIVECLASS variable to al low searching the appropriate class At the end of the search order the ACTIVECLASS vocabulary would be set null This implementation should not conflict with any other special vocabu lary constructs such as ONLY Application and Implementation The general use for classes is to organize the dictionary according to the types of objects being used For example one could use the phrases SINGLE to add single length inte gers DOUBLE to add double length integers and FLOAT to add floating point numbers if the classes SINGLE DOUBLE and FLOAT had been defined to describe single length integers double length integers and floating point num bers respectively Figure One lists the code for the same sample application which is used in the Smalltalk book I have used the ONLY concept to avoid the necessity of writing SINGLE before each of the single length operations and I have left the implementation of an in teger dictionary class
47. PRINTING OFF BLE IF THEN QUIT ELSE 2DROP THEN LRAD 1S LOAD 13 CR MGD BUF IN BOUNDS DC Ce EMIT LOOP lt VPERROR IS ERROR FORTH Dimensions polyFORTH GETS YOUR PROGRAM FROM CONCEPT TO REALITY 4 TO 10 TIMES THE ONLY INTEGRATED SOFTWARE DEVELOPMENT PACKAGE DESIGNED FOR REAL TIME APPLICATIONS If you re a real time software developer polyFORTH can be your best ally in getting your program up and running on time In fact on the average you will develop a program 4 to 10 times faster thon with traditional program ming languages polyFORTH shortens development time by making the best use of your time There are no tong waits while you load editors compilers assemblers and other tools no tong waits white they run becouse everything you need is in a single easy to use 100 resident system Using polyFORTH you take a raw idea fo fast compiled code in seconds and then test it interactively PolyFORTH has everything you need to develop real time applications fast multi tasking multi user OS FORTH compiler interpreters and assemblers editor and utilities and over 400 primi tives and debugging aids With its unique modulor structure polyFORTH even helps you test and debug custom hard ware interactively and it is available for most 8 36 and 32 bit computers FORTH Inc also provides its customers with such professional support
48. R CR CR CR SCRE 2 0 Registers and buffers NG 04 18 86 1 2 Registers to hold occurence counts for Rosan nuaeral letters S VARIABLE M VARIABLE 8D VARIABLE C VARIABLE t 4 VARIABLE X VARIABLE V VARIABLE 1 5 b Buffer to hold pattern text 80 chars sax including spaces 7 CREATE NAME 80 ALLOT 8 9 VARIABLE SPAN Alias for SPAN 10 11 READNAHE 12 Accept nase froe keyboard and move to NAME buffer 13 CR NAME 80 EXPECT SPAN SPAN i 15 Volume VII No 5 17 COMBINE THE RAW POWER OF FORTH WITH THE CONVENIENCE OF CONVENTIONAL LANGUAGES H FORTH Why HS FORTH Not for speed alone although it is twice as fast as other full memory Forths with near assembly language performance when optimized Not even because it gives MANY more functions per byte than any other Forth Not be cause you can run all DOS com mands plus COM and EXE programs from within HS FORTH Not be cause you can single step trace de compile amp dissassemble Not for the complete syntax checking 8086 8087 80186 assembler amp optimizer Nor for the fast 9 digit software float ing point or lightning 18 digit 8087 math pack Not for the half mega byte LINEAR address space for quick access arrays Not for com plete music sound effects amp graph ics support Nor the efficient string functions Not for unrivaled disk flex ibility including traditional Forth screens sectored or in files or free format files all with full scr
49. RTH Programmer contact us or send your resum to DASH FIND amp ASSOCIATES 808 Dalworth Suite B Grand Prairie TX 75050 214 642 5495 Committed to Excellence un a la PRR e e APUNE OUWUPNAUAWNHH O Ser WON KDUA wWNHH O Ser WONKA GTAWNHKH OC 2 B TEXTLOAD BLK F83 TextLoad blk by Alberto Pasquale 11 15 1986 HEX CODE OPEN F lt filename adrr handle flag DX POP 3D02 AX MOV 21 INT AX PUSH U lt IF O AX MOV ELSE 1 AX MOV THEN CODE CLOSE F handle gt BX POP 3E AH MOV 21 INT NEXT END CODE VARIABLE F HANDLE VARIABLE K BUF LABEL F ERROR O AX MOV 1PUSH CODE lt F KEY n F HANDLE BX MOV 1 CX MOV K BUF DX MOV 3F AH MOV 21 INT F ERROR JB CX AX SUB 0 lt gt IF 1A AL MOV ELSE K BUF AX MOV THEN AH AH SUB 1PUSH END CODE DECIMAL 1PUSH END CODE 3 B TEXTLOAD BLK F83 TextLoad bik by Alberto Pasquale 11 15 1986 VARIABLE F NAME 15 ALLOT GET FNAME 14 MIN DUP ROT ROT F NAME SWAP MOVE F NAME O SWAP C GET FNAME BL WORD COUNT GET FNAME EOF KEY IS KEY 7 CHAR IS J 7 NOOP IS O RES IN IS Z ERROR IS ERROR F HANDLE CLOSE F CONTROL Z END OF FILE CR EOF BACK UP CR ERR O DUP IF EOF ERROR ELSE DROP 2DROP THEN va ve 4 B TEXTLOAD BLK F83 TextLoad blk by Alberto Pasquale 11 15 1986 TEXTLOAD GET FNAME F NAME OPEN F IF F HANDLE 7 DROP IS J F KEY IS
50. TTL Serial Out Ground 50 covers price of parts and manual in singles 20 covers cost of chip alone in 10 000 quantity 20 gold piece not included shown covering chip to illus trate actual size The F68HC11 features 2 Serial Chan nels 5 Ports 8 Channel 8 bit A D major timer counter subsystem Pulse Accumulator Watchdog Timer Com puter Operating Properly COP Moni tor 512 bytes EEPROM 256 bytes RAM 8K byte ROM with FORTH 83 Standard implementation Availability F68HC11 Production units with Max FORTH in internal ROM avail able 4Q 86 Volume quantity available 1Q 87 X68HC11 emulator with Max FORTH in external ROM available now NMIX 0022 68HC11 Development System boards available now 290 00 New Micros Inc 808 Dalworth Grand Prairie TX 75050 214 642 5494 GRAND PRAIRIE 214 642 5494 Some results of this initial retreat were the FIG Model Library developed by Martin Tracy health and life insurance options for members the mechanism for adding or deleting publications from FIG s ordering list streamlined financial operations including improv ed monthly reporting on budget P amp L and inventory and changes in FIG s by laws Revision of the FIG by laws is of particular note among recent actions taken by the Board of Directors Board member Thea Martin saw defficiencies in the provisions regarding members responsibilities Only five people had started FIG and only the Board
51. Three Timings for 10 000 executions of AREA IBM PC AT 8 MHz 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 self starting applications COST 130 page manual 30 00 8K EPROM with manual 100 00 Postage paid in North America Inquire for license of quantity pricing seseceseceterereTereneveseseTaretetareretetetere a a Oe Oh ae ee Bryte Computers Inc P O Box 46 Augusta ME 04330 207 547 3218 2 2 0 0 Volume Vill No 5 t1 FORTH Dimensions Floating Point Operators Most programmers perform floating point arithmetic in Forth with operators that are analogs of the stan dard Forth integer arithmetic oper ators Floating point operators with analogous names e g F FDUP F perform functions analogous to the standard integer operators It is easy to program intuitively with this type of system Some programmers prefer to rede fine the standard integer operators so that they work with real numbers in stead These redefined operators are maintained in a separate vocabulary This approach allows a given piece of source code to be used with either number type simply by switching vo cabularies Also the same set of oper ators can be used for either integer or real arithmetic just as
52. Two and Three contain typi cal performance data Most of the differences in timing between the ex amples is due to the time required for multiplication by pi The timing loop calls the AREA routine 10 000 times and uses the computer s system clock ac curate to about 0 06 seconds on an IBM PC as a timer The poor performance of FTEST when real arithmetic is carried out in software SFP stands out in sharp contrast to the other results Neverthe less it is still a bit faster than inter preted BASIC What is striking is that the speed of floating point arithmetic using a hardware coprocessor is quite close to that of integer arithmetic yet the degree of precision and dynamic range achievable with the use of floating point arithmetic is far beyond the capabilities of integer arithmetic scaled or not Practical Experience It would be wrong to extrapolate from these simple timing data that real arithmetic will always be just about as fast as integer arithmetic in Forth The point is that the performance penalty for using floating point arithmetic in Forth is negligible in situations where an application demands precision and dynamic range There is no reason to use scaled arithmetic to avoid decreas ed run time performance if the degree of performance degradation is not critical and if significantly increased source code complexity results This observation has been thoroughly demonstrated in real world situations Floa
53. Vill No 5 Forth Dimensions Published by the Forth Interest Group Volume VIII Number 5 January February 1987 Editor Marlin Ouverson Advertising Manager Kent Safford Production Cynthia Lawson Berglund Typesetting LARC Computing Forth Dimensions solicits editorial material comments and letters No re sponsibility is assumed for accuracy of submissions Unless noted otherwise material published by the Forth Interest Group is in the public domain Such material may be reproduced with credit given to the author and to the Forth Interest Group Subscription to Forth Dimensions is free with membership in the Forth Inter est Group at 30 per year 43 foreign air For membership change of address and to submit items for publication the address is Forth Interest Group P O Box 8231 San Jose California 95155 Administrative offices and advertising sales 408 277 0668 Symbol Table Simple introductory tu torials and simple appli cations of Forth Intermediate articles and code for more com plex applications and tutorials on generally dif ficult topics Advanced requiring stu dy and a thorough under standing of Forth i i l Code and examples con form to Forth 83 stand ard Code and examples con form to Forth 79 stand ard Code and examples con form to fig FORTH Deals with new propos als and modifications to standard Forth sys tems 10 Dimensions FEATURES
54. d use Forth In the first semester of their first year students follow a basic course on pro gramming logic and the rudiments of Forth using a network of twenty Com paq Deskpro s The use of computer graphics is of primary importance since it motivates the students while permitting them to learn the elemen tary control structures In the second year of this program students develop real time applications in Forth using concepts such as multi tasking an I O toolbox code definitions low and high level interrupts etc As an example students last year simulated a railroad crossing control using an STD bus system and I O modules Finally in their last year the stu dents have a course on the internals and the extensibility of Forth includ ing the higher level of metacompila tion In the last semester of that pro gram students in groups of two have 300 hours to work with assistance on a main project Most of these projects are coming from real needs among the region s industries These projects must be about half hardware and half software to get approval from the in structors The software must be written in Forth assembler or both and is put into EPROMs if necessary As an ex ample students last year developed two projects for Ph D s in nuclear physics at the Universite de Sher brooke One was for data acquisition and control of an electron gun in an experiment about the diffraction of
55. details of the processor and ar chitecture have been submitted to the 1986 FORML Conference Martin E Fraeman John R Hayes Robert L Williams Thomas Zaremba Johns Hopkins University Laurel Maryland Volume Vill No 5 FORTH Dimensions Practical Considerations for Floating Point Arithmetic Richard Wilton Marina del Rey California In most high level languages wheth er or not to use floating point arith metic is not even a question Fortran PL 1 or C programmers simply take for granted that when they wish to compute with real numbers the lan guage they are using offers the tools to do so The presence of arithmetic data types in such high level languages al lows the selective use of integer or real arithmetic In contrast Forth deals with objects on a somewhat less abstract level A Forth programmer must always be aware of the low level representation of real numbers and the manner in which arithmetic operators are implemented These considerations are much less im portant to programmers in most high level languages This article discusses some of the practical points involved in doing Forth floating point arithmetic It starts by covering the salient low level features of floating point system design in Forth The simple source code examples which follow illustrate some of the points to consider in designing real arithmetic into a Forth application Real Number Representation One of the fir
56. din 77 Rue du Cagire 31100 Toulouse 16 61 44 03 06 e GERMANY Hamburg FIG Chapter Monthly 4th Sat 1500h Contact Horst Gunter Lynsche Common Interface Alpha Schanzenstrasse 27 2000 Hamburg 6 e HOLLAND Holland Chapter Contact Adriaan van Roosmalen Heusden Houtsestraat 134 4817 We Breda 31 76 713104 FIG des Alpes Chapter Contact Georges Seibel 19 Rue des Hirondelles 74000Annely 50 57 0280 e 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 e JAPAN Japan Chapter Contact Toshi Inoue Dept of Mineral Dev Eng University of Tokyo 7 3 1 Hongo Bunkyo 113 812 2111 ext 7073 e NORWAY Bergen Chapter Kjell Birger Faeraas Hallskaret 28 Ulset 47 5 187784 e REPUBLIC OF CHINA R O C Contact Ching Tang Tzeng P O Box 28 Lung Tan Taiwan 325 SWEDEN Swedish Chapter Hans Lindstrom Gothenburg 46 31 166794 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 Ist 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
57. ds we begin by defining a new vocabulary named UNSCREEN to keep them separ ate B FILE is the variable that will hold the number of bytes in whatever source a QSAPRBSCH READ SEG LOAD SOURCE file we load MOD BUF is the address of the 4K buffer at hex F000 where the file will go REC SIZE and FILE SIZE serve as off sets into the file control block they leave the record size and file size ad dresses respectively OPEN FILE is simi lar to the existing OPEN FILE command except this one checks to see that the source file is no larger than 4K If it is we abort with an appropriate error message if it isn t we store the num ber of bytes in B FILE READ CHAR reads one character from the source file READ SEQ is the com mand that reads a sequential source file into the 4K buffer at MOD BUF The record size is set to one so that the file you need is the file you get The DTA data transfer address is set up at PAD Each time a character is brought in it OSAPRBGCW READ SE S IN FILE DUP REC SIZE 1 SWAP FILE SIZE DO READ CHAR PAD Ca BL MAY MOD HUF SIN Ci LOIN LOOP LOAD iS DEFINE FILES OPEN FILE IN OFF FAD SET DMA READ SEG IN GFF BLK ON RUN SOURCE G adr len BLE iF NOD BUF S FILE ELSE TIB T1B THEN OOAPRESCW ONLY FORTH ALSD BOS ALSO UNSCREEN DEFINITIONS 4 ERROR OSAPRB6CH PERROR 5 adr len f IF TYPE CR SPO SP
58. e last speakers session was dedi cated to a panel that discussed forsee able trends in this field The panel consisted of experts who have done extensive work in the theory design and development of Forth engines Chaired by Martin Tracy of Forth Inc the panelists were Gary Feierbach Inner Access Glen Haydon Haydon Enterprises Charles Moore Comput er Cowboys and John Rible Novix Inc Questions were taken from the audience What would you like to see in terms of recognition of Forth Charles Moore stated that he would like to see Forth on the list of govern ment approved languages Gary Feier bach would like Forth to be recognized across a broad spectrum of application areas The relocatable library question should be addressed satisfactorily That some Forth systems permit com pilation at the same rate as linking in other languages should be a factor in gaining recognition a complete in vestigation would be persuasive but initial exposure to a less than optimal Forth system can slow acceptance Glen Haydon then pointed out that Phil Koopman has a Forth library system available through Mountain View Press Regarding the merits of advertising the best approach to get ting something across is having a job well done and well received which addresses and solves the problem at hand When we show that Forth predominates Charles Moore respond ed by saying that advertising convinces users we are a seriou
59. e the following class name the first vocabu lary in the regular search order rather than the active class as it normally is Class Variables and Deferred Binding As defined above the class of an object must be known when the word involved is defined In some cases it may be convenient not to have to specify the name of a class in advance This ability is provided by employing the following phrase ClassVarName DEFER WordName When this phrase is executed Word Name is looked up in the vocabulary in the class which is currently referenced by ClassVarName and then is exe cuted This lookup will take a certain amount of time but the increase in flexibility may be worthwhile at times It would be an error if WordName is undefined at run time of course Class variables are defined by using the standard form CLASSVAR ClassVarName This phrase would define a null class variable which would have to be as signed a real class to be of use Unlike classes class variables are not consid ered prefix operators because they ex ecute at run time to provide informa tion to DEFER The method of assigning a class to a class variable had perhaps be best left to the discretion of the implementor although the following form may be satisfactory CLASS gt ClassName ClassVarName The difficulty in implementing this operation is ensuring that ClassName is not executed as a prefix operator FORTH Dimensions 24 Votume VIII
60. ed with all orders of the order Please allow See tee Comes San Jose CA 95155 Monday Friday 3am 5pm current prices 15 minimum on charge 4 6 weeks for out of stock add 62 Sania Clara PS orders Checks must be in US drawn books detivery in most j County add 7 other on a US Bank A 10 charge will be cases willbe much sooner California counties add 6 added for returned checks FORTH Dimensions 22 Volume VIII No 5 A Simple Translator Tinycase Allen Anway Superior Wisconsin I recently wrote several menu driven programs and observed the following frequently the operator must press a key for the desired response but the programmer wants a value output other than that of the pressed key Thus the programmer must translate an arbitrary ASCII keystroke into another arbitrary number If program med once the CASE structure is a good solution because of its clear easy to change structure If programmed of ten CASE and all of its branches con sume quite a few bytes So I wrote the compact TINYCASE to inspect a similarly ordered array of sixteen bit numbers for matches and to output to the stack the translated num ber when a match is found If no match is found it outputs a default number just as can be done in CASE Screens 80 and 81 show TINYCASE implemented both in high level Forth and in CODE assembler The high level BEGIN WHILE UNTIL construction comes from the remarkable art
61. een edi tors Not even because I O is as easy but far more powerful than even Basic Just redirect the charac ter input and or output stream any where display keyboard printer or com port file or even a memory buffer You could even transfer con trol of your entire computer to a terminal thousands of miles away with a simple gt COM lt COM pair Even though a few of these reasons might be sufficient the real reason is that we don t avoid the objections to Forth WE ELIMINATE THEM Public domain products may be cheap but your time isn t Don t shortchange yourself Use the best Use it now HS FORTH complete system 395 with FORTH A Text amp Reference by Kelly and Spies Prentice Hall and The HS FORTH Supplement by Kelly and Callahan man Visa Mastercard HARVARD SOFTWORKS PO BOX 69 SPRINGBORO OH 45066 513 748 0390 FORTH Dimensions SERE 3 SERE 4 Characters that are Rosan nuserals NG 04 18 86 0 NG 04 18 86 1 Stack the ASCII chars UC le 2 DDUP n non DUP DUP 3 ULMa ASCII N ASCII a ULDd ASCII D ASCII d z LEc ASCII C ASCII c s ULLI ASCII L ASCII 1 s ULXx ASCII X ASCII x j ASCI innnina i j ULVv ASCII V ASCIIv 8 1 addr add 1 to contents of addr 3 j i True if n 2 nt or n n2 the n s will be ASCII characters ROT OR R OR oO CH me OF s ULIi ASCII I ASCII i 9 1 SWAP o ULUu ASCII U
62. el 8 Perry Michael Vocabulary Mechanisms in Forth in 7980 FORML Proceedings pp 39 41 Ragsdale William The ONLY Concept for Vocabularies in 1982 FORML Proceedings pp 109 116 Rosen Evan High Speed Low Memory Consumption Structures in 1982 FORML Proceedings pp 191 196 Continued from page 18 SERE 9 Pattern and fudge handlers FUDGE MESSAGE be counted YIN COAN_ FUDGE proapt user BEGIN FUDGE MESSAGE KEY DUP ENIT DUP YES OR_NO yes then fudge on invalid response IF YES FUDBE TRUE ELSE DROP YIN MESSAGE FALSE THEN UNTIL s COAX PATTERN PATTERN MESSAGE proapt READNAME CR COAX FUDGE also fudged nua ls SCRE tt Print analysis of nase ANALYTE Print formatted analysis of the pattern nase CR CR NAME SPAN TYPE ASCII EMIT CR CR 4 PLOP D PLOP ac PLOP L PLOP X PLOP Ms 1000 FLOP ADs 500 FLOP ACs 100 FLOP ls 2 50 FLOP Asa 10 FLOP AV PLOP avsa 5 FLOP 1 PLOP ls 1 FLOP 10 SPACES 4 0 DO ASCII EMIT LOOP CR 14 R CR 3 Volume VIII No 5 SCRE 10 NG 04 21 86 0 Constant of the Beast NE 04 18 86 1 2 b amp b CONSTANT BEASTS The Beast revealed CR Shall Uku vee Yay eye and Wkw two vees 3 THE_BEAST BEASTA PROCLAIM 4 5 6 7 a 9 10 12 13 PLOP receive nase 14 15 FLOP n e SCRE
63. f that contest submitted by Charles Eaker has been widely implemented and even offered as part of many vendors systems the flood of proposals has not ceased There have been many articles and letters on the subject in Forth Dimensions All proposals to date have had problems Portability is one Another is that they all have been too specialized and restricted in their area of application Generalization is accomplished by designing another special case of CASE Strictly speaking a CASE statement is unnecessary It is syntactic sugar to make a program easier to write read and understand It is so helpful in doing this that it is a standard feature of all other modern programming lan guages Figure One a is a rather futile pro gram written in C to illustrate a com mon pattern of logical decisions in many programs is equal to for comparing two things to dis tinguish it from for assignment as in Fortran or Basic An equivalent Forth version would look something like Figure One b Most people will agree that Figure One a would be better written as in Figure Two a An even better way is found in some dialects of C illustrated by Figure Two b In this extension following syntax from Pascal values separated by indicate a set of values and values separated by indicate a range Some Forth proposals have one def inition for individual values and
64. from FO 06 lt BEQ 04 gt gt INy WDY LDA PHA INY WDY LDA PUT JMP END CODE DECIMAL gt compile of tests execute entered result 82 1 082 i TINYCASE example 4 TINYCASE TEST1 2 234 7 789 18 181 97 979 12 t 30 bytes of code total 10 of header z TEST2 CASE 2 234 ENDOF 7 789 ENDOF 18 181 ENDOF 97 979 ENDOF alternately DUP 12 ENDOF 12 SWAP ENDCASE 3 77 bytes of code total 10 of header FORTH Dimensions Classes in Forth Vince D Kimball Ipswich Massachusetts If one wishes to do object oriented programming in Forth one must first add the class concept to the language A Forth like solution to the problem a minor modification of the vocabulary concept is proposed Overview The principles of transparency and localization seem to be central to the current interest in object oriented pro gramming Transparency emphasizes the wish to use generic operators across data structures and localization em phasizes the desire to partition a group of data structures and operations upon them into a separate entity which may be understood more or less on its own Currently Forth does not seem to support these principles in any direct way Multiple code field words are a first step toward generic operators but they are flawed for general use in that they do not allow adding to the original class of operators to be used with a given data structure T
65. guages LISP LOGO Prolog BNF Style coding conventions phrasing Software Tools decom pilers structure charts Forth internals Forth computers floating point interrupts mulitasking error handling Volume VIII No 5 FORTH Dimensions ae BOOKS ABOUT FORTH 200 ALL ABOUT FORTH Glen B Haydon An annotated glossary for MVP Forth a 79 Standard Forth 216 DESIGNING amp PROGRAMMING PERSONAL EXPERT SYSTEMS 19 20 29 Car Townsend amp Dennis Feucht Introductory explanation of Al Expert System Concepts Create your own expert system in Forth Written in 83 Standard 217 F83 SOURCE 25 26 35 Henry Laxen amp Michael Perry A complete listing of F83 including source and shadow screens Includes introduction on getting started 218 FOOTSTEPS IN AN EMPTY VALLEY NC4000 Single Chip Forth Engine 25 26 35 Dr C H Ting A thorough examination and explanation of the NC4000 Forth chip including the comptete source to cmForth from Charles Moore 219 FORTH A TEXT AND REFERENCE 22 23 33 Mahlon G Kelly amp Nicholas Spies A text book approach to Forth with comprehensive referen ces to MMS Forth and the 79 and 83 Forth Standards 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 Kevin McCabe A textbook approach to 79 Standard Forth 230 FORTH FUNDAMENTALS V 2 13 14 18 Kevin McCabe
66. hey are useful however for the very basic operators which are common to most data struc tures Vocabularies seem to provide localization but at present they are insufficient to the task because they do not allow easy mixing of different vocabularies or the explicit specifica tion of linkages among vocabularies If we accept these principles as use ful but want to retain the flexibility and performance of Forth we must dis cover how to add structures to Forth to support them without making Forth into a pale echo of Smalltalk The proposed solution is to implement the class as a modified vocabulary and to enable the use of the class name as a prefix operator for modifying the dic tionary search sequence I believe that this unique concept will provide the power of object oriented programming without sacrificing any of Forth Plan An extremely simple method of add ing classes to Forth involves the use of Forth s built in vocabulary system as a foundation The addition of six new words plus a modification of Forth s dictionary lookup sequence will pro vide the core of object programming while maintaining the idiom and flexi bility of Forth The first three new words CLASS CLASS and lt SUPER allow for the definition of classes The last three new words CLASSVAR DEFER and CLASS gt provide the useful ability to defer binding the name of a class to a word until run time Other words may suggest themselves as more ex
67. icle in describing several hard ware Forth engines states that we at Johns Hopkins University s Applied Physics Laboratory have taken the basic design of the Novix 4000 device and expanded it to a thirty two bit processor on a chip It is true that we have designed a single chip thirty two bit Forth processor but it is in no way related to the Novix processor Our processor was independently de signed based on our experience with a microprogrammed bit slice Forth en gine our group designed for the Hop kins Ultraviolet Telescope a part of the ASTRO Space Shuttle mission The Novix processor and our proces sor are radically different in both ar chitecture and implementation The Novix chip achieves high performance by connecting to external memory via three buses one for fetching instruc tions and two for accessing the param eter and return stacks Our processor uses a more conventional single bus but caches the top sixteen elements of both the parameter and return stack on chip Our architecture was influenced by RISC research and has only two instruction formats The Novix design is implemented in a CMOS gate array We did a full custom implementation of our design in four micron SOS CMOS which is suitable for high radiation spacecraft environments We are currently reimplementing the ar chitecture in three micron bulk CMOS and will be finished in the second quarter of 1987 Papers describing the full
68. icle by Harral son Forth Dimensions V1 2 It takes some stack gymnastics for the high level word to work out so the CODE word is much preferred both for rea sonable compactness and for blazing speed Screen 83 shows identical examples of TEST and TEST2 with stack effects of entered result One must tell TINYCASE in advance how many groups there will be four in this case One does not have to put in a default value negative twelve in this case But lacking such only means that if one enters the TINYCASE default condition one most likely will get part of the header of the next word in the dictionary CASE must explicitly have a default or no other number will be put on the stack Both TEST1 and TEST2 operate as follows 2 TESTI 234 ok 3 TESTI 12 ok 97 TESTI 979 ok Volume VIII No 5 GONTA AUN O 2000 TINYCASE program FORTH 83 Allen Anway UW Superior 4 1 85 gt TINYCASE CREATE 4 2 DOES gt entered pfa DUP OR 4 BEGIN 6 amp 2DUP 3 PICK WHILE 2 DUP R UNTIL RDROP 2 SWAP DROP result is compile of tests execute entered result 81 081 TINYCASE program 1 HEX TINYCASE CREATE 4 sCODE 2 LDY W DY LDA N STA INY BEGIN INY WODY LDA INY BOT CMP zs IF lt BNE gt type of branch WOY LDA BOT i SBC THEN OFO branch INY INY N CPY CS UNTIL lt BCC gt type of branch branch here
69. inal stand alone application MACH 2 FOR THE MACINTOSH features full support of the Macintosh toolbox support of the Macintalk speech drivers printing and floating point easy I O redirection and creates double clickable multi segment Macintosh applications Includes RMaker and 500 pg manual 99 95 MACH 2 FOR THE ATARI ST features full GEM and TOS support floating point 1 O redirection and creates double clickable ST applications Includes 300 page manual 99 95 MACH 2 FOR THE OS 9 OPERATING SYSTEM provides position independent and re entrant code execution full support of all OS 9 system calls Creates stand alone OS 9 applications Link FORTH to C and vice versa Includes 400 page manual 495 00 MACH 2 FOR INDUSTRIAL BOARDS is 68020 compatible provides 68881 Floating Point support and produces position independent relocatable ROM able code with no meta compilation or target compilation required Includes system manual and porting manual 495 00 PALO ALTO SHIPPING CO P O Box 7430 Menlo Park California 94026 415 854 7994 Sales 800 44FORTH Support MPANY FORTH Dimensions VISA MC accepted CA residents include 6 5 sales tax Include shipping handling with all orders US 5 S H Australia 20 S H Canada 7 S H Europe 10 S H RoundTable and GEnie are registered trademarks of the General Electric Information Services Company Volume
70. instance if a real number is represent ed in sixty four bits then FDROP r DROP DROP DROP DROP is exactly analogous to DROP for sixteen bit integers or to 2DROP for thirty two bit integers Similar oper ators such as FDUP FSWAP FPICK and so on can be defined in terms of the standard Forth stack words A common problem is that the pa rameter stack can quickly become crowded particularly when sixteen bit integers and addresses must be main tained on the stack at the same time as real numbers Bugs introduced by inac curate stack operations for example SWAP instead of FSWAP can be notori ously difficult to track down Using a Separate Stack In an effort to avoid stack clutter some implemen tors of Forth floating point support simply maintain all real numbers on a separate dedicated stack This design makes life much easier for program mers who make heavy use of the pa rameter stack FQRTH Dimensions 10 Volume VIII No 5 The separate stack approach can also lead to significantly improved per formance if it is supported in hard ware For example the Intel 8087 arithmetic coprocessor maintains its own stack The stack is only eight deep but this is sufficient for most applications A separate real number stack thus maps directly onto the hard ware which simplifies the low level software primitives and leads to in AREA radius area DUP 355 113 AREA radius
71. is the greatest common divisor and is an example of tail recursion FACTORIAL is an example of true recursion where both stacks pile up and processing occurs both before and after the word RECURSE These definitions seem to work as expected but if I ve over looked anything please write and in form me Charles Shattuck Roseville California 170ctB6 CWS NGT near end restore the input stream EI THEN then cempilaticn address of word being defined N at end of definition RESOLVE then branch te beginning else cail the function recursively IMMEDIATE COMPILE GNLY restore input stream example of tail recursion RECURSE THEN an e xamole of true recursian t RECURSE THEN Shattuck Screen Forth aux Ecoles Dear Marlin I would like to tell you about a French teaching experience in Quebec Canada This program at the Coll ge de Sherbrooke is titled Technologie des Systemes Ordin s This three year program aims at forming technicians who can adapt and maintain software as well as repair microcomputers The programming is mostly centered on real time applications while hardware revolves around chips like pio sio pic crtc etc But the students also learn other useful tools like word processing databases spreadsheets communica tions CAD and so on In fact we try to take the best out of the two worlds of electronics and programming Here is how we teach an
72. kup Modifications SEARCHCLASS FALSE BEGIN DUP ACTIVECLASS J DUP SWAP REPEAT FIND SEARCHCLASS DUP 0 IF FIND as defined in F83 gt THEN 0 ACTIVECLASS S addr cfa flag i SWAP 0 SUPER 3 ACTIVECLASS DROP OVER SWAP HASH 3 FIND xS addr cfa flag i addr false GVER AND WHILE addr false Figure Two Example Implementation operators so that they check for inter vening class prefix operators or so that the code field prefix operator sets a system variable which is referred to in determining which code field of a multiple code field word to execute there are many ways that this might be done It seems logical to require that there be no intervening prefix opera tors between the class name and the word name An Open Question One of the most difficult questions to answer in the object oriented pro gramming model concerns the han dling of generic classes of composite objects such as arrays or stacks How can one efficiently implement a generic array class where subclasses may be simply instantiated for byte arrays bit arrays double length arrays or multi dimensional arrays of these as they are needed The solutions I have seen written in Smalltalk seem to be rather inefficient Charles Moore did not in clude an ARRAY word in his initial design of Forth for basically this reason I am considering several tech niques but perhaps someone out there already has a solution
73. l arithmetic situations frequently arise in which the choice is affected by stylistic or performance considerations The simple example in Table One calculates the area of a circle four different ways The first two STEST and USTEST use scaled integer arith metic The value for pi is the well known ratio 355 113 which is accurate to six decimal places The scaling in USTEST looks slower but runs faster because it does not use and thereby avoids the overhead of floored division The second pair of examples FTEST and F87TEST use floating point arith metic to do the same work FTEST is written with a set of floating point operators which parallel the usual in teger operators It uses the Forth pa rameter stack for all real arithmetic so integers and real numbers coexist on the stack at the same time The last example F87TEST uses the Intel 8087 s separate stack to hold real numbers for intermediate calculations A comparison of the source code reveals little on the surface apart from the somewhat obscure operators used to manipulate the 8087 stack directly There is however a great deal of difference in dynamic range and in precision implied by the use of floating point operators Any increase in precision of the integer versions STEST and USTEST would require additional scaling operations with a significant performance degradation as a consequence as well as additional code required to support scaling Tables
74. ll screen editor are all standard features And the optional target com piler lets you optimize your applica tion for virtually any programming environment The package exactly matches Mas tering Forth Brady 1984 and meets all provisions of the Forth 83 Standard MasterFORTH standard package Commodore 64 with graphics Extensions Floating Point 0005 60 Graphics selected systems 60 Module relocator with utility sources 60 TAGS Target Applic Generation System MasterFORTH target compiler and telocator Publications amp Application Models Printed source listings each 35 Forth 83 International Standard AS ENN 8726 S Sepulveda BI A174 Los Angeles CA 90045 FORTH Dimensions 1 load This program will help your calculations toward identifying the Beast of Revelation Here is wisdom Let him that hath understanding count the number of the beast for it is the number of a man and his number is Six hundred threescore and six The Revelation of St John the Divine 13 18 Type BEAST lt return gt to begin BEAST Type a name of no more than 80 characters including spaces and upper and lower case letters then press lt return gt Ignia Incendiari Shall U amp u vee Y amp y eye and W amp w two vees be counted YIN y Ignia Incendiari O Ms o 1 0s S500 1 Cs 100 O Ls Qo O Xs 0 O Vs
75. n should make the special identifications U gt V Y gt l and W gt vv the calculation proceeds medieval style in Roman numerals I answered yes whereupon the numerical value of the name was analytically displayed The value was 605 At this point in the program would have liked to put in a whistle to inform me whether the total was greater than or less than 666 and by how much but I decided to keep to twelve screens in order to print the program on two pages A bit of pencil work showed me 15 that I was sixty one short The addition al letters D and C were therefore barred but various combinations of L X V and I were available A few mystic passes over these letters Scrabble style and Lisa appeared so I responded to the prompt Another name with yes and entered the fuller name Ignia Lisa Incendiari It was clear that the remain ing deficiency was ten Now realized that my friend had withheld her middle name she is Ignia Alexis Incendiari When entered her full name the proclamation came back to me her number is the number of The Beast That satisfied me and 1 told the pro gram that I was through with it But wait You ask How can I assume that her name is Ignia Alexis Incendiari Isn t that fudging I am forced to admit that indeed I have fudged but in doing so I am only following the lead of the great numerologists of the past who fudged mightily And perhaps 1 have discovered a t
76. ngible gains in development time and cost efficiency maintainence Well it will be best if such Forth users make their own state ments Forth Dimensions will tell the stories this year of some installations large and small using Forth We think you ll find it interesting and eye opening This is part of a larger information gathering project We hope Forth ven dors and programmers will help us to compile the first complete document of Forth s use in all manner of systems and products We first published a questionnaire a year ago issue VII 5 which brought many fascinating re sponses but still reached only the tip of the iceberg That questionnaire is reprinted in this issue please use it yourself and see that copies get passed to non FIG members who have been involved in Forth projects On a final note the new set of Forth Dimensions writer s guidelines is now available from FIG It provides infor mation that new writers as well as our regulars should have on hand Much of the material in it will also help anyone writing about Forth for other publications The price is right so if you would like to write an article tutorial or technical note please send for a free copy We will look forward to hearing from you Marlin Ouverson Johns Hopkins Correction Dear Editor We would like to point out a factual error in Glen Haydon s article The Multi Dimensions of Forth VIII 3 The art
77. nter Call Linus Orth 913 236 9189 St Louis Chapter 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 e NEW MEXICO Albuquerque Chapter Monthly 1st Thurs 7 30 p m Physics amp Astronomy Bldg Univ of New Mexico Jon Bryan Call 505 298 3292 NEW YORK FIG New York Monthly 2nd Wed 7 45 p m Manhattan Call Ron Martinez 212 749 9468 Rochester Chapter Bi Monthly 4th Sat 2 p m Hutchinson Hall Univ of Rochester Call Thea Martin 716 235 0168 Syracuse Chapter Monthly 3rd Wed 7 p m Call Henry J Fay 315 446 4600 OHIO Akron Chapter Call Thomas Franks 216 336 3167 Athens Chapter Call Isreal Urieli 614 594 3731 Cleveland Chapter Call Gary Bergstrom 216 247 2492 Cincinatti Chapte 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 FORTH Dimensions Volume VIII No 5 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 e OREGON Greater Oregon Chapter
78. o do object oriented programming Transparency and localization are central to objects but Forth does not appear to support these principles explicitly As a solution minor modification of the vocabulary concept is proposed The Ultimate CASE Statement by Wil Baden Many citizens of the Forth community have lamented the lack of a CASE statement in standard specifications But all proposals to date even Eaker s widely used technique have had problems Lack of portability is one Restriction to their area of application is another Generalization is accomplished with a special case of CASE 32 Volume Seven Index by Julie Anton Subjects authors and titles from last year arranged for easy reference Keep a copy of this with your collection of back issues 34 National Forth Convention 86 Nearly one thousand people gathered in November to explore the state of Forth Engines Hardware and software designers discussed several methods used to embed Forth in hardware and how those efforts are shaping Forth s future This and other important topics are included in this capsule summary DEPARTMENTS 5 Letters 9 Editorial A Sense of Place 36 Index to Advertisers 38 FIG Chapters Volume VIII No 5 3 FORTH Dimensions SPEED AND POWER is the name of the game OTH PC4000 995 Use the PC4000 to turn your PC into a high speed Forth development workstation The PC4000 is a PC plug in card with the Novix NC4000P Fo
79. ones are at today Whatever hap pens keeping it simple will keep it on track with Forth theory The bottle neck today is still memory speed The cost of memory will continue to lower and speed will increase Designs for Forth engines will change according to what there will be time to do between memory accesses How can Novix address a customer s need for a bugless engine a full im plementation of the chip as it was orig inally intended and reliable delivery John Rible related that Novix has licensed some rights to Harris Semi conductor and that they are working with it in their core cell library Novix is upgrading to the NC6000 and is committed to fixing the NC4000 The rest is up to the marketplace and to management Charles Moore compared the situa tion to the chicken and egg syndrome if anyone had ordered 10 000 chips it would have been different It is clearly not desirable to order a chip with bugs or which may not be readily available Novix is trying its best in a field dominated by giants FORTH Dimensions 34 Volume VIII No 5 The pinout is very large for these processors keeping them expensive What about Forth chips with fewer pinouts Charles Moore said he could visual ize a twenty four pin eight bit proces sor but couldn t see anything useful smaller than that It is a manufacturing and quantity problem not so much one of design Pins are cheap in terms of cost benefit tradeoffs
80. orth 5 14 An Approach to Reading Programs 3 34 Apra Ronald E 6 21 Ask the Doctor Evaluation 1 8 Forth on the Front 2 12 Atari Painting Forth 4 28 B Benchmark Readability 4 16 C Case statements YACS Part Two 1 38 Code inspections An Approach to Reading Programs 3 34 Code Modules and Data Structures 5 23 Conferences 1985 Forth National Convention 4 41 euroFORML 85 6 15 FORML at Asilomar 5 25 Rochester Forth Conference 1985 2 38 Control structures Teaching Forth Let s Keep It Simple 6 21 Crashproofing The Moving Cursor Writes 6 10 Number Editing Utility 3 37 D Data compression Probabilistic Dictionaries 2 40 Data processing Quick DP in Forth 5 14 Data structures code modules and 5 23 Databases An Application of the Recursive Sort 5 12 Debugging WALK on Bugs 5 16 Dictionaries probabilistic 2 40 Dobbins R W 4 25 E Elola Mike 4 10 Eratosthenes Sieve 4 16 euroOFORML 85 6 15 Extending the Multi Tasker Mailboxes 4 25 F F83 Extending the Multi Tasker Mailboxes 4 25 String Functions 6 23 Word Usage Statistics 4 12 Fast Evaluation of Polynomials 5 27 Feucht Dennis L 3 28 Formatting CRT The Hacker s LOCKER 2 27 Formatting number Making Numbers Pretty 5 7 FORML at Asilomar 5 35 Forth Component Libraries 4 38 Forth Spreadsheet 1 14 2 30 Forth Timer Macros 3 19 Forth 83 Improved Forth 83 DO LOOP 3 28 Not ONLY But ALSO 1 32 Franske David 5 16 G Graphics Atari 4 28
81. orth articles collected in the pages of Dr Dobb s Journal 270 UNDERSTANDING FORTH 3 50 5 6 Joseph Reymann A brief introduction to Forth and overview of its structure A 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 79 Standard implementing Forth data structures vocabu laries applications and working group reports 322 ROCHESTER 1982 Data bases amp Process Control 25 28 35 Machine independence project management data struc tures mathematics and working group reports 323 ROCHESTER 1983 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 325 ROCHESTER 1985 Software Management amp Engineering 20 21 30 Improving software productivity using Forth in a space shuttle experiment automation of an airport development of MAGIC L and a Forth based business applications
82. otal ReceivedFram tatalSpentFor cS DEFINITIONS no dict dict gt 8 dicti dict ctl S code hist incomes IntDictionary at code hist expenditures IntDictionary at receive 2DUP cashOnHand SWAP incomes IntDictionary spend S code n hist 3 oR 2DUP totalReceivedFrom R isAt 3 5 code n hist 3 OVER NEGATE OVER cashQnHand SWAP FORTH DEFINITIONS Usage Examples R 2DUP totalSpentFar expenditures IntDictionary R gt isAt SWAP 100 IntDictionary new Houseincome 100 IntDictionary new HouseExpenses ONLY FORTH ALSO CLASSI FinancialHistory HouseIncome HouseExpenses 350 initialBalance Household utilities 32 Household spend food 30 Household spend rent 400 Household spend wages 1000 Household receive taxRefund 200 Household receive Household cashOnHand 9 Figure One Example Application number of codes involved The Forth code and the usage examples should be relatively straightforward However it may be useful to point out that the words corresponding to the dictionary codes for income and expense categories are not defined in the example these definitions are not essential to under standing the example and are of the form Volume VIII No 5 25 FORTH Dimensions is not found in the active class and by the addition of code to set the active class to null at the end of the search process SEARCHCLASS simply follows the class
83. othing is happening Actually the file is now being interpreted As soon as the interpreter gets to the end of FILEA BLK you will see LOAD FILEB BLK appear on the screen and the drive will come on again FILEB BLK will now be read in and interpreted LOAD FILEC BLK will then appear and FILEC BLK will be read in and interpreted At this point you are ready to run your application You may leave your image by entering SAVE SYSTEM file name com and boot right into it by entering program IS BOOT In any case I think you will find that editing source modules will become a bit more enjoyable And as an added bonus you will find they take up a great deal less disk space screens are notorious disk hogs because of all the white space they require As a result you will probably be more likely to structure indent your Forth source code the way it was intended instead of squeezing it into that 16x64 box like most of us FORTH Dimensions 14 Volume VIII No 5 Tracking the Beast Nathaniel Grossman Los Angeles California Humankind has been fascinated by numbers throughout all of its recorded history To its one hand lay mathemat ics with the abstract theory of numbers and more exotic developments We have cuneiform evidence that the Pyth agorean Theorem was known to the ancient Babylonians and abundant testimony from the Greek tradition of a feverish devotion to the study of integers
84. perience with this style of program ming is gathered Class Definition Words Classes would be defined according to the following form CLASS ClassName lt SUPER SuperClassName CLASS ClassName DEFINITIONS definitions in class ClassName FORTH DEFINITIONS The word CLASS would create in the compilation vocabulary a dictionary entry for ClassName which specifies a new list of word definitions forming the class being defined Subsequent execution of ClassName will be as a prefix operator making the words in the class the first part of the search order during the next dictionary look up Thus the phrase ClassName WordName would find the word WordName in the class ClassName if there was one and the search order would be the same after the phrase as it was before it The word lt SUPER would be used to indicate the superclass of the class just defined It would chain the class indicated by ClassName to the class indicated by SuperClassName When a dictionary search of Class Name is exhausted SuperClassName would be searched Those classes with out superclasses could be declared as CLASS ClassName lt SUPER Object The Object class would be the prim ary class holding definitions common to all classes Classes defined without using the lt SUPER word would not be chained to any superclass which might be useful in some cases The word CLASS would be used in the phrase CLASS ClassName to mak
85. 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 Ist 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 Room A Call Tom Ghormley 916 444 7775 Bay Area Chapter Silicon Valley Chapter Monthly 4th Sat FORML 10 a m Fig 1 p m H P Auditorium Wolfe Rd amp Pruneridge Cupertino _Call John Hall 415 532 1115 or call the FIG Hotline 408 277 0668 Stockton Chapter Cail Doug Dillon 209 931 2448 e COLORADO Denver Chapter Monthly Ist Mon 7 p m Cliff King 303 693 3413 e CONNECTICUT Central Connecticut Chapter Call Charles Krajewski 203 344 9996 e 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 Ist Wed p m Call Terry McNay 813 725 1245 e GEORGIA Atlanta Chapter Monthly 3rd Tues 6 30 p m Computone Cotilion Road Call Nick Hennenfent 404 393 3010 ILLINOIS Cache Forth Chapter Call Clyde W Phillips Jr
86. rth engine on board to add speed 512K memory and concurrent processing power to your PC or 100 compatible The PC4000 runs cmForth SCForth and Delta C PolyFORTH a registered trademark of Forth Inc coming soon DELTA BOARD 495 The Delta Board is a single board stand alone computer using the Novix NC4000P Forth engine to execute high level Forth instructions without compilation It brings minicomputer performance to industrial control and other tasks using embedded processors Operates at least 10 times faster than the 68000 based systems Memory board mother board power supply cable and enclosure available for expansion The Delta Board runs cmForth SCForth and Delta C The PC4000 and Delta Board come fully assembled and tested with 4 MHz operation 90 day warranty PCX or DCX with the Delta Board Communication Software in F83 User Manual cmForth with editor and demo programs and user support with Silicon Composers Bulletin Board SILICON COMPOSERS 210 California Avenue Suite I Palo Alto CA 94306 415 322 8763 Formerly E SOFTWARE COMPOSERS ass a EEEN SILICON COMPOSERS FORTH Dimensions 4 Volume VIII No 5 A Tale of Recursion Dear Editor While reading the very interesting article The Point Editor VIII 3 by J Brooks Breeden I couldn t help noticing the use of RECURSE at the end of the word MENU in screen seven This is an example of tail recursion where the recursive call
87. ruth that is unknown even to Ignia Incendiari herself Numbers don t lie or do they References 1 Hopper Vincent Foster Medieval Number Symbotism Cooper Square Publishers New York 1969 The word medieval in the title does not disqualify this book as a reference on current day numerol ogy 2 Bell Eric Temple Numerology Baltimore 1933 Reprinted 1981 This little book scarce but well worth finding to read was written by an eminent mathematician who also published popular science fic tion under the pseudonym John Taine FORTH Dimensions PORTABLE POWER WITH MasterFORTH Whether you program d J on the Macintosh the E IBM PC an Apple II ser ies a CP M system or the Commodore 64 your mee program will run un B S changed on all the rest If you write for yourself MasterFORTH will protect your investment If you write M forothers it will expand your marketplace Forth is interactive you have immediate feed back as you program every step of the way Forth is fast too and you can CP M use its built in as sembler to make it even faster Master FORTH s relocatable utilities and headerless code let you pack a lot more program into your memory The resident debugger lets you decom pile breakpoint and trace your way through most programming prob lems A string package file interface and fu
88. s lt return CR EXTENDED _ROMAN count it if a roman nuaeral 5 DROP discard tha character 6 YES char f True only if one of Y or y LOOP 7 DUP ASCII Y SWAP ASCIIy OR 8 NUMBER n 9 NO char f True only if one of N or n cuapute value of nase froa counts stored by the scan 10 DUP ASCII N SWAP ASCII n OR 3 0 MA 1000 DESO EIO HOT e I XG 10 WE Set re 3 42 YES OR NO char f DUP YES SWAP NO OR 13 14 YINLMESSAGE CR CR BEEP 15 You aust respond with Y or N then lt return CR Continued on page 27 FORTH Dimensions 18 Volume VIII No 5 FORTH INTEREST GROUP MAIL ORDER FORM P O Box 8231 108 MEMBERSHIP in the FORTH INTEREST GROUP amp Volume 8 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 4 000 members and 90 chapters FIG membership includes a subscription to the bi monthly publication FORTH Dimensions FIG also offers its members publication discounts group health and life insurance an on line data base a large selection of Forth literature and many other services Cost is 30 00 per year for USA Canada amp Mexico all San Jose CA 95155 MEMBERSHIP IN THE FORTH INTEREST GROUP 408 277 0668 other countries may select surface 37 00 or air 43 00 delivery The ann
89. s entry in the marketplace so we must maintain a public relations image Where are the optimizing compilers that will make the Forth engine more widely useful John Rible said Small C is available for the Novix 4000 Others are under negotiation and they are expensive But why do it six to seven times faster than an IBM AT in C on top of Forth hardware when it could be forty times faster in native Forth What will the second generation of Forth engines look like Charles Moore stated that any engine one wants is producible One conse quence of the simplicity of the Forth processor is that it can be easily com bined with other hardware on chip stacks multi processors in a single chip etc He doesn t think future genera tions will have the same thousand fold increases or the same impact John Rible added that the behavior of the processor is dependent on the rest of the world They are doing what they can with the current technology Hopefully the computer theorists will learn that one or two stacks will speed things up dramatically Gary Feierbach expects us to see thirty two bit chips and custom chips for specific applica tions He also believes we need a tar geted education effort so prospective users can see what can be done with Forth in hardware Glen Haydon concluded that five years from now we will still have eight bit processors and the sixty four bit processors will be where the thirty two bit
90. s superclass chain while calling FIND to search each class s linked list of words along the way One possible concern in implementing this proposal is that it introduces another kind of prefix operator to the code field prefix operators already proposed with VARIABLE ACTIVECLASS VARIABLE NEWCLASS 4 multiple code field words One might run into situations where a phrase of the form CodePrefix ClassName WordName must be handled The implementor must ensure that the pre fix operators act properly without in terfering with each other One would not want to try to execute the nonexis tent second code field of ClassName for instance A simple solution would be to implement the code field prefix pointer to class to be searched pointer to class being defined HTHREADS 2 2 CONSTANT SUPER i offset to superclass ptr 0 ACTIVECLASS Class Definition Words CLASS CREATE HTHREADS 0 DO 0 HERE VOC LINK DOES lt SUPER gt BODY CLASS gt BODY S LOOP ACTIVECLASS S S CONTEXT Class Variables CLASSVAR CREATE 0 DOES ACTIVECLASS CLASS tS BODY gt BODY DEFER 5 R COUNT 2DUP ELSE COUNT TYPE DEFER S5 COMPILE DEFER NEWCLASS 3 SUPER BL WORD Ca i ALLOT IMMEDIATE HERE NEWCLASS YOC LINK 0 l oas E gt R DROP FIND IF EXECUTE TRUE ABORT is undefined THEN IMMEDIATE Dictionary Loo
91. should be just plain lt in many systems mine included as the LFA NFA CFA and PFA will all be negative numbers and growing in the right direction to use lt Also a problem is the assumed de compilation of CREATE Most users will be safe in that their CREATE will be a standard fig FORTH definition but mine is not In those cases where it varies from CREATE FIND IF DROP then changing the patch word XCREATE to end with the first word in the defini tion of CREATE instead of with FIND should work The listing shows an application of LOCATE that will work For Tl Forth users the definition of SFA PUT is SFA PUT BLK CELLS HERE The code on line one should be compiled until debugging is no longer necessary If things don t go right then simply keying in FORGET SFA PUT XCREATE and then reloading will crash the sys tem Why Because CREATE has al ready been patched and compiling the screen again patches it again Before recompiling execute RESTORE Sincerely Gene Thomas Little Rock Arkansas Locate Utility Listing i Screen 16 0 LOCATE rev gtAug8 fig 1 CREATE CONSTANT C 2 3 SFA PUT BLK FIND 3 4 SFA PUT CFA CREATE 5 HERE CONSTANT WALL 6 SFA pfa sfa LFA 2 7 SFA NFA 2 3 jejew FD 8 2 RESTORE C gt CREATE xcreate patch create with sfa put no sfa s below wall lfa nfa cfa pfa dict order nfa lfa cfa pfa dict order
92. st questions the imple mentor of floating point numbers has to solve is that of the representation of real numbers The usual representation is a simple data structure containing an exponent sometimes called the char acteristic a significand mantissa and a sign bit An example is shown in Figure One exponent With an eight bit exponent a twenty three bit significand and one sign bit this real number representation could be stored in two sixteen bit words on the usual Forth stack Many similar representations can be used in Forth floating point implementations A Forth systems programmer chooses the representation best suited to a par ticular hardware and software situation For example some representations are more easily used in software floating point primitives whereas others corres pond to the representation used by a floating point coprocessor such as the AMD 9511 or the Intel 8087 or to that used by firmware routines such as those in the Apple Macintosh or in the IBM PC s BASIC ROM A Forth application programmer who uses floating point arithmetic must be aware of the representation used because the dynamic range and accuracy of real numbers is implicit in their representation Also if you wish to manipulate real numbers with stan dard Forth operators such as 2 or CMOVE you must know how many bytes of storage are required for each real number Manipulating Real Numbers Another
93. ster Forth Conference 1985 2 38 FORTH Dimensions 32 Volume VIII No 5 S Schmauch Ed 3 30 Simard Donald 2 25 Smith Kevin 2 28 Sorting An Application of the Recursive Sort 5 12 Spreadsheets Forth 1 14 2 30 Stack operations Fast Evaulation of Polynomials 5 27 A Universal Stack Word 5 25 Stoddart Bill 1 32 Strings F83 String Functions 6 23 Subroutines Another Subroutine Technique 2 25 Synonyms and Macros 3 11 3 14 T Takara Ken 3 37 Taylor Don 1 27 Teaching Forth Let s Keep It Simple 6 21 Techniques Tutorial YACS Part Two 1 38 Ting C H 4 12 Turpin Dr Richard H 5 12 U A Universal Stack Word 5 25 Utilities Fast Evaluation of Polynomials 5 27 Keywords Where Used 1 29 Number Editing 3 37 The Hacker s LOCKER 2 27 A Universal Stack Word 5 25 Universal Text File Reader 3 7 WALK on Bugs 5 16 Word Indexer 4 10 Vy Van Duinen Frans 2 15 Vocabulary Not ONLY But ALSO 1 32 w WALK on Bugs 5 16 Weinstein Iram 3 19 Word Indexer 4 10 Word Usage Statistics F83 4 12 Y Z Yngve Victor H 3 11 3 14 4 16 Zettel Len 5 14 Volume VIII No 5 TOTALCONTROL with LMI FORTH For Programming Professionals an expanding family of compatible high performance Forth 83 Standard compilers for microcomputers For Development Interactive Forth 83 Interpreter Compilers e 16 bit and 32 bit implementations e Full screen editor and assembler e Uses standard
94. t n2 WITHIN l ASCII c c integer value of character c BL WORD COUNT l ABORT C STATE IF COMPILE LITERAL THEN IMMEDIATE Figure Eleven a HEX 16 BASE OCTAL 8 BASE BINARY 2 BASE DECIMAL 10 BASE NUMBER addr dn tf 0 0 ROT CONVERT C BL Figure Eleven b applications with a version that selects the numerical radix according to the first character Figure Eight implements a convention used on Motorola systems e g 68000 Laxen s CLASSIFY example FD VII 1 can be written without re dundant classes with no additional definitions as in Figure Nine Since DUP is assembler code in most systems you can optimize its definition with something like that in Figure Ten a The Forth 79 definition of OR is given in Figure Ten b If you do not have PICK as in fig FORTH or if PICK is not an assembler code definition see Figure Ten c A CASE statement in any program ming language is intended for a series of tests to classify a value To do this in other languages without using a CASE structure would require repeating the value at each test giving a tedious appearance to the source In Forth the data stack allows us to avoid such explicit references to the value In Forth a CASE statement has the pat tern DUP IF DROP We have sweetened this to CASE OF The trivial nature of the implementa tion emphasizes that a CASE statemen
95. t is not essential to Forth Those Forth practitioners who pride themselves on how lean and mean their Forth is will find it superfluous My intent is not to propose this definition of CASE for standardization but on the other hand any further CASE proposal should be as simple to implement as portable and as powerful Auxiliary Definitions You may already have some of these Your definitions may be dif ferent from those shown in Figure Eleven a BLANK LINES and NEW LINE are words peculiar to the application BLANK LINES is a variable counting the number of successive blank lines NEW LINE does a CR when the value of BLANK LINES is less than two Figure Eleven b provides definitions for several fundamental Forth words It also presents a naive version of NUMBER that ignores details such as sign and punctuation and is not in tended for actual use Volume VIII No 5 31 FORTH Dimensions Volume Seven Index This reference guide to Volume VII was prepared as a service to our readers Items are referenced by issue number and page number the first entry refers to an article in volume VII issue 1 page 36 A Another Forth 83 LEAVE 1 36 Another Subroutine Technique 2 25 Application Tutorials A Generic Sort 1 10 Universal Text File Reader 3 7 Wordwrapping Tool 4 8 Applications An Application of the Recursive Sort 5 12 Forth on the Front 2 12 Forth Spreadsheet 1 14 2 30 Mass Transit Forth 2 28 Quick DP in F
96. ting point Forth programs have been successfully utilized in applications such as high level display graphics real time engineering telemetry processing and industrial quality control analysis A Forth program which uses floating point arithmetic is often the best ap proach to an application which de mands real number processing as well as interactive hardware control With inexpensive widely available floating point hardware real numbers can be handled in a sophisticated man ner without sacrificing either speed or the many conveniences of the standard Forth interpretive environment Fur thermore in well integrated systems such as the Apple Macintosh it be hooves a Forth programmer to take advantage of readily available firm ware support for real arithmetic With a critical eye to the factors described in this article you can easily integrate floating point arithmetic into Forth applications FORTH Dimensions 12 Volume VIH No 5 Screenless Forth Carl A Wenrich Tampa Florida Don t get me wrong I love my Laxen amp Perry F83 package It is the most elegant piece of code I ve seen since the last thing I wrote myself But somehow I ve never been able to get to the point where I actually enjoy screen editing Even with everything that s done to help I still find it tedious On the other hand editing with my SEE editor C Ware Corporation P O Box C Sunnyvale CA 94087 is a pure joy So
97. to have my cake and eat it too I wrote this little piece for my IBM PC to escape the tyranny of the silent screen It allows you to create source modules using any ASCII text file editor even DOS s EDLIN if you re desperate 1 O LOAD BLOCK ONLY FORTH ALSO DEFINITIONS WARNING OFF NLOAD 5 LOAD NLOAD IS LOAD e gt Om Som OF a Ww PO oe p 5 VOCABULARY UNSCREEN VARIABLE B FILE 61440 CONSTANT MOD BUF REC SIZE 5 adr adr i th s FILE SIZE 5 adr adr 16 1 2 3 4 j 4 7 0 CO _ ABORT Open error ABORT File over 4k FILE SIZE DUP 4096 B FILE sh ess to 4 m e Fe C ABORT Read error we on Volume Vill No 5 UNSCREEN REC SIZE FILE SI2E GPEN FILE READ CHAR OPEN FILE S IN FILE DUP 15 b005 DOS ERR READ CHAR S IN FILE 20 BDOS DOS ERR Here s how it works F83 is set up with four disk buffers of 1024 bytes each at the top of memory I just redefined that space as a 4K source file buffer Any programs larger than 4K can be broken down into 4K modules and chained together easily Let s take a look at the commands required to implement this screenless Forth system As you can see by glanc ing at the listing there really isn t very much to it What we have is yet another indication of the power of Forth you can do quite a lot with very little Since some of the new words are duplicates of existing comman
98. to the readers The example uses three operations from the IntDictionary class 1 at to access the value corresponding to a certain code 2 isAt to store a value corresponding to a certain code and 3 new to create a new IntDictionary given the maximum codeValue CONSTANT codeName Figure Two lists the code for imple menting the words I have proposed under the Laxen Perry F83 model The code should be relatively straightfor ward so I will only review some of the more challenging sections The CLASS defining word produces a dictionary entry similar to that of the vocaBu LARY defining word with the addition of space for a pointer to the class s superclass and a different run time action DEFER compiles the code ad dress of its run time word DEFER and a counted string representation of the word which follows it in the input stream DEFER extracts the address of the string which follows it moves the instruction pointer past the string looks up the word in the dictionary and either executes it or types an error message and aborts FIND is modified by the addition of a call to SEARCH CLASS before searching the CONTEXT and CURRENT vocabularies if the word ONLY FORTH ALSO CLASS SINGLE CLASS FinancialHistory lt SUPER Object CLASSI FinancialHistory cashOQnHand 5 hist incomes CS hist expenditures S hist imnttialBalance CREATE SWAP i new tS di SWAP oo 3 CREATE t
99. ual 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 toa 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 a IE ee a a A NT CE TTL a TE a a N a a a O FORTH DIMENSIONS BACK VOLUMES The six issues of the volume year May April 101 Volume 1 FORTH Dimensions 1979 80 15 1 6 18 102 Volume 2 FORTH Dimensions 1980 81 1 5 16 18 103 Volume 3 FORTH Dimensions 1981 82 15 16 18 104 Volume 4 FORTH Dimensions 1982 83 15 16 18 105 Volume 5 FORTH Dimensions 1983 84 1 5 16 18 106 Volume 6 FORTH Dimensions 1984 85 1 5 16 18 107 Volume 7 FORTH Dimensions 1985 86 20 21 24 ALL 7 VOLUMES 75 00 SAVE 35 00 FORML CONFERENCE PROCEE
100. was Officially imbued then with both re sponsibility and authority to act on FIG s behalf It was a close knit and efficient way of conducting business After thorough review the Board has formally amended the by laws The essential change now directs a Nomi nating Committee to report to the entire FIG membership probably in Forth Dimensions The committee can accept nominations for board member candidates from the membership at large Names must be submitted to the committee along with the supporting signatures of ten FIG members The committee will notify the membership of nominees names election dates and a vote by proxy mechanism FIG s normal business activities are directed by a volunteer business group that meets monthly in San Jose Cali fornia with several Board members normally in attendance along with other professional associates and inter ested members Day to day operations are carried out by the Association De velopment Center Shepherd Associ ates a paid service with whom FIG works closely FIG Chapters exist in many parts of the world At the time of this meeting there were eighty seven active chapters with others in various stages of forma tion In many ways they are the volunteer based foundation of the or ganization On the 1986 FORML tour that visited China Forth experts there exhibited great interest in forming a FIG Chapter Such a chapter would be the first on the mainland and would
101. your needs As an example lately we wrote two simple words gt FORTH and gt ASM that permit us to execute high level words within a code definition This is very useful within a slow interrupting sys tem when there are math equations to perform and system status to display on a console a PID control loop with adjustable parameters for example Other colleges CEGEP in Quebec are thinking about switching to Forth just like we did four years ago There will probably be a course given by the Universit de Sherbrooke in the spring of 1987 for the CEGEP teachers We would like very much to exchange information with other institutions about their Forth teaching experiences Denis Lambert Coll ge de Sherbrooke Sherbrooke Quebec Canada On Line Docs for fig FORTH Dear Marlin Regarding On Line Documenta tion Forth Dimensions VIII 2 it is a very good idea I have implemented it Some fig FORTH users however are going to have some trouble getting it to work Perhaps I can help Mr Wavrik s definition of LOCATE seems to assume that the word FIND leaves a CFA and a flag The usual fig FORTH FIND leaves PFA CNT and a flag The count NFA s count byte con tents is a gremlin floating around in the word LOCATE The word CFA gt SFA is actually being fed the count and even after the count is dropped CFA gt SFA receives a PFA not a CFA Another difficulty is that the u lt in the word LOCATE
Download Pdf Manuals
Related Search
Related Contents
CPMS - Moore Industries International PCORI Online User Manual: Submitting an Application Bowers & Wilkins DM320 User's Manual LABO-MODERNE 54U 取扱説明書 (操作用) 電力マルチメータ 目 次 - M 取扱説明書(PDF) IMPORTANTE INSTRUCCIONES DE SEGURIDAD Manual de instalación y mantenimiento Triton Riel As informações e descrições dos equipamentos Copyright © All rights reserved.
Failed to retrieve file