aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/words/wlscope.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/avr8/words/wlscope.asm')
-rw-r--r--amforth-6.5/avr8/words/wlscope.asm22
1 files changed, 22 insertions, 0 deletions
diff --git a/amforth-6.5/avr8/words/wlscope.asm b/amforth-6.5/avr8/words/wlscope.asm
new file mode 100644
index 0000000..cbef8c2
--- /dev/null
+++ b/amforth-6.5/avr8/words/wlscope.asm
@@ -0,0 +1,22 @@
+; ( addr len -- addr' len' wid )
+; Compiler
+; dynamically place a word in a wordlist. The word name may be changed.
+VE_WLSCOPE:
+ .dw $ff07
+ .db "wlscope",0
+ .dw VE_HEAD
+ .set VE_HEAD = VE_WLSCOPE
+XT_WLSCOPE:
+ .dw PFA_DODEFER1
+PFA_WLSCOPE:
+ .dw CFG_WLSCOPE
+ .dw XT_EDEFERFETCH
+ .dw XT_EDEFERSTORE
+
+; wlscope, "wordlist scope" ( addr len -- addr' len' wid ), is a deferred word
+; which enables the AmForth application to choose the wordlist ( wid ) for the
+; new voc entry based on the input ( addr len ) string. The name of the new voc
+; entry ( addr' len' ) may be different from the input string. Note that all
+; created voc entry types pass through the wlscope mechanism. The default
+; wlscope action passes the input string to the output without modification and
+; uses get-current to select the wid.