OSDN Git Service

V300, la Der de Der
authorJean-Michel THOORENS <jeanmichel.thoorens@gmail.com>
Fri, 19 Apr 2019 12:14:09 +0000 (14:14 +0200)
committerJean-Michel THOORENS <jeanmichel.thoorens@gmail.com>
Fri, 19 Apr 2019 12:14:09 +0000 (14:14 +0200)
32 files changed:
ADDON/ANS_COMPLEMENT.asm
FastForth.pdf
FastForthWords.txt
MSP430-FORTH/ANS_COMP.f
MSP430-FORTH/CHNGBAUD.f
MSP430-FORTH/CORDIC.f
MSP430-FORTH/DEEP_RST.f
MSP430-FORTH/FF_SPECS.f
MSP430-FORTH/FixPoint.f
MSP430-FORTH/MSP_EXP430FR5994/ANS_COMP.4TH
MSP430-FORTH/MSP_EXP430FR5994/CORDIC.4TH
MSP430-FORTH/MSP_EXP430FR5994/CORETEST.4TH
MSP430-FORTH/MSP_EXP430FR5994/DEEP_RST.4TH [new file with mode: 0644]
MSP430-FORTH/MSP_EXP430FR5994/FF_SPECS.4TH [new file with mode: 0644]
MSP430-FORTH/MSP_EXP430FR5994/FIXPOINT.4TH
MSP430-FORTH/MSP_EXP430FR5994/PROG100K.4TH
MSP430-FORTH/MSP_EXP430FR5994/SD_TOOLS.4TH
MSP430-FORTH/MSP_EXP430FR5994/TESTXASM.4TH
MSP430-FORTH/MSP_EXP430FR5994/UTILITY.4TH
MSP430-FORTH/PROG100k.f
MSP430-FORTH/RC5toLCD.f
MSP430-FORTH/RTC.f
MSP430-FORTH/SD_TEST.f
MSP430-FORTH/SD_TOOLS.f
MSP430-FORTH/TESTASM.F
MSP430-FORTH/TESTXASM.F
MSP430-FORTH/UTILITY.f
config/Preprocess.bat
config/SendSource.bat
forthMSP430FR.asm
inc/FastForthREGtoTI.pat
inc/TargetInit.asm

index 84dfae2..37d54ae 100644 (file)
     FORTHWORD "{ANS_COMP}"
     mNEXT
 
+;https://forth-standard.org/standard/core/VALUE
+;( x "<spaces>name" -- )                      define a Forth VALUE
+;Skip leading space delimiters. Parse name delimited by a space.
+;Create a definition for name with the execution semantics defined below,
+;with an initial value equal to x.
+
+;name Execution: ( -- x )
+;Place x on the stack. The value of x is that given when name was created,
+;until the phrase x TO name is executed, causing a new value of x to be assigned to name.
+
+;TO name Run-time: ( x -- )
+;Assign the value x to name.
+
+            FORTHWORD "VALUE"
+            mDOCOL
+            .word CREATE
+            .word COMMA  ; compile x
+            .word DOES
+            FORTHtoASM
+            MOV @RSP+,IP
+            BIT #UF10,SR
+            JZ FETCH 
+            BIC #UF10,SR
+            JMP STORE
+
+; https://forth-standard.org/standard/core/TO
+;TO name Run-time: ( x -- )
+;Assign the value x to named VALUE.
+            FORTHWORD "TO"
+            BIS #UF10,SR
+            MOV @IP+,PC
+
 ;https://forth-standard.org/standard/core/StoD
 ;C S>D    n -- d          single -> double prec.
             FORTHWORD "S>D"
@@ -239,6 +271,19 @@ TWOSTORE    MOV     @PSP+,0(TOS)
             MOV     @PSP+,TOS
             mNEXT
 
+; https://forth-standard.org/standard/double/TwoVALUE
+            FORTHWORD "2VALUE"
+            mDOCOL
+            .word CREATE
+            .word COMMA,COMMA  ; compile hi then lo
+            .word DOES
+            FORTHtoASM
+            MOV @RSP+,IP
+            BIT #UF10,SR
+            JZ TWOFETCH 
+            BIC #UF10,SR
+            JMP TWOSTORE
+
 ; https://forth-standard.org/standard/core/TwoDUP
 ; 2DUP   x1 x2 -- x1 x2 x1 x2   dup top 2 cells
             FORTHWORD "2DUP"
index dc622ac..8a13e89 100644 (file)
Binary files a/FastForth.pdf and b/FastForth.pdf differ
index c4d4eb2..3a3b461 100644 (file)
@@ -156,13 +156,13 @@ see: http://www.ece.utep.edu/courses/web3376/Notes_files/ee3376-isa.pdf
 ?GOTO           used after a conditionnal (0=,0<>,U>=,U<,0<,S<,S>=) to branch to a label FWx or BWx
 GOTO            used as unconditionnal branch to a label FWx or BWx
 
-BW3             BACKWARD branch destination n°3
-BW2                                         n°2
-BW1                                         N°1
+BW3             BACKWARD branch destination n°3
+BW2                                         n°2
+BW1                                         N°1
 
-FW3             FORWARD branch destination  n°3
-FW2                                         n°2
-FW1                                         n°1
+FW3             FORWARD branch destination  n°3
+FW2                                         n°2
+FW1                                         n°1
 
 ?JMP            used after a conditionnal (0=,0<>,U>=,U<,0<,S<,S>=) to jump to a predefined word
 JMP             unconditionnal jump to a predefined word
@@ -231,6 +231,8 @@ RRCM    http://www.ti.com/lit/ug/slau272d/slau272d.pdf#page=214
 POPM    http://www.ti.com/lit/ug/slau272d/slau272d.pdf#page=204
 PUSHM   http://www.ti.com/lit/ug/slau272d/slau272d.pdf#page=205
 
+ASSEMBLER_EXTENDED WORDS set:
+
 ADDX    http://www.ti.com/lit/ug/slau272d/slau272d.pdf#page=187
 ADDCX   http://www.ti.com/lit/ug/slau272d/slau272d.pdf#page=188
 ANDX    http://www.ti.com/lit/ug/slau272d/slau272d.pdf#page=189
@@ -256,6 +258,7 @@ CMPA    http://www.ti.com/lit/ug/slau272d/slau272d.pdf#page=235
 MOVA    http://www.ti.com/lit/ug/slau272d/slau272d.pdf#page=238
 SUBA    http://www.ti.com/lit/ug/slau272d/slau272d.pdf#page=241
 
+RPT
 
 CONDCOMP ADD-ON
 ---------------
@@ -330,13 +333,13 @@ QUIT becomes a DEFERed word
 
 ANS_COMPLEMENT ADD-ON
 ---------------------
-PAD             SOURCE          .(              (               DECIMAL         HEX             
+PAD             >IN             SOURCE          .(              (               DECIMAL         HEX             
 FILL            [CHAR]          CHAR            +!              MIN             MAX             2/              
 2*              RSHIFT          LSHIFT          XOR             OR              AND             INVERT          
-2OVER           2SWAP           2DROP           2DUP            2!              2@              S>D             
-CELL+           CELLS           CHAR+           CHARS           ALIGN           ALIGNED         */              
-*/MOD           MOD             /               /MOD            *               FM/MOD          SM/REM          
-M*              UM*             {ANS_COMP}
+2OVER           2SWAP           2DROP           2DUP            2VALUE          2!              2@              
+S>D             CELL+           CELLS           CHAR+           CHARS           ALIGN           ALIGNED         
+*/              */MOD           MOD             /               /MOD            *               FM/MOD          
+SM/REM          M*              UM*             TO              VALUE           {ANS_COMP}
 
 PAD             https://forth-standard.org/standard/core/PAD            
 >IN             https://forth-standard.org/standard/core/toIN
@@ -364,6 +367,7 @@ AND             https://forth-standard.org/standard/core/AND
 2SWAP           https://forth-standard.org/standard/core/TwoSWAP
 2DROP           https://forth-standard.org/standard/core/TwoDROP
 2DUP            https://forth-standard.org/standard/core/TwoDUP
+2VALUE          https://forth-standard.org/standard/double/TwoVALUE
 2!              https://forth-standard.org/standard/core/TwoStore
 2@              https://forth-standard.org/standard/core/TwoFetch
 S>D             https://forth-standard.org/standard/core/StoD
@@ -383,6 +387,8 @@ FM/MOD          https://forth-standard.org/standard/core/FMDivMOD
 SM/REM          https://forth-standard.org/standard/core/SMDivREM
 M*              https://forth-standard.org/standard/core/MTimes
 UM*             https://forth-standard.org/standard/core/UMTimes
+TO              https://forth-standard.org/standard/core/TO
+VALUE           https://forth-standard.org/standard/core/VALUE
 {ANS_COMP}
 
 
index 1ddfe95..d1a8efe 100644 (file)
@@ -1,6 +1,7 @@
+\ -*- coding: utf-8 -*-
 
 ; -----------------------------------------------------
-; ANS_COMP.f    words complement to pass CORETEST.4th
+; ANS_COMP.f    words complement to pass CORETEST.4TH
 ; -----------------------------------------------------
 \
 \ to see kernel options, download FastForthSpecs.f
 \ ASSEMBLER conditionnal usage with IF UNTIL WHILE  S<  S>=  U<   U>=  0=  0<>  0>=
 \ ASSEMBLER conditionnal usage with ?JMP ?GOTO      S<  S>=  U<   U>=  0=  0<>  0<
 
-PWR_STATE
-
 : DEFINED! ECHO 1 ABORT" already loaded!" ;
 
 [DEFINED] {ANS_COMP} [IF] DEFINED!
 
 [ELSE]
 
+PWR_STATE
+
 MARKER {ANS_COMP}
 
+\ https://forth-standard.org/standard/core/VALUE
+\ ( x "<spaces>name" -- )                      define a Forth VALUE
+\ Skip leading space delimiters. Parse name delimited by a space.
+\ Create a definition for name with the execution semantics defined below,
+\ with an initial value equal to x.
+\ 
+\ name Execution: ( -- x )
+\ Place x on the stack. The value of x is that given when name was created,
+\ until the phrase x TO name is executed, causing a new value of x to be assigned to name.
+\ 
+\ TO name Run-time: ( x -- )
+\ Assign the value x to name.
+
+: VALUE 
+CREATE ,
+DOES> 
+HI2LO
+MOV @RSP+,IP
+BIT #UF10,SR
+0= IF
+    MOV #@,PC
+THEN 
+BIC #UF10,SR
+MOV #!,PC
+ENDCODE
+
+\ https://forth-standard.org/standard/core/TO
+\ TO name Run-time: ( x -- )
+\ Assign the value x to named VALUE.
+CODE TO
+BIS #UF10,SR
+MOV @IP+,PC
+ENDCODE
+
 [UNDEFINED] AND [IF]
 \ https://forth-standard.org/standard/core/AND
 \ C AND    x1 x2 -- x3           logical AND
@@ -189,10 +224,10 @@ ENDCODE
 [THEN]
 
 \ https://forth-standard.org/standard/core/SMDivREM
-\ SM/REM   d1lo d1hi n2 -- r3 q4  symmetric signed div
+\ SM/REM   DVDlo DVDhi DIVlo -- r3 q4  symmetric signed div
 CODE SM/REM
-MOV TOS,S           \           S=divisor
-MOV @PSP,T          \           T=dividend_sign==>rem_sign
+MOV TOS,S           \           S=DIVlo
+MOV @PSP,T          \           T=DVD_sign==>rem_sign
 CMP #0,TOS          \           n2 >= 0 ?
 S< IF               \
     XOR #-1,TOS
@@ -293,16 +328,18 @@ M* DROP
 >R M* R> FM/MOD NIP
 ;
 
-\ ----------------------------------------------------------------------
-\ DOUBLE OPERATORS
-\ ----------------------------------------------------------------------
-
 \ https://forth-standard.org/standard/core/StoD
 \ S>D    n -- d          single -> double prec.
 : S>D
     DUP 0<
 ;
 
+\ ----------------------------------------------------------------------
+\ DOUBLE OPERATORS
+\ ----------------------------------------------------------------------
+
+[UNDEFINED] {DOUBLE} [IF]
+
 \ https://forth-standard.org/standard/core/TwoFetch
 \ 2@    a-addr -- x1 x2    fetch 2 cells ; the lower address will appear on top of stack
 CODE 2@
@@ -321,6 +358,19 @@ MOV @PSP+,TOS
 MOV @IP+,PC
 ENDCODE
 
+\ https://forth-standard.org/standard/double/TwoVALUE
+: 2VALUE
+CREATE
+, ,             \ compile Shi then Flo
+DOES>
+HI2LO
+MOV @RSP+,IP
+BIT #UF10,SR
+0= ?JMP 2@ 
+BIC #UF10,SR
+JMP 2!
+ENDCODE
+
 \ https://forth-standard.org/standard/core/TwoDUP
 \ 2DUP   x1 x2 -- x1 x2 x1 x2   dup top 2 cells
 CODE 2DUP
@@ -360,6 +410,8 @@ MOV 6(PSP),TOS      \ -- x1 x2 x3 x4 x1 x2
 MOV @IP+,PC
 ENDCODE
 
+[THEN]
+
 \ ----------------------------------------------------------------------
 \ ALIGNMENT OPERATORS
 \ ----------------------------------------------------------------------
@@ -495,11 +547,9 @@ ENDCODE
 TOIN CONSTANT >IN
 
 [UNDEFINED] PAD [IF]
-
 \ https://forth-standard.org/standard/core/PAD
 \  PAD           --  addr
 PAD_ORG CONSTANT PAD
-
 [THEN]
 
 RST_HERE
index 48d89c4..8abe6b2 100644 (file)
@@ -1,3 +1,4 @@
+\ -*- coding: utf-8 -*-
 
 ; ------------
 ; CHNGBAUD.f
index 9a99cf1..d6c9a4d 100644 (file)
@@ -1,3 +1,4 @@
+\ -*- coding: utf-8 -*-
 
 ; ----------
 ; CORDIC.f
 \ ASSEMBLER conditionnal usage with IF UNTIL WHILE  S<  S>=  U<   U>=  0=  0<>  0>=
 \ ASSEMBLER conditionnal usage with ?JMP ?GOTO      S<  S>=  U<   U>=  0=  0<>  0<
 
-PWR_STATE
-
 : DEFINED! ECHO 1 ABORT" already loaded!" ;
 
 [DEFINED] {CORDIC} [IF] DEFINED!
 
 [ELSE]
 
+PWR_STATE
+
 MARKER {CORDIC}
 
 [UNDEFINED] {FIXPOINT} [IF] \ define words to display angle as Q15.16 number.
index 1f217c5..61a3412 100644 (file)
@@ -1,3 +1,4 @@
+\ -*- coding: utf-8 -*-
 
 ; ------------
 ; DEEP_RST.f
index 2587ff1..739b7f9 100644 (file)
@@ -1,3 +1,4 @@
+\ -*- coding: utf-8 -*-
 
 ; ------------------
 ; FF_SPECS.f
@@ -43,6 +44,57 @@ LOOP
 
 : ESC #27 EMIT ;
 
+[UNDEFINED] PAD [IF]
+\ https://forth-standard.org/standard/core/PAD
+\  PAD           --  addr
+PAD_ORG CONSTANT PAD
+[THEN]
+
+[UNDEFINED] AND [IF]
+\ https://forth-standard.org/standard/core/AND
+\ C AND    x1 x2 -- x3           logical AND
+CODE AND
+AND @PSP+,TOS
+MOV @IP+,PC
+ENDCODE
+[THEN]
+
+
+[UNDEFINED] WORDS [IF]
+\ https://forth-standard.org/standard/tools/WORDS
+\ list all words of vocabulary first in CONTEXT.
+: WORDS                         \ --            
+CR 
+CONTEXT @ PAD                   \ -- VOC_BODY PAD                  MOVE all threads of VOC_BODY in PAD
+INI_THREAD @ DUP +              \ -- VOC_BODY PAD THREAD*2
+MOVE                            \ -- vocabumary entries are copied in PAD
+BEGIN                           \ -- 
+    0 DUP                       \ -- ptr=0 MAX=0                
+    INI_THREAD @ DUP + 0        \ -- ptr=0 MAX=0 THREADS*2 0
+        DO                      \ -- ptr MAX            I =  PAD_ptr = thread*2
+        DUP I PAD + @           \ -- ptr MAX MAX NFAx
+            U< IF               \ -- ptr MAX            if MAX U< NFAx
+                DROP DROP       \ --                    drop ptr and MAX
+                I DUP PAD + @   \ -- new_ptr new_MAX
+            THEN                \ 
+        2 +LOOP                 \ -- ptr MAX
+    ?DUP                        \ -- ptr MAX MAX | -- ptr 0 (all threads in PAD = 0)
+WHILE                           \ -- ptr MAX                    replace it by its LFA
+    DUP                         \ -- ptr MAX MAX
+    2 - @                       \ -- ptr MAX [LFA]
+    ROT                         \ -- MAX [LFA] ptr
+    PAD +                       \ -- MAX [LFA] thread
+    !                           \ -- MAX                [LFA]=new_NFA updates PAD+ptr
+    DUP                         \ -- MAX MAX
+    COUNT $7F AND               \ -- MAX addr count (with suppr. of immediate bit)
+    TYPE                        \ -- MAX
+    C@ $0F AND                  \ -- count_of_chars
+    $10 SWAP - SPACES           \ --                    complete with spaces modulo 16 chars
+REPEAT                          \ --
+DROP                            \ ptr --
+;                               \ all threads in PAD are filled with 0
+[THEN]
+
 : ADDONS
 ESC ." [7m"         \ escape sequence to set reverse video
 ." KERNEL OPTIONS:" \ in reverse video
@@ -74,6 +126,17 @@ DUP + DUP 0< IF CR ." CONDCOMP" THEN
     [DEFINED] {TOOLS}    [IF] CR ." UTILITY" [THEN]
     [DEFINED] {FIXPOINT} [IF] CR ." FIXPOINT" [THEN]
     [DEFINED] {SD_TOOLS} [IF] CR ." SD_TOOLS" [THEN]
+    CR CR
+    [DEFINED] VOCABULARY [IF]
+    CR ESC ." [7m"      \ escape sequence to set reverse video
+    ." ASSEMBLER word set"
+    ESC ." [0m"         \ escape sequence to clear reverse video
+        ALSO ASSEMBLER WORDS CR PREVIOUS
+    [THEN]
+    CR ESC ." [7m"      \ escape sequence to set reverse video
+    ." FORTH word set"
+    ESC ." [0m"         \ escape sequence to clear reverse video
+    WORDS
 THEN
 ;
 
@@ -82,7 +145,7 @@ PWR_STATE       \ before free bytes computing, remove all created words
 HERE            \ to compute bytes
 ECHO
 
-42              \ number of terminal lines   
+41              \ number of terminal lines   
 0 DO CR LOOP    \ don't erase any line of source
 
 ESC ." [1J"     \ erase up (42 empty lines)
@@ -120,7 +183,7 @@ SIGNATURES HERE - U. ." bytes free" CR
 
 ESC ." [0m"     \ escape sequence to clear reverse video
 
-CR ADDONS CR
+CR ADDONS
 ;
 
-ECHO specs \ here FastForth type a (volatile) message with some informations
+ECHO specs \ here FastForth types a (volatile) message with some informations
index e64ee2b..18eb6d0 100644 (file)
@@ -1,3 +1,4 @@
+\ -*- coding: utf-8 -*-
 
 ; -----------------------------------------------------
 ; FIXPOINT.f
 \ ASSEMBLER conditionnal usage with ?JMP ?GOTO      S<  S>=  U<   U>=  0=  0<>  0<
 \
 
-PWR_STATE
-
 : DEFINED! ECHO 1 ABORT" already loaded!" ;
 
 [DEFINED] {FIXPOINT} [IF] DEFINED!
 
 [ELSE]
 
+PWR_STATE
+
 MARKER {FIXPOINT}
 
 
@@ -250,7 +251,7 @@ S< IF       XOR #-1,Y           \ 1 INV(DVDlo)
             XOR #-1,X           \ 1 INV(DVDhi)
             ADD #1,Y            \ 1 INV(DVDlo)+1
             ADDC #0,X           \ 1 INV(DVDhi)+C
-THEN        AND #-1,TOS         \ 1 DVR < 0 ?
+THEN        AND #-1,TOS         \ 1 DVRhi < 0 ?
 S< IF       XOR #-1,rDOVAR      \ 1 INV(DVRlo)
             XOR #-1,TOS         \ 1 INV(DVRhi)
             ADD #1,rDOVAR       \ 1 INV(DVRlo)+1
index e2cece0..d4391da 100644 (file)
@@ -1,18 +1,37 @@
 
 ; -----------------------------------------------------
-; ANS_COMP.4th    words complement to pass CORETEST.4th
+; ANS_COMP.4th    words complement to pass CORETEST.4TH
 ; -----------------------------------------------------
 
-PWR_STATE
-
 : DEFINED! ECHO 1 ABORT" already loaded!" ;
 
 [DEFINED] {ANS_COMP} [IF] DEFINED!
 
 [ELSE]
 
+PWR_STATE
+
 MARKER {ANS_COMP}
 
+
+: VALUE 
+CREATE ,
+DOES> 
+HI2LO
+MOV @R1+,R13
+BIT #$400,R2
+0= IF
+    MOV #@,R0
+THEN 
+BIC #$400,R2
+MOV #!,R0
+ENDCODE
+
+CODE TO
+BIS #$400,R2
+MOV @R13+,R0
+ENDCODE
+
 [UNDEFINED] AND [IF]
 CODE AND
 AND @R15+,R14
@@ -220,11 +239,13 @@ M* DROP
 >R M* R> FM/MOD NIP
 ;
 
-
 : S>D
     DUP 0<
 ;
 
+
+[UNDEFINED] {DOUBLE} [IF]
+
 CODE 2@
 SUB #2,R15
 MOV 2(R14),0(R15)
@@ -239,6 +260,18 @@ MOV @R15+,R14
 MOV @R13+,R0
 ENDCODE
 
+: 2VALUE
+CREATE
+, ,
+DOES>
+HI2LO
+MOV @R1+,R13
+BIT #$400,R2
+0= ?JMP 2@ 
+BIC #$400,R2
+JMP 2!
+ENDCODE
+
 CODE 2DUP
 SUB #4,R15
 MOV R14,2(R15)
@@ -270,6 +303,8 @@ MOV 6(R15),R14
 MOV @R13+,R0
 ENDCODE
 
+[THEN]
+
 CODE ALIGNED
 BIT #1,R14
 ADDC #0,R14
@@ -363,9 +398,7 @@ ENDCODE
 $1DC4 CONSTANT >IN
 
 [UNDEFINED] PAD [IF]
-
 $1CE4 CONSTANT PAD
-
 [THEN]
 
 RST_HERE
index 536a477..6b2275d 100644 (file)
@@ -3,14 +3,14 @@
 ; CORDIC.4th
 ; ----------
 
-PWR_STATE
-
 : DEFINED! ECHO 1 ABORT" already loaded!" ;
 
 [DEFINED] {CORDIC} [IF] DEFINED!
 
 [ELSE]
 
+PWR_STATE
+
 MARKER {CORDIC}
 
 [UNDEFINED] {FIXPOINT} [IF]
index 6f118af..abe9c36 100644 (file)
@@ -97,7 +97,7 @@ CREATE ACTUAL-RESULTS 20 CELLS ALLOT
     ELSE >IN ! DROP [CHAR] * EMIT
     THEN ;
 
-ECHO CR HEX
+ECHO HEX
 
 \ From: John Hayes S1I
 \ Subject: core.fr
diff --git a/MSP430-FORTH/MSP_EXP430FR5994/DEEP_RST.4TH b/MSP430-FORTH/MSP_EXP430FR5994/DEEP_RST.4TH
new file mode 100644 (file)
index 0000000..3012074
--- /dev/null
@@ -0,0 +1,6 @@
+
+; ------------
+; DEEP_RST.4th
+; ------------
+
+-1 $1808 ! COLD
diff --git a/MSP430-FORTH/MSP_EXP430FR5994/FF_SPECS.4TH b/MSP430-FORTH/MSP_EXP430FR5994/FF_SPECS.4TH
new file mode 100644 (file)
index 0000000..8f0ae44
--- /dev/null
@@ -0,0 +1,173 @@
+
+; ------------------
+; FF_SPECS.4th
+; ------------------
+
+; display all FastForth compilation options
+
+
+WIPE
+
+0 CONSTANT CASE IMMEDIATE
+
+: OF
+1+     
+>R     
+POSTPONE OVER POSTPONE =
+POSTPONE IF    
+POSTPONE DROP  
+R>     
+; IMMEDIATE 
+
+: ENDOF
+>R     
+POSTPONE ELSE 
+R>     
+; IMMEDIATE 
+
+: ENDCASE
+POSTPONE DROP
+0 DO 
+    POSTPONE THEN 
+LOOP 
+; IMMEDIATE 
+
+: BS 8 EMIT ;
+
+: ESC #27 EMIT ;
+
+[UNDEFINED] PAD [IF]
+$1CE4 CONSTANT PAD
+[THEN]
+
+[UNDEFINED] AND [IF]
+CODE AND
+AND @R15+,R14
+MOV @R13+,R0
+ENDCODE
+[THEN]
+
+
+[UNDEFINED] WORDS [IF]
+: WORDS
+CR 
+$1DCA @ PAD
+$1800 @ DUP +
+MOVE
+BEGIN
+    0 DUP
+    $1800 @ DUP + 0
+        DO
+        DUP I PAD + @
+            U< IF
+                DROP DROP
+                I DUP PAD + @
+            THEN
+        2 +LOOP
+    ?DUP
+WHILE
+    DUP
+    2 - @
+    ROT
+    PAD +
+    !
+    DUP
+    COUNT $7F AND
+    TYPE
+    C@ $0F AND
+    $10 SWAP - SPACES
+REPEAT
+DROP
+;
+[THEN]
+
+: ADDONS
+ESC ." [7m"
+." KERNEL OPTIONS:"
+ESC ." [0m"
+$1812 @
+
+      DUP 0< IF CR ." LF XTAL" THEN
+DUP + DUP 0< IF CR ." TERMINAL5WIRES" THEN
+DUP + DUP 0< IF CR ." TERMINAL4WIRES" THEN
+DUP + DUP 0< IF CR ." TERMINAL3WIRES" THEN
+DUP + DUP 0< IF CR ." HALFDUPLEX_TERMINAL" THEN
+DUP + DUP 0< IF CR ." PROMPT" THEN
+DUP + DUP 0< IF CR ." BOOTLOADER" THEN
+DUP + DUP 0< IF CR ." SD_CARD_READ_WRITE" THEN
+DUP + DUP 0< IF CR ." SD_CARD_LOADER" THEN
+DUP + DUP 0< IF CR ." FIXPOINT_INPUT" THEN
+DUP + DUP 0< IF CR ." DOUBLE_INPUT" THEN
+DUP + DUP 0< IF CR ." VOCABULARY_SET" THEN
+DUP + DUP 0< IF CR ." NONAME" THEN
+DUP + DUP 0< IF CR ." EXTENDED_ASM" THEN
+DUP + DUP 0< IF CR ." ASSEMBLER" THEN
+DUP + DUP 0< IF CR ." CONDCOMP" THEN
+
+0< IF
+    CR ESC ." [7m"
+    ." OTHER OPTIONS:"
+    ESC ." [0m"
+    [DEFINED] {ANS_COMP} [IF] CR ." ANS_COMPLEMENT" [THEN]
+    [DEFINED] {TOOLS}    [IF] CR ." UTILITY" [THEN]
+    [DEFINED] {FIXPOINT} [IF] CR ." FIXPOINT" [THEN]
+    [DEFINED] {SD_TOOLS} [IF] CR ." SD_TOOLS" [THEN]
+    CR CR
+    [DEFINED] VOCABULARY [IF]
+    CR ESC ." [7m"
+    ." ASSEMBLER word set"
+    ESC ." [0m"
+        ALSO ASSEMBLER WORDS CR PREVIOUS
+    [THEN]
+    CR ESC ." [7m"
+    ." FORTH word set"
+    ESC ." [0m"
+    WORDS
+THEN
+;
+
+: specs
+PWR_STATE
+HERE
+ECHO
+
+41
+0 DO CR LOOP
+
+ESC ." [1J"
+ESC ." [H"
+ESC ." [7m"
+
+$1A04 @
+
+CR ." FastForth V" $1810 @ U. ." for MSP430FR"
+CASE
+    $830C     OF      ." 2355,"   $8000   ENDOF
+    $8240     OF      ." 2433,"   $C400   ENDOF
+    $81F0     OF      ." 4133,"   $C400   ENDOF
+    $8103     OF      ." 5739,"   $C200   ENDOF
+    $8102     OF      ." 5738,"   $C200   ENDOF
+    $8169     OF      ." 5969,"   $4400   ENDOF
+    $8160     OF      ." 5948,"   $4400   ENDOF
+    $82A1     OF      ." 5994,"   $4000   ENDOF
+    $81A8     OF      ." 6989,"   $4400   ENDOF
+
+    ABORT" xxxx <-- unrecognized device!"
+ENDCASE
+
+SPACE $1806 @ 0 1000 UM/MOD U. 
+?DUP IF  BS ." ," U.
+THEN ." MHz, "
+
+$1800 @ U. BS ." -Entry Vocabularies, "
+
+- U. ." bytes, "
+
+$FF80 HERE - U. ." bytes free" CR
+
+ESC ." [0m"
+
+CR ADDONS
+;
+
+ECHO specs
index f761b05..992d10c 100644 (file)
@@ -3,14 +3,14 @@
 ; FIXPOINT.4th
 ; -----------------------------------------------------
 
-PWR_STATE
-
 : DEFINED! ECHO 1 ABORT" already loaded!" ;
 
 [DEFINED] {FIXPOINT} [IF] DEFINED!
 
 [ELSE]
 
+PWR_STATE
+
 MARKER {FIXPOINT}
 
 
index 8efd046..f7a5cd0 100644 (file)
@@ -1,3 +1,4 @@
+
 ; -----------------------------------
 ; PROG100k.4th = 110 x RC5toLCD.4th
 ; -----------------------------------
index 628f3a6..daa0a8d 100644 (file)
@@ -3,14 +3,14 @@
 ; SD_TOOLS.4th : BASIC TOOLS for SD Card : DIR FAT SECTOR CLUSTER
 ; ---------------------------------------------------------------
 
-PWR_STATE
-
 : DEFINED! ECHO 1 ABORT" already loaded!" ;
 
 [DEFINED] {SD_TOOLS} [IF] DEFINED!
 
 [ELSE]
 
+PWR_STATE
+
 MARKER {SD_TOOLS}
 
 [UNDEFINED] MAX [IF]
index 8f800ea..950c421 100644 (file)
@@ -3,7 +3,6 @@
 ; UTILITY.4th
 ; ------------------------------------------------------------------------------
 
-PWR_STATE
 
 : DEFINED! ECHO 1 ABORT" already loaded!" ;
 
@@ -11,6 +10,8 @@ PWR_STATE
 
 [ELSE]
 
+PWR_STATE
+
 MARKER {TOOLS} 
 
 [UNDEFINED] ? [IF]
index fff2c68..b39bc71 100644 (file)
@@ -1,3 +1,5 @@
+\ -*- coding: utf-8 -*-
+
 ; -----------------------------------
 ; PROG100k.f = 110 x RC5toLCD.f
 ; -----------------------------------
index 4c067dd..f00fe82 100644 (file)
@@ -1,3 +1,4 @@
+\ -*- coding: utf-8 -*-
 
 ; -----------------------------------
 ; RC5TOLCD.f
index 756e391..4e00879 100644 (file)
@@ -1,3 +1,4 @@
+\ -*- coding: utf-8 -*-
 
 ; --------------------
 ; RTC.f
index 799bf03..aec447a 100644 (file)
@@ -1,3 +1,4 @@
+\ -*- coding: utf-8 -*-
 
 ; -----------
 ; SD_TEST.f
index 958e320..c2bb40d 100644 (file)
@@ -1,3 +1,4 @@
+\ -*- coding: utf-8 -*-
 
 ; ---------------------------------------------------------------
 ; SD_TOOLS.f : BASIC TOOLS for SD Card : DIR FAT SECTOR CLUSTER
 \ ASSEMBLER conditionnal usage with IF UNTIL WHILE  S<  S>=  U<   U>=  0=  0<>  0>=
 \ ASSEMBLER conditionnal usage with ?JMP ?GOTO      S<  S>=  U<   U>=  0=  0<>  0<
 
-PWR_STATE
-
 : DEFINED! ECHO 1 ABORT" already loaded!" ;
 
 [DEFINED] {SD_TOOLS} [IF] DEFINED!
 
 [ELSE]
 
+PWR_STATE
+
 MARKER {SD_TOOLS}
 
 [UNDEFINED] MAX [IF]    \ MAX and MIN are defined in {UTILITY}
index aaf1686..86956ee 100644 (file)
@@ -1,3 +1,4 @@
+\ -*- coding: utf-8 -*-
 
 ; -----------------------------------------------------------------------
 ; TEST_ASM.f
index 55d05ca..e70dd06 100644 (file)
@@ -1,3 +1,4 @@
+\ -*- coding: utf-8 -*-
 
 ; -----------------------------------------------------------------------
 ; TESTXASM.f
index 3aacf9e..0ccccec 100644 (file)
@@ -1,3 +1,4 @@
+\ -*- coding: utf-8 -*-
 
 ; ------------------------------------------------------------------------------
 ; UTILITY.f
@@ -31,7 +32,6 @@
 \ ASSEMBLER conditionnal usage with IF UNTIL WHILE  S<  S>=  U<   U>=  0=  0<>  0>=
 \ ASSEMBLER conditionnal usage with ?JMP ?GOTO      S<  S>=  U<   U>=  0=  0<>  0<
 
-PWR_STATE
 
 : DEFINED! ECHO 1 ABORT" already loaded!" ;
 
@@ -39,6 +39,8 @@ PWR_STATE
 
 [ELSE]
 
+PWR_STATE
+
 MARKER {TOOLS} 
 
 [UNDEFINED] ? [IF]    \
index c83402c..f118906 100644 (file)
@@ -4,7 +4,7 @@
 @ECHO OFF
 
 ::echo %2
-::echo %~d1\config\gema\%~n2.pat
+::echo %~d1\inc\%~n2.pat
 
 IF "%2" == "" ( 
 echo no file to be preprocessed!
@@ -32,8 +32,8 @@ exit
 
 :preprocess
 ::%~d1\prog\gema.exe -nobackup -line -t '\n=\r\n;\r\n=\r\n' -f %~d1\inc\%~n2.pat %1 %~dp1last.4TH
-::%~d1\prog\gema.exe -nobackup -line -t '-\r\n=\r\n' -f %~d1\inc\%~n2.pat %1 %~dp1last.4TH
-%~d1\prog\gema.exe -nobackup -line -t -f %~d1\inc\%~n2.pat %1 %~dp1last.4TH
+%~d1\prog\gema.exe -nobackup -line -t '-\r\n=\r\n' -f %~d1\inc\%~n2.pat %1 %~dp1last.4TH
+::%~d1\prog\gema.exe -nobackup -line -t -f %~d1\inc\%~n2.pat %1 %~dp1last.4TH
 @XCOPY /D /Y  "%~dp1last.4TH" "%~dp1\%~n2\%~n1.4TH*" > NUL
 exit
 
index 5d38b27..a726ad1 100644 (file)
@@ -13,8 +13,8 @@ IF /I "%~x1" == ".4TH" GOTO 4TH
 :: ==============================================================================================
 :: source file.f part
 :: %~dpn1.f is the symbolic source file.f described as drive\path\name.f
-:: %~d1\config\gema\%~n2.pat is the pattern file for preprocessor gema.exe
-:: %~dpn1.4TH is the source file.4TH to be sent to the target
+:: %~d1\inc\%~n2.pat is the pattern file for preprocessor gema.exe
+:: %~dpn1.4TH is the source file.4TH to be preprocessed then sent to the target
 :: %~d1 is the drive of arg %1
 :: %~n2 is your selected template by SelectTarget.bat or your scite $(1)
 
index ac81dfd..aea5f15 100644 (file)
@@ -973,7 +973,7 @@ UMSLASHMOD  PUSH #DROP          ;3 as return address for MU/MOD
 ; rDODOES = count
 
 ; MU/MOD        DVDlo DVDhi DIVlo -- REMlo QUOTlo QUOThi, also used by fixpoint and #
-MUSMOD      MOV TOS,T           ;1 T = DIV
+MUSMOD      MOV TOS,T           ;1 T = DIVlo
             MOV 2(PSP),S        ;3 S = DVDlo
             MOV @PSP,TOS        ;2 TOS = DVDhi
 MUSMOD1     MOV #0,W            ;1  W = REMlo = 0
@@ -988,7 +988,7 @@ MUSMOD2     MOV #32,rDODOES     ;2  init loop count
 ; -----------------------------------------
 MDIV1       CMP T,W             ;1  REMlo U>= DIV ?
             JNC MDIV2           ;2  no : carry is reset
-            SUB T,W             ;1  yes: REMlo - DIV ; carry is set after soustraction!
+            SUB T,W             ;1  yes: REMlo - DIV ; carry is set
 MDIV2       ADDC X,X            ;1  RLC quotLO
             ADDC Y,Y            ;1  RLC quotHI
             SUB #1,rDODOES      ;1  Decrement loop counter
@@ -1699,8 +1699,8 @@ TONUMEND    MOV S,0(PSP)            ;3 -- x x addr2 cnt2
 ; ?NUMBER makes the interface between INTERPRET and >NUMBER; it's a subset of INTERPRET.
 ; convert a string to a signed number; FORTH 2012 prefixes $, %, # are recognized
 ; digits separator '_' is recognized
-; with DOUBLE_INPUT switched ON, 32 bits numbers (with decimal point) are recognised
-; with FIXPOINT_INPUT switched ON, Q15.16 signed numbers are recognised.
+; with DOUBLE_INPUT switched ON, 32 bits numbers (with decimal point) are recognized
+; with FIXPOINT_INPUT switched ON, Q15.16 signed numbers are recognized.
 ; prefixed chars - # % $ are processed before calling >NUMBER
 ; other (anywhere) chars . , and _ are processed as >NUMBER exits
 ;Z ?NUMBER  addr -- n|d -1  if convert ok ; flag Z=0, UF9=1 if double
@@ -1738,22 +1738,24 @@ PREFIXED    ADD #1,S                ;1
 TONUMEXIT   FORTHtoASM              ;  -- addr ud2lo-hi addr2 cnt2      R-- IP sign BASE    S=addr2
 ; ----------------------------------;
             JZ QNUMNEXT             ;2                                  if conversion is ok
-            SUB #2,IP
+; ----------------------------------;
+            SUB #2,IP               ;                                   redefines TONUMEXIT as >NUMBER return
             CMP.B #28h,W            ;                                   rejected char by >NUMBER is a underscore ?
-            JZ TONUMPLUS            ;                                   skip it
+            JZ TONUMPLUS            ;                                   yes, skip it
+; ----------------------------------;
         .IFDEF DOUBLE_NUMBERS       ;                                   DOUBLE_NUMBERS = DOUBLE_INPUT | FIXPOINT_INPUT
-;            BIT #UF9,SR
-;            JNZ QNUMNEXT
             BIS #UF9,SR             ;2                                  set double number flag
-        .ENDIF
-        .IFDEF DOUBLE_INPUT
+        .ENDIF                      ;
+        .IFDEF DOUBLE_INPUT         ;
             CMP.B #0F7h,W           ;2                                  rejected char by >NUMBER is a decimal point ?
-            JZ TONUMPLUS            ;2                                  skip it
-        .ENDIF
+            JZ TONUMPLUS            ;2                                  yes, skip it
+        .ENDIF                      ;
+; ----------------------------------;
         .IFDEF FIXPOINT_INPUT       ;
             CMP.B #0F5h,W           ;2                                  rejected char by >NUMBER is a comma ?
             JNZ QNUMNEXT            ;2                                  no, that will be followed by abort on conversion error
-S15Q16      MOV TOS,W               ;1 -- addr ud2lo x x x              yes   W=cnt2
+; ----------------------------------;
+S15Q16      MOV TOS,W               ;1 -- addr ud2lo x x x              W=cnt2
             MOV #0,X                ;1 -- addr ud2lo x 0 x              init X = ud2lo' = 0
 S15Q16LOOP  MOV X,2(PSP)            ;3 -- addr ud2lo ud2lo' ud2lo' x    0(PSP) = ud2lo'
             SUB.B #1,W              ;1                                  decrement cnt2
@@ -1798,7 +1800,7 @@ QNUMOK      ADD #2,PSP              ;1 -- addr ud2lo-hi cnt2
             MOV @PSP+,0(PSP)        ;4 -- udlo udhi sign                note : PSP is incremented before write back.
             XOR #-1,TOS             ;1 -- udlo udhi inv(sign)
             JNZ QDOUBLE             ;2                                  if jump : TOS=-1 and Z=0 ==> conversion ok
-Q2NEGATE    XOR #-1,TOS             ;1 -- udlo udhi tf
+QDNEGATE    XOR #-1,TOS             ;1 -- udlo udhi tf
             XOR #-1,2(PSP)          ;3
             XOR #-1,0(PSP)          ;3 -- (dlo dhi)-1 tf
             ADD #1,2(PSP)           ;3
@@ -1892,8 +1894,8 @@ TONUMEND    MOV S,0(PSP)            ;3 -- ud2lo ud2hi adr2 count2
 ; ?NUMBER makes the interface between >NUMBER and INTERPRET; it's a subset of INTERPRET.
 ; convert a string to a signed number; FORTH 2012 prefixes $, %, # are recognized
 ; digits separator '_' is recognized
-; with DOUBLE_INPUT switched ON, 32 bits numbers (with decimal point) are recognised
-; with FIXPOINT_INPUT switched ON, Q15.16 signed numbers are recognised.
+; with DOUBLE_INPUT switched ON, 32 bits numbers (with decimal point) are recognized
+; with FIXPOINT_INPUT switched ON, Q15.16 signed numbers are recognized.
 ; prefixes # % $ and - are processed before calling >NUMBER
 ; not convertible chars '.' , ',' and '_' are processed as >NUMBER exits
 ;Z ?NUMBER  addr -- n|d -1  if convert ok ; flag Z=0, UF9=1 if double
@@ -1937,8 +1939,6 @@ TONUMEXIT   FORTHtoASM              ;  -- addr ud2lo-hi addr2 cnt2      R-- IP s
             CMP.B #28h,Y            ;                                   rejected char by >NUMBER is a underscore ?
             JZ TONUMPLUS            ;                                   skip it
         .IFDEF DOUBLE_NUMBERS       ;                                   DOUBLE_NUMBERS = DOUBLE_INPUT | FIXPOINT_INPUT
-            BIT #UF9,SR
-            JNZ QNUMNEXT
             BIS #UF9,SR             ;2                                  set double number flag
         .ENDIF
         .IFDEF DOUBLE_INPUT
@@ -2250,27 +2250,27 @@ QABORT_TERM                         ; wait the end of downloading source file
             CALL #RXON              ; send XON and/or set RTS low
 QABORTLOOP  BIC #UCRXIFG,&TERM_IFG  ; clear UCRXIFG
         MOV #int(frequency*2730),Y  ; 2730*frequency ==> 65520 @ 24MHz
-QABUSBLOOPJ MOV #8,X                ; 1~        <-------+ windows 10 seems very slow... ==> 2730*36 = 98ms delay
+QABUSBLOOPJ MOV #8,X                ; 1~        <-------+ windows 10 seems very slow... ==> 2730*37 = 101ms delay
             ADD X,X                 ; 1~                | linux seems very very slow... ==> 2730*69 = 188ms delay
 QABUSBLOOPI NOP                     ; 1~        <---+   |
             SUB #1,X                ; 1~            |   | the loop must be longer than longuest existing silence on terminal
             JNZ QABUSBLOOPI         ; 2~ 4~ loop ---+   | i.e. when USB driver refill they buffers.
             SUB #1,Y                ; 1~                |
-            JNZ QABUSBLOOPJ         ; 2~ 36~/69~ loop --+
+            JNZ QABUSBLOOPJ         ; 2~ 37~/69~ loop --+
             BIT #UCRXIFG,&TERM_IFG  ; 4 new char in TERMRXBUF after delay for refill ?
             JNZ QABORTLOOP          ; 2 yes, the input stream is still active: loop back
 ; ----------------------------------;
             mDOCOL                  ;
             .word   PWR_STATE       ; remove all words beyond PWR_HERE, including a definition leading to an error
             .word   lit,LINE,FETCH  ; fetch line number before set ECHO !
-            .word   ECHO            ;
+            .word   ECHO            ; to see abort message
             .word   XSQUOTE         ; -- c-addr u c-addr1 u1
-            .byte   4,27,"[7m"      ;    type ESC[7m
-            .word   TYPE            ; -- c-addr u       set reverse video
+            .byte   4,27,"[7m"      ;    type ESC[7m    (set reverse video)
+            .word   TYPE            ; -- c-addr u   
             .word   QDUP            ;
             .word QFBRAN,ERRLINE_END;       if LINE = 0
 ; ----------------------------------;
-; Display error line:xxx            ;       if LINE <> 0 (if NOECHO)
+; Display error line:xxx            ;       if LINE <> 0 (if NOECHO state before calling ABORT")
 ; ----------------------------------;
             .word   CR              ;
             .word   XSQUOTE         ;       displays the line where error occured
@@ -2278,13 +2278,13 @@ QABUSBLOOPI NOP                     ; 1~        <---+   |
             .word   TYPE            ;
             .word   ONEMINUS        ;
             .word   UDOT            ;
-ERRLINE_END                         ;
+ERRLINE_END                         ; -- c-addr u
 ; ----------------------------------;
 ; Display ABORT" message            ; <== WARM jumps here
 ; ----------------------------------;
 QABORT_DISPLAY                      ;
             .word   TYPE            ; --                type abort message
-            .word   XSQUOTE         ; -- c-addr2 u2
+            .word   XSQUOTE         ; -- c-addr u
             .byte   4,27,"[0m"      ;
             .word   TYPE            ; --                set normal video
 FABORT      .word   ABORT           ; no return; FABORT = BRACTICK-8
@@ -2306,10 +2306,10 @@ BRACTICK    mDOCOL
 ;C '    -- xt           find word in dictionary and leave on stack its execution address
             FORTHWORD "'"
 TICK        mDOCOL          ; separator -- xt
-            .word   FBLANK,WORDD,FIND    ; Z=1 if not found
+            .word   FBLANK,WORDD,FIND
             .word   QFBRAN,NotFound
             .word   EXIT
-NotFound    .word   NotFoundExe          ; in INTERPRET
+NotFound    .word   NotFoundExe     ; see INTERPRET
 
 ;https://forth-standard.org/standard/block/bs
 ; \         --      backslash
@@ -2349,13 +2349,14 @@ DEFERSTORE  MOV @PSP+,2(TOS)        ; -- CFA_DEFER          xt --> [CFA_DEFER+2]
 
             FORTHWORDIMM "IS"       ; immediate
 IS          mDOCOL
-            .word   FSTATE,FETCH        ; STATE @
-            .word   QFBRAN,IS_EXEC      ; if = 0
-IS_COMPILE  .word   BRACTICK            ; find the word, compile its CFA as literal
-            .word   lit,DEFERSTORE,COMMA; compile DEFERSTORE
-            .word   EXIT                ;
-IS_EXEC     .word   TICK,DEFERSTORE     ; find the word, leave its CFA on the stack and
-            .word   EXIT                ; put it into PFA of DEFERed word, then exit.
+            .word   FSTATE,FETCH    ; STATE @
+            .word   QFBRAN,IS_EXEC  ; if = 0
+IS_COMPILE  .word   BRACTICK        ; find the word, compile its CFA as literal
+            .word   lit,DEFERSTORE  ;
+            .word   COMMA           ; compile DEFERSTORE
+            .word   EXIT            ;
+IS_EXEC     .word   TICK,DEFERSTORE ; find the word, leave its CFA on the stack and
+            .word   EXIT            ; put it into PFA of DEFERed word, then exit.
 
 ;https://forth-standard.org/standard/core/IMMEDIATE
 ;C IMMEDIATE        --   make last definition immediate
@@ -2402,8 +2403,8 @@ COLONNONAME SUB #2,PSP
             MOV &DDP,TOS            ; -- xt     of this NONAME word
             MOV TOS,W               ;  W=CFA
             MOV #PAIN,X             ;2 MOV Y,0(X) writes to PAIN read only register = first lure for semicolon REVEAL...
-            MOV #PAOUT,Y            ;2 MOV @X,-2(Y) writes to PAIN register = 2th lure for semicolon REVEAL...
-            CALL #HEADEREND         ; ...because we don't want write a preamble of word in dictionnary!
+            MOV #PAOUT,Y            ;2 MOV @X,-2(Y) also writes to PAIN register = 2th lure for semicolon REVEAL...
+            CALL #HEADEREND         ; ...because we don't want write a preamble of this :NONAME definition in dictionnary!
     .ENDIF ; NONAME
 
 ;-----------------------------------; common part of NONAME and :
@@ -2496,30 +2497,7 @@ CONSTANT    CALL #HEADER            ; W = DDP = CFA + 2 words
             MOV #DOCON,-4(W)        ;   CFA = DOCON
             MOV TOS,-2(W)           ;   PFA = n
             MOV @PSP+,TOS
-            JMP REVEAL              ;   to link created VARIABLE in vocabulary
-
-;;https://forth-standard.org/standard/core/VALUE
-;;( x "<spaces>name" -- )                      define a Forth VALUE
-;;Skip leading space delimiters. Parse name delimited by a space.
-;;Create a definition for name with the execution semantics defined below,
-;;with an initial value equal to x.
-;
-;;name Execution: ( -- x )
-;;Place x on the stack. The value of x is that given when name was created,
-;;until the phrase x TO name is executed, causing a new value of x to be assigned to name.
-;
-;            FORTHWORD "VALUE"       ; VALUE is an alias of CONSTANT
-;            JMP CONSTANT
-;
-;;TO name Run-time: ( x -- )
-;;Assign the value x to name.
-;
-;            FORTHWORDIMM "TO"       ; TO is an alias of IS
-;            JMP IS
-
-; usage : SDIB_ORG IS CIB           ; modify Current_Input_Buffer address to read a SD file sector
-;         ...
-;         TIB_ORG IS CIB            ; restore Terminal_Input_Buffer address as Current_Input_Buffer address
+            JMP REVEAL              ;   to link created CONSTANT in vocabulary
 
 ;https://forth-standard.org/standard/core/CREATE
 ;C CREATE <name>        --          define a CONSTANT with its next address
@@ -3138,7 +3116,7 @@ CLR_RAM_ASM
         MOV #10,&BASE               ;4
         MOV #32,&CAPS               ; init CAPS ON
         RET
-;---------------------------------------;
+;-----------------------------------;
 
 ; --------------------------------------------------------------------------------
 ; forthMSP430FR : WARM
@@ -3219,8 +3197,8 @@ WARMTYPE    .word   XSQUOTE         ;
         FORTHWORD "COLD"
 COLD    BIT #1,&TERM_STATW      ;
         JNZ COLD                ; loop back while TERM_UART is busy
-        MOV #0A504h,&PMMCTL0    ; performs BOR (SYSRSTIV = 6) reset @ next address
-;        MOV #0A508h,&PMMCTL0    ; performs POR (SYSRSTIV = 20) reset @ next address
+        MOV #0A504h,&PMMCTL0    ; performs BOR (SYSRSTIV = #6) reset @ next address
+;        MOV #0A508h,&PMMCTL0    ; performs POR (SYSRSTIV = #20) reset @ next address
 
 ;---------------------------------------------------------------------------------
 ; RESET 1: Initialisation limited to FastForth usage : I/O, RAM, RTC
index 28396a9..2a0c94c 100644 (file)
@@ -26,10 +26,15 @@ PSP=R15!
 
 
 ! forth words filter
+D\.R=D\.R
+
 M\*=M\*
+M\+=M\+
+
 R\>=R\>!
 R\@=R\@!
 \>R=\>R!
+
 S\>=S\>!
 \>S=\>S!
 S\<=S\<!
@@ -40,4 +45,5 @@ S\"=S\"!
 
 T\{=T\{!
 \}T=\}T!
+
 U\.R=U\.R!
index 849ea97..69636da 100644 (file)
@@ -29,7 +29,6 @@
     .include "CHIPSTICK_FR2433.asm"
     .ENDIF
 
-
 ; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
 ; add here your target.asm item:
 ; .IFDEF MY_MSP430FR5738_1