aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/words/wlscope.asm
blob: cbef8c21f09f6f6b5f28255ed73ddc8b97eb1de1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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.