OSDN Git Service

V303, newcomer: FastForth I2C TERMINAL
[fast-forth/master.git] / MSP430-FORTH / FF_SPECS.f
1 \ -*- coding: utf-8 -*-
2
3 ; ------------------
4 ; FF_SPECS.f
5 ; ------------------
6  
7 ; displays all FastForth specifications
8
9 \ from scite editor :
10 \ TARGET SELECTION : copy your target in (shift+F8) parameter 1: 
11 \ LP_MSP430FR2476
12 \ MSP_EXP430FR5739  MSP_EXP430FR5969    MSP_EXP430FR5994    MSP_EXP430FR6989
13 \ MSP_EXP430FR4133  CHIPSTICK_FR2433    MSP_EXP430FR2433    MSP_EXP430FR2355
14 \
15 \ OR
16 \
17 \ drag and drop this file onto SendSourceFileToTarget.bat
18 \ then select your TARGET when asked.
19 \
20 PWR_STATE       \ remove volatile words
21
22 [UNDEFINED] AND [IF]
23 \ https://forth-standard.org/standard/core/AND
24 \ C AND    x1 x2 -- x3           logical AND
25 CODE AND
26 AND @PSP+,TOS
27 MOV @IP+,PC
28 ENDCODE
29 [THEN]
30
31 [UNDEFINED] DUP [IF]    \ define DUP and DUP?
32 \ https://forth-standard.org/standard/core/DUP
33 \ DUP      x -- x x      duplicate top of stack
34 CODE DUP
35 BW1 SUB #2,PSP      \ 2  push old TOS..
36     MOV TOS,0(PSP)  \ 3  ..onto stack
37     MOV @IP+,PC     \ 4
38 ENDCODE
39
40 \ https://forth-standard.org/standard/core/qDUP
41 \ ?DUP     x -- 0 | x x    DUP if nonzero
42 CODE ?DUP
43 CMP #0,TOS      \ 2  test for TOS nonzero
44 0<> ?GOTO BW1   \ 2
45 MOV @IP+,PC     \ 4
46 ENDCODE
47 [THEN]
48
49 [UNDEFINED] OVER [IF]
50 \ https://forth-standard.org/standard/core/OVER
51 \ OVER    x1 x2 -- x1 x2 x1
52 CODE OVER
53 MOV TOS,-2(PSP)     \ 3 -- x1 (x2) x2
54 MOV @PSP,TOS        \ 2 -- x1 (x2) x1
55 SUB #2,PSP          \ 1 -- x1 x2 x1
56 MOV @IP+,PC
57 ENDCODE
58 [THEN]
59
60 [UNDEFINED] DROP [IF]
61 \ https://forth-standard.org/standard/core/DROP
62 \ DROP     x --          drop top of stack
63 CODE DROP
64 MOV @PSP+,TOS   \ 2
65 MOV @IP+,PC     \ 4
66 ENDCODE
67 [THEN]
68
69 [UNDEFINED] SWAP [IF]
70 \ https://forth-standard.org/standard/core/SWAP
71 \ SWAP     x1 x2 -- x2 x1    swap top two items
72 CODE SWAP
73 MOV @PSP,W      \ 2
74 MOV TOS,0(PSP)  \ 3
75 MOV W,TOS       \ 1
76 MOV @IP+,PC     \ 4
77 ENDCODE
78 [THEN]
79
80 [UNDEFINED] ROT [IF]
81 \ https://forth-standard.org/standard/core/ROT
82 \ ROT    x1 x2 x3 -- x2 x3 x1
83 CODE ROT
84 MOV @PSP,W          \ 2 fetch x2
85 MOV TOS,0(PSP)      \ 3 store x3
86 MOV 2(PSP),TOS      \ 3 fetch x1
87 MOV W,2(PSP)        \ 3 store x2
88 MOV @IP+,PC
89 ENDCODE
90 [THEN]
91
92 [UNDEFINED] >R [IF]
93 \ https://forth-standard.org/standard/core/toR
94 \ >R    x --   R: -- x   push to return stack
95 CODE >R
96 PUSH TOS
97 MOV @PSP+,TOS
98 MOV @IP+,PC
99 ENDCODE
100 [THEN]
101
102 [UNDEFINED] R> [IF]
103 \ https://forth-standard.org/standard/core/Rfrom
104 \ R>    -- x    R: x --   pop from return stack ; CALL #RFROM performs DOVAR
105 CODE R>
106 SUB #2,PSP      \ 1
107 MOV TOS,0(PSP)  \ 3
108 MOV @RSP+,TOS   \ 2
109 MOV @IP+,PC     \ 4
110 ENDCODE
111 [THEN]
112
113 [UNDEFINED] 0= [IF]
114 \ https://forth-standard.org/standard/core/ZeroEqual
115 \ 0=     n/u -- flag    return true if TOS=0
116 CODE 0=
117 SUB #1,TOS      \ borrow (clear cy) if TOS was 0
118 SUBC TOS,TOS    \ TOS=-1 if borrow was set
119 MOV @IP+,PC
120 ENDCODE
121 [THEN]
122
123 [UNDEFINED] 0< [IF]
124 \ https://forth-standard.org/standard/core/Zeroless
125 \ 0<     n -- flag      true if TOS negative
126 CODE 0<
127 ADD TOS,TOS     \ 1 set carry if TOS negative
128 SUBC TOS,TOS    \ 1 TOS=-1 if carry was clear
129 XOR #-1,TOS     \ 1 TOS=-1 if carry was set
130 MOV @IP+,PC     \ 
131 ENDCODE
132 [THEN]
133
134 [UNDEFINED] = [IF]
135 \ https://forth-standard.org/standard/core/Equal
136 \ =      x1 x2 -- flag         test x1=x2
137 CODE =
138 SUB @PSP+,TOS   \ 2
139 0<> IF          \ 2
140     AND #0,TOS  \ 1 flag Z = 1
141     MOV @IP+,PC \ 4
142 THEN
143 XOR #-1,TOS     \ 1
144 MOV @IP+,PC     \ 4
145 ENDCODE
146 [THEN]
147
148 \ https://forth-standard.org/standard/core/Uless
149 \ U<    u1 u2 -- flag       test u1<u2, unsigned
150 [UNDEFINED] U< [IF]
151 CODE U<
152 SUB @PSP+,TOS   \ 2 u2-u1
153 0<> IF
154     MOV #-1,TOS     \ 1
155     U< IF           \ 2 flag 
156         AND #0,TOS  \ 1 flag Z = 1
157     THEN
158 THEN
159 MOV @IP+,PC     \ 4
160 ENDCODE
161 [THEN]
162
163 [UNDEFINED] IF [IF]     \ define IF and THEN
164 \ https://forth-standard.org/standard/core/IF
165 \ IF       -- IFadr    initialize conditional forward branch
166 CODE IF
167 SUB #2,PSP              \
168 MOV TOS,0(PSP)          \
169 MOV &DP,TOS             \ -- HERE
170 ADD #4,&DP            \           compile one word, reserve one word
171 MOV #QFBRAN,0(TOS)      \ -- HERE   compile QFBRAN
172 ADD #2,TOS              \ -- HERE+2=IFadr
173 MOV @IP+,PC
174 ENDCODE IMMEDIATE
175
176 \ https://forth-standard.org/standard/core/THEN
177 \ THEN     IFadr --                resolve forward branch
178 CODE THEN
179 MOV &DP,0(TOS)          \ -- IFadr
180 MOV @PSP+,TOS           \ --
181 MOV @IP+,PC
182 ENDCODE IMMEDIATE
183 [THEN]
184
185 [UNDEFINED] ELSE [IF]
186 \ https://forth-standard.org/standard/core/ELSE
187 \ ELSE     IFadr -- ELSEadr        resolve forward IF branch, leave ELSEadr on stack
188 CODE ELSE
189 ADD #4,&DP              \ make room to compile two words
190 MOV &DP,W               \ W=HERE+4
191 MOV #BRAN,-4(W)
192 MOV W,0(TOS)            \ HERE+4 ==> [IFadr]
193 SUB #2,W                \ HERE+2
194 MOV W,TOS               \ -- ELSEadr
195 MOV @IP+,PC
196 ENDCODE IMMEDIATE
197 [THEN]
198
199 [UNDEFINED] BEGIN [IF]  \ define BEGIN UNTIL AGAIN WHILE REPEAT
200 \ https://forth-standard.org/standard/core/BEGIN
201 \ BEGIN    -- BEGINadr             initialize backward branch
202 CODE BEGIN
203     MOV #HEREADR,PC
204 ENDCODE IMMEDIATE
205
206 \ https://forth-standard.org/standard/core/UNTIL
207 \ UNTIL    BEGINadr --             resolve conditional backward branch
208 CODE UNTIL
209     MOV #QFBRAN,X
210 BW1 ADD #4,&DP          \ compile two words
211     MOV &DP,W           \ W = HERE
212     MOV X,-4(W)         \ compile Bran or QFBRAN at HERE
213     MOV TOS,-2(W)       \ compile bakcward adr at HERE+2
214     MOV @PSP+,TOS
215     MOV @IP+,PC
216 ENDCODE IMMEDIATE
217
218 \ https://forth-standard.org/standard/core/AGAIN
219 \ AGAIN    BEGINadr --             resolve uncondionnal backward branch
220 CODE AGAIN
221 MOV #BRAN,X
222 GOTO BW1
223 ENDCODE IMMEDIATE
224
225 \ https://forth-standard.org/standard/core/WHILE
226 \ WHILE    BEGINadr -- WHILEadr BEGINadr
227 : WHILE
228 POSTPONE IF SWAP
229 ; IMMEDIATE
230
231 \ https://forth-standard.org/standard/core/REPEAT
232 \ REPEAT   WHILEadr BEGINadr --     resolve WHILE loop
233 : REPEAT
234 POSTPONE AGAIN POSTPONE THEN
235 ; IMMEDIATE
236 [THEN]
237
238 [UNDEFINED] DO [IF]     \ define DO LOOP +LOOP
239 \ https://forth-standard.org/standard/core/DO
240 \ DO       -- DOadr   L: -- 0
241 CODE DO
242 SUB #2,PSP              \
243 MOV TOS,0(PSP)          \
244 ADD #2,&DP              \   make room to compile xdo
245 MOV &DP,TOS             \ -- HERE+2
246 MOV #XDO,-2(TOS)        \   compile xdo
247 ADD #2,&LEAVEPTR        \ -- HERE+2     LEAVEPTR+2
248 MOV &LEAVEPTR,W         \
249 MOV #0,0(W)             \ -- HERE+2     L-- 0
250 MOV @IP+,PC
251 ENDCODE IMMEDIATE
252
253 \ https://forth-standard.org/standard/core/LOOP
254 \ LOOP    DOadr --         L-- an an-1 .. a1 0
255 CODE LOOP
256     MOV #XLOOP,X
257 BW1 ADD #4,&DP          \ make room to compile two words
258     MOV &DP,W
259     MOV X,-4(W)         \ xloop --> HERE
260     MOV TOS,-2(W)       \ DOadr --> HERE+2
261 BEGIN                   \ resolve all "leave" adr
262     MOV &LEAVEPTR,TOS   \ -- Adr of top LeaveStack cell
263     SUB #2,&LEAVEPTR    \ --
264     MOV @TOS,TOS        \ -- first LeaveStack value
265     CMP #0,TOS          \ -- = value left by DO ?
266 0<> WHILE
267     MOV W,0(TOS)        \ move adr after loop as UNLOOP adr
268 REPEAT
269     MOV @PSP+,TOS
270     MOV @IP+,PC
271 ENDCODE IMMEDIATE
272
273 \ https://forth-standard.org/standard/core/PlusLOOP
274 \ +LOOP   adrs --   L-- an an-1 .. a1 0
275 CODE +LOOP
276 MOV #XPLOOP,X
277 GOTO BW1        \ goto BW1 LOOP
278 ENDCODE IMMEDIATE
279 [THEN]
280
281 [UNDEFINED] I [IF]
282 \ https://forth-standard.org/standard/core/I
283 \ I        -- n   R: sys1 sys2 -- sys1 sys2
284 \                  get the innermost loop index
285 CODE I
286 SUB #2,PSP              \ 1 make room in TOS
287 MOV TOS,0(PSP)          \ 3
288 MOV @RSP,TOS            \ 2 index = loopctr - fudge
289 SUB 2(RSP),TOS          \ 3
290 MOV @IP+,PC             \ 4 13~
291 ENDCODE
292 [THEN]
293
294 [UNDEFINED] HERE [IF]
295 CODE HERE
296 MOV #HEREADR,PC
297 ENDCODE
298 [THEN]
299
300 [UNDEFINED] @ [IF]
301 \ https://forth-standard.org/standard/core/Fetch
302 \ @     c-addr -- char   fetch char from memory
303 CODE @
304 MOV @TOS,TOS
305 MOV @IP+,PC
306 ENDCODE
307 [THEN]
308
309 [UNDEFINED] ! [IF]
310 \ https://forth-standard.org/standard/core/Store
311 \ !        x a-addr --   store cell in memory
312 CODE !
313 MOV @PSP+,0(TOS)    \ 4
314 MOV @PSP+,TOS       \ 2
315 MOV @IP+,PC         \ 4
316 ENDCODE
317 [THEN]
318
319 [UNDEFINED] C@ [IF]
320 \ https://forth-standard.org/standard/core/CFetch
321 \ C@     c-addr -- char   fetch char from memory
322 CODE C@
323 MOV.B @TOS,TOS
324 MOV @IP+,PC
325 ENDCODE
326 [THEN]
327
328 [UNDEFINED] SPACES [IF]
329 \ https://forth-standard.org/standard/core/SPACES
330 \ SPACES   n --            output n spaces
331 CODE SPACES
332 CMP #0,TOS
333 0<> IF
334     PUSH IP
335     BEGIN
336         LO2HI
337         $20 EMIT
338         HI2LO
339         SUB #2,IP 
340         SUB #1,TOS
341     0= UNTIL
342     MOV @RSP+,IP
343 THEN
344 MOV @PSP+,TOS           \ --         drop n
345 MOV @IP+,PC
346 ENDCODE
347 [THEN]
348
349 [UNDEFINED] 1+ [IF]
350 \ https://forth-standard.org/standard/core/OnePlus
351 \ 1+      n1/u1 -- n2/u2       add 1 to TOS
352 CODE 1+
353 ADD #1,TOS
354 MOV @IP+,PC
355 ENDCODE
356 [THEN]
357
358 [UNDEFINED] + [IF]
359 \ https://forth-standard.org/standard/core/Plus
360 \ +       n1/u1 n2/u2 -- n3/u3     add n1+n2
361 CODE +
362 ADD @PSP+,TOS
363 MOV @IP+,PC
364 ENDCODE
365 [THEN]
366
367 [UNDEFINED] - [IF]
368 \ https://forth-standard.org/standard/core/Minus
369 \ -      n1/u1 n2/u2 -- n3/u3     n3 = n1-n2
370 CODE -
371 SUB @PSP+,TOS   \ 2  -- n2-n1 ( = -n3)
372 XOR #-1,TOS     \ 1
373 ADD #1,TOS      \ 1  -- n3 = -(n2-n1) = n1-n2
374 MOV @IP+,PC
375 ENDCODE
376 [THEN]
377
378 [UNDEFINED] 2* [IF]
379 \ https://forth-standard.org/standard/core/TwoTimes
380 \ 2*      x1 -- x2         arithmetic left shift
381 CODE 2*
382 ADD TOS,TOS
383 MOV @IP+,PC
384 ENDCODE
385 [THEN]
386
387 [UNDEFINED] UM/MOD [IF]
388 \ https://forth-standard.org/standard/core/UMDivMOD
389 \ UM/MOD   udlo|udhi u1 -- r q   unsigned 32/16->r16 q16
390 CODE UM/MOD
391     PUSH #DROP      \
392     MOV #MUSMOD,PC  \ execute MUSMOD then return to DROP
393 ENDCODE
394 [THEN]
395
396 [UNDEFINED] MOVE [IF]
397 \ https://forth-standard.org/standard/core/MOVE
398 \ MOVE    addr1 addr2 u --     smart move
399 \             VERSION FOR 1 ADDRESS UNIT = 1 CHAR
400 CODE MOVE
401 MOV TOS,W           \ W = cnt
402 MOV @PSP+,Y         \ Y = addr2 = dst
403 MOV @PSP+,X         \ X = addr1 = src
404 MOV @PSP+,TOS       \ pop new TOS
405 CMP #0,W            \ count = 0 ?
406 0<> IF              \ if 0, already done !
407     CMP X,Y         \ Y-X \ dst - src
408     0<> IF          \ if dst = src, already done !
409         U< IF       \ U< if src > dst
410             BEGIN   \ copy W bytes
411                 MOV.B @X+,0(Y)
412                 ADD #1,Y
413                 SUB #1,W
414             0= UNTIL
415             MOV @IP+,PC
416         THEN        \ U>= if dst > src
417         ADD W,Y     \ copy W bytes beginning with the end
418         ADD W,X
419         BEGIN
420             SUB #1,X
421             SUB #1,Y
422             MOV.B @X,0(Y)
423             SUB #1,W
424         0= UNTIL
425     THEN
426 THEN
427 MOV @IP+,PC
428 ENDCODE
429 [THEN]
430
431 [UNDEFINED] WORDS [IF]
432 \ https://forth-standard.org/standard/tools/WORDS
433 \ list all words of vocabulary first in CONTEXT.
434 : WORDS                         \ --            
435 CR 
436 CONTEXT @ PAD_ORG               \ -- VOC_BODY PAD                  MOVE all threads of VOC_BODY in PAD_ORG
437 INI_THREAD @ 2*                 \ -- VOC_BODY PAD THREAD*2
438 MOVE                            \ -- vocabulary entries are copied in PAD_ORG
439 BEGIN                           \ -- 
440     0 DUP                       \ -- ptr=0 MAX=0                
441     INI_THREAD @ 2* 0           \ -- ptr=0 MAX=0 THREADS*2 0
442         DO                      \ -- ptr MAX            I =  PAD_ptr = thread*2
443         DUP I PAD_ORG + @       \ -- ptr MAX MAX NFAx
444             U< IF               \ -- ptr MAX            if MAX U< NFAx
445                 DROP DROP       \ --                    drop ptr and MAX
446                 I DUP PAD_ORG + @   \ -- new_ptr new_MAX
447             THEN                \ 
448         2 +LOOP                 \ -- ptr MAX
449     ?DUP                        \ -- ptr MAX MAX | -- ptr 0 (all threads in PAD = 0)
450 WHILE                           \ -- ptr MAX                    replace it by its LFA
451     DUP                         \ -- ptr MAX MAX
452     2 - @                       \ -- ptr MAX [LFA]
453     ROT                         \ -- MAX [LFA] ptr
454     PAD_ORG +                   \ -- MAX [LFA] thread
455     !                           \ -- MAX                [LFA]=new_NFA updates PAD+ptr
456     DUP                         \ -- MAX MAX
457     COUNT $7F AND               \ -- MAX addr count (with suppr. of immediate bit)
458     TYPE                        \ -- MAX
459     C@ $0F AND                  \ -- count_of_chars
460     $10 SWAP - SPACES           \ --                    complete with spaces modulo 16 chars
461 REPEAT                          \ --
462 DROP                            \ ptr --
463 ;                               \ all threads in PAD are filled with 0
464 [THEN]
465
466 [UNDEFINED] CASE [IF]
467 \ https://forth-standard.org/standard/core/CASE
468 : CASE 0 ; IMMEDIATE \ -- #of-1 
469
470 \ https://forth-standard.org/standard/core/OF
471 : OF \ #of-1 -- orgOF #of 
472 1+                          \ count OFs 
473 >R                          \ move off the stack in case the control-flow stack is the data stack. 
474 POSTPONE OVER POSTPONE = \ copy and test case value
475 POSTPONE IF                 \ add orig to control flow stack 
476 POSTPONE DROP           \ discards case value if = 
477 R>                          \ we can bring count back now 
478 ; IMMEDIATE 
479
480 \ https://forth-standard.org/standard/core/ENDOF
481 : ENDOF \ orgOF #of -- orgENDOF #of 
482 >R                          \ move off the stack in case the control-flow stack is the data stack. 
483 POSTPONE ELSE 
484 R>                          \ we can bring count back now 
485 ; IMMEDIATE 
486
487 \ https://forth-standard.org/standard/core/ENDCASE
488 : ENDCASE \ orgENDOF1..orgENDOFn #of -- 
489 POSTPONE DROP
490 0 DO 
491     POSTPONE THEN 
492 LOOP 
493 ; IMMEDIATE 
494 [THEN]
495
496 [UNDEFINED] S_ [IF]
497 CODE S_             \           Squote alias with blank instead quote separator
498 MOV #0,&CAPS        \           turn CAPS OFF
499 COLON
500 XSQUOTE ,           \           compile run-time code
501 $20 WORD            \ -- c-addr (= HERE)
502 HI2LO
503 MOV.B @TOS,TOS      \ -- len    compile string
504 ADD #1,TOS          \ -- len+1
505 BIT #1,TOS          \           C = ~Z
506 ADDC TOS,&DP        \           store aligned DP
507 MOV @PSP+,TOS       \ --
508 MOV @RSP+,IP        \           pop paired with push COLON
509 MOV #$20,&CAPS      \           turn CAPS ON (default state)
510 MOV @IP+,PC         \ NEXT
511 ENDCODE IMMEDIATE
512 [THEN]
513
514 [UNDEFINED] ESC [IF]
515 CODE ESC
516 CMP #0,&STATEADR
517 0= IF MOV @IP+,PC   \ interpret time usage disallowed
518 THEN
519 COLON          
520 $1B                 \ -- char escape
521 POSTPONE LITERAL    \ compile-time code : lit $1B  
522 POSTPONE EMIT       \ compile-time code : EMIT
523 POSTPONE S_         \ compile-time code : S_ <escape_sequence>
524 POSTPONE TYPE       \ compile-time code : TYPE
525 ; IMMEDIATE
526 [THEN]
527
528 : SPECS             \ to see Fast Forth specifications
529 PWR_STATE           \ before free bytes computing, remove all created words 
530 ECHO
531
532 42 0 DO CR LOOP     \ to avoid erasing any line of source, create 42 empty lines
533 ESC [H              \ then cursor home
534
535 ESC [7m             \ Turn reverse video on
536 CR ." FastForth V"  \ title line in reverse video 
537 VERSION @         
538 0 <# #  8 HOLD # 46 HOLD #S #> TYPE
539 ."  for MSP430FR"
540 HERE                \ HERE - MAIN_ORG = bytes code
541 DEVICEID @          \ value kept in TLV area
542 CASE
543 \ device_ID   OF      ." xxxx," $MAIN_ORG ENDOF \ <-- add here your device
544     $8102     OF      ." 5738,"   $C200   ENDOF 
545     $8103     OF      ." 5739,"   $C200   ENDOF
546     $8160     OF      ." 5948,"   $4400   ENDOF
547     $8169     OF      ." 5969,"   $4400   ENDOF
548     $81A8     OF      ." 6989,"   $4400   ENDOF
549 \   $810D     OF      ." 5986,"   $4400   ENDOF
550 \
551     $81F0     OF      ." 4133,"   $C400   ENDOF
552     $8240     OF      ." 2433,"   $C400   ENDOF
553 \
554     $82A1     OF      ." 5994,"   $4000   ENDOF
555 \   $82A6     OF      ." 5962,"   $4000   ENDOF
556
557     $830C     OF      ." 2355,"   $8000   ENDOF
558 \   $830D     OF      ." 2353,"   $C000   ENDOF
559 \   $831E     OF      ." 2155,"   $8000   ENDOF
560 \   $831D     OF      ." 2153,"   $C000   ENDOF
561     $832A     OF      ." 2476,"   $8000   ENDOF
562 \   $832B     OF      ." 2475,"   $8000   ENDOF
563 \   $833C     OF      ." 2633,"   $C400   ENDOF
564 \   $833D     OF      ." 2533,"   $C400   ENDOF
565     ABORT" xxxx <-- unrecognized device!"
566 ENDCASE                     \ -- HERE MAIN_ORG
567
568 ['] ['] DUP @ $1284 =       \ DOCOL = CALL rDOCOL opcode
569 IF ."  DTC=1," DROP         \ [CFA] = CALL rDOCOL
570 ELSE 2 + @ $1284 =          \ 
571     IF ."  DTC=2,"          \ [CFA] = PUSH IP, [CFA+2] = CALL rDOCOL 
572     ELSE ."  DTC=3,"        \ [CFA] = PUSH IP, [CFA+2] = MOV PC,IP
573     THEN
574 THEN
575 $20 EMIT 
576 INI_THREAD @ U. #8 EMIT ." -Entry word sets, "  \ number of Entry word sets,
577 FREQ_KHZ @ 0 1000 UM/MOD U.                     \ frequency,
578 ?DUP IF #8 EMIT #44 EMIT U. \ if remainder
579 THEN ." MHz, "              \ MCLK
580 - U. ." bytes"              \ HERE - MAIN_ORG = number of bytes code,
581 ESC [0m                     \ Turn off character attributes
582 CR
583 ." /COUNTED-STRING   = 255" CR 
584 ." /HOLD             = 34" CR
585 ." /PAD              = 84" CR
586 ." ADDRESS-UNIT-BITS = 16" CR
587 ." FLOORED           = true" CR
588 ." MAX-CHAR          = 255" CR
589 ." MAX-N             = 32767" CR
590 ." MAX-U             = 65535" CR
591 ." MAX-D             = 2147483647" CR
592 ." MAX-UD            = 4294967295" CR
593 ." STACK-CELLS       = 48" CR
594 ." RETURN-STACK-CELLS= 48" CR
595
596 CR 
597 ESC [7m ." KERNEL ADDONS" ESC [0m   \ subtitle in reverse video
598 CR
599
600 KERNEL_ADDON @
601     DUP 0< IF ." 32.768kHz XTAL" CR THEN
602 2*  DUP 0< IF 2* ." 5 WIRES (RTS/CTS) UART TERMINAL" CR
603         ELSE 2* DUP
604             0< IF ." 4 WIRES (RTS) UART TERMINAL" CR
605             THEN
606         THEN
607 2*  DUP 0< IF ." 3 WIRES (XON/XOFF) UART TERMINAL" CR
608         ELSE  ." I2C SLAVE TERMINAL INPUT" CR
609         THEN
610 2*  DUP 0< IF ." HALF-DUPLEX TERMINAL" CR THEN
611 2*  DUP 0< IF ." ASM DATA ACCESS BEYOND $FFFF" CR THEN
612 2*  DUP 0< IF ." BOOTLOADER" CR THEN
613 2*  DUP 0< IF ." SD_CARD READ/WRITE" CR THEN
614 2*  DUP 0< IF ." SD_CARD LOADER" CR THEN
615 2*  DUP 0< IF ." FIXPOINT INPUT" CR THEN
616 2*  DUP 0< IF ." DOUBLE INPUT" CR THEN
617 2*  DUP 0< IF ." VOCABULARY SET" CR THEN
618 2*  DUP 0< IF ." DEFERRED words" CR THEN
619 2*  DUP 0< IF ." EXTENDED ASSEMBLER" CR THEN
620 2*  DUP 0< IF ." ASSEMBLER" CR THEN
621 2*  DUP 0< IF ." CONDITIONNAL COMPILATION" CR THEN
622         0< IF                   \ true if CONDCOMP add-on
623     CR 
624     ESC [7m ." OPTIONS" ESC [0m \ subtitle in reverse video
625     CR
626     [DEFINED] {CORE_ANS}  [IF] ." ANS94 CORE COMPLIANT" CR [THEN]
627     [DEFINED] {TOOLS}     [IF] ." UTILITY" CR [THEN]
628     [DEFINED] {FIXPOINT}  [IF] ." FIXPOINT" CR [THEN]
629     [DEFINED] {CORDIC}    [IF] ." CORDIC engine" CR [THEN]
630     [DEFINED] {SD_TOOLS}  [IF] ." SD_TOOLS" CR [THEN]
631     [DEFINED] {RTC}       [IF] ." RTC utility" CR [THEN]
632
633     [DEFINED] VOCABULARY  [IF] 
634         CR 
635         ESC [7m ." ASSEMBLER word set" ESC [0m  \ subtitle in reverse video 
636         ALSO ASSEMBLER WORDS PREVIOUS           \ type ASSEMBLER word set
637         CR
638     [THEN]
639
640 THEN
641    
642 CR
643 ESC [7m ." FORTH word set"  ESC [0m \ subtitle in reverse video 
644 WORDS                               \ type FORTH word set 
645 CR
646
647 WARM    \ type bytes free
648 ;
649
650 SPECS \ here FastForth types a (volatile) message with some informations