1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ;; UrForth level
1: self
-hosting
32-bit Forth compiler
4 ;; Copyright
(C
) 2020 Ketmar Dark
// Invisible Vector
6 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;; create aliases
for all public words from vocid
9 : tc
-populate
-vocid
( srcvocid destvocid
-- )
10 current @
>r
;; save
"CURRENT"
12 [: ( nfa
-- exitflag
)
13 dup nfa
->ffa ffa@
[ (WFLAG
-SMUDGE
) (WFLAG
-HIDDEN
) or
] literal and
16 dup id
-count
3 > swap
3 " TC-" s
= or
if
17 \ endcr dup id
-count
3 /string type cr
20 dup nfa
->cfa swap id
-count
3 /string
23 endcr
." non-hidden non-tc tc immediate \`" id
-count type
." \`\n"
24 abort
" non-hidden non-tc tc immediate"
33 r
> current
! ;; restore
"CURRENT"
37 vocabulary tc
-immediates
38 \ also tc
-immediates definitions
39 vocid
-of tc
-immediates
-src vocid
-of tc
-immediates tc
-populate
-vocid