aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/words/depth.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/common/words/depth.asm')
-rw-r--r--amforth-6.5/common/words/depth.asm23
1 files changed, 23 insertions, 0 deletions
diff --git a/amforth-6.5/common/words/depth.asm b/amforth-6.5/common/words/depth.asm
new file mode 100644
index 0000000..c17d84d
--- /dev/null
+++ b/amforth-6.5/common/words/depth.asm
@@ -0,0 +1,23 @@
+; ( -- n )
+; Stack
+; number of single-cell values contained in the data stack before n was placed on the stack.
+.if cpu_msp430==1
+ HEADER(XT_DEPTH,5,"depth",DOCOLON)
+.endif
+
+.if cpu_avr8==1
+VE_DEPTH:
+ .dw $ff05
+ .db "depth",0
+ .dw VE_HEAD
+ .set VE_HEAD = VE_DEPTH
+XT_DEPTH:
+ .dw DO_COLON
+PFA_DEPTH:
+.endif
+ .dw XT_SP0
+ .dw XT_SP_FETCH
+ .dw XT_MINUS
+ .dw XT_2SLASH
+ .dw XT_1MINUS
+ .dw XT_EXIT