Home

6 - Forth Interest Group

image

Contents

1. aes Please direct all questions comments miscellaneous personal abuse to and Henry Laxen or Michael Perry ae 1259 Cornell Avenue 1125 Bancroft Way Berkeley 94706 Berkeley 94702 ane Please direct all questions concerning the wet ssx address extensions made to F83 for the 68000 to Robert Eager 3500 Glenridge Place Corvallis OR 97330 hae 24 Save Core Image a File on Disk 2927 86 3 DEFER HEADER HEX 68K HEADER ADR LEN ADR 28 LEN 28 1C SWAP iC SWAP OVER DUP 1 ERASE 601A OVER 4 HERE OVER 12 BPAGE OVER 2 BOFFSET OVER 2 ON DECIMAL 68K HEADER IS HEADER SAVE S Addr len FCB2 DUP FCB DUP DELETE DROP DUP MAKE FILE ROT HEADER BOUNDS DO SET DMA DUP WRITE 128 CLOSE FORTH DEFINITIONS MORE 5 n 20 1 1 ENOUGH CAPACITY SWAP DUP 8 FILE 8 MAXREC BOUNDS DO BUFFER B BUF BLANK UPDATE LOOP SAVE BUFFERS FILE 8 CLOSE CREATE FILE S blocks 095 2 DUP FIL S DUP FCB MAKE FILE MORE 9 X The Rest is Silence 8 4
2. AH EEE EAD t Please direct all questions comments miscellaneous personal abuse to and srs Henry Laxen 1259 Cornell Avenue Berkeley California 94706 Michael Perry 1125 Bancroft Way Berkeley California 94702 nae tae tae RENEE EAE Forth Dimensions 26 27 Rest Silence l0FEB86rje RRARRRARRARTARAARERARARARARAATARRATRARRARARTEATEEAR ERRARE Please direct all questions comments AUR miscellaneous personal abuse to Henry Laxen Michael Perry 1259 Cornell Avenue 1125 Bancroft Way Berkeley CA 94706 Berkeley CA 94702 BEN and nae T Please direct all questions concerning the address extensions made to 83 for the 68000 to Robert Eager 3500 Glencidge Place Corvallis OR 97330 wae eae att 555555355225555555444 5454454 30 68000 Assembler Load Screen 29JAN86rje ONLY FORTH ALSO DEFINITIONS 1 14
3. TT SSeS eee Eau NEXT 14 14 CODE PAUSE NEXT END CODE 15 15 1 38 0 N Target System Setup 19Apr84map 0 Task Dependant USER Variables 24Mar84map 1 ONLY FORTH META ALSO FORTH 1 USER DEFINITIONS 2 HEX 800 TARGET ORIGIN IN META DECIMAL 2 VARIABLE TOS OF STACK 3 2 92 THRU System Source Screens HEX 3 VARIABLE ENTRY ENTRY POINT CONTAINS MACHINE CODE 4 CR Unresolved references CR UNRESOLVED 4 VARIABLE LINK LINK TO NEXT TASK 5 CR Statistics CR Last Host Address 5 VARIABLE SPO INITIAL PARAMETER STACK 6 FORTH HERE U CR First Target Code Address 6 VARIABLE RPO INITIAL RETURN STACK 7 500 THERE U CR Last Target Code Address 7 VARIABLE DP DICTIONARY POINTER 8 META HERE T THERE U CR CR 8 VARIABLE OUT NUMBER OF CHARACTERS EMITTED 9 DOS 4 8 T 9 VARIABLE LINE THE NUMBER OF LINES SENT SO FAR 11 ONLY FORTH ALSO DOS SAVE A KERNEL 68K FORTH 11 VARIABLE BASE FOR NUMERIC INPUT AND OUTPUT 12 CR Now return to CP M and type 12 VARIABLE HLD POINTS TO LAST CHARACTER HELD IN PAD 13 CR KERNEL EXTEND68 BLK lt CR gt CR OK CR DECIMAL 13 VARIABLE FILE POINTS TO FCB OF CURRENTLY OPEN FILE 14 14 VARIABLE IN FILE POINTS TO FCB OF CURRENTLY OPEN FILE 15 VARIABLE PRINTING 2 Declare the Forward References and Version 290ctB3map 11 l
4. NEW 81 BF SP BX BX SI EX EX BX NEXT Figure Eight fig FORTH DODOE and new version DODOES INC DEC DEC MOV FOF FUSH DODOES INC INC DEC DEC MOV FOF PUSH JMF DX BF 51 51 DX NEXT BX NEW BX BF BF 51 51 BX NEXT Figure Nine MVP FORTH DODOES and new version EXEC EXEC Figure Ten fig FORTH and MVP FORTH EXEC and new version L DW POF JMF DW FOF JMP 2 FIG amp EX NEXT 1 2 NEW BX WORD CBX Volume Number 6 19 NGS FORTH A FAST FORTH OPTIMIZED FOR THE IBM PERSONAL COMPUTER AND MS DOS COMPATIBLES STANDARD FEATURES INCLUDE 79 STANDARD eDIRECT I O ACCESS eFULL ACCESS TO MS DOS FILES AND FUNCTIONS eENVIRONMENT SAVE amp LOAD eMULTI SEGMENTED FOR LARGE APPLICATIONS eEXTENDED ADDRESSING eMEMORY ALLOCATION CONFIGURABLE ON LINE eAUTO LOAD SCREEN BOOT eLINE amp SCREEN EDITORS eDECOMPILER AND DEBUGGING AIDS 088 ASSEMBLER eGRAPHICS amp SOUND eNGS ENHANCEMENTS eDETAILED MANUAL INEXPENSIVE UPGRADES eNGS USER NEWSLETTER COMPLETE FORTH DEVELOPMENT SYSTEM PRICES START AT 70 NEW HP 150 amp HP 110 VERSIONS AVAILABLE i NEXT GENERATION SYSTEMS 2987 SANTA CLARA CA 95055 408 241 5909 Forth D
5. k Security Breach Dear Marlin I have no excuses I don t know what happened Clearly the code printed with my letter on F83 Execution Security is wrong with several errors in it The en closed new code should work Sincerely G R Jaffray Jr 3536 Angelus Avenue Glendale California 91208 LETTERS Worthless Like Pascal Dear Mr Ouverson I m a graduate student at the Florida Institute of Technology doing extensive work in natural language processing in terfacing to an expert system and semantic knowledge base with Forth under the di rection of Dr T O Hand We intend to become one of the most advanced institu tions for AI applications using Forth Iam writing to convey my strong pro test to the use of assembly code in source Scr 6 B XSECUR BLK XSECUR GRJjr 0 1 HEX ASSEMBLER 1 2 LABEL XSECU1 0 JMP do this if word is good 2 3 LABEL XSECUR Warm start if cfa points to invalid location 3 4 AX LODS 89 C C3 C code fr NEXT O BX AX MOV 4 5 AX PUSH AX DEC AX DEC BX AX CMP AX POP XSECU1 JE code word 5 6 QUIT 8 CMP XSECU1 JE colon definition 6 7 UNNEST 8 XSECU1 JE end colon def 2 8 RMARGIN 8 4 CMP XSECU1 JE DOCREATE variable 8 9 BL AX 1 JE DOCONSTANT constant 9 10 BASE CMP XSECUI JE user variable 10 11 KEY CMP XSECUI JE deferred word 11 12 EMIT
6. is 16 bit constant which returns the 64K page address to which the system was compiled A second constant BOFFSET specifies the starting address of the kernel within this page These two words are defined twice in the kernel source Screen 1 contains the definitions used by the metacompiler to target the ker nel and screen 84 contains the definitions for use by the Forth programmer To compile the kernel at a new target address simply edit the definitions BP AGE and BOFFSET in screen 1 of the kernel and compile the system as described by Laxen and Perry See Listing One screen 1 Note each listing contains the original Source screens in the left column and its corresponding extended source screens in the right column Screen lines in the ex tended source that actually contain modi fied code are marked with a vertical bar at the beginning of the line Extending F83 resulted in 10 words and five source screens requiring modifica tions in the KERNEL68 file see Listing One and 10 words and one source screen in the EXTEND68 and CPU68000 files see Listing Two No modifications were required in either the METACOMPILER or UTILITY files The effect on code size and execution speed was as follows 640 byte growth in size and a 346 increase in execution time based on the benchmark published in Forth Dimensions VIII A see Listing Three To run this modified F83 F83X your system must meet only
7. a year or two Instead I wrote a tiny Pascal compiler which was sold through Pro gramma International for several years I started looking for the ideal program ming language which to me meant porta bility That is I would be able to move my tools to the different laboratory computers Iwas working with Our laboratory desktop computer spoke only BASIC our labora tory minicomputer spoke only Fortran the statistical packages I worked with spoke only APL and I was somewhat miffed by having to translate the tools around MH What was your job when you were working on the arm MT I was a full time lecturer in the dance department at UCLA teaching anatomy PROFILES IN FORTH for dancers while completing a Ph D in bioengineering And the arm was part of the bioengi neering MT Yes in the UCLA Bioenginecring Laboratories MH So you stayed away from Forth and developed your design for the ideal lan guage MT It was basically a macro assembler Phil Wasson pointed out that I was devel oping a language very much like fig FORTH I looked at fig FORTH and thought I could implement that model on an Apple computer It was already on an Apple but it wasn t in the form I needed I thought it would take me a month Phil was a programmer with Programma Interna tional at that time working with their ver sion of Forth And in fact I was able convert the Forth in a short time so we decided t
8. CMP XSECU1 JE user deferred word 12 13 BX PUSH AX BX MOV O BX AL MOV DOES word L3 14 E8 AL BX POP XSECU1 JE 103 JMP 103H warm start 14 15 x5 Scr 7 B XSECUR BLK 0 XSECURITY amp UNSECURE GRJjr 0 1 1 2 CODE XSECURITY Establish JMP to XSECUR 2 3 PUSH gt NEXT BX MOV 9 AL MOV JMP op code 3 4 ALO BX MOV BX INC XSECUR overlay code at gt NEXT 4 5 gt 3 AX MOV get rel displacement to XSECUR 5 6 0 BX MOV BX POP gt JMP C lay down after E9 6 7 7 8 CODE UNSECURE gt BX Restore original code at gt NEXT 8 9 AD AL MOV AL 0 BX MOV BX INC It was AD 8B D8 9 10 8B AL MOV AL BX MOV INC 10 11 08 AL MOV AL MOV gt NEXT JMP C 11 12 DECIMAL FORTH 12 13 13 14 14 15 15 Volume IX Number 6 listings e g Local Variables Peter Ross FD IX 4 It doesn t provide the slightest bit of portability and thus makes the source code absolutely worthless to those not using the same system as the author By the same token source listings should not be machine or implementation dependent e g Extensions for F83 Scarpelli FD IX 4 In my four short years of Forth pro gramming I have always found a lack of useful programming development and debugging tools for this very reason I have also come to the conclusion that any at tempt to make Forth a structured program min
9. Volume IX Number 6 SCR 5 TUTOR BLK MORE ROOM FOR LESSON WORDS MENU 9 DISPLAY will display infor screen PRTSCR CURRENT GET SCREEN IS NTUTOR CR REPT SCREEN OF INFORMATION IS STUTOR CR HELP SCR 6 TUTOR BLK PRINT SCREENS FOR TUTOR INFORMATION FORTH 83 TUTOR PROGRAM AND HELP SCREENS WRITTEN BY BILL KIBLER c 1987 DONATED into PUBLIC DOMAIN with ALL COMMERCIAL RIGHTS RESERVED This program will help beginners and past FORTH users alike The screens contain informa tion on Forth 83 and are related to the book STARTING FORTH by Leo Brodie which should be used as a textbook with this program Each chapter or series of screens is organized to present the words used the chapter in glos sary form Forth users will find this glossary important to see the differences between F83 and other versions Typing HELP will repeat these Screens then type SCR 7 TUTOR BLK second intro screen with list of words the chapter number for the area of help needed Typing ESC key will exit the screens and return to the system prompt GET will display next chapter of information while REPT will start with the first screen of the chapter again START TUTOR will start with the introduction chapter NEW F83 WORDS The following words are important utilities in F83 and may be different from previous ver sions WORDS will display a list of F83 words used OPEN
10. Michael Perry vat 1259 Cornell Avenue 1125 Bancroft Way set Berkeley 94706 Berkeley 94702 tae YEN Please direct all questions concerning the address extensions made to F83 for the 68000 to ave Robert Eager 23 t 3500 Glenridge Place Awa se Corvallis OR 97330 m EEE 800 TARGET ORIGIN BODY Base Page compilation addr Base Page Offset System Source Screens CR UNRESOLVED 30JAN86rje FORTH HERE U META BOFFSET THERE U META HERE T THERE U CR CR kerntop kernbot ONLY FORTH ALSO DOS SAVE KERNELX 68K FORTH CR Now return to CP M and type CR KERNELX EXT68KX BLK CR OK DECIMAL 95 19DEC85rje 1 COMPILE FORTH IMMEDIATE Create the kernel s CP M 68k Absolute File Header 96 Boot up Vectors and NEXT Interpreter 19DEC86rje ASSEMBLER HEX LABEL ORIGIN FFFF FFFF 1 JMP Low Level COLD Entry point FFFF FFFF L JMP Low Level WARM Entry point LABEL NEXT 07 MOVE D W LMOVE L 07 MOVE 07 A0 LMOVE A0 JMP ASSEMBLER gt NEXT META CONSTANT gt NEXT ASSEMBLER DEFINITIONS META H NEXT META ASSEMBLER gt BPAGE L amp JMP DECIMAL HERE T DUP 100 CURRENT T harmless VOCABULARY FORTH FORTH DEFINITIONS 0 OVER 2 T link DUP 2 SWAP 16 T thread IN META 98 Run Time Code for
11. lt E 12 DUP 2 IF DROP FALSE EXIT THEN underflow gt PAUSE BEGIN STATUS 4 AND UNTIL DATA 13 NP 2 QUEUE CP TRUE 13 DECIMAL 14 13 p Volume IX Number 6 9 Forth Dimensions 5 VOCABULARY PHONE PHONE DEFINITIONS 6 7 11 LOAD X Phone numbers 8 CALL HEADER ASCII WORD COUNT DIAL 9 10 TALKING DEFINITIONS Forth Dimensions 11 X Phone Numbers 1 HEADER ATDT OUTGOING p 1 o gt FIG HEADER 4155323590 DIAL 3 5 3 0 Dumb Terminal breakpoint interpreter 26MaYSSirt 0 X Dumb Terminal local escape table 2 85 i See FD volS 1 pri 1 2 VARIABLE CHECK 2 3 BREAK invokes QUIT shell 3 CREATE FILTERTABLE 1 4 CR RFE 4 mvp 6 CHECK 0 BLK 4 QUEUE QUEUE IGUEUE QUEUE IGUEUE BREAK S BEGIN QUERY INTERPRET aok CR AGAIN 5 QUEUE QUEUE COUELE QUEUE QUEUE QUEUE QUELIE QUEUE 5 amp PRINT QUEUE QUEUE QUEUE QUEUE QUEUE QUEUE 7 FORTH DEFINITIONS 7 QUEUE QUEUE QUELE QUEUE QUEUE C 8 RESUME J ERROR IS ERROR resume normal abort 8 90 RPE CHECK X aborts tom BUIT shell 3 10 RO 2DROP mve DROP 10 FILTER 5 c saddr OVER 22 lt 11 ELSE Can t resume QUIT THEN 1 IF OVER 2 FILTERTABLE PERFORM ELSE UEJE THEN 12 12 12 TALKING DEFINITIONS
12. TUTOR WORDS INTRO introduction 1 fundamentals 2 and STACK editor commands CHP4 conditionals nests 5 fixed point operations CHP6 loops amp nested CHP7 number types CHP8 var const arrays CHP9 F83 structure CHP10 Input Output 11 extensions GET next chapter REPT begin chapter again HELP repeat these screens START TUTOR start at INTRO SPACE BAR next screen ESC stops display BYE EXITS to DOS MENU displays this screen PRTSCR GET and REPT pointers Volume IX Number 6 29 Forth Dimensions 1988 Rochester Forth Conference On Programming Environments June 14 18 1988 University of Rochester CALL FOR PAPERS The Eighth Rochester Forth Conference will be held at the University of Rochester and is sponsored by the Institute for Applied Forth Research Inc The focus will be on Programming Environments The invited speakers include Cliff Click and Paul Snow on their Postscript implementation in Fifth and William Wickes software project leader for the HP28 calculator discussing Reverse Polish Lisp Other speakers will discuss environments for scientific calculation simulation and programming workbenches There is a call for papers on topics in the following areas Environments Technology Object oriented Forth Forth processors Forth as an AI platform Peripheral controllers Postscript State machin
13. EMIT 1 LOOP DROP TYPE WITH L K CR KEY LEAVE LOOP DROP gt SCR 2 TUTOR BLK go get screens of information gotutor tutor WTPRT CURRENT SCREEN IS SCR 2 SPACES ESC EXIT 2 SPACES USE SPACE BAR FOR NEXT SCREEN ESCCHK DUP 27 SET ESC FLAG 1 32 THEN WAIT WTPRT 13 EMIT Forth Dimensions 28 PRINT THEN CR WITHOUT LF BEGIN KEY ESCCHK 32 UNTIL LOOP TIL SPACE KEY GOTUTOR DISPLAYS SCREEN ON STACK THEN WAITS CR DUP SCR 15 SPACES SCR CR BEGIN DISPLAY WAIT NTUTOR 1 DUP DUP NTUTOR 1 CR 3 SPACES REPT REPEAT LAST LESSON GET NEXT LESSON ETUTOR UNTIL CR MENU CR CRCR TUTOR STORE SCREEN POINTERS THEN GOTUTOR 0 ETUTOR DUP DUP STUTOR NTUTOR GOTUTOR gt SCR 3 TUTOR BLK INITIALIZE AND START THE LOOPS GET REPT GET GO GET NEXT GROUP OF SCREENS NTUTOR TUTOR BACK AND REPEAT SET OF 5 5 STUTOR TUTOR START TUTOR START WITH FIRST SCREEN OF TUTOR 10 TUTOR HELP GIVE INTRO MESSAGE 6 TUTOR gt SCR 4 TUTOR BLK DEFINING MODULES OF INFORMATION INTRO 10 TUTOR CHP1 12 TUTOR CHP2 18 TUTOR CHP3 25 TUTOR 4 34 TUTOR 5 40 TUTOR CHP6 48 TUTOR CHP7 55 TUTOR 8 66 TUTOR CHP9 73 TUTOR CHP10 84 TUTOR 11 92 TUTOR gt
14. FIG amp GREAT FORTH BSE EE REY MMSFORTH 2 4 179 95 MOY 3x DX The one you ve read about in FORTH TEXT 8 REFERENCE Available for MOV BL CRX I PC XT AT PS2 etc and TRS 80 M 1 3 fond BUB BH BH GREAT MMSFORTH OPTIONS MOV DI UP FORTHWRITE LEA AX UBX DI 4 DATAHANDLER JMF AFLUSH DATAHANDLER PLUS UTILITIES 49 DOUSE INC BX NEW Single computer single user prices porate mat renea om 5 INC EX amp format add 5 disk Tandy add A 20 Add S H plus 5 tax on Mass orders ng Y 2 r pd not avail for TRS 80s SUE EH EH GREAT FORTH SUPPORT 11 Free user tips MMSFORTH Newsletter MOV D 1 UF consulting on hardware selection staff LEA LEXTDI JI training and programming assignments large or small od MF APLISH FORTH BOOKS FORTH A TEXT amp REF THINKING FORTH 9 Figure Seven fig FORTH and MVP FORTH DOUSE and new version Many others in stock MILLER MICROCOMPUTER SERVICES 61 Lake Shore Road Natick MA 01760 617 653 6136 9 am 9 pm Forth Dimensions 18 Volume IX Number 6 DODOEs XCHG DODGE PUSH XCHG MOV MOV INC INC FUSH XCHG FLUSH ACHG INC INC MOV INC INC PUSH JMF RF SF FIG SI SF DX BX DX CBX DX DX DX
15. LU COMPILE 2 FORTH IMMEDIATE 44 0 5 Devices Strings O7MarBamap 1 LABEL gt UPPER D6 BYTE ASCII a D6 CMPI 2 gt ASCII z D6 lt IF BL D6 SUBI THEN THEN RTS 3 CODE 5 S addr addr len 1 0 i 4 SP DO MOVE 1 00 ADDQ 5 6 7 8 9 0 1 2 3 4 FORWARD DEFINITIONS 5 FORWARD SP 1 07 MOVE D7 LMOVE SP D7 MOVE 07 Al LMOVE BEGIN 1 DO 5080 0 gt WHILE BYTE 8 9 Al 06 MOVE gt UPPER JSR D6 MOVE LABEL FILE HEADER HEX AQ D6 MOVE gt UPPER JSR 21 06 CMP WORD 500 1 DP T 0v IF O IF 1 SP MOVE ELSE l SP MOVE THEN 10 601A T 0 T 0 T 0 T 0 T 0 T 0 T 10 NEXT THEN 119 T 0 T09 T 0 500 T 11 REPEAT SP CLR NEXT END CODE 12 DECIMAL 12 13 13 COMPARE 5 addri addr2 len 1 0 1 14 CAPS IF 5 ELSE COMP THEN 15 3 0 Boot up Vectors and NEXT Interpreter 10 84 45 1 ASSEMBLER LABEL ORIGIN 0 N Devices Terminal IO via CP M BIOS l3Apr84map 2 1 JMP Low Level COLD Entry point 5 s Save cegisters ow Level WARM Ent int fun a TREE S ack 3 SP 3 DO MOVE SP D MOVE 07 Di LMOVE 2 TRAP 5 IP D MOVE 07 W LMOVE 4 DO SP MOVE NEXT END CODE 6 W D7 MOVE D7 A0 LMOVE AQ JMP 5 CODE BIOS 5 parm func ret HEX 7 ASSEMBLER gt META CONSTANT NEXT 3 SP pou BE 4 ADV
16. THRU D NEXT NEXT BPAGE 1 JMP 2 INIT ASSEMBLER WORD H ONLY FORTH ALSO DEFINITIONS HEX 4EB9 CONSTANT DOES OP 6 CONSTANT DOES SIZE DECIMAL DOES S IP IP F DUP DOES SIZE SWAP 8 DOES OP LABEL CREATE ASSEMBLER ASSEMBLER INIT CODE CODE ASSEMBLER INIT H 46 Vocabulary Range test O4FEBS6r je VOCABULARY BUG BUG ALSO DEFINITIONS VARIABLE VARIABLE IP VARIABLE CNT VARIABLE DEBUG LABEL FNEXT IP 07 MOVE D7 LMOVE HERE 07 MOVE 07 0 LMOVE 0 JMP CONSTANT FNEXT1 FORTH DEFINITIONS CODE UNBUG 8 BPAGE ASSEMBLER 1 L LONG MOVE WORD FNEXT 4 BPAGE 1 4 BPAGE L MOVE NEXT C BUG DEFINITIONS 20 0 Debug version of Next 10 4 1 LABEL 2 00 00 6500 3 IF IP 00 6200 Uca 4 I 0 Lt 02 MOVE 1 02 ADOQ 02 CNT 0 1 MOVE 5 2 D2 CMP Os 6 Ir CNT 0 L CLR LONG FNEXT 0 L gt NEXT 4 MOVE 7 WORD IP SP MOVE DEBUG 0 L D MOVE 07 LMOVE 8 FNEXT1 0 L JMP 9 10 0 1 JMP DECIMAL 11 LABEL JBUG 12 DEDNEXT JMP 13 CODE 14 JBUG 0 L8 NEXT LONG MOVE WORD NEXT is 22 0 Multitasking low level 10Jan84map 1 CODE PAUSE 8 2 SP MOVE IP to stack RP SP MOVE RP to stack 3 UP 0 L 07 MOVE 07 0 LMOVE 4 SP AO MOVE SP to USER area
17. ning exhibits for familiar faces than about protecting my investment and getting out So it was a pleasant surprise to find Don Colburn looking comfortable in the Crea tive Solutions booth talking with pas sersby about his company s NuBus prod ucts It was good to see someone showing Forth s strength on the current generation of machines where the innovation and excitement is reminiscent of the elder days of microcomputing With few exceptions the absence of leadership shown by Forth companies to crowds like the one that packed Moscone Center on that particular day is surprising This is the first publication I ve worked on where so few of those who could gain the most by sharing their ideas and business activities actually do so A few even have theattitude thatif someone doesn t arrive at the office elicit the information and frame it meaningful context for them they ll just keep it to themselves Well FIG does provide Forth Dimensions to facilitate communication with and among its members and FIG s modest membership fee allows this to take place regularly and reliably in these pages on GEnie and at annual meetings But FIG cannot provide the content of all this communication only the forum and philosophically I believe that s proper The fact is no business thrives without communication paid advertising directed toward product sales along with marketing of product and company image Communi cation to the i
18. 02 524 7490 BELGIUM Belgium Chapter 4th Wed 20 00h Contact Luk Van Loock Lariksdreff 20 2120 Schoten 03 658 6343 Southern Belgium Chapter Contact Jean Marc Bertinchamps Rue N Monnom 2 B 6290 Nalinnes 071 213858 CANADA Northern Alberta Chapter 4th Sat p m N Alta Inst of Tech Tony Van Muyden 403 962 2203 Nova Scotia Chapter Halifax Howard Harawitz 902 477 3665 Southern Ontario Chapter Quarterly 1st Sat 2 p m Genl Sci Bldg Rm 212 McMaster University Dr 416 525 9140 3 Toronto Chapter Contact John Clark Smith Box 230 Station Toronto ON 512 Vancouver Chapter Don Vanderweele 604 941 4073 COLOMBIA Colombia Chapter Contact Luis Javier Parra B Aptdo Aereo 100394 Bogota 214 0345 DENMARK Forth Interesse Gruupe Denmark Copenhagen Erik Oestergaard 1 520494 ENGLAND Forth Interest Group U K London ist Thurs 7 p m Polytechnic of South Bank Rm 408 Borough Rd Contact DJ Neale 58 Woodland Way Morden Surry SM4 4DS FRANCE French Language Chapter Contact Jean Daniel Dodin 77 Rue du Cagire 31100 Toulouse 16 61 44 03 06 FIG des Alpes Chapter Annely Georges Seibel 50 57 0280 GERMANY Hamburg FIG Chapter 4th Sat 1500h Contact Horst Gunter Lynsche Common Interface Alpha Schanzenstrasse 27 2000 Hamburg 6 HOLLAND Holland Chapter Contact Adriaan van Roosmalen Heusden Houtsestraat 134 4817 We Breda 31 76 7
19. CR Statistics CR Last Host Address CR First Target Code Address CR Last Target Code Address Dos HERE T BOFFSET 18 BOFFSET 1 THERE 100 Declare the Forward References 11 1 FORWARD DEFINITIONS FORWARD 0 Initialization Low Le 1 2 3 4 5 6 HERE ORIGIN 2 T COLD ENTRY POINT 7 8 9 0 1 and Version 1 O7Mar84map HERE ORIGIN 6 T WARM ENTRY POINT 27 0 LMOVE A0 JMP RO 256 0 14 SP LEA INIT RO 0 14 RP LEA INIT LONG D7 CLR WORD COLD 0 L LEA 1 07 MOVE 27 AO LMOVE A0 JMP 1 86 0 Initialize User Variables 13Apr84map 1 HERE UP T SET UP USER AREA 20 4 TOS 0 ENTRY LINK 3 INIT RO 256 SPO INIT RO RPO 4 0 Must be patched later 5 0 OUT 0 LINE 6 0 OFFSET 710 BASE 0 HLD 8 0 FILE 9 0 IN FILE 10 FALSE PRINTING 11 EMIT EMIT 12 13 14 15 0 nce 03Apr84nmap RERARRARRARARARTATAATATRS RSAA SRARHAAARARE TARA REE R htt ns comments and use to aes Michael Perry EER 1125 Bancroft Way Berkeley California wen 94702 mE ARERR RARRARRRAKRERERE RARE RES BARAARRRRERERRRATERARRATATEAARE 10 ARRAN KER ERR RAE ERE m Please direct all questions comments and TA eR miscellaneous personal abuse to
20. Jr 312 386 3147 Central Illinois Chapter Urbana Sidney Bowhill 217 333 4150 Rockwell Chicago Chapter Gerard Kusiolek 312 885 8092 INDIANA Central Indiana Chapter 3rd Sat 10 a m John Oglesby 317 353 3929 Fort Wayne Chapter 2nd Tues 7 p m Univ Campus B71 Neff Hall Blair MacDermid 219 749 2042 IOWA Iowa City Chapter 4th Tues Engineering Bldg Rm 2128 University of Iowa Rober Benedict 319 337 7853 Central Iowa FIG Chapter 1st Tues 7 30 p m Iowa State Univ 214 Comp Sci Rodrick Eldridge 515 294 5659 Fairfield FIG Chapter 4th day 8 15 p m Gurdy Leete 515 472 7077 KANSAS Wichita Chapter FIGPAC 3rd Wed 7 p m Wilbur E Walker Co 532 Market Ame Flones 316 267 8852 MASSACHUSETTS Boston Chapter 3rd Wed 7 p m Honeywell 300 Concord Billerica Gary Chanson 617 527 7206 MICHIGAN Detroit Ann Arbor area 4th Thurs Tom Chrapkiewicz 313 322 7862 MINNESOTA MNFIG Chapter Minneapolis Even Month 1st Mon 7 30 p m Odd Month 1st Sat 9 30 a m Vincent Hall Univ of MN Fred Olson 612 588 9532 MISSOURI Kansas City Chapter 4th Tues 7 p m Midwest Research Institute MAG Conference Center Linus Orth 913 236 9189 St Louis Chapter Ist Tues 7 p m Thomhill Branch Library Contact Robert Washam 91 Weis Dr Ellisville MO 63011 NEW JERSEY New Jersey Chapter Rutgers Univ Piscataway Nichol
21. lt gt end of the file or not WHILE DROP drop the status flag FILEBUFFER 128 DUMP FILEBUFFER do read and dump REPEAT CLOSE IT close the file CR Screen 7 Duap Worderstar word wrap file emit all Y use this in screen 4 to all of the Y Wordstar wordwrap special codes as well as the file V By scrutinizing the code you can decipher which codes it uses say for print codes etc Remember that a CR which includes Va LF will not visibly show on the screen except for action DUMP FILEBUFFER addr n OVER SWAP DO I 16 I DO 1 DUP 32 OVER 126 gt OR IF EMIT ELSE EMIT THEN LOOP 16 LOOP 16 55 12 26 86 Volume IX Number 6 15 Forth Dimensions of the advantages of using Forth in preference to other high level languages is the speed of the compiled code This speed is in large part due to the efficiency of the inner interpreter known as the NEXT loop All it has to do is fetch the address of the instruction to be interpreted IP save it in the working register W and then incre ment IP by two to point to the next instruc tion in the list The processor then falls into a section of code called NEXT1 that places the address pointed to by W into the processor s PC and the jump is made Glen B Haydon describes these functions in high level Forth terms in his book About Forth as follows NEXT IP 2 IP 1 NEXT1
22. map decompile single step trace and prompt options Trace scope can be limited by depth or address HS FORTH lacks a modular compilation environ ment One motivation toward modular compilation is that with conventional compilers recompiling an entire application to change one subroutine is unbearably slow HS FORTH compiles at 20 000 lines per minute faster than many languages link let alone compile The second motivation is linking to other languages HS FORTH links to foreign subroutines dynamically HS FORTH doesn t need the extra layer of files or the programs needed to manage them With HS FORTH you have source code and the executable file Period Development environments are cute and necessary for unnecessarily complicated languages Simplicity is so much better HS FORTH Programming Systems Lower levels include all functions not named at a higher level Some functions available separately Documentation amp Working Demo 3 books 1000 pages 6105 95 Student 145 Personal optimizer scaled amp quad integer 245 Professional 80x87 assembler turnkey 395 dynamic strings multitasker RSDL linker physical screens Production ROM Metacompiler Metawindows 495 Level upgrade price difference plus 25 OBJ modules 495 Rosetta Stone Dynamic Linker 95 Metawindows by Metagraphics includes RSDL 145 Hardware Floating Point amp Complex 95 Quad integer software floating point 45
23. 13 44 14 15 15 9 n 0 X Dumb Terminal kevboard modem tasks 17 EM 1 T local process 26 5 2 PRINTING OFF 3 OUTGOING eQUEUE IF EMITM THEN TYPE SPACE ELSE 2DRDP THEN TE APEC GUELE THEN PAUSE 4 5 BREAK 2DROP 1 BRKERROR IS 7ERROR BREAK 5 V ctrl F 5 oe MAE MA amp QUEUE IF EMIT THEN 8 i PRINT 2DROP PRINTING NOT PRINTING 3 ctrl P printer 9 KEY IF KEY OUTGOING FILTER THEN PAUSE 9 OTYPE S addr len saddr ROT ROT ACAIN 10 BOUNDS DO T OVER OUEUE PAUSE LOOP DROP 12 H QCR 5 gadde 13 SWAP OUEUE 2 12 13 12 14 14 15 15 10 0 Dumb Terminal converse quiet Z2bMayssirt 1 Converse invokes the dumb terminal detis 2 CONVERSE baud INITIALIZE INCOMING OQUEUE O X Dumb Terminal Autodialins Phone numbers 20Mav8sirt 3 OUTGOING OQUEUE MULTI MODEM WWE KEYBOARD 1 DIAL S addr len OUTGOING OUTGOING QCR 4 2 5 QUIET 5 MODEM SLEEP 1 ERROR IS ERROR ABORT 1 3 FORTH DEFINITIONS n 4 BOOK WORDS 7 ZoMayS5i rt 10 E Volume IX Number 6 17 5 This is the load block for the dumb terminal emulator This dumb terminal emulator uses the Laxen amp Perrv F83 multitasking capabilities bv defining separate keyboard and modem tasks These two tasks communicate via a FIFO queue This structur
24. 2 0 LONG ADDQ WORD 5 AO 07 MOVE 07 0 LMOVE A0 JMP to next task 6 LABEL RESTART 7 SP D MOVE drop SR SP AQ LMOVE return address e 4 AO SUBQ AO UP 0 LE MOVE Set UP to new user 9 A0 D MOVE 07 SP LMOVE Restore stack 10 SP 3 07 MOVE 07 RP LMOVE Return stack 1 SP D MOVE D7 LMOVE Restore IP NEXT C 12 13 4E47 ENTRY TRAP 7 DECIMAL 14 ENTRY LINK only task points to itself 15 23 0 N Manipulate Tasks 08JANS4MAP 1 2 LOCAL S base addr addr UP 3 ELINK 5 addr LINK 4 ILINK 5 addr LINK 2 5 SLEEP S 44 AEF8 SWAP ENTRY LOCAL 6 5 4 47 SWAP ENTRY LOCAL 1 7 STOP 8 SLEEP PAUSE 8 SINGLE 5 1 PAUSE BODY PAUSE 9 MULTI 5 30 9 9c 1 RESTART 9E 11 141 PAUSE 8 PAUSE 12 DECIMAL 13 Continued page 37 Volume IX Number 6 EDUCATING FORTH USERS BILL KIBLER SACRAMENTO CALIFORNIA RN the past few years I have been studying and trying to use Forth I still remember my first experiences with the language and the frustration Although I had read all the material with the program and had picked up a book I was amazed with how easily I got lost I had learned enough to consider Forth a language for me but was finding it a bit too cryptic to start using Time has passed and I have learned more about usin
25. DEC BF MOV 54 MOV SI DX JMF NEXT DOCOL INC BX INC EX DEC BF DEC MOV EFI SI MOV SI RX JMF NEXT WORD FTR EX WORD FTR 8X Figure Two MVP FORTH NEXT FIG 5 NEW Figure Four fig FORTH and MVP FORTH DOCOL and new version Volume IX Number 6 FORTH SOURCE WISC CPU 16 The stack oriented Writeable Instruction Set Computer WISC is a new way of harmonizing the hardware and the application program with the Opcode s semantic content Vastly improved throughput is the result Assembled and tested WISC for IBM PC AT XT 1500 Wirewrap Kit WISC for IBM PC AT XT 900 WISC CPU 16 manual 50 MVP FORTH Stable Transportable Public Domain Tools You need two primary features in a software development package a stable operating system and the ability to move programs easily and quickly to a variety of computers MVP FORTH gives you both these features and many extras MVP Books A Series Vol 1 Ail about FORTH Glossary 25 C Vol 2 MVP FORTH Source Code 20 Vol 3 Floating Point and Math 25 Vol 4 Expert System 15 Vol 5 File Management System 25 Vol 6 Expert Tutorial 15 Vol 7 FORTH GUIDE 20 C Vol 8 MVP FORTH PADS 50 Vol 9 Work Kalc Manual 30 MVP FORTH Software A trans portable FORTH MVP FORTH Programmer s Kit including disk documentation Volumes 1 2 amp 7 of MVP Series FORTH Applica
26. Defining Words 19DEC85rje VARIABLE UP LABEL DOCONSTANT SP MOVE NEXT LABEL DOUSER VARIABLE DO MOVE UP BPAGE L DO ADD DO SP MOVE NEXT CODE LIT 5 IP SP MOVE NEXT END CODE 100 Identify numbers and forward References 20DEC85rje HEX FORWARD lt CODE gt T DOES S FORWARD CODE HERE T 4 9 T JSR L OP CODE FORTH BPAGE LITERAL HW of address ASSEMBLER DODOES LITERAL T T LW of address NUMERIC 5 FORTH HERE NUMBER DPL 8 1 IF TRANSITION DLITERAL META ELSE DROP TRANSITION LITERAL META THEN UNDEFINED S HERE T 0 T IN FORWARD FORTH CREATE META TRANSITION FORTH FALSE DOES gt FORWARD CODE DECIMAL 107 Execution Control ASSEMBLER NEXT META CONSTANT gt NEXT 19DEC85rje CODE EXECUTE S cfa SP 07 MOVE 07 W LMOVE 07 MOVE D7 A0 LMOVE 0 JMP END CODE CODE PERFORM S cfa addr SP 07 MOVE D7 W LMOVE 07 MOVE W D7 MOVE D7 A0 LMOVE A0 JMP END CODE LABEL DODEFER 5 PERFORM 4 BPAGE LK JMP LABEL DOUSER DEFER S W 07 MOVE UP L D7 ADD PERFORM 24 BPAGE JMP CODE GO 5 daddr RTS END CODE CODE NOOP NEXT END CODE CODE PAUSE NEXT END CODE D7 W LMOVE 131 Task Dependant USER Variables USER DEFINITIONS VARIABLE TOS VARIABLE ENTRY VARIABLE MPAGE VARIABLE LINK 08FEB86rje TOP OF STACK ENTRY
27. O Box 46 Augusta ME 04330 207 547 3218 Forth Dimensions I certainly agree that authors whose code s performance relies on assembly routines should also provide high level Forth definitions for publication F83 spe cific code as you can see in this issue will remain as long as many of our readers find it useful or educational We optimistically believe that even most of the system spe cific code we publish has value in terms of learning from others techniques And if you also learn a little about how a different Forth dialect or implementation works all has not been lost Still we do give prefer ence to work that is generalized for our readership without losing its pizazz As for the debate over structured programming let its proponents defend themselves if they care to Ed Ailing Acronyms Dear Marlin A minor nit pick a Forth word may contain a name field link field code field and parameter field Because Forth so often keeps track of items by putting their ad dresses on the stack we frequently talk about the addresses of those fields the name field address NFA link field ad dress LFA code field address CFA and parameter field address PFA Many Forth writers and conference speakers confuse the two concepts say ing for example that the value of a con stant is stored in its If we can suc cessfully talk to computers which do exactly what w
28. POINT CONTAINS MACHINE CODE HIGHWORD MEMORY PAGE ADDR FOR OPCODE LINK TO NEXT TASK VARIABLE SPO INITIAL PARAMETER STACK VARIABLE RPO INITIAL RETURN STACK VARIABLE DP DICTIONARY POINTER VARIABLE NUMBER OF CHARACTERS EMITTED VARIABLE LINE THE NUMBER OF LINES SENT SO FAR VARIABLE OFFSET RELATIVE TO ABSOLUTE DISK BLOCK 0 VARIABLE BASE FOR NUMERIC INPUT AND OUTPUT VARIABLE HLD POINTS TO LAST CHARACTER HELD IN PAD VARIABLE FILE POINTS TO FCB OF CURRENTLY OPEN FILE VARIABLE IN FILE POINTS TO FCB OF CURRENTLY OPEN FILE 137 Devices Strings 19 85 1 LABEL gt UPPER 06 gt D6 BYTE ASCII 06 gt IF ASCII 2 06 lt IF BL 06 SUBI THEN THEN RTS CODE CAPS COMP S addrl addr2 len 1 0 1 SP 00 MOVE 1 DO ADDQ SP 07 MOVE D7 A0 LMOVE SP D7 MOVE D7 Al LMOVE LABEL FILE HEADER BEGIN 1 00 SUBQ 0 lt WHILE Al D6 MOVE gt UPPER BPAGE L JSR D6 Dl MOVE BOFFSET ic DP T Load Target dictionary ptr with tstart AO D6 MOVE UPPER L JSR Dl 06 CMP WORD 0 IF 0 lt IF 1 SP MOVE ELSE 1 SP MOVE THEN 601A T 0000 T 6000 0000 T 0000 T 0000 T 0000 T NEXT THEN 0000 T 0000 T 0000 T 0000 T BPAGE T BOFFSET T REPEAT SP CLR NEXT END CODE FFFF T DECIMAL COMPARZ S addrl addr2 len 0 1 CAPS 8 IF CAPS COMP ELSE COMP THEN 2 Forth D
29. Pc This article proposes to demonstrate how two existing 8086 implementations fig FORTH for IBM PC 1 0 and MVP FORTH version 1 0305 03 can be made to run faster by decreasing the NEXT loop overhead It involves changing a few other portions such as DOCOL DOCON DOVAR DODOES DOUSE and EXEC but the in creased speed of the loop seems well worth the effort If you are running Forth on a different processor you should be able to make similar changes with similar results Figures One and Two show assembly source code for the fig FORTH and MVP versions of the NEXT loop im Forth Dimensions fig F ORTH Forth 79 FASTER NEXT LOOP plementation The LODSW instruction in the fig FORTH version does what the first three instructions of the MVP FORTH version do The source index register SI on the 8086 is used as the interpreter pointer AX and BX are used as general purpose registers and DX is assigned as the Forth working register W Both versions pick up the address of the instruction to be interpreted increment IP and then jump to the definition And both increment the working register W by one before making the jump The other required increment is deferred to the defining word interpreters DOCOL DOCON DOVAR DO DOES and DOUSE This was probably CARL A WENRICH TAMPA FLORIDA done to allow for byte boundary address ing upon entry to new defining word routines But I have ye
30. SD 60 bl 9 7 00 00 00 00 28 29 3t 3D 50 51 65 70 71 72 73 74 7 78 79 DECIMAL gt 14 00 00 00 00 00 00 00 00 00 00 0 00 00 00 00 00 00 00 00 00 2B 2 20 2E 2F 30 31 32 35 JF 40 41 42 44 44 45 46 47 33 54 39 96 37 58 59 5B 67 68 69 bB OC OF 78 7C 7D 00 WRAP gt gt Volume IX Number 6 wrapped file Should you want to actually place say printer codes in the data you transmit you can place the appropriate hex value within the lookup table For example the value 01 hex is used for boldface printing Therefore by placing 01 in the second value in the lookup table the second 00 currently to the right of lt lt on line 2 of screen 3 the dump would emit the symbol for 01 hex If your data were going to a remote printer on the other end of a modem after going through a Screen 4 Duap Wordstar word wrap file HEX DUP 16 55 12 26 86 WRAPCASE use lookup table to action Wordstar codes receiving program that printer would start printing in boldface assuming the program were set up to action WordStar codes In order to send this data byte by byte out the serial port use an output word in place of the word EMIT If your system has the facility to redirect output from the con Sole to the serial port en masse this is also a choice I prefer the byte method because I feel I have more direct control of the ma chine To use this facil
31. Shape and other forms of movement notation MH What is Effort Shape MT The quality of movement as opposed to where the limbs go Forexample are you bursting that is are you letting one muscle carry the action without inhibiting it with the antagonistic muscle I ve taught several forms of movement notation and I ve also taught some aspects of nonverbal communication and anatomy for dancers MH What was anatomy for dancers MT It s the owners manual and operating guide for the body what you re designed to do what is a violation of that how things work how you keep them working To wards the end I tailored it specifically for dancers and martial artists Dancing is pri marily a world of women and martial arts primarily a world of men but the bodies are very much alike so with the combination I could attract a fairly large number of stu dents interested in either of those two MH And they both have to know how to move Yes and the contrast is just as inter esting as the similarity MH Do you have a background in martial arts MT I have had seventeen years of various Chinese styles Volume IX Number 6 MH How did dance enter your We don t have a culture that directs people toward dance by and large MT When I was around 15 a girl friend asked me to come and help her out in her dance recital I knew nothing about it but I went and helped her by
32. T 15 ASSEMBLER DODOES LITERAL IMMEDIATE 6 NUMERIC 5 84 1 FORTH HERE IKETA NUMBER DELE 1 IE N Initialization High Level 19Apr84map 8 1 TRANSITION DLITERAL META 1 1 CONSTANT INITIAL 9 ELSE DROP TRANSITION LITERAL META THEN 2 Ok 8 10 UNDEFINED 8 START 11 HERE T 0 T nate 12 IN FORWARD FORTH CREATE TRANSITION Ree DEFAULT 13 FORTH FALSE META 5 14 DOES FORWARD CODE 9 256 UM MOD NIP 1 DECIMAL U Pages 15 DECIMAL 8 9 10 Volume IX Number 6 23 Forth Dimensions 85 ASSEMBLER WARM 0 L LEA D7 MOVE The Rest Sile AA AER E ERE 0 1 2 3 4 5 6 7 8 9 Please direct all questio miscellaneous personal ab ION Henry Laxen vas 1259 Cornell Avenue ats Berkeley California 100 94706 11 12 enna hana 13 93 Rest is Silence 94 Target System Setup ONLY FORTH META ALSO FORTH HEX 00F2 CONSTANT BPAGE 0500 CONSTANT BOFFSET IN META DECIMAL 2 92 THRU HEX CR Unresolved references
33. Time slice and round robin multitaskers 75 GigaForth 80286 386 Native mode extension 295 HARVARD SOFTWORKS PO BOX 69 SPRINGBORO OH 45066 513 748 0390 Forth Dimensions Forth 83 A few modem I O programs have been published in Forth Dimensions JAM85 ERI84 ACK83 These have provided good examples of serial line interface ba sics Armed with this knowledge here is a slightly more advanced terminal emulator designed to be a useful terminal package and to serve as an example of a Forth multitasking application One useful feature of using a computer to emulate a dumb terminal is the ability to do local processing Services such as auto matic dialing phone lists and file upload download at your fingertips can make sit ting at a slow modem more tolerable This can be a touchy thing to program however since the real time nature of amodem pack age requires that a local process run to completion within a character time If this restriction is violated the modem may lose incoming data Forth s asynchronous approach to multitasking provides a very fast context switch between tasks Often this is just a few machine instructions and can be as fast asa busy high level Forth loop A termi nal emulator is usually coded as just an infinite loop passing characters back and forth from modem to console The code in screen 9 shows two tasks which could be written as one BEGIN AGAIN loop but instead
34. allows use of an existing file 10 MORE is used to add 10 screens and 30 CREATE FILE NAME BLK opens 30 screens INDEX displays a list of line 0 1 20 INDEX will list screens 1 to 20 1 30 SHOW will print 6 screens to a page on your printer in condensed mode use EPSON IS INIT PR for epson printers 1 30 TRIAD prints three to a page if condensed print is not available 1 30 SHADOW SHOW will print both the L SCR 8 TUTOR BLK THIRD PRINT SCREEN OF TUTOR INFORMA regular screens and the information screens on a page not used in TUTOR but in UTILITY BLK SEE xxxx disassembles the word xxxx while VIEW will open the source file on A drive and list the screen it is in VOCS will list the vocabularies in the dictionary while ORDER displays the path of the directory search Use DOS WORDS to see a list of the DOS dictionary words CAPACITY will print the number of screens a open file L will toggle between the shadow and the source screens will display the next screen L will list cur rent screen B L will list previous screen 1 EDIT will invoke the line editor with screen 1 ready to edit 0 NEW will start editing at line 0 and allow the text to be entered one line after the other HEX 100 80 DUMP will do a hex dump of memory location 100h to 180h DEBUG LIST will allow stepping through list when used next as in 1 LIST Use BYE to exit to DOS NL scr 9 TUTOR BLK last intro screen with list of words
35. are really only concerned with characters represented by ASCII 32 126 but includ ing 13 and 10 which make up the carriage Volume IX Number 6 FILES return If WordStar included only these codes we would just need to get into DOS read a sector of the disk file output that sector and repeat until we exhaust the file As stated the control codes used by Word Star cause a big problem But anything can be solved in Forth right As a matter of fact within a word wrapped file WordStar uses a great many codes from ASCII 160 254 and AO FE among others in addition to the standard codes mentioned above the ones we d Anything be solved in Forth right like to use by themselves but can t The trick therefore is to use a lookup table to determine which character to output Ihave provided seven screens of code in PAUL A COOPER CHATSWORTH CALIFORNIA LMI s PC Forth version 3 1 It will be necessary for readers using another system to incorporate their version of the assem bler and DOS interface LMI provides its customers with a quick disk interface which speeds up sector access greatly Screen 1 contains an assembly lan guage word INDARR that sets up indexed user arrays In our case we use this array to set up a 254 section lookup table in screen 3 appropriately named WRAP The code words lt lt and gt gt mark the stack top for the array then mark
36. cannot do this for business owners norcan the Forth Vendors Group You have to make it happen The advantages to asso ciation must be shared by all but a strong business association relies on strong busi ness members One final aside I suggest it is time for the comatose Forth Vendors Group to be taken off its support systems if any Have a brief post mortem exam then reorganize It s springtime in the northern hemisphere at least and a good time for new begin nings Give the entity a decent public burial and see what crops up Maybe someone will propose a comfortable way for the FVG to organize under FIG to ensure con tinuity communication useful agendas and to ease the administrative tasks What ever its form the vendors need it and the Forth community needs it Aarlin Ouverson Editor Forth Dimensions Published by the Forth Interest Group Volume IX Number 6 March April 1988 Editor Marlin Ouverson Advertising Manager Kent Safford Design Production Berglund Graphics ISSN 0884 0822 Forth Dimensions welcomes editorial mate rial letters to the editor and com ments from its readers No responsibility is assumed for accu racy of submissions Subscription Forth Dimensions is in cluded with membership in the Forth Interest Group at 30 per year 42 overseas air For membership change of address and to submit items for publication the address is Forth Inter est Group P O Box 823
37. cfa words are easily implemented And code words become incredibly powerful with multiple entry points not requiring jumps over word fragments One of many reasons our system is much more compact than itsimmense dictionary 1600 words would imply INCREDIBLE FLEXIBILITY The Rosetta Stone Dynamic Linker opens the world of utility libraries Link to resident routines or link amp remove routines interactively HS FORTH preserves relocata bility of loaded libraries Link to BTRIEVE METAWIN DOWS HALO HOOPS ad infinitum Our call and data Structure words provide easy linkage HS FORTH runs both 79 Standard and Forth 83 pro grams and has extensions covering vocabulary search order and the complete Forth 83 test suite It loads and runs all FIG Libraries the main difference being they load and run faster and you can develop larger applica tions than with any other system We like source code in text files but support both file and sector mapped Forth block interfaces Both line and file loading can be nested to any depth and inciudes automatic path search FUNCTIONALITY More important than how fast a system executes is whether it can do the job at all Can it work with your computer Can it work with your other tools Can it trans form your data into answers A language should be complete on the first two and minimize the unavoidable effort required for the last HS FORTH opens your computer like no other lan g
38. compile F83 to run from any location in RAM under CP M 68K you can keep several distinct Forth kernels in memory at the same time Gump EDUCATING FORTH USERS BY BILL KIBLER 27 Would your first encounter with Forth have been different if it came with an on line tutor to help with system functions or to provide customized exercises linked to the chapters in Starting Forth Here is a way to get users up and running mi PROFILES IN FORTH MARTIN TRACY 31 Martin Tracy is natural leader and expert programmer until recently a Forth vendor and is a current member of the Forth Interest Group s Board of Directors ES CHARLES MOORE S FIRESIDE CHAT REVIEWED BY SCOTT SQUIRES 30 perennially favorite event at the National Forth Convention is the Fireside Chat by Mr Charles Moore creator of Forth Here Scott Squires shares the notes he took as he listened to the informal session EDITORIAL ADVERTISERS INDEX 4 6 LETTERS FIG CHAPTERS 5 38 VOLUME EIGHT INDEX BY MIKE ELOLA Volume IX Number 6 3 Forth Dimensions I went to this year s MacWorld Expo in San Francisco hoping to save big bucks on a hard disk not because I expected to find much relevant to these pages And after elbowing my way through the gridlocked aisles comparing prices and finding my purchase at a retail booth that resembled a Wall Street trading pit during last October s frenzy I cared less about scan
39. however they diverged from their original goal of portability by imposing an addressing restriction on their Forth Dimensions code his restriction torced their implem entation to work only in the lowest 64K of the 68000 s address space As a result only systems with RAM memory atthis location could run it Many machines however have their ROM memory located in this region and their RAM memory elsewhere in the 16Mb address space Figure One displays the memory map of such a com puter the Hewlett Packard 9000 Family 200 Series Technical Workstation L amp P implemented part of this construct Fortunately a study of F83 s source code revealed a means to extend the system s addressing with minor impact on code size and efficiency This extended addressing would enable the programmer to target the compiled code to any 64K bounded area henceforth described as a page of memory For the 68000 each page of memory has a unique highest address byte value The hex address representation is YYYY where XX represents the unique page address and Y Y Y Y represents the local address within that particular page For example the first addressable page starts at 00 0000 the second at 01 0000 and the last at 0000 By constraining the Forth system to exist between these pages of memory the original F83 s addressing can be used with minimal address conversion overhead The conversion invo
40. mostly in the Orient in Japan and Taiwan I did dance a bit in Texas and New York City I danced with the Ameri can Festival Ballet Radio City Music Hall West Side Story tours MH Did you ever have any direct overlap of your Forth experience and dance I m thinking of Labanotation for instance Labanotation or the Laban system is a somewhat recondite system for writing down the movements of a dance ed MT Yes in fact I m a Labanotation in structor I taught that for several years My master s thesis was a computer assisted movement notation system Based on Labanotation MT I did bring Labanotation into it but it Forth Dimensions turns out that the muscles and bones can be modeled fairly accurately mathematically and even Labanotation has at its heart a model of the body easily transposed into computer terms In fact I held a panel on computer dance around 1975 in Philadel phia partof the conference for the Commit tee on Research in Dance But that was peripheral to my interest it turned out that I really wasn t interested in combining computers and dance MH When you set up MicroMotion you quickly released other versions of your Forth MT MicroMotion still exists as a com pany it s just that I am no longer associated with it After the Apple we went to the Z 80 then the Commodore 64 then the IBM PC then Ray Talbot produced a Macintosh MasterForth for us During tha
41. now to see MH What kinds of activities do you see for a professional support organization Is there a model for it or is it something we have to create as we 207 MT The model I have in mind is some where between a professional society anda public relations firm Certainly one of the things FIG can do for Forth is to promote name recognition of the Forth language To me it seems strange that there is an organi zation for Forth To me a language is always the thing that gets in the way be tween you and the problem some get in the way less than others What I like about Forth is that it doesn t get very much in the way of solving the problem But it does get in the way I mean if I want to measure the temperature of a lamp and you tell me I have to learn to type that s a skill that I don t need To me the language is interesting in its ability to let me solve my problem and leave me in peace as I do so One of the things that attracts me to Forth is that it lets me do so But I think if I were a manager and you said Come join the Forth Interest Group or Come see Forth at the Forth convention I would ask Why But if you said Come and see a good solution to solving real world real time programs on existing hardware at the Forth Forth Dimensions convention or Join the Forth Interest Group to learn more about solving such problems that would be appealing MH So i
42. testing and debugging custom hardware Provides hexadecimal display of the data address and B port Indicates status of reset interupt WEB WED and X port Provides for free running and single step clocking Provides the ability to independently drive write to the data address and B port directly with user data board available 2nd quarter 1988 for serial communication interupt handling event timing time and date logging and saving system state parameters Two RS232 serial ports Eight level prioritized interupt controller Each interupt line is individually maskable and resetable Current pending interupt status is readable Real time clock with 2K of non volatile RAM Three 16 bit timer counters Extended Memory board available 3rd quarter 1988 Paged memory 64 Kbytes segments up to eight segments Card Cage amp Power Supply available 3rd quarter 1988 Rack mountable card cage with face plates for each slot 5 volts and 12 volts supplied 72 Pin backplane Disk Drive Controller board available 3rd quarter 1988 3 1 2 inch floppy and SCSI controllers for hard disks Video board available 4th quarter 1988 Will drive Apple Macintosh II high resolution 640 x 480 monochrome monitor and PC compatible monochrome monitors A D amp D A board available 4th quarter 1988 12 bit 1 MHz A D amp D A converters Future Inc 10386 Blacksburg 24062 0386 703 552 1347 A
43. the problem of implementing large data files which are to be sent to another device other than a local printer or video display while directly in Forth It s relatively easy to use an editor util ity and many of them are on the market Today one finds a plethora of word proces sor utilities available but a survey I did recently showed that the preponderance of those in use has the name you guessed it WordStar The ubiquitous WordStar is a difficult learning experience for most and one which when learned is almost impossible to remove from one s use That being said let s assume for the purposes of discussion that you love the utility and at the same time you use Forth quite a bit too Well you ve probably found that from time to time you d like to access a WordStar file directly while inside Forth That s exactly the situation I found myself in because I wanted to be able to send data files over serial lines or over the air via amateur radio bands And I wanted to do it while in Forth because Forth is my language of choice But I knew there wasa problem with this because WordStar uses strange little codes embedded in the text filesto make wonderful little things happen atthe printer and console I had to devise a way to read those codes and either use or discard them And I realized that this situ ation would be magnified if I wished to use a word wrapped file In the transmission of ASCII data we
44. 1 San Jose California 95155 Administrative offices and advertising sales 408 277 0668 Copyright 1987 by Forth Interest Group Inc The material contained in this periodical but not the code is copy righted by the individ ual authors of the articles and by Forth Interest Group Inc respectively Any reproduction or use of this periodical as it is compiled or the ar ticles except reproductions for non commer cial purposes without the written permission of Forth Interest Group Inc is a violation of the Copyright Laws Any code bearing a copyright notice however can be used only with permis sion of the copyright holder About the Forth Interest Group The Forth Interest Group is the association of programmers managers and engineers who create practical Forth based solutions to real world needs Many research hardware and soft ware designs that will advance the general state of the art FIG provides a climate of intellectual exchange and benefits intended to assist each of its members Publications conferences semi nars telecommunications and area chapter meetings are among its activities Forth Dimensions is published bi monthly for 30 42 per year by the Forth Interest Group 1330 S Bascom Ave Suite D San Jose CA 95128 Second class postage pending at San Jose CA 95101 POSTMASTER Send address changes to the Forth Interest Group P O Box 8231 San Jose CA 95155 Volume IX Number 6
45. 13104 IRELAND Irish Chapter Contact Hugh Dobbs Newton School Waterford 051 75757 051 74124 ITALY FIG Italia Contact Marco Tausel Via Gerolamo Forni 48 20161 Milano 02 435249 JAPAN Japan Chapter Contact Toshi Inoue Dept of Mineral Dev Eng University of Tokyo 7 3 1 Hongo Bunkyo 113 812 2111 ext 7073 NORWAY Bergen Chapter Kjell Birger Faeraas 47 518 7784 REPUBLIC OF CHINA Contact Tzeng 28 Lung Tan Taiwan 325 SWEDEN Swedish Chapter Hans Lindstrom 46 31 166794 SWITZERLAND Swiss Chapter Contact Max Hugelshofer ERNI amp Co Elektro Industrie Stationsstrasse 8306 Bruttsellen 01 833 3333 SPECIAL GROUPS Apple Corps Forth Users Chapter Ist amp 3rd Tues 7 30 p m 1515 Sloat Boulevard 2 San Francisco CA Dudley Ackerman 415 626 6295 Baton Rouge Atari Chapter Chris Zielewski 504 292 1910 FIGGRAPH Howard Pearimutter 408 425 8700 NC4000 Users Group John Carpenter 415 960 1256 Forth Dimensions Forth Symposium Sydney 19 20 Organized by Forth users from industrial and academic organizations the focus is Forth as a programming system for productivity It will feature presented papers demonstrations and commercial exhibits Charles Moore Forth s inventor is the keynote speaker World Expo 88 Brisbane May 21 24 The highlight of Australia s Bicentenary celebration World Expo
46. 88 features more than 30 nations and 20 corporations showcasing their achievements under the theme Leisure in the Age of Technology Great Barrier Reef Hamilton Island May 25 27 You can fish waterski parasail scuba dive snorkel play tennis or squash cruise sail visit the Great Barrier Reef by helicopter or launch or just soak up the sun around the Pacific s largest fresh water swimming pool Make reservations directly with Silicon Valley Travel Inc 100 68 West El Camino Real Mountain View CA 94040 Telephone 415 962 9820 Australia 2550 Group Tour Departs San Francisco May 16 1988 and returns May 28 1988 Group travel includes air fare ground transportation between airports and hotels and hotel accommodations Forth Symposium attendance is an additional 70 for each attendee and symposium banquet attendance is 20 per person Local tours will be arranged for non conference guests A brochure with a complete itinerary and additional information is available from the Forth Interest Group or Silicon Valley Travel Inc Payment must be received by March 31 1988 After this date trans Pacific fares will increase by 150 per person which will increase the tour price to 2700 Forth Interest Group P O Box 8231 San Jose CA 95155
47. ADR LEN ADR 28 LEN 28 HIDE s LAST DUP NDLINK 8 SWAP CURRENT HASH 3 1 SWAP 1C SWAP OVER DUP 1C ERASE REVEAL 5 LAST DUP NDLINK SWAP CURRENT HASH 4 601A OVER 4 HERE OVER 14 500 OVER 2 ON 2 DECIMAL 1 USES S R gt LAST NAME gt t 5 68K HEADER IS HEADER VOCABULARY ASSEMBLER 6 SAVE S Addr len USES 5 CSP COMPILE USES COMPILE 7 FCB2 DUP FCB DUP DELETE DROP DUP MAKE FILE ROT HEADER REVEAL ASSEMBLER 2 IMMEDIATE 8 BOUNDS DO I SET DMA DUP WRITE 128 LOOP CLOSE CODE S R gt LAST NAME gt gt 9 FORTH DEFINITIONS 7 CODE 5 CSP COMPILE CODE COMPILE 10 MORE S n pos REVEAL ASSEMBLER IMMEDIATE HEX 11 1 CAPACITY SWAP DUP 8 FILE MAXREC BOUNDS DOES S COMPILE CODE 4EB9 JSR 12 DO I BUFFER B BUF BLANK UPDATE LOOP DECIMAL FORTH BPAGE META LITERAL HW 13 SAVE BUFFERS FILE 8 CLOSE ASSEMBLER DODOES LITERAL LW 14 CREATE FILE S tbhlocks 2 IMMEDIATE 15 Dos FCB2 DUP FILES DUP FCB MAKE FILE MORE 177 0 Initialization High Level JOJANS6rje 9 The Rest is Silence O3Apr84map 1 9349 933 23424A amp FAXRARREARTVEXE REST RARARERSRRARWRRASSEARAEERRRRATARARAM 1 CONSTANT INITIAL 2 s snesscnahesecaestadunshasecaoe eCESESSESESESOSESS SSS SY BPAGE CONSTANT BPAGE 3 BOFFSET CONSTANT BOFFSET 4 Please direct all questions comments and 5 4 misc
48. DDRESS ose 1259 Cornell Avenue 1125 Bancroft Way 24 HERE ORIGIN 4 LOW WORD COLD ENTRY POINT ADDRESS 9 Berkeley California Berkeley California TaS INIT RO L RP LEA 10 94706 94702 256 L SP LEA 141 884 LONG 0 BPAGE D7 MOVE WORD LOAD D7 W BASE PAGE ADDRESS 12 ARR ER EMER ERA EERE EERE COLD BPAGE 1 LEA 13 99544422444 4392424 952 4ARKVGAGEPARARASARARAEREARARARSAAAKARARAA 07 MOVE 27 AO LMOVE AQ JMP 14 179 3 Initialize User Variables OBFEBB6rje 0 68000 Assembler Load Screen 13Apc84map UP T 0 TOS Set up User Area 1 ONLY FORTH ALSO DEFINITIONS 0 ENTRY 2 1 14 THRU BPAGE MPAGE 3 LINK 4 NEXT gt JMP INIT RO 256 SPO Place the Stack 8 24 INIT 1 ASSENALER WORD ij INIT RO RPO 256b above Return Stack ONLY TORTH ALSO DEFINITIONS 0 Must patched later M 4OUT 8 HEX 4 8 CONSTANT DOES OP DECIMAL 0 LINE 9 4 CONSTANT DOES SIZE 0 OFFSET 10 DOES S IP IP F 10 BASE Come up in Decimal i DUP DOES SIZE SWAP 8 DOES OP 2 Pilz 13 LABEL CREATE ASSEMBLER ASSEMBLER INIT H 0 IN FILE 14 CODE CODE ASSEMBLER INIT FALSE PRINTING EMIT EMIT 19 0 19 Y 0 N Vocabulary Range test 02Apr84map 1 VOCABULARY B
49. E wane TORRE 8 ASSEMBLER DEFINITIONS META LONG 9 H NEXT META ASSEMBLER NEXT JMP 8 DO HERI MOVE LONG 7 00 REG BUF MOVEM lt NEXT END CODE 10 IN META 3 DECIMA 11 DUP 100 CURRENT T harmless 10 KEY 5 f 9 2 5 9 gt E 12 VOCABULARY FORTH FORTH DEFINITIONS 11 KEY S char 13 0 OVER 2 T link 12 BEGIN PAUSE KEY UNTIL 0 3 BIOS i 14 DUP 2 SWAP 16 T thread 13 CONSOLE S char 15 14 PAUSE 4 BIOS DROP 1 WOUT 15 5 0 Run Time Code for Defining Words O7Mar84map 7 VARIABLE UE 0 N Extensible Layer Defining Words 21Dec83map 2 LABEL DOCONSTANT arca spa csr 1 3 SP MOVE NEXT d ais t x 4 LABEL DOUSER VARIABLE 765 s a orn CSP lt gt ABORT Stack Changed i 5 W DO MOVE UP DO ADD 20 SP MOVE NEXT T 1 5 6 CODE LIT 5 n IP SP MOVE NEXT END CODE S SERT e SHAR CURRENT E HASH d od 6 LAST DUP N gt LINK SWAP CURRENT HASH 9 7 USES 8 R gt 8 LAST NAMED 8 VOCABULARY ASSEMBLER 1 9 USES 5 CSP COMPILE USES 0 Identify numbers and forward References 08Jan84nmap 1 peopel ia ye TR Mum VAMEP AR ee 1 HEX pi z8 12 CODE 5 CSP COMPILE CODE E aes 13 COMPILE REVEAL ASSEMBLER IMMEDIATE HEX 14 DOES gt 5 COMPILE CODE 4EB8 JSR DECIMAL 4 FORWARD CODE HERE T S 5 4EB8 T ASSEMBLER DODOES LITERAL T
50. GE DECIMAL DEBNEXT L JMP NEXT 1 LONG MOVE WORD gt NEXT 4 BPAGE L MOVE NEXT C 49 Multitasking low level 1OFEBS6rje CODE PAUSE 5 IP SP MOVE to stack RP SP MOVE RP to stack UP BPAGE L 07 MOVE 07 A0 LMOVE SP 0 MOVE SP to USER area 4 A0 LONG ADDQ WORD AQ 07 MOVE D7 LMOVE AO JMP to next task C LABEL RESTART 5 SP 07 MOVE drop SR SP AO LMOVE return address 4 AO SUBQ AO UP BPAGE L MOVE Set UP to new user 0 07 MOVE D7 SP LMOVE Restore stack SP 07 MOVE D7 RP LMOVE Return stack SP 07 MOVE 07 IP LMOVE Restore IP NEXT 4 47 CONSTANT TRAP 0027 CONSTANT TRAP7VECTOR 4EF9 CONSTANT JMPL TRAP ENTRY ENTRY LINK DECIMAL 59 Manipulate Tasks OBFEBB6r je HEX CODE INSTALL VECTOR S new vector old 16 MOVEQ func SP D1 MOVE SP 02 LMOVE 3 TRAP DO SP LMOVE NEXT LOCAL S base addr addr UP 6 i gt LINK addr LINK ILINK S addr LINK SLEEP 8 addr JMPL4 SWAP ENTRY LOCAL gt WAKE addr TRAP SWAP ENTRY LOCAL 5 STOP 8 UP SLEEP PAUSE SINGLE S 1 PAUSE gt BODY PAUSE 2 MULTI 5 RESTART BPAGE TRAP7VECTOR amp INSTALL VECTOR 2DROP PAUSE 8 PAUSE DECIMAL 15 N The Rest is Silence 10 86 16
51. K INC BX MOV AX CEEX MMSFORTH is the unusually smooth JME AFUSH and complete Forth system with the great support Many programmers report four to ten times greater productivity with this outstanding system and MMS provides advanced applications pro grams in Forth for use by beginners and for custom modifications Unlike many Forths on the market MMSFORTH gives you a rich set of the instructions editing and debugging tools that professional programmers want The licensed user gets continuing free phone tips and a MMSFORTH Newsletter is available Figure Five fig FORTH and MVP FORTH DOCON and new version The MMSFORTH GAMES DISK includes DOVAR INC DX FIG 8 arcade games BREAKFORTH CRASH FORTH and for 5 80 CEE FUSH DX board games OTHELLO TIC TAC FORTH and top notch CRYPTO JMF NEXT QUOTE HELPER with a data file of coded messages and the ability to en e d 2 code your own these come with DOVAR I NC BX NEW Forth source code for a valuable and INC EX enjoyable demonstration of Forth pro o gramming techniques FUSH HX Hurry and the GAMES DISK will be our JMF NEXT free gift to you Our brochure 15 free too and our knowledgeable staff is ready to answer your questions Write Better yet 617 653 6136 Figure Six fig FORTH and MVP FORTH DOVAR and new version 7 gift DQOUSE INC DX
52. L Wilson 602 956 7578 Tucson Chapter 2nd amp 4th Sun 2 p m Flexible Hybrid Systems 2030 Broadway 206 John Mead 602 323 9763 ARKANSAS Central Arkansas Chapter Little Rock 2nd Sat 2 p m amp 4th Wed 7 p m Jungkind Photo 12th amp Main Gary Smith 501 227 7817 CALIFORNIA Los Angeles Chapter 4th Sat 10 a m Hawthorne Public Library 12700 S Grevillea Ave Phillip Wasson 213 649 1428 Monterey Salinas Chapter Bud Devins 408 633 3253 Orange County Chapter 4th Wed 7 p m Fullerton Savings Huntington Beach Noshir Jesung 714 842 3032 San Diego Chapter Thursdays 12 noon Guy Kelly 619 450 0553 Sacramento Chapter 4th Wed 7 p m 1798 59th St Room A Tom Ghormley 916 444 7775 Silicon Valley Chapter 4th Sat 10 a m H P Cupertino George Shaw 415 276 5953 Stockton Chapter Doug Dillon 209 931 2448 FIG CHAPTERS COLORADO Denver Chapter 14 Mon 7 p m Clifford King 303 693 3413 CONNECTICUT Central Connecticut Chapter Charles Krajewski 203 344 9996 FLORIDA Orlando Chapter Every other Wed 8 p m Herman B Gibson 305 855 4790 Southeast Florida Chapter Coconut Grove area John Forsberg 305 252 0108 Tampa Bay Chapter 1st Wed 7 30 p m Terry McNay 813 725 1245 GEORGIA Atlanta Chapter 3rd Tues 6 30 p m Western Sizzlen Doraville Nick Hennenfent 404 393 3010 ILLINOIS Cache Forth Chapter Oak Park Clyde W Phillips
53. MARCHIAPRIL 1988 5 00 VOLUME IX NUMBER ae UCATING FORTH USERS ED SUPERFAST FORTH SYSTEMS AT FORCE COPROCESSOR 10 E E o 5 50 FORTH MIPS LI Sh 4 10 MHz Forth RISC Core l cycle 16 16 multiplier 15 channel interrupt two 64 word stack controllers m Plugs into AT or 386 Forth Software included Expandable to 128K bytes shared memory space 2 X 3 prototyping area All Core signals available Runs concurrently with AT 2 weeks ARO 3995 B PC4000 COPROCES OR 4 TO 0 FORTH MIPS 163 4 ec i row m PERI REN 3 el 5 A 3 2 5 AM e Du A te T 3 b die aA de AV WA f 9 E ET hal WW GL GE xA M wg 1 A em HS SIR Boe nama rrr ME vu ce be i ae xs be a D 1 wu ou E s wt mn uA ums LA x POA 5 Forth Software included NC4016 signals available Runs concurrently wit
54. UG BUG ALSO DEFINITIONS 2 44 3 VARIABLE IP VARIABLE Please direct all guestions comments and 4 VARIABLE CNT VARIABLE DEBUG ae miscellaneous personal abuse to san 5 LABEL FNEXT ane 6 07 MOVE 27 LMOVE CES Henry Laxen or Michael Perry ad 7 MERE 1259 Cornell Avenue 1125 Bancroft Way aes 8 W ye DJ MOVE DJ AO LMOVE A0 JMP C tet Berkeley California Berkeley California rsa 9 CONSTANT FNEXT1 94706 94702 wen 10 FORTH DEFINITIONS 44 A 11 CODE UNBUG S 12 BUG FNEXT ASSEMBLER 0 L gt NEXT LONG MOVE WORD NEXT 13 BUG DEFINITIONS 14 15 Volume IX Number 6 25 Forth Dimensions 47 Debug version of Next O6FEBS6rje LABEL DEBNEXT HEX IP DO MOVE 1 DO CMP 6500 V Ir L 00 CMP 6200 Uc L D2 MOVE 102 ADDQ D2 CNT 1 MOVE 2 4 D2 Ir CNT 1 4 CLR LONG FNEXT BPAGE gt L MOVE WORD 4 L gt 4 BPAGE 1 MOVE 5 DEBUG 1 07 MOVE 07 W LMOVE L JMP THEN THEN THEN FNEXT BPAGE L JMP LABEL JBUG CODE PNEXT JBUG BPAGE 18 JBUG 4 BPA
55. Volume IX Number 6 11 Forth Dimensions 17 2 amp Mavebirt CONVERSE takes a baud rate as a parameter initializes the FILTERTABLE is a table indexed into bv a control character modem port zera s the queues fires up the multitasker Note it contains 32 entries which can be FORTH word and enters the KEYBOARD infinite loop which will be invoked by a control character pressed at the keyboard QUIET puts the modem task to sleep and aborts the system FILTER takes a character and aueue address and looks up control characters in FILTERTABLE for execution otherwise sticks it in the queue PERFORM is 6 EXECUTE 2b iTHarssirt 28 is background task which sets outsoins characters i3MargSirt and urites them to the modem Port and incomins characters Phone numbers can be entered into the control character table and writes them in the incoming queue or defined to be executed while in the break shell KEYBOARD is the terminal task which sets incoming characters and prints them Keyboard entered characters FILTER d which either does something or sends them to the outsoins queue WERE LOOKING FOR A FEW GOOD DASH FIND ASSOCIATES Forth Recruiters Under New Management 70 Elmwood Rochester NY 14611 716 235 0168 Forth Dimensions 12 Volume IX Number 6 Forth 83 DUMPING WORDSTAR article deals with
56. adsheet terminal emulation etc By adding code to allow the user to jump between these self contained sys tems it is relatively simple to create a multiple Forth environment that enables the user to access several applications at the stroke of a word The source code for F83X and the relo cation program and its source are available for downloading from the Forth RoundTable on GEnie or by mail on 8 SSSD CP M 5 1 4 DSDD MS DOS or 3 1 2 SS HP CP M 68K format To get a copy send a sufficient number of disks 8 and 3 1 2 require four diskettes 5 1 4 requires three and a stamped self ad dressed envelope with 10 for handling to Robert J Eager 3500 NW Glenridge Corvallis Oregon 97330 Recommended References Laxen and Perry s implementation of the Forth 83 Standard for the MC68000 Original code and source version 2 0 1 Inside F83 by Dr C H Ting A must Motorola MC68000 32 bit Microproces sor User Manual 2nd ed The author currently works as a soft ware engineer at Wright Patterson Air Force base Forth Dimensions FFFFFF FFFF FF 8000 8000 Absolute Address Non Addressable Memory 007 7FFF 000000 0000 Figure Three 32 bit absolute vs 16 bit absolute addressing CP M 68K CCP BDOS BIOS v Relative Address Highest RAM TPA End 64Kb boundary markers Second available 64Kb pag
57. as Lordi 201 338 9363 NEW MEXICO Albuquerque Chapter Ist Thurs 7 30 p m Physics amp Astronomy Bldg Univ of New Mexico Jon Bryan 505 298 3292 NEW YORK FIG New York 2nd Wed 7 45 p m Manhattan Ron Martinez 212 866 1157 Rochester Chapter 4th Sat 1 p m Monroe Comm College Bldg 7 Rm 102 Frank Lanzafame 716 235 0168 Syracuse Chapter 3rd Wed 7 p m Henry 1 Fay 315 446 4600 NORTH CAROLINA Raleigh Chapter Frank Bridges 919 552 1357 OHIO Akron Chapter 3rd Mon 7 p m McDowell Library Thomas Franks 216 336 3167 Athens Chapter Isreal Urieli 614 594 3731 Cleveland Chapter 4th Tues 7 p m Chagrin Falls Library Gary Bergstrom 216 247 2492 Dayton Chapter 2nd Tues amp 4th Wed 6 30 p m CFC 11 W Monument Ave 612 Gary Ganger 513 849 1483 OKLAHOMA Central Oklahoma Chapter 3rd Wed 7 30 p m Health Tech Bldg OSU Tech Contact Larry Somers 2410 49th Oklahoma City OK 73112 OREGON Greater Oregon Chapter Beaverton 2nd Sat 1 p m Forth Dimensions Volume IX Number 6 Tektronix Industria Park Bldg 50 Tom Almy 503 692 2811 Willamette Valley Chapter 4th Tues 7 p m Linn Benton Comm College Pann McCuaig 503 752 5113 PENNSYLVANIA Philadelphia Chapter 4th Sat 10 a m Drexel University Stratton Hall Melanie Hoag 215 895 2628 TENNESSEE East Tennessee Chapter Oak Ridge 2nd Tues 7 30 p m Sci App
58. d so there isn t any need to check for limits 3 Seven choices are possible Seven items is the limit the brain can store and refer to at one time 4 A key always points to a Forth word Chuck has started using menus in his system The menus started out as a tree structure but that was restrictive Now he uses cross referencing and a web structure Any menu can point to any other menu You can go back all the way anytime because this uses the Novix chip which has a circular return stack Continued from page 26 Scr 2 C BENCHMRK BLK Noyes Sieve Prime Number Benchmark O1AUGB87rje 1 DECIMAL 2 8192 CONSTANT SIZE VARIABLE FLAGS SIZE ALLOT 3 4 PRIMES S primes FLAGS SIZE 01 FILL 0 5 SIZE Q 6 DO FLAGS I 7 IF 3 I I DUP I SIZE lt 8 IF SIZE FLAGS OVER FLAGS I 9 DO 0 I C DUP LOOP 10 THEN 11 DROP 1 12 THEN 13 LOOP 14 15 Scr 3 C BENCHMRK BLK Noyes Sieve Prime Number Benchmark 01AUG87rje 1 2 SIEVE S DARK BEGIN TIMING ON THE CR T 3 0 10 DO I 2 SPACES 12000 0 DO LOOP 1 LOOP 4 BEEP 5 10 0 DO PRIMES LOOP 6 BEEP 7 CR i PRIMES 8 9 0 DO DROP LOOP 9 10 Volume Number 6 37 Forth Dimensions USA ALABAMA Huntsville FIG Chapter Tom Konantz 205 881 6483 ALASKA Kodiak Area Chapter Horace Simmons 907 486 5049 ARIZONA Phoenix Chapter 4th Thurs 7 30 p m Dennis
59. dancing a bit and moving with her and the director of the American Festival Ballet saw me there and indicated that I had some promise So I started taking classes and within a year was doing my first professional work not unusual for a male dancer It s unusual for a woman but not for a man Where were you then MT I was in Providence Rhode Island did most of my dancing in New York City From then I ve always been a dancer and something else the something else changes from time to time So at UCLA after I developed my course and started taking classes in kinesi ology the study of motion in the body Eventually as a teaching assistant I taught lectures and classes in electromyography and biomechanics for the kinesiology de partment To work with the body at that level you do need to learn something about computers and mathematics For instance suppose I need to know what s going on inside the hip Let s say I m interested in why dancers who dance beyond the age of 30 often develop hip arthritis and may even need hip replacement Well I can t put a transducer in the hip of a dancer The only thing I can do is take a high speed film of the outside model the forces and deduce what is going on in the hip to make that happen So Ineed rather sophisticated tools immediately high speed photography mechanics and mathematical modeling of moving objects anatomy all tools needed to solve that p
60. e this notion just came to him in the last few days You ll just do a memory dump or decompile to see the code Source code is bulky In the past he resisted saving the object code because he couldn t see maintaining both object and source code That would have been redundant Instead the source code was recompiled very quickly each time it was needed He had completely overlooked the opposite idea of saving just the object code Volume IX Number 6 Chuck has never found a pretty printer he liked They always seem to format the code differently than he would His source code format is inconsistent Sometimes he wants an IF at the start of a line sometimes at the end or he wants something spaced differently Of course I m always right he laughs It will never decompile and indent as he d like but now that most of his definitions are only one line long indenting doesn t matter One feature of blocks is that it allows a specific grouping of words Decompiling can t do that Typically though you ll probably only need to decompile one word at a time Comments and stack effects won t be in the object code but they are necessary He ll probably put these in shadow blocks on the disk Every word could have a pointer to related comments on the disk You would be able to walk up to any computer and see what program is running and how it works 1 It doesn t matter what computer it is the process is th
61. e ex F3 000 FFFF Usable TPA space First available 64Kb page F2 000 FFF TPA Begin Lowest RAM System Parameters Figure Four CP M 68K s location relative to the CCP BDOS BIOS 22 Volume IX Number 6 10 500 1 THERE HERE T 100 10 VARIABLE OFFSET RELATIVE TO ABSOLUTE DISK BLOCK 0 0 14 The Rest is Silence 03Apr84map 0 Execution Control 28Apr84map 1 ASSEMBLER NEXT CONSTANT 2 Serer errr reer CODE EXECUTE er 3 3 SP D MOVE D7 W LMOVE E eer Please direct all questions comments and 4 W D MOVE D7 AO LMOVE AO JMP END CODE 5 miscellaneous personal abuse to CODE PERFORM addr of cfa een 2 6 SP 1 07 MOVE 07 LMOVE W 07 MOVE D7 W LMOVE Jokes Henry Laxen or Michael Perry eae 7 07 MOVE 27 AO LMOVE 0 JMP END CODE 8 tea 1259 Cornell Avenue 1125 Bancroft Way tex 8 LABEL DODEFER 5 9 see Berkeley California Berkeley California sa 9 PERFORM 4 JMP 10 94706 94702 Eo 10 LABEL DOUSER DEFER li ris 11 W 07 MOVE UP D7 ADD PERFORM 2 JMP 12 55A6464A4AAEARARRAREAEAAERRARARRRTARANAATAY RANA 13 cope RTS ND CODE 13
62. e allows local processing without loosins characters convenient technique for invoking local processing words is used via a control character table as in F83 One local word that can be invoked in this example is a breakpoint interPreter as Published bv Leo Brodie This allows vou to exit to a hisher forth QUIT shell giving vou complete access to the forth dictionary while terminal emulating 19 N 95 This screen contains all of the hardware specific code to talk to the modem Port These words are analogous to FORTH i o words 20 M 26Mav8Sirt QDEPTH is the depth of the FIFO ueues This depth should be adjusted according to hou smooth the multitasking loop is runnins total task activity Note that at 1200 baud a character comes in every MS or so and without interurt driven modem control the Toor must averase shorter than this to avoid sueue overflow and lost characters INCOMING and OUTGOING are both bvte aueues of GDEPTH lensth whose first cell is a pointer to the front of the list and second cell is a Pointer to the back of the list OQUEUE initializes a aueue so the tuo pointers Point at the same aueue entry QUEUE increments queue Pointer circularly NIP is SWAP DROP 21 17 85 OVERFLOW issues an error message for an overflowed aueue QUEUE puts a byte at the front of a queue It first increments the front pointer then checks for an overflow Note that if an overflow occurs it will c
63. e same if there is a smart decompiler 2 It doesn t matter how it got there If it were done in C it would still decompile to Forth 3 Forth could unify the representation of the computer 4 You can look at a program even if the supplier hasn t given you access The con cept of proprietary would have a new meaning The Forth community is a bit like a terrorist group Maybe each person could decompile a program More laughs 5 You could change a program while it s running His new machine writes directly to the CRT It has a variable for the number of pixels per line and a variable for the number of lines If he changes these while the program is running he now has to go back to the source code and change it there If there were no source code decompiling would always show the latest version with the correct information Changes to a program would probably make it larger To make changes you might have to relocate words or remove words in the middle thereby leaving holes But most debugging is done at the end of the diction ary so this may not bea problem The Novix was the first CPU for which Chuck seriously tried to write a full com piler Forth and the Novix chip are not as ideal together as he d like To truly opti mize you need to look back three or four words DUP is a prefix in Forth but on the Novix it s a suffix All these problems go away with the compiler Because you
64. e tell them to do whether we mean it or not we should be capable of a bit more precision when communi cating with each other Perhaps the alphabet soup addicts among us could be mollified by the introduction of the ab breviations NF LF CF and PF for refer ring to the fields themselves Sincerely Carol Pruitt University of Rochester Lab for Laser Energetics 250 East River Road Rochester NY 14623 Grammarians have been warning tech nical writers for some time about overus ing acronyms and you aren t the first Forth programmer to point out this par ticular problem Is an author talking about the address of the field or an ad dress stored in the field Your solution may be the least confusing so far but authors should remember that acronyms don t make convoluted or repetitious writing any better only shorter Ed ADVERTISERS INDEX Bryte 6 Dash Find 12 FORTH Inc 14 Forth Interest Group 40 Future Inc 35 Harvard Softworks 7 Institute for Applied Forth Research 30 Laboratory Microsystems 33 Miller Microcomputer Services 18 Mountain View Press 17 Next Generation Systems 19 Silicon Composers 2 Volume IX Number 6 YES THERE IS BETTER WAY A FORTH THAT ACTUALLY DELIVERS ON THE PROMISE HS FORTH POWER HS FORTH s compilation and execution speeds unsurpassed Compiling at 20 000 lines per minute it compiles faster than many systems link For real jobs ex
65. ecution speed is unsurpassed as well Even non optimized programs run as fast as ones produced by most C compilers Forth systems designed to fool benchmarks are slightly faster on nearly empty do loops but bog down when the coion nesting level ap proaches anything useful and have much greater memory overhead for each definition Our optimizer gives assembler language performance even for deeply nested definitions containing complex data and control structures HS FORTH provides the best architecture so good that another major vendor cloned rather poorly many of its features Our Forth uses all available memory for both programs and data with almost no execution time penalty and very little memory overhead None at all for programs smaller than 200 And you can resize seg ments anytime without a system regen With the GigaForth option your programs transparently enter native mode and expand into 16 Meg extended memory or a gigabyte of virtual and run almost as fast as in real mode Benefits beyond speed and program size include word redefinition at any time and vocabulary structures that can be changed at will for instance from simple to hashed or from 79 Standard to Forth 83 You be head word names and reclaim space at any time This includes automatic removal of a colon definition s local variables Colon definitions can execute inside machine code primitives great for interrupt amp exception handlers Multi
66. ellaneous personal abuse to OK INITIAL LOAD 6 7 Laxen Michael Perry ane START S EMPTY BUFFERS DEFAULT 3 8 ree 1259 Cornell Avenue 1125 Bancroft Way ase 9 Berkeley California Berkeley California ver BYE CR HERE 1 0 128 UM MOD 10 94706 94702 SWAP 0 IF 1 THEN DECIMAL Records CR 11 0 0 BDOS 12 13 14 178 Initialization Low Level 26JAN86rje ASSEMBLER Rest is Silence 04Apr84map 02 MARA 1 BPAGE ORIGIN 8 T HIGH WORD OF WARM ENTRY POINT ADDRESS 2 RARER RRR M MEER EET EERE HERE EERO HERE ORIGIN 10 LOW WORD OF WARM ENTRY POINT ADDRESS 244 taa LONG 0 BPAGE 07 MOVE WORD LOAD 07 W BASE PAGE ADDRESS 1 4 44 Please direct all questions comments and WARM 14 LEA 1016 miscellaneous personal abuse to D7 MOVE 07 LMOVE AO JMP ead AS 2 COLD BOOP Henry Laxen or Michael Perry BPAGE ORIGIN 2 T HIGH WORD OF COLD ENTRY POINT A
67. enry Multitasking July Aug 1984 part two Forth Dimensions Vol 5 No 5 Jan Feb 1984 1 3 0 X Dumb Terminal load block 2 MavSSirt 0 X Dumb Terminal FIFO queues 20MavaSirt 1 VOCABULARY TALKING ONLY FORTH ALSO TALKING ALSO 190 24 5 CONSTANT GDEPTH X 5 Pase buffer 2 TALKING DEFINITIONS 214 2 2 1 318 THR dumb terminal emulator 3 X Create 2 queues with front and back pointers 4 4 CREATE INCOMING QDEPTH 4 ALLOT 5 FORTH DEFINITIONS 5 CREATE OUTGOING ODEPTH 4 ALLOT 69 LOAD CONVERSE QUIET 5 7 7 OQUEUE 5 aaddr DUP 4 DUP ROT 2 8 ONLY FORTH ALSO 8 INCOMING OQUEUE OUTGOING OQUEUE initialize the 2 queues 9 CR Dumb terminal emulator loaded 9 10 10 X Increment queue Pointer 11 1t S saddr OVER QDEPTH 4 OVER 12 12 IF SWAP 4 OVER ELSE NIP 1 OVER THEN 13 13 14 14 15 15 4 5 0 X Dumb Terminal queue i o 17 85 i 1 OVERFLOW 5 saddr INCOMING terminal Hardware specific words 19Mar amp Sirt gt OR ERROR Incemins queue overflow 2 92 CONSTANT STATUS 3 ELSE CR ERROR Qutsoing queue overflow THEN DROP 390 5 QUEUE S c saddr DUP QUEUE INITIALIZE 6 baud 120 300 DUP 28 IF OVERFLOW ELSE 8 C THEN b IF 44 STATUS ELSE 1200 66 STATUS PC THEN 8 7 8 KE 5 f STATUS PCE 1 AND 0 5 E 2 EE PEGIN KENN UTI Q QUEUE 3 trueifalse
68. es Reverse Polish Lisp Metacompilers Workstations Forth in VLSI Simulation systems Business and Scientific languages Threaded compilers for Basic and C Applications Dialects Laboratory space based medical AI ACTOR ASYST Fifth MAGIC L NEON real time business database financial Saavy PLOG RPL SPHERE STOIC Papers may be presented in either platform or poster sessions Please submit a 200 word abstract by May 15th Papers should be received by June 1st and are limited to a maximum of four single spaced camera ready pages Longer papers may be presented at the Conference but should be submitted to the refereed Journal of Forth Application and Research Abstracts and papers should be sent to the Conference Chairman Lawrence P Forsley Institute for Applied Forth Research Inc 70 Elmwood Avenue Rochester New York 14611 For more information please write the Conference Chairman or call 716 328 6426 Forth Dimensions 30 Volume IX Number 6 Martin Tracy has been intimately involved in the Forth community for years bringing many contributions in his roles as Forth vendor leader expert programmer and current member of the Forth Interest Group s Board of Directors Mike Ham interviewed Martin for Forth Dimensions and got frank talk about Forth and FIG and some quick glimpses into Martin s eclectic life MH Are you still working for Forth Inc MT That s right I m a senior programmer at Fort
69. essarily the one who does the coding Some people think the computers of the future will be neural nets The most difficult thing about neural nets is training them not programming them You need to spend time coaxing these machines when you really want to just tell them what to do People are going to want loyal and faithful 36 machines slaves if you will that do exactly what they are told You never really know what a machine has learned You can t trust a machine like that It s thought that programming tools willbe so powerful that programmers won t be needed That isn t true It s easier to write in Forth than in other languages but not a magnitude easier In stead of being difficult as with other lan guages it makes it possible Computers will be put to more complex tasks in the future What will a programmer be doing 1000 years from now What kind of interface Probably brain waves How many parallel channels Well it would be controlling a very high resolution display with full 3D color and sound Several channels would be modulating but there would probably be three main channels This makes it close to the three key keyboard on his latest system Everyone laughs The program mer would be laying down no make that floating Yeah that s it Chuck smiles to himself at the thought Now will this pro grammer be dealing with files or screens Audience laughs You won t need to deal with source cod
70. g Forth I have most of the books published on the subject yet some thing still seems to be missing While earning a masters degree on Computers and Education I have been able to understand some of Forth s problems It is not the lack of a good language or means of expressing Forth s operations but a matter of provid ing educational support for users espe cially new users Most of us have used Turbo Pascal and have seen the reason for its success speed of compilation Turbo s editing and com piling can be considered a little like Forth s Screen compilation Looking at that I wonder why Forth hasn t achieved some of Turbo s success The answer was not inter nal speed but educational support through afree spreadsheet and an inexpensive tutor program The free program gave the user a program to run immediately as well as the source code from which to steal and gleam ideas and techniques What I propose then is more fuel for standardization of Forth This standardiza tion is not of words but of packaging No version of Forth should be considered complete without a free bundled program and enough tutorial information to get a new user on line the same day To that end IbelieveIhave written just such a program TUTOR BLK TUTOR BLK came about as my mas ters project and was a two sided program it was a more detailed look at Forth by explaining the language to non users and I was creating tutorial information abou
71. g language severely violates all aspects of Forth If you want astructured language use Pascal it s about as worthless as struc tured Forth not trying to insult Carl Wenrich Readable Forth FD IX 4 I am merely saying that the structure he proposes is more of a hindrance than a programming aid If readability is what Mr Wenrich is after I suggest he read or re read Thinking Forth by Leo Brodie There are better ways to make Forth more read able Has anyone thought of making Forth more object oriented We at FIT have It has potential and Dr Hand has already begun exploration in this area This is my opinion as of this point in time As my Forth experience increases and as Forth continues to evolve I may change these views butnot until the oppos ing facts are staring me in the face Sincerely Joe Sternlicht 3630 Misty Oak Dr 1607 Melbourne Florida 32901 E Forth Dimensions SSSR Se OR RM I SU SS pe 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 b COST 130 page manual 30 00 8K EPROM with manual 100 00 Postage paid in North America Inquire for license or quantity pricing Bryte Computers Inc P
72. h Inc For the past year I imple mented the digital signal processing Forth for the Texas Instruments TMS 320 22 We re selling that and I m working on other projects as they come up MH What machines MT Quite a few people want us to write software for them on the IBM usually the AT computer But it varies We do quite a bit of work on the 68000 Process control people are turning to ruggedized IBM PCs I wouldn t say it s quite a machine of choice yet but it s getting close to it MH How did you get into Forth MT I first encountered Forth working on programming a myoelectric artificial arm for a below the elbow amputee which means there s enough of a stump that you can fitthe arm over the stump and still make contact with the remnants of the muscles You teach the machine every morning Volume IX Number 6 Martin Tracy when you put it on by concentrating on an action that activates the remnants of the muscle The computer watches and learns what your intention is and then moves the artificial arm the same way It gives some crude control over the arm but of course there is no feeling The processor in the arm was an RCA 1802 It was programmed on a Decus Forth development system so I started reading the Decus Forth manual It was incompre hensible to me and I gave up on Forth at that point I stayed away from it for perhaps Forth needs to be managed differently than other languages
73. h PC Compact length format 2 weeks ARO 1295 4016 Novix Forth Engine Plugs into PC XT AT 386 2 bytes main memory PC shared memory space Multiple PC4000 operation Both ideal for real time control data acquisition and reduction image or signal processing or computationally intensive applications For additional information please contact us at SILICON COMPOSERS 210 California Ave Palo Alto CA 94306 415 322 8763 SILICON COMPOSERS Forth Dimensions 2 Volume Number 6 MULTITASKING MODEM PACKAGE BY JEFFREY TEZA 8 This terminal emulator is designed to be a useful example of Forth multitasking If you spend much time telecommuni cating especially downloading and uploading files you will appreciate the local processing provided by this program for F83 and other multitasking Forths Add your favorite functions and share them with us mm DUMPING WORDSTAR FILES BY PAUL A COOPER 13 With or withoutembedded codes your files can fly in Forth Don t choose between your favorite word processor and your Forth environment get them working together FASTER NEXT LOOP BY CARL WENRICH 16 If you are willing to forgo byte boundary addressing in your fig or MVP FORTH system for the 8086 a little tinkering can improve the execution speed of all your Forth code RELOCATABLE F83 FOR THE 68000 BY ROBERT J EAGER 20 Nomoreexcuses not only can you
74. idering the simplicity of Forth multi tasking and with Henry Laxen s excellent tutorial LAX84 LAX83 serious Forth vendors should consider providing this important aspect of a Forth environment This code runs fine at 1200 baud on my 8 MHz 80186 system Lost characters Volume IX Number 6 mI could still be a problem for very slow References JAM85 James John S Simple Mo PAUSE loops on slower machines Ifthisis ACK83 Ackerman Apple Forth dem I O Words Forth Di a problem all I can suggest is to code the la Modem Forth Dimen mensions Vol 6 5 Jan Feb MODEM incoming character receiver in sions Vol 5 No 4 Nov Dec 1985 assembler or to make it interrupt driven 1983 KNU73 Knuth The Art of Computer As demonstrated here the speed of prop BRO83 Brodie Leo Add a Break Programming Fundamental erly optimized Forth multitasking loops is point Tool Forth Dimen Algorithms Vol 1 Addison often a desirable alternative to a high level sions Vol 6 No 2 May June Wesley 1973 Forth loop Chances are a slow computer 1983 83 Laxen Henry Multitasking would require a bit of assembler even fora ERI84 Ericson and Feucht Simple part one Forth Dimensions simpler terminal program Data Transfer Protocol Vol 5 No 4 Nov Dec 1983 Forth Dimensions 16 No 2 LAX84 Laxen H
75. imensions you avid user of Laxen Perry s F83 Do you own or use a 68000 based machine under CP M 68K And do you find that F83 for the 68000 does not run on your system If you answered yes to these questions you will find the following article of interest This paper describes the modification to F83 that enables the user to compile and execute F83 anywhere within the 68000 s address space The techniques discussed also provide the basis for creat ing a multiple image Forth system The creation of F83 was a major mile stone for the Forth community Here was public domain Forth system with all the essence of a professional package And with the release of the 68000 based ver sion F83 became a truly powerful implem entation One of the many design decisions Laxen and Perry had to make was how to handle F83 s I O The result was a tradeoff between minor performance degradation for computer transportability By con structing F83 to utilize basic DOS and I O routines defined by the two most common operating systems CP M and MS DOS Laxen and Perry effectively reduced im plementation dependency down to the CPU level As a result F83 for the 808x was written to run on either CP M or MS DOS based computers i e Kaypro IBM PC etc and F83 for the 68000 was written to execute on CP M 68K based computers i e Sage IV MASCOMP HP9920 etc When Laxen and Perry implemented their 68K version
76. imensions Volume IX Number 6 138 0 Devices Terminal IO via CP M BIOS 19 85 The Rest is Silence O3Apr84map CREATE REG BUP 64 ALLOT Save registers qostttssesssesassosetodsooteteecseosanaschhnacesenasaceceansess one CODE BDOS S n fun 2 SP DO MOVE SP D7 MOVE 07 Dl LMOVE 2 TRAP 3 wee DO SP MOVE NEXT END CODE 4 tee Please direct all questions comments and 5 miscellaneous personal abuse to tae CODE BIOS 5 parm func ret HEX 6 SP DO MOVE SP 01 MOVE 7 tee Henry Laxen or Michael Perry wae LONG 7F00 REG BUF 1 MOVEM gt WORD 3 TRAP 8 1259 Cornell Avenue 1125 Bancroft Way DO SP MOVE LONG 7200 REG BUF L MOVEM 9 ane Berkeley California Berkeley California NEXT END CODE DECIMAL 10 94706 94702 11 tee KEY 5 f 9 2 BIOS 0 lt gt QEEBE ULL KEY S char BEGIN PAUSE KEY UNTIL 0 3 BIOS 13 85559225499 CONSOLE S char PAUSE 4 BIOS DROP 1 0UT 14 15 170 9 Extensible Layer Defining Words 200 85 0 Save a Core Image as a File on Disk 30Mar84map OICSP 5 spe csp i 1 DEFER HEADER HEX CSP 5 SP CSP lt gt ABORT Stack Changed 2 2 68K HEADER
77. ittle piece published by Leo Brodie BRO83 It is a breakpoint interpreter which runs a Forth QUIT loop shell This essentially Forth Dimensions MULTITASKING MODEM PACKAGE JEFFREY R TEZA ENCINITAS CALIFORNIA allows the user to jump up to a Forth inter preter riding on top of the modem soft ware This is shown on screens 5 and 6 and is entered into the jump table in the ASCII 6 Ctrl F key slot Now you have complete access to the Forth dictionary which should provide an adequate selection of local processing tools Another tool shown on screens 7 and 11 provides a telephone list These num bers can be assigned to a key and automati cally dialed by the modem with the mere stroke of a control key or they can be stored in a vocabulary PHONE to be executed from the breakpoint interpreter I find this to be a clean and useful application and have endeavored to pro vide good comments The end user word is CONVERSE which takes a baud rate as a parameter and launches the two processes for example type 1200 CONVERSE A few words about dialect The code is written in Laxen and Perry s F83 I ve tried to comment any non 83 Standard code in the shadow screens but the multitasking word BACKGROUND may have to be changed according to your multitasking word set My apologies to people withouta multitasker Some of the ideas here can be implemented in a single task system But cons
78. ity you must first load Screen 6 Wordstar word wrap file DUMP FILE get file from Wordstar and eait GET FILENAME enter path and filename your assembler and DOS interface if you don t use the program as it is Again any other Forth system will require some mas saging of the assembler words and implem entation of the DOS interface Copyright 1987 by Paul A Cooper All rights reserved Permission granted for any individual reader of Forth Dimen sions to use for personal use only 16 55 12 26 86 CASE 8D OF DROP CR ENDOF V if do a CR 1 OF DROP NOOP ENDDF if drop 0D OF DROP CR ENDOF sage as 8D WRAP DUP 00 IF DROP if 00 drop ELSE EMIT THEN ENDCASE anything else eait DECIMAL DUMP FILEBUFFER addr n QVER SWAP 00 16 I X look at each disk byte sector DO I C8 DUP 32 lt OVER 126 gt OR IF WRAPCASE V if do ELSE EMIT if not eait the standard character THEN LOOP 14 LOOP gt go back and do it again Screen 5 Duap Wordstar word wrap file 16 55 12 26 86 EXITWORD advise status of action CR CR You have exited the DUMP FILE routine CR CR KEYACTION query keyboard and take action if necessary Vif ESC quit if any other key wait OTERMINAL IF KEY DUP 27 IF DROP EXITWORD CLOSE IT QUIT ELSE DROP KEY 27 IF EXITWORD CLOSE IT QUIT THEN THEN THEN OPEN IT open it BEGIN KEYACTION READ IT EOF
79. l Intl Corp 8th Fl 800 Oak Ridge Tumpike Richard Secrist 615 483 7242 TEXAS Austin Chapter Contact Matt Lawrence P O Box 180409 Austin TX 78718 Dallas Ft Worth Metroplex Chapter 4th Thurs 7 p m Chuck Durrett 214 245 1064 Houston Chapter lst Mon 7 p m Univ of St Thomas Russel Harris 713 461 1618 Periman Basin Chapter Odessa Bryson 915 337 8994 UTAH North Orem FIG Chapter Contact Ron Tanner 748 N 1340 W Orem UT 84057 VERMONT Vermont Chapter Vergennes 3rd Mon 7 30 p m Vergennes Union High School Rm 210 Monkton Rd Don VanSyckel 802 388 6698 VIRGINIA First Forth of Hampton Roads William Edmonds 804 898 4099 Potomac Chapter Arlington 2nd Tues 7 p m Lee Center Lee Highway at Lexington St Joel Shprentz 703 860 9260 Richmond Forth Group 2nd Wed 7 p m 154 Business School Univ of Richmond Donald A Full 804 739 3623 Volume IX Number 6 WISCONSIN Lake Superior FIG Chapter 2nd Fri 7 30 p m Main 195 UW Superior Allen Anway 715 394 8360 MAD Apple Chapter Contact Bill Horton 502 Atlas Ave Madison WI 53714 Milwaukee Area Chapter Donald Kimes 414 377 0708 INTERNATIONAL AUSTRALIA Melbourne Chapter 1st Fri 8 p m Contact Lance Collins 65 Martin Road Glen Iris Victoria 3146 03 29 2600 Sydney Chapter 2nd Fri 7 p m John Goodsell Bldg Rm LG19 Univ of New South Wales Contact Peter Tregeagle 10 Binda Rd Yowie Bay 2228
80. lems And that s great because those are fun to watch But if Forth is that kind of language why wave abookat me ora piece of paper or a theory MH Or a case statement MT Right Don Colburn had a wonderful idea and I m going to try to make it happen aprogramming contest with at least a 1000 cash prize I will arrange gizmos or widgets for each contestant the same for each con testant We will provide a room and tables and power The contestants will bring any 34 thing to it any computer any software They can bring a team if they want what ever it takes to do the problem And when the gun is fired they solve the problem It will be a fun problem to watch You get to see this happening and once it s solved we will leave it running so people can come by and watch it I m going to challenge Microsoft Quick BASIC Turbo C and others I m going to challenge them all to come MH You have a pattern in which you do things on your own Forth has grown up in an environment in which many program mers work on their own but at Forth Inc you have a cluster of Forth programmers and they do team projects Do you have any thoughts about Forth in a team atmos phere MT One is that I think it needs to be managed differently than other languages You break up large tasks differently I don t believe a simple Forth without local variables or other tools is very good at large projects despite the fac
81. lves the use of a CPU register to address extend Forth s local RELOCATABLE F83 FOR THE 68000 ROBERT J EAGER CORVALLIS OREGON addresses into their absolute address equivalent On boot up a designated reg ister has its upper 16 bits initialized with the memory page address in which the exe cuting Forth system resides Subsequent memory accesses are done by taking the Forth s 16 bit local address and copying it into the lower 16 bits of this register and then using the whole register all 32 bits to address memory See Figure Two Laxen and Perry interestingly enough have already implemented part of this conversion construct in order to correct for an addressing anomaly unique to the 68000 Whenever a short address 16 bits is loaded into an address register the 68000 extends its sign bit to form a 32 bit address This results in a 64K region of addressable memory that starts in the lowest 32K 00 0000 through 00 7FFF and skips to the highest 32K FF 8000 through FF FFFF See Figure Three To compensate for this unorthodox addressing behavior F83 loads the short address into a data register D7 then cop ies it into an address register 0 as a 32 bit value It is this address that the original Forth system uses to access memory By placing the desired page address 0000 through OOFF into the upper 16 bits of D7 on boot up we can use the original code to automatically expand Forth s local ad dre
82. n a sense we re handicapping ourselves by having a convention at which the theme seems to be Forth rather than solutions to particular problems MT Yes I think we should concentrate on what we re good at I really believe Forth is the best language for certain classes of problems Unlike some of my peers I do not believe it is good for everything MH The Rochester group has been very successful by making their conference theme a particular problem AI robotics and the like and then getting people to attend who are interested in that problem They inevitably get a lot of exposure to Forth but they are drawn by the problem andits solutions Do you see something like that as a possibility for future FIG conven tions A targeted problem area perhaps MT Yes Ihave volunteered to run the next FIG convention which will be in Anaheim I would like to use exactly this line of argument to bring people in from the aero space corridor I want to reach people who don t already use Forth I will do more than that I want to reach people for whom if I said Come learn Forth it would be a strange request I m going to reach them by saying Come see working neural nets at the Forth convention or Come see RISC or WISC language oriented processors at the Forth convention I want to give them a reason with the Forth in small letters rather than capitals I want something vis ible audible real world real time prob
83. ndustry includes factual up dates about materials processes tech niques market penetration etc and mar keting the company s technical integrity often in the form of published papers This Shouldn t be puffery it can be done L Forth Dimensions EDITORIAL honestly without compromising the com petetiveness The thoughtful execution of a compre hensive plan of communication is essen tial I m amazed by the lack of this in Forth vendors service providers and developers although some of the latter like to think of Forth as a kind of trade secret If they aren t talking to their colleagues to poten tial customers employers employees to their users and to the experts who read Forth Dimensions who are they talking to If the answer is Just to existing custom ers I may buy their product but you can keep the stock Take time to communicate This is fundamental If a company owner or de partment manager feels too pressed to do this well and thoughtfully it is assured that the company or department can t thrive only spin like a cat trying to catch its tail Stability i e longevity in the market place relies on much more than selling products as we all should have learned by now I for one am tired of seeing the bleached bones of fine products and com panies that foundered due to introverted or half hearted management I want the living specimens to go forth and multiply FIG
84. ng you ve done in Forth that you like the best MT Well the LISP extensions I did for the Forth Model Library were quite interest ing the ones on Volume I of the library MH You have a good ability to lay out an interesting and reasonably sized problem and then do it completely MT Ihave a definite sequence I go through when I solve a problem The first thing Ido is immersion I get together everything I possibly can gather in a short amount of time For example searches of the Byte network BIX trips to the library if I can get books mostly books in fact my pre ferred source is books I collect as much information on the topic as I can and read quite a bit of it without understanding very much of it I m just bringing the material in Then I will let alittle time go by halfa day oraday when Iam notconcentrating on the problem And then start to work on the problem at that point Volume IX Number 6 FUTURE announces Eight new products based on the NC4016 Future Series products CPU board available 2nd quarter 1988 NC4016 5 MHz standard Stack and data RAM Full 128K bytes of paged main memory Power fail detect Automatic switching to on board battery backup at power fail Psuedo serial port full compatibility with CM FORTH and SC FORTH 16Kbytes of EPROM SC FORTH SC C and CM FORTH available Display Debugger board available 2nd quarter 1988 useful for
85. o form a company MicroMotion and sell Forth for the Apple computer That s how I first got into Forth At this time I was reaching my seven year limit as a lecturer at UCLA UCLA does not encourage lecturers to remain after seven years They were interested mostly in tenure track positions So I left the UCLA dance department and started MicroMo tion with the hope that the company be able to run itself when I periodically left to dance which is what I did for the next several years Forth Dimensions What kind of dance do you do MT Classical ballet and character I ve retired MH What s character MT Character is what ugly ballet dancers used to do It s where Drosslemeyer comes in or Rothbart the evil magician Puss in Boots the Bluebird the Spanish dancer MH So you set up the company to cover while you were not there MT Yes I wanted very much to get into computers with the Forth language but I could only dance while I was young So I chose to give dance priority Of course ina fast moving technical field that wasn t a very good choice if your goal is to make a lot of money but it was the right choice in that I did get to dance Linda Kahn ran the company when I was away and that s how MicroMotion got its start MH Whence the MicroMotion logo of the little dance figure MT That s right MH Did you dance mostly on the West Coast MT I danced
86. ontinue to Place characters in the queue causing the queue to be dumped by incrementing the front pointer Past the rear Pointer QUEUE removes a byte from the back of the aueue if one is available and returns either the character and a true or a false flag if the queue was empty 26MayvS5iet This breakpoint interpreter was Published by Leo Brodie in FD volS noi MVP F RTH chanses are shown as inline Comments BREAK invokes an outer interpreter or shell RESUME is used to resume from the BREAK shell If the return stack is messed up use KEYBOARD to restart 23 26 5 BRKERROR ERROR is the F23 vectored ABORT error handler this word is used to return to the BREAK shell on errors BREAK calls the breakpoint interpreter after cleaning up the stack and vectorins the new errer handler BEEP rings the bell after cleaning the stack PRINT tossies the printer on off in an system types strins to a queue SCR puts a carriage return ascii 13 in queue 24 z amp MavSoirt DIAL tyres string to the outsoins queue followed by a cr Put the PHONE vocabulary in the FORTH vocabulary Use PHONE BOOK to see the Phone numbers Put the Phone numbers in the PHONE vocabularv Use PHONE lt gt e a PHONE FIG to dial a number Use CALL XXXXXXX to call a number not in the PHONE Back to the application vocabulary TOT EE lt
87. or a long time He s not sure any longer about what Forth is Originally he created it as an interface to the computer so he could solve problems Now he wants itas an interface to the problem with the computer just being an incidental He could make a new com puter fairly easily now so that s almost as flexible as the software This alters the Forth Dimensions REVIEWED BY SCOTT SQUIRES mn tradeoffs profoundly With his new three key keyboard Chuck has come up with some new ideas some of them in the last few days Forth doesn t need an interpreter or compiler it s possible to use just a decompiler To him a disk is just a non volatile backup of the object code There would be no blocks or buffers these are things he had always thought were a part of Forth Now he s busy removing more and more of Forth and isn t sure of what will be left Somebody sug gested it might be like the smile of the Chesire cat from Alice in Wonderland Chuck thinks it might be the illusion of Forth He s not worried about conflicts as long as it s fun The difficulty with neural nets is training them We should figure out how programmers will be doing it in 1000 years and start doing that now Most people think there won t be any programmers in 1000 years He doesn t think that s true especially since he s heard the same thing for the past 20 years A programmer is the one who understands the problem not nec
88. p the file named MYFILE EXT that is on drive A Just re spond with A MYFILE EXT cr Your file will completely dump in the original form as shown on the WordStar dump but it won t have any of the special codes e g printer codes An added advantage of this Forth dump is that you will have a continu ous printout that you can stop anywhere instead of using C to keep going Just hita key to stop continue if you wish to get out press Esc In screen 7 I show a separate DUMP FILEBUFFER word This can be used in place of the word of the same name in screen 4 if you want to display all WordStar codes on your screen This was written formy own use in tracking down the various codes needed to set up the lookup table WRAP and WRAPCASE Butit might be fun for some to see just what WordStar does inside a word pac 15 55 12 26 86 close the file read sector 16 55 12 26 86 HEX FE INDARR WRAP Y Qutput code fros Wordwrap hex code lt lt 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0 00 00 00 00 00 00 20 21 22 23 24 25 34 33 36 37 38 39 AB 49 4 4B 4C 4D 5
89. pple is a registered trademark of Apple Computer Inc Macintosh is a trademark of Apple Computer Inc SC FORTH and 5 products of Silicon Composers 35 Forth Dimensions FIRESIDE CHAT WITH CHARLES MOORE At last November s National Forth Con vention in San Jose California the Forth Interest Group celebrated its tenth anni versary Mr Charles Moore the creator of Forth contributed to the event in many ways among them his annual Fireside Chat with attendees Here Scott Squires shares the notes he took as he listened to the informal session As usual Chuck was full of unusual ideas mixed with tongue in cheek during his annual fireside chat at the 1987 Forth National Convention I have tried to record these as accurately as possible and hope that at least the concepts are correct There are two attitudes about Forth in the Forth community 1 It s about to die 2 It s all set to take off Chuck didn t know which is true but didn t actually think it matters He uses Forth maybe it would be more useful if other people didn t Chuck smiles He can t concieve of a sucessful SDI Star Wars given the complexities It s impossible to check out and a problem could kill everyone Ben Bova has written a book Millenium that covers a lot of this He hasn t seen any new compelling reasons that persuade people to use Forth He and the Forth community have been providing reasons f
90. rawing it doesn t approach the ca pabilities of Metawindows tm Metagraphics We use our Rosetta Stone Dynamic Linker to interface to Meta windows HS FORTH with MetaWindows makes an un beatable graphics system Or Rosetta to your own preferred graphics driver HS FORTH provides hardware software floating point including trig and transcendentals Hardware fp covers full range trig log exponential functions plus complex and hyperbolic counterparts and all stack and compari son ops HS FORTH supports all 8087 data types and works in RADIANS or DEGREES mode No coproces sor No problem Operators mostly fast machine code and parse format words cover numbers through 18 dig its Software fp eliminates conversion round off error and minimizes conversion time Single element through 4D arrays for all data types in cluding complex use multiple cfa s to improve both per formance and compactness Z X Y X Y would be coded X Y X Y 15 2 16 bytes instead of X Y X Y Z 26 bytes Arrays can ignore 64k boundaries Words use SYNONYMs for data type inde pendence HS FORTH can even prompt the user for retry on erroneous numeric input The HS FORTH machine coded string library with up to 3D arrays is without equal Segment spanning dynamic string support includes insert delete add find replace exchange save and restore string storage Our minimal overhead round robin and time slice multi taskers require a
91. re writing true in line Forth all changes could be optimized and that Jeads to more compact code To go from one machine to another you would decompile the object code to pro duce the source code The target machine would compile this source code in it s own format This is similar to the idea of meta compiling but implies that compiling is only needed when moving between ma chines Someone from the audience mentions that RTL a Forth variant language has flags in the object code to tell what type of data structure it is ie IF WHILE BEGIN etc Chuck thought that Wil Baden s diagramming system presented at last year s FORML might be used as part of the decompiling This is a pleasant flowchart where it doesn t matter exactly what word is used to generate the structure as long as result of the structure is clear Other languages could be decompiled to Forth and perhaps it could optimize the decompilation to produce good Forth code not just a step by step decompilation of programs written without Forth in mind He would be willing to change his pro gramming style to conform to the tools At one time he pushed for the word Since the Novix he hasn t used it at all and says that he s changed mind His objection to the mouse is the coor dination required About Chuck s three key keypad 1 Color coded keys red green blue Selects the word or item with that color 2 Itprovides limit or boun
92. roblem When I had learned what I could from the kinesiology department I moved on to the bioengineer ing department to learn more and the more I focused on that the closer I got to comput ers and had to learn more about that And that s how I got into programming MH Do you see any body movement projects at Forth Inc L Volume IX Number 6 TOTAL CONTROL with LMI FORTH an expanding family of compatible high performance Forth 83 Standard compilers for microcomputers For Development Interactive Forth 83 Interpreter Compilers 16 bit and 32 bit implementations Full screen editor and assembler Uses standard operating system files 400 page manual written in plain English Options include software floating point arithmetic coprocessor support symbolic debugger native code compilers and graphics support For Applications Forth 83 Metacompiler Unique table driven multi pass Forth compiler Compiles compact ROMable or disk based applications Excellent error handling Produces headerless code compiles from intermediate states and performs conditional compilation Cross compiles to 8080 Z 80 8086 68000 6502 8051 8096 1802 and 6303 No license fee or royaity for compiled applications For Speed CForth Application Compiler Translates high level Forth into in line optimized machine code Can generate ROMable code Support Services for registered u
93. sers Technical Assistance Hotline Periodic newsletters and low cost updates Bulletin Board System Call or write for detailed product information and prices Consulting and Educational Services available by special arrangement Overseas Distributors Germany Forth Systeme Angelika Flesch 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 09 451 2946 For Programming Professionals e Laboratory Microsystems Incorporated 7 Office Box 10430 Marina del Rey CA 90295 Phone credit card orders to 213 306 7412 33 Forth Dimensions MT I don t see anything like that coming through the door The closest we get is robotics but they lack the human nature robots are too predictable for my taste MH Do you mean too few degrees of freedom in the movement or the lack of will MT The lack of will For instance when you re embarrassed you move very differ ently But I don t know how to embarrass a robot or a neural net MH I would like to get your thoughts on FIG where it s come from and where it s going MT I think it has come from a hobbyist orientation I would like to see it move to more of a professional support organiza tion I don t know whether it can or not I think we re trying it on right
94. sses into their 32 bit absolute equiva lents This modification and other recod ing resulted in the new Forth system that can execute at any page of memory the system was compiled for As a result of these code changes all high level Forth words are unaffected Volume IX Number 6 both in function and code size Assembly code words which do not contain short absolute addresses are also unaffected For those that do their code has been modified to use long absolute addressing For the programmer who is coding in assembly only two adjustments in coding technique must be made Follow each short absolute address with the system s base page ad dress BPAGE and use the long absolute assembly mnemonic ie L vs whenever addressing memory directly For example to copy the 16 bit value from the variable SPAN to D1 instead of using SPAN 01 MOVE write SPAN BPAGE L D1 MOVE 16 Mb FFFF Where M Transient Program Area F83 needs to be lt Top of my system RAM AREA Memory grows downwards 8 Mb 80 0000 VO AREA 4 Mb 40 0000 ROM AREA User Program ROMs Where F83 wants tobe gt System Boot ROMs Figure One Memory map of the HP9920 Page of Memory Address Register Relative Memory gt Location L 31 15 0 Figure Two Representation of page and local addresses memory Volume IX Number 6 21 where
95. stomize their own program to highlight particular features This program is by no means complete I had intended to make a glossary section too the glossary would give the user either a short or long definition of most words For beginners and novice users the ability to have on line explanations has proven to be many a program s successful sales strat egy Forth developers can use that same Strategy and with less overhead Forth Dimensions SCR 0 INTRO TEXT FOR SCREEN ZERO BDK112186 FO ITI TO OI I AITO TUTOR BLK AO F83 TUTOR AND HELP PROGRAM kkk kkk kk Bill Kibler Cedarville CA 96104 Written by KERAK PO BOX 487 KKKKK kkkkk kkkkk kkkkxk Donated into PUBLIC DOMAIN with ALL Commercial rights reserved kkkkkkkkkkkkk kk kkkkkkkkkkkkkkkkkkkkkk kkk SCR 1 TUTOR BLK LOAD BLOCK AND START OF TUROR PROGRAM 53 load 23 tree 15 spaces PLEASE WAIT WHILE LOADING TUTOR SCREENS TUTOR BLK CR CR CR CR CR variables and display VARIABLE ETUTOR END DISPLAYING TUTOR SCREENS VARIABLE STUTOR BEGINING SCREEN OF CURRENT GROUP VARIABLE NTUTOR NEXT TUTOR SCREEN GROUP routines 1 DUP 36 IF CHECK FOR 1 ETUTOR THEN DISPLAY DISPLAY SCREEN OF TEXT 1 ENOUGH DUP SCR L SCR 1 DO SPACES DUP BLOCK I C L C L TUCK PAD SWAP CMOVE PAD SWAP TYPE WITHOUT THE TYPE 0 DO DUP CQ 55
96. t a programming language that I felt was not getting the exposure it needed The pro gram screens contain enough information It is a matter of providing educational support about Forth for a new user to start using the program the same day The new words defined also show the ease with which new words are created and old words modified to suit special needs The program screens included here cover introductions and new words to manipulate the tutorial program The entire program is over 100 screens but only the first ten are program screens There are 90 screens of text including some blank Volume IX Number 6 screens as well as a glossary at the begin ning of each section or chapter I would add the first ten screens into my version of Forth the user would then see a list of help words and program information at boot up time This provides a directed entry into the program and guarantees the first time user a positive experience This program was written for F83 the public domain Forth 83 program Al though Laxen and Perry have done a fine job their support for first time users is rather minimal This program along with Starting Forth by Leo Brodie which the tutorial material supports via its chapter references should help F83 users get started The TUTOR BLK program is public domain and can be included with commercial packages as long as I get credit Commercial users will want to cu
97. t that there have been many large projects done with Forth I think the first thing that happens is that the Forth is extended in some way so that you can manage the large project and then you work with that extension But whether you are in Forth itself Here s an example I often give you write a C in Forth and now you write a program are you writing a program in C or in Forth As far as I am concerned you are programming in C It looks like C acts like C So the fact that Forth can do any thing is a kind of cop out the real interest ing question to me is what does it do natu rally as Forth and not what you can bend it to be So asa natural thing you see Forth as aone person language and for a large team you build a language suited to the task and team approach with local variables and the like Then it s not Forth anymore MT Right but Forth Inc would not agree with me One approach we take there is to break the problem into tasks that can be doneatthe same time run at the same time Programmers work on different tasks then they are put together and run at the same Volume IX Number 6 time to make the system MH With lots of use of vocabularies to avoid collisions MT No actually we use vocabularies very little We run tools at integration to detect name conflicts and change them MH You ve done a lot of Forth program ming Do you have any particular favorite anythi
98. t time you wrote the intro ductory Forth text Mastering Forth MT That s right The very first version was a yellow book when MicroMotion was still Forth 79 We produced what I believe is the first tutorial in Forth Brodie s Start ing Forth came out a year and a half after that little yellow book came out The ver sion known as Mastering Forth came out two years after Starting Forth 1 am cur rently doing a second edition of Mastering Forth for Brady Books Prentice Hall Is it still tuned to MasterForth MT It sexpanded It has the same material though revised as Mastering Forth but with chapters on topics that I feel have not been covered in Forth books such as target compilation graphics and floating point MH Will it be published in 1988 MT I m committed to producing the book by the end of the March MH How did you decide to leave Micro Motion MT My fortieth birthday was approach 32 ing I had decided to retire from dance and also to purchase a home To do that in southern California takes a lot of money so Isold MicroMotion and started to work for Forth Inc MH When you worked in bioengineering you already had programming knowledge How did you get started in programming itself MT The thing that has interested me for a long time is human beings in motion people when they move Part of this is my background in dance part of it Labanota tion and Effort
99. t to see any need for this capability So not having any par ticular use for it I eliminated it Figure Three shows version that exe cutes about 12 faster than the fig FORTH version and about 25 faster than the MVP FORTH version BX is now used as the working register and DX is completely out of the picture It also uses a little less memory but that is of little consequence What is significant is the time saved since NEXT is executed so often MVP FORTH NEXT No of 8086 Cycles NEXT AX SI 13 INC SI 2 INC SI 2 BX AX 2 NEXT1 MOV DX BX 2 INC DX 2 JMP WORD PTR 15 Total no of 8086 cycles required 38 Abbreviated NEXT 078086 Cycles NEXT LODSW 12 MOV BX AX 2 JMP WORD PTR BX 15 Total no of 8086 cycles required 29 16 Volume IX Number 6 Of course there is a small price to pay The defining word interpreters have to be modified and EXEC has to be changed to eliminate the dependence on NEXT1 But the changes are easy to implement and the difference in memory and cycle time re quirements is minimal Figures Four through Ten show how the changes can be implemented NEXT LODSW MOV BX AX MOV DX BX INC DX IMP Figure One fig FORTH NEXT NEXT ESI INC 51 INC 51 MOV EX AX 1 MOV EX INC DX JMF LODSW MOV EX AX WORD Figure Three New NEXT DOCOL INC DX E DEC RE
100. the end of fill process In screen 2 the DOS interface is invoked a 128 byte buffer is established and our interrogated file is subnamed the end of file flag 1 is made a constant and several commands to open close and read are defined In screen 4 a case word WRAPCASE explicitly actions three different hex values without going into the lookup table 8D Screen 7 Array words ASHB4 INDARR cells lt name gt creates indexed array CREATE 2 HERE OVER ERASE ALLOT CODE AX 2 BX LEA BX POP BX ADD AX BX ADD AX PUSH NEXT END CODE VARIABLE DUMMY lt lt mark stack top to fill indexed array SP DUMMY gt gt gark end of fill then fill array SDUNMY SP 6 OVER DO I 2 LOOP 16 47 09 10 86 Forth Dimensions which WordStar uses as a hidden carriage ASK FORTH ENGINEERING ABOUT _ REAL TIME THAT S ON TIME Find Out How To Implement Real Time Systems In Digital Signal Processing Manufacturing Process Control Machine Vision Robotics time and under budget For The Answers To Your Questions Call Our Engineering AnswerLine Today zu UP Pr as FORTH Inc M Sepulveda Blvd Manhattan Beach 90266 ON TIME UNDER BUDGET FORTH Inc Forth Dimensions return OD the standard carriage return and 1A used as a gt to mark leftover
101. three requirements First the computer must be 680X0 based Second the computer must use CP M 68K as its operating system Third the Tran sient Program Area TPA of the CP M 68K system must define a region of mem ory that contains at least one 64K bounded page of RAM i e F2 0000 through F2 FFFF See Figure Four For those of you interested in loading F83X onto your system I have written a CP M 68K relocatable program called GENF83X REL that enables the user to bootstrap a relocatable version of F83X called F83XREL HEX onto their system To install F83X the users copies GENF83X REL and F83XREL HEX onto an empty formatted diskette and places it into the default drive The user then exe Forth Dimensions GENF83X REL After loading the program will display the system s available TPA and prompt the user for the 64K page they wish to target the code for Pressing lt cr gt without entering a number will result in the F83X code being targeted for the first available 64K page of memory The result ing code will be written to the default drive with the filename F83X 68K With these enhancements to F83 any one who runs a 68000 based computer under CP M 68K with at least 64K of programming space can run F83X For those wishing to take advantage of their extra memory pages one could load sev eral versions of F83X into memory each tailored for a specific task 1 word essing spre
102. tions and Starting FORTH IBM Apple Amiga CP M MS DOS PDP 11 and others Specify 195 CI MVP FORTH Enhancement Package for IBM Programmer s Kit Includes full screen editor amp MS DOS file interface 110 C MVP FORTH Floating Point and Math Apple or CJ CP M 8 75 COMVP LIBFORTH for Four disks of enhancements 2 MVP FORTH Screen editor for 15 C MVP FORTH Graphics Extension for IBM or Apple 80 MVP FORTH PADS Professional Application Development System An integrated system for customizing your FORTH programs and applications PADS is a true professional development system Specify Computer CJ Apple 500 LJ MVP FORTH Floating Point Math 100 L1MVP FORTH Graphics Extension 580 MVP FORTH EXPERT 2 System for learning and developing knowledge based programs Specify O Apple O CP M 8 100 Order Numbers 800 321 4103 In California 415 961 4103 FREE CATALOG MOUNTAIN VIEW PRESS PO DRAWER X Mountain View CA 94040 17 Forth Dimensions NOW FOR IBM PC AT PS2 AND TRS 80 MODELS 1 3 4 4P DOCON INC DX 3 FIG amp The Gift MOV BX DX Computer MOV AX CBX 1 Buy MMSFORTH before year s end JMF to let your computer work harder faster 5 3 2 Then MMS will reward it and you DOCON INC BX 3 NEW with the MMSFORTH GAMES DIS
103. uage You can execute function calls DOS com mands other programs interactively from definitions or even from files being loaded DOS and BIOS function calls are documented HS FORTH words we don t settle for giving you an INTCALL and saying have at it We also include both fatal and informative DOS error handlers installed by executing FATAL or INFORM HS FORTH supports character or blocked sequential or random I O The character stream can be received from sent to console file memory printer or com port We include a communications plus upload and down load utility and foreground background music Display output through BIOS for compatibility or memory mapped for speed Our formatting and parsing words are without equal In teger double quad financial scaled time date float ing or exponential all our output words have string formatting counterparts for building records We also provide words to parse all data types with your choice of field definition HS FORTH parses files from any lan guage Other words treat files like memory and nn H read or write from to a handle file or device as fast as possible For advanced file support HS FORTH easily links to BTRIEVE etc HS FORTH supports text graphic windows for MONO thru VGA Graphic drawings line rectangle ellipse can be absolute or scaled to current window size and clipped and work with our penplot routines While great for plotting and line d
104. unused bytes in each line on the monitor One would think these would be spaces or 20 hex but in the words of Shakespeare alas and alack no MicroPro entertainers had their reasons I m certain These 1A codes are dropped The balance of any codes read are diverted to the lookup table which leaves on the stack the proper ASCII representation if a code 00 hex is left it is dropped as irrelevant to our use The word DUMP FILEBUFFER in screen 4 is the main action word It looks at each byte that is read into FILEBUFFER and uses WRAPCASE if the code is below decimal 32 hex 20 or above decimal 126 hex 7E if not it merely emits it Screen 5 contains some keyboard interaction words that allow immediate escape from a dump or a hold if in hold one may continue the dump or escape Screen 6 holds the main Screen 2 Wordstar word wrap file DOSINT invoke 005 interface HANDLE FILEQUT V nase the file VARIABLE FILEBUFFER 128 ALLOT establish buffer and length 1 CONSTANT EOF end of file flag GET FILENAME CR CR Enter Path and Filename FILEOUT INPUT FILENAME CR CR V input data PEN IT FILEQUT OPEN FILE V open the file IF CR Can t open file CR QUIT THEN CLOSE IT FILEQUT CLOSE FILE DROP READ IT FILEQUT 128 FILEBUFFER READ 7 Screen 3 Duap Wordstar word wrap file word DUMP FILE the operator is prompted for the path and filename Let s say you want to dum
105. use a Forth multitasker to glue the two together By running one in the ground and the other in the foreground this structure has an advantage for a termi nal emulator Itallows the KEYBOARD task to spend some time doing different func tions while the MODEM background task continues to pay attention to any characters being received at the serial port Now one of the problems with these two tasks going about their merry way is what to do with characters coming in from the modem while the KEYBOARD task is goofing off This is where screens 3 and 4 come in These two screens create a first in first out buffer which allows the two tasks to communicate on a slightly relaxed schedule Stubborn characters that refuse to wait for the KEYBOARD task to complete a job are stored in this FIFO buffer to be picked up later by KEYBOARD and dis played to the user What shall we do with all this time Great Now wecan take a little vacation in the KEYBOARD routine without feeling pressured to whip through the loop in time for another character What shall we do with all this time Many things come to mind some of which are shown in the example Screen 8 creates a jump table that detects a control key pressed at the key board and sends the KEYBOARD task off on vacation I ve coded a few interesting tools for a user sitting at a modem talking to another computer The first is taken from an elegant l
106. word that exits cleanly at the end of subtask execution The cooperative round robin multi tasker provides individual user stack segments as well as user tables Control passes to the next task user whenever desired Volume IX Number 6 APPLICATION CREATION TECHNIQUES HS FORTH assembles to any segment to create stand alone programs of any size The optimizer can use HS FORTH as amacro library or complex macros can be built as colon words Full forward and reverse labeled branches and calls complement structured flow control Complete syntax checking protects you Assembler programming has never been 0 easy The Metacompiler produces threaded systems from a few hundred bytes or Forth kernels from 2k bytes With it you can create any threading scheme or segmenta tion architecture to run on disk or ROM You can turnkey or seal HS FORTH for distribution with no royalties for turnkeyed systems Or convert for ROM in saved sealed or turnkeyed form HS FORTH includes three editors or you can quickly Shell to your favorite program editor The resident full window editor lets you reuse former command lines and save to or restore from a file Itis both an indispensable development aid and a great user interface The macro editor provides reuseable functions cut paste file merge and extract session log and RECOMPILE Our full screen Forth editor edits file or sector mapped blocks Debug tools include memory stack dump memory

Download Pdf Manuals

image

Related Search

Related Contents

Active Thermal Management System 1  Philips 4000 series LED TV 29PFL4508  Bedienungsanleitung - Viessmann Modellspielwaren  アバラングパック取扱説明書  DX606v - Optoma    Installation manual  Manual do Utilizador  BME 290 Final Report - Biomedical Engineering  User Manual - Durham Geo Enterprises  

Copyright © All rights reserved.
Failed to retrieve file