mirror of
https://github.com/nineties/planckforth
synced 2025-01-13 08:01:10 +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 ;
|
||||
: rp0 [ rp@ ] literal ;
|
||||
|
||||
\ ( -- n )
|
||||
\ Number of elemtns in the stack
|
||||
: depth sp0 sp@ - cell- cell / ;
|
||||
: rdepth rp0 rp@ - cell / ;
|
||||
|
||||
\ === Integer Arithmetic ===
|
||||
|
||||
: 1+ 1 + ;
|
||||
|
|
Loading…
Reference in a new issue