retroforth/interface/retro-napia.retro
crc 1ceb710639 remove old public keys
FossilOrigin-Name: 7e882da83e87eba9375f80959ec98f130ed4db4d13040a7599cd20dce77b983c
2022-01-31 10:20:32 +00:00

30 lines
643 B
Forth

# Retro/Napia Words
This adds support for some words from Retro/Napia. 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/Napia, these are the
standard names for these).
~~~
:n:add + ;
:n:sub - ;
:n:mul * ;
:n:div / ;
:n:mod mod ;
:n:divmod /mod ;
~~~
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
~~~