mirror of
https://github.com/nineties/planckforth
synced 2025-01-27 08:00:04 +01:00
Add depth and rdepth
This commit is contained in:
parent
99e8b72521
commit
7b57c7f864
1 changed files with 5 additions and 0 deletions
|
@ -610,6 +610,11 @@ allot-cell : &find! [ ' L , , ] ; \ ( c-addr -- nt ) Throw exception at error
|
||||||
: sp0 [ sp@ ] literal ;
|
: sp0 [ sp@ ] literal ;
|
||||||
: rp0 [ rp@ ] literal ;
|
: rp0 [ rp@ ] literal ;
|
||||||
|
|
||||||
|
\ ( -- n )
|
||||||
|
\ Number of elemtns in the stack
|
||||||
|
: depth sp0 sp@ - cell- cell / ;
|
||||||
|
: rdepth rp0 rp@ - cell / ;
|
||||||
|
|
||||||
\ === Integer Arithmetic ===
|
\ === Integer Arithmetic ===
|
||||||
|
|
||||||
: 1+ 1 + ;
|
: 1+ 1 + ;
|
||||||
|
|
Loading…
Add table
Reference in a new issue