mirror of
https://github.com/nineties/planckforth
synced 2025-01-14 08:01:27 +01:00
fixed a bug
This commit is contained in:
parent
db86f87671
commit
a17e38b16d
1 changed files with 5 additions and 5 deletions
10
bootstrap.fs
10
bootstrap.fs
|
@ -623,11 +623,6 @@ 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 + ;
|
||||||
|
@ -1486,6 +1481,11 @@ do-stack 16 cells + do-sp !
|
||||||
|
|
||||||
( === Dump of data stack === )
|
( === Dump of data stack === )
|
||||||
|
|
||||||
|
\ ( -- n )
|
||||||
|
\ Number of elemtns in the stack
|
||||||
|
: depth sp0 sp@ - cell- cell / ;
|
||||||
|
: rdepth rp0 rp@ - cell / ;
|
||||||
|
|
||||||
: .s ( -- )
|
: .s ( -- )
|
||||||
sp0 sp@ - cell- cell / ( depth of the stack )
|
sp0 sp@ - cell- cell / ( depth of the stack )
|
||||||
'<' emit 0 u.r '>' emit space
|
'<' emit 0 u.r '>' emit space
|
||||||
|
|
Loading…
Reference in a new issue