2 ; -----------------------------------------------------------------------
3 ; File Name Test_Extd_ASM.4th
4 ; -----------------------------------------------------------------------
30 TESTPUSHM ; you should see 11111 3 2 1 0 -->
37 TESTPOPM ; you should see 11111 3 2 1 0 -->
89 0= UNTIL MOV @R15+,R14
94 TEST5 ; you should see : 9 8 7 6 5 4 3 2 1 0 -->
106 8 BYTES_TABLE_IDX BYTES_TABLE
108 2 BYTES_TABLE C@ . ; you should see 2 -->
111 VARIABLE BYTES_TABLE1
116 MOV.B BYTES_TABLE1(R14),R14
121 0 IDX_TEST1 ; you should see 1 -->
129 1 TEST6 . ; you should see 1 -->
160 TABLE 2 - CONSTANT PFA_TABLE
163 CODE REDIRECT ; <table> -- redirects TABLE to argument <table>
170 CODE REDIRECT0 ; -- redirects TABLE to TABLE0
171 MOV #TABLE0,&PFA_TABLE
176 CODE REDIRECT10 ; -- redirects TABLE to TABLE10
177 MOV #TABLE10,&PFA_TABLE
182 CODE REDIRECT20 ; -- redirects TABLE to TABLE20
183 MOV #TABLE20,&PFA_TABLE
195 TABLE0 REDIRECT TABLE 10 DUMP
197 TABLE10 REDIRECT TABLE 10 DUMP
199 TABLE20 REDIRECT TABLE 10 DUMP
202 REDIRECT0 TABLE 10 DUMP
204 REDIRECT10 TABLE 10 DUMP
206 REDIRECT20 TABLE 10 DUMP
209 TABLE0 PFA_TABLE ! TABLE 10 DUMP
211 TABLE10 PFA_TABLE ! TABLE 10 DUMP
213 TABLE20 PFA_TABLE ! TABLE 10 DUMP
218 ; -----------------------------------------------------------------------
219 ; create a primary DEFERred assembly word
220 ; -----------------------------------------------------------------------
222 DEFER TRUC ; here, TRUC is a secondary DEFERred word (i.e. without BODY)
225 CODENNM ; leaves its execution address (CFA) on stack
229 ENDCODE IS TRUC ; TRUC becomes a primary DEFERred word
230 ; with its default action (DUP) located at its BODY addresse.
232 TRUC . ; display R14 value -->
235 ' TRUC >BODY IS TRUC ; TRUC is reinitialized with its default action
238 TRUC . ; display R14 value -->
240 \ ' DROP IS TRUC ; TRUC is redirected to DROP
242 \ 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? -->