diff --git a/ci86.gnr b/ci86.gnr index f820017..d5d0f75 100644 --- a/ci86.gnr +++ b/ci86.gnr @@ -1315,16 +1315,16 @@ _COMMENT THIS ROUTINE WILL ALLOW YOU TO STEP THRU FORTH PROGRAMS EVERY TIME 'NEXT' IS EXECUTED. -IN ORDER TO USE THE STEP FEATURE YOU MUST DO THE FOLLOWING: +In order to use the step feature you must do the following: - 1. PATCH THE INSTRUCTION IN 'NEXT' WITH A JUMP - TO 'TNEXT' + 1. patch the instruction in 'next' with a jump + to 'TNEXT' - 2. PATCH YOUR BREAKPOINT ROUTINE AT - LABEL 'BREAK' + 2. patch your breakpoint routine at + label 'BREAK' - 3. SET VARIABLES, `BIP' & `BIPE' TO THE - ADDRESSES YOU WANT TO STEP THRU. + 3. set variables, `BIP' & `BIPE' to the + addresses you want to step thru. THE CONTENTS OF THE 2 VARIABLES 'BIP` AND `BIPE' ARE INTERPRETED AS FOLLOWS: @@ -2249,7 +2249,7 @@ forthcode({>IN}) is not actually a variable: its content must be fetched immediately, and changing it has no effect. }, {{(>IN)},{IN}}, -dnl this test to be moved to library test (after WANT legacy.) +dnl this test to be moved to library test (after "-legacy-" WANTED .) dnl {{: GS1 >IN @ ; QUIT dnl GS1 .},{4}}, {}, @@ -3226,7 +3226,7 @@ forthvar({addr}), i.e. it can be fetched with forthcode({COUNT}). _VERBOSE_({{ (Where would that BD come from?)}})}, {{COUNT},{$!}}, -{{ 1 LOAD WANT $!-BD "A9" PAD $!-BD PAD COUNT TYPE},{A9}}, enddoc) +{{ 1 LOAD "$!-BD" WANTED "A9" PAD $!-BD PAD COUNT TYPE},{A9}}, enddoc) _SUPPRESSED({{ _HEADER({$!-BD},{SSTORBD},{DOCOL}) DC TDUP, CSTOR, ONEP, SWAP, LMOVE @@ -3565,7 +3565,7 @@ _HEADER({PP},{PP},{DOUSE}, _CELLS(29)) _C _LOAD_({ worddocsafe( {INPUT~},{(>IN)},{paren_iso_in},{--- addr},{}, -{After forthsample({WANT -legacy-}) this is used by +{After forthsample({ "-legacy-" WANTED }) this is used by the word forthcode({L_>IN}), to store the offset from the start within the current input text buffer (terminal or disc) from which the next text will be @@ -4787,7 +4787,7 @@ forthcode({WORD}) leaves the character count in the first byte, the characters, ends with two or more blanks. }, {{NAME},{PARSE},{BLK} ,{IN}}, -{{1 LOAD WANT WORD : GS1 BL WORD COUNT . C@ EMIT ; GS1 CELLO},{5 C}, +{{1 LOAD "WORD" WANTED : GS1 BL WORD COUNT . C@ EMIT ; GS1 CELLO},{5 C}, { : GS2 5A WORD COUNT DUP . TYPE ; GS2 QQZ},{2 QQ}, { : GS3 5A WORD COUNT DUP . TYPE ; GS3 ZZZQQZ},{2 QQ} }, @@ -5059,7 +5059,7 @@ that uses a regular string. }, {{CONTEXT},{PRESENT},{(FIND)}}, { -{ 1 LOAD WANT FIND : FIND: BL WORD FIND ; dnl +{ 1 LOAD "FIND" WANTED : FIND: BL WORD FIND ; dnl 123 : BONOBO ; FIND: BONOBO . ' BONOBO = . .},{-1 _T_ 123}, { IMMEDIATE 142 FIND: BONOBO . ' BONOBO = . .},{1 _T_ 142}, dnl don't find the next, though it is a denotation @@ -6925,7 +6925,7 @@ saved like this. _VERBOSE_({{In practice the use of of the same stream. }}) }, {{SAVE},{RESTORE-INPUT}}, -{{1 LOAD WANT SAVE-INPUT !CSP : GS1 SAVE-INPUT 0 PP ! RESTORE-INPUT ; dnl +{{1 LOAD "SAVE-INPUT" WANTED !CSP : GS1 SAVE-INPUT 0 PP ! RESTORE-INPUT ; dnl 34 GS1 . . ?CSP},{-1 34} }, enddoc) _SUPPRESSED({{ @@ -8838,7 +8838,7 @@ worddoc( {OPERATINGSYSTEM},{BYE},{bye},{---},{ISO}, {Return to the host environment _OS_. },{{COLD},{EXIT-CODE}}, { -{ 1 LOAD WANT GET-ENV },{}, +{ 1 LOAD "GET-ENV" WANTED },{}, { "COMSPEC" GET-ENV SHELL $!},{}, {"wina.exe -f 23 EXIT-CODE ! BYE >null:" SYSTEM ( No error!)}, { } }, diff --git a/ci86.lina.labtest b/ci86.lina.labtest index bd0e7ae..16d4ed7 100644 --- a/ci86.lina.labtest +++ b/ci86.lina.labtest @@ -3,7 +3,7 @@ dnl $Id$ dnl Copyright(2013): Albert van der Horst, HCC FIG Holland by GNU Public License divert(4)dnl wordtest( {D0<}, -{ {WANT D0<},{}, +{ { "D0<" WANTED },{}, { 0 0 D0< . },{0}, { 1 0 D0< . },{0}, { 0 1 D0< . },{0}, @@ -12,7 +12,7 @@ wordtest( {D0<}, { 0 -1 D0< . },{-1} }) wordtest( {D<}, -{ {WANT D<},{}, +{ { "D<" WANTED },{}, { 0. 0. D< . },{0}, { 1. 0. D< . },{0}, { 0. 1. D< . },{-1}, @@ -20,7 +20,7 @@ wordtest( {D<}, }) wordtest( {D<}, -{ {WANT D<},{}, +{ { "D<" WANTED },{}, { -1. -1. D< . },{0}, { 0. -1. D< . },{0}, { 1. -1. D< . },{0}, @@ -29,32 +29,32 @@ wordtest( {D<}, { -1. INVERT 1. INVERT D< . },{0} }) wordtest( {<=}, -{ {WANT <=},{}, +{ { "<=" WANTED },{}, {1 2 <= .},{_T_}, {-1 -2 <= .},{0}, {0 -1 <= .},{0}, {1 1 <= .},{_T_} }, ) wordtest( {>=}, -{ {WANT >=},{}, +{ { ">=" WANTED },{}, {1 2 >= .},{0}, {-1 -2 >= .},{_T_}, {0 -1 >= .},{_T_}, {1 1 >= .},{_T_} }, }) wordtest( {ROLL}, -{ {WANT ROLL},{}, +{ { "ROLL" WANTED},{}, {2 1 1 ROLL . . },{2 1 }, {3 2 1 0 3 ROLL . . . . },{3 0 1 2 }, {4 3 2 1 0 4 ROLL . . . . . },{4 0 1 2 3 }, }) wordtest( {REFILL}, -{ { WANT REFILL}, {SOURCE : ISN'T UNIQUE }, +{ { "REFILL" WANTED}, {SOURCE : ISN'T UNIQUE }, { : _G13 2DUP OVER + SWAP DO I C@ &| = IF ^J I C! THEN LOOP ;},{}, { " 1 2 3 4 REFILL| 1 . 3 .| .| . . . . " _G13 EVALUATE },{1 3 -1 4 3 2 1 }, }) wordtest( {0>IN}, -{ { WANT 0>IN}, {SOURCE : ISN'T UNIQUE }, +{ { "0>IN" WANTED}, {SOURCE : ISN'T UNIQUE }, {: _G14 DUP IF 1- 0>IN THEN ;},{}, { : _G13 2DUP OVER + SWAP DO I C@ &| = IF ^J I C! THEN LOOP ;},{}, { " 4| DUP . _G14 | 9 + . " _G13 EVALUATE},{4 3 2 1 0 9}, diff --git a/logforth.txt b/logforth.txt index e61e85a..c7961fe 100644 --- a/logforth.txt +++ b/logforth.txt @@ -13902,6 +13902,13 @@ storing into X15 all is well. blocks.frt 5.109 ci86.gnr 5.131 allow threading pet in 64 bit. Tested manually with the test section of the last threadpet.frt in tools/THREADS. +blocks.frt 5.109 multiple words names after WANT. + +2016 jan 26 +The update of 23 jan failed. The new version of WANT was not yet saved. +Furthermore the tests failed because WANT was used. Changed those to +used WANTED, blocks.frt was already changed to use WANTED. +blocks.frt 5.110 ci86.gnr 5.132 allow threading pet in 64 bit. -------------------- officialdecompilation fails on SEE _pad. diff --git a/manual.mi b/manual.mi index 9365183..3429d00 100644 --- a/manual.mi +++ b/manual.mi @@ -78,6 +78,8 @@ but thisforth does. thisforth uses the forthdefi({blocks}) as a library by addition of the word forthcode({WANTED}) and a convention. +More convenient is forthcode({WANT}) that adds all words that are on the +remainder of the line, so without quotes. Starting with forthsamp({thisforth -w}) or most any option you have this facility available. If you are already in thisforth, you can type forthsamp({1 LOAD}). diff --git a/options.frt b/options.frt index 6780557..38fbb03 100644 --- a/options.frt +++ b/options.frt @@ -26,10 +26,10 @@ CREATE _pad 80 ALLOT \ Word surrounded by spaces DUP 0= 24 AND THROW POSITION 0= WHILE 1+ REPEAT ; : (WANTED) ( sc -- ) ERRSCR @ 4 + >R BEGIN 2DUP PRESENT 0= WHILE 2DUP R> #LOCATED DUP 1+ >R LOAD REPEAT RDROP ; -\ Make sure WORD is present in the current namespace -: WANTED '(WANTED) CATCH DUP 24 = IF >R ETYPE R> MESSAGE - ELSE THROW 2DROP THEN ; : WANT ( "name" ) NAME WANTED ; -: CF: "CONFIG" WANTED ; +: WANTED ( Make WORD available. ) '(WANTED) CATCH DUP 24 = IF + >R ETYPE R> MESSAGE ELSE THROW 2DROP THEN ; +: WANT ^J PARSE SAVE SET-SRC BEGIN NAME DUP WHILE WANTED + REPEAT 2DROP RESTORE ; : CF: "CONFIG" WANTED ; ( -b :_This_option_is_available )