From 67d25d837ac55f28a366c0a3b262e439a6e75fc3 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 19 Aug 2017 12:15:28 +0200 Subject: Add AmForth --- amforth-6.5/avr8/words/wlscope.asm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 amforth-6.5/avr8/words/wlscope.asm (limited to 'amforth-6.5/avr8/words/wlscope.asm') 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. -- cgit v1.2.3