Support easily adding extra dictionaries, e.g. as part of platform

This commit is contained in:
mgcaret 2019-12-10 16:02:31 -08:00
parent 5839acb568
commit daff3166ec
1 changed files with 10 additions and 1 deletions

View File

@ -6407,7 +6407,7 @@ eword
dword VOCABULARY,"VOCABULARY"
ENTER
.dword CREATE
.dword _COMP_LIT
dovocab: .dword _COMP_LIT
.dword H_FORTH ; root of all dictionaries
.dword LAST
.dword drXT ; XT of the just-created word
@ -6421,6 +6421,15 @@ dword VOCABULARY,"VOCABULARY"
EXIT
eword
; H: ( c-addr u -- ) create a new named wordlist definition as per VOCABULARY
; H: meant for adding more builtin dictionaries (e.g. platform specific dictionaries)
; H: which are expected to adjust the root to the new wordlist
hword dVOCAB,"$VOCAB"
ENTER
.dword dCREATE
JUMP VOCABULARY::dovocab
eword
.endif
.if 0 ; half-baked