This commit is contained in:
Ingy döt Net 2013-04-10 21:29:02 -07:00
parent 764da6cbbb
commit db842d013d
19005 changed files with 197040 additions and 7 deletions

View file

@ -0,0 +1,10 @@
unused . \ memory available for use in dictionary
here . \ current dictionary memory pointer
: mem, ( addr len -- ) here over allot swap move ;
: s, ( str len -- ) here over char+ allot place align ; \ built-in on some forths
: ," [char] " parse s, ;
variable num
create array 60 cells allot
create struct 0 , 10 , char A c, ," string"
unused .
here .

View file

@ -0,0 +1,5 @@
marker foo
: temp ... ;
create dummy 300 allot
-150 allot \ trim the size of dummy by 150 bytes
foo \ removes foo, temp, and dummy from the list of definitions

View file

@ -0,0 +1,3 @@
4096 allocate throw ( addr )
dup 4096 erase
( addr ) free throw