Commit e2d39029 authored by pazsan's avatar pazsan

basics.fs fixed

parent c7d9851a
......@@ -66,7 +66,6 @@ has? ec
[IF]
unlock ram-dictionary borders nip lock
AConstant dictionary-end
: forthstart 0 ;
[ELSE]
has? header [IF]
: dictionary-end ( -- addr )
......@@ -86,8 +85,13 @@ AConstant dictionary-end
\G the region addressed by @code{here}.
usable-dictionary-end here - ;
has? ec [IF]
: in-dictionary? ( x -- f )
dictionary-end < ;
[ELSE]
: in-dictionary? ( x -- f )
forthstart dictionary-end within ;
[THEN]
\ here is used for pad calculation!
......@@ -171,8 +175,7 @@ AConstant dictionary-end
true ;
: accumulate ( +d0 addr digit - +d1 addr )
swap >r swap base @
um* drop rot base @ um* d+ r> ;
swap >r swap base @ um* drop rot base @ um* d+ r> ;
: >number ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 ) \ core to-number
\G Attempt to convert the character string @var{c-addr1 u1} to an
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment