retroforth/interface/konilo.retro
crc 2ccff78191 rename retro-napia.retro to konilo.retro
FossilOrigin-Name: 3ca37dbd36b70922b55e9716a5cda795522ecc6799dee6ad190d54fa4c1d1077
2023-10-03 14:46:18 +00:00

33 lines
692 B
Forth

# Retro/ilo & Retro/napia Words
This adds support for some words from Retro/ilo. It's intended
to aid in portability between the systems.
The basic math operations are given non-symbolic names and
placed in the `n:` namespace. (In Retro/ilo, these are the
standard names for these).
~~~
:n:add + ;
:n:sub - ;
:n:mul * ;
:n:div / ;
:n:mod mod ;
:n:divmod /mod ;
:comma , ;
:gc &Heap swap v:preserve ;
~~~
Provide source data.
~~~
'retro-napia.retro
dup 'n:add d:lookup d:source store
dup 'n:sub d:lookup d:source store
dup 'n:mul d:lookup d:source store
dup 'n:div d:lookup d:source store
dup 'n:mod d:lookup d:source store
dup 'n:divmod d:lookup d:source store
drop
~~~