2 ; -----------------------------------------------------------------------
3 ; TEST_ASM.4th for MSP_EXP430FR5994
4 ; -----------------------------------------------------------------------
13 ABORT" FastForth V4.0 please!"
20 ; ------------------------------------------------------------------
21 ; first we download the set of definitions we need (from CORE_ANS.4th for MSP_EXP430FR5994)
22 ; ------------------------------------------------------------------
242 POSTPONE AGAIN POSTPONE THEN
359 ; ------------------------------------------------------------------
360 ; then we download the set of definitions we need (from UTILITY.4th for MSP_EXP430FR5994)
361 ; ------------------------------------------------------------------
367 R> OVER - 0 MAX SPACES TYPE
389 DO I C@ $7E MIN $20 MAX EMIT LOOP
395 ; --------------------------
396 ; end of definitions we need
397 ; --------------------------
425 TESTPUSHM ; you should see 11111 3 2 1 0 -->
431 TESTPOPM ; you should see 11111 3 2 1 0 -->
480 0= UNTIL MOV @R15+,R14
485 TEST5 ; you should see : 9 8 7 6 5 4 3 2 1 0 -->
496 8 BYTES_TABLE_IDX BYTES_TABLE
498 2 BYTES_TABLE C@ . ; you should see 2 -->
501 VARIABLE BYTES_TABLE1
506 MOV.B BYTES_TABLE1(R14),R14
511 0 IDX_TEST1 ; you should see 1 -->
519 1 TEST6 . ; you should see 1 -->
550 TABLE 2 - CONSTANT PFA_TABLE
553 CODE REDIRECT ; <table> -- redirects TABLE to argument <table>
560 CODE REDIRECT0 ; -- redirects TABLE to TABLE0
561 MOV #TABLE0,&PFA_TABLE
566 CODE REDIRECT10 ; -- redirects TABLE to TABLE10
567 MOV #TABLE10,&PFA_TABLE
572 CODE REDIRECT20 ; -- redirects TABLE to TABLE20
573 MOV #TABLE20,&PFA_TABLE
585 TABLE0 REDIRECT TABLE 10 DUMP
587 TABLE10 REDIRECT TABLE 10 DUMP
589 TABLE20 REDIRECT TABLE 10 DUMP
592 REDIRECT0 TABLE 10 DUMP
594 REDIRECT10 TABLE 10 DUMP
596 REDIRECT20 TABLE 10 DUMP
599 TABLE0 PFA_TABLE ! TABLE 10 DUMP
601 TABLE10 PFA_TABLE ! TABLE 10 DUMP
603 TABLE20 PFA_TABLE ! TABLE 10 DUMP
608 ; -----------------------------------------------------------------------
609 ; create a primary DEFERred assembly word
610 ; -----------------------------------------------------------------------
620 ENDCODE ; leaves its execution address (CFA) on stack
624 IS TRUC ; TRUC becomes a primary DEFERred word
625 ; with its default action (DUP) located at its BODY addresse.
627 TRUC . ; display R14 value -->
629 ' DROP IS TRUC ; TRUC is redirected to DROP
631 ; TRUC ; The generated error displays stack empty! in reverse video, removes the TRUC definition and restarts the interpretation after the end of the file. And as you see, FastForth is able to display long lines, interesting, doesn't it? -->
633 ' TRUC >BODY IS TRUC ; TRUC is reinitialized with its default action
635 TRUC . ; display R14 value -->