Commit 3b5da45b authored by Anton Ertl's avatar Anton Ertl

added $+!LEN

parent 4f61f4de
......@@ -9562,6 +9562,7 @@ doc-$!
doc-$@
doc-$@len
doc-$!len
doc-$+!len
doc-$del
doc-$ins
doc-$+!
......
......@@ -79,9 +79,13 @@
over @ @ $padding over = IF drop @ ! EXIT THEN
THEN
over @ swap resize throw over ! @ ! ;
: $+!len ( u $addr -- addr )
\G make room for u bytes at the end of the memory area referenced
\G by $addr; addr is the address of the first of these bytes.
>r r@ $@len tuck + r@ $!len r> @ cell+ + ;
: $+! ( addr1 u $addr -- ) \ gforth-string string-plus-store
\G appends a string to another.
>r r@ $@len 2dup + r@ $!len r> $@ rot /string rot umin move ;
over >r $+!len r> move ;
: c$+! ( char $addr -- ) \ gforth-string c-string-plus-store
\G append a character to a string.
dup $@len 1+ over $!len $@ + 1- c! ;
......
......@@ -183,8 +183,3 @@ has? flash [IF]
Variable max-name-length \ maximum length of all names defined yet
32 max-name-length ! \ is global!
\ has? peephole [IF]
\ 0 value peeptable \ initialized in boot
\ [THEN]
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