X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=stack.asm;h=d26bf7b2c9d137fd2dc9a152653cbd59d33590a3;hb=ea16f5d7f9a9ff7a7af9d7f8d6cac589b02620a0;hp=91be19d71963d217ee453051f14abdc80cc9d2b2;hpb=dd99a1e5f8fb8209ce62d714b5d6bc30a7492a09;p=rrq%2Frrqforth.git diff --git a/stack.asm b/stack.asm index 91be19d..d26bf7b 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. @@ -110,9 +119,9 @@ p_roll_eq: push qword [rsp+rax] next - WORD w6.2.2300, 'TUCK',fasm + WORD p_tuck, 'TUCK',fasm ;; ( x1 x2 -- x2 x1 x2 ) - ;; insert the top stack value into below second stack value. + ;; copy the top stack value into below second stack value. pop rax pop rbx push rax