mirror of
https://github.com/nineties/planckforth
synced 2024-12-26 21:58:42 +01:00
Add +!, -! and allot
This commit is contained in:
parent
f2ce995009
commit
8fc41ad39f
1 changed files with 11 additions and 0 deletions
11
core.fs
11
core.fs
|
@ -770,4 +770,15 @@ alias-builtin xor ^
|
|||
Now we can use multiline comment with ( nests. )
|
||||
)
|
||||
|
||||
( === Memory Operation === )
|
||||
|
||||
: +! ( n a-addr -- ) tuck @ + swap ! ;
|
||||
: -! ( n a-addr -- ) tuck @ - swap ! ;
|
||||
|
||||
\ allocate n bytes
|
||||
: allot ( n -- c-addr )
|
||||
here @ swap
|
||||
here +!
|
||||
;
|
||||
|
||||
bye
|
||||
|
|
Loading…
Reference in a new issue