aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/words/variable.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/common/words/variable.asm')
-rw-r--r--amforth-6.5/common/words/variable.asm24
1 files changed, 24 insertions, 0 deletions
diff --git a/amforth-6.5/common/words/variable.asm b/amforth-6.5/common/words/variable.asm
new file mode 100644
index 0000000..fe3e245
--- /dev/null
+++ b/amforth-6.5/common/words/variable.asm
@@ -0,0 +1,24 @@
+; ( cchar -- )
+; Compiler
+; create a dictionary entry for a variable and allocate 1 cell RAM
+
+.if cpu_msp430==1
+ HEADER(XT_VARIABLE,8,"variable",DOCOLON)
+.endif
+
+.if cpu_avr8==1
+
+VE_VARIABLE:
+ .dw $ff08
+ .db "variable"
+ .dw VE_HEAD
+ .set VE_HEAD = VE_VARIABLE
+XT_VARIABLE:
+ .dw DO_COLON
+PFA_VARIABLE:
+.endif
+ .dw XT_HERE
+ .dw XT_CONSTANT
+ .dw XT_TWO
+ .dw XT_ALLOT
+ .dw XT_EXIT