From: Ralph Ronnquist Date: Sun, 23 May 2021 14:48:07 +0000 (+1000) Subject: add DEPTH X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=1e20129cc5801258ef162be39d764693511ff6fb;p=rrq%2Frrqforth.git add DEPTH --- diff --git a/stack.asm b/stack.asm index 91be19d..32db5ae 100644 --- a/stack.asm +++ b/stack.asm @@ -1,5 +1,14 @@ ;;; Words for stack manipulations + WORD p_depth,'DEPTH',fasm + ;; ( -- v ) + ;; Push stack depth (before push) + lea rax,[DS_TOP] + sub rax,rsp + shr rax,3 + push rax + next + WORD p_dup, 'DUP',fasm ;; ( v -- v v ) ;; Duplicate top ov stack value.