retroforth/interface/unsigned.retro
crc e2b55648cb add comma & gc to glossary
FossilOrigin-Name: b2a5e66264d4a5b2a757710c72641cd097445b6b7109cd91c0d22668aa4ed637
2023-01-26 22:29:37 +00:00

32 lines
1.2 KiB
Forth

# Unsigned Numbers
~~~
:unsigned:+ (nn-n) #0 #8101 io:scan-for io:invoke \ad...... ;
:unsigned:- (nn-n) #0 #8101 io:scan-for io:invoke \su...... ;
:unsigned:* (nn-n) #0 #8101 io:scan-for io:invoke \mu...... ;
:unsigned:/mod (nn-nn) #0 #8101 io:scan-for io:invoke \di...... ;
:unsigned:eq? (nn-f) #0 #8101 io:scan-for io:invoke \eq...... ;
:unsigned:-eq? (nn-f) #0 #8101 io:scan-for io:invoke \ne...... ;
:unsigned:lt? (nn-f) #0 #8101 io:scan-for io:invoke \lt...... ;
:unsigned:gt? (nn-f) #0 #8101 io:scan-for io:invoke \gt...... ;
:unsigned:shift (nn-n) #0 #8101 io:scan-for io:invoke \sh...... ;
:unsigned:*/mod (nnn-nn) #1 #0 #8101 io:scan-for dup io:invoke io:invoke ;
:*/mod (nnn-nn) #1 #8101 io:scan-for io:invoke ;
~~~
~~~
'interface/unsigned.retro s:dedup
dup 'unsigned:+ d:lookup d:source store
dup 'unsigned:- d:lookup d:source store
dup 'unsigned:* d:lookup d:source store
dup 'unsigned:/mod d:lookup d:source store
dup 'unsigned:eq? d:lookup d:source store
dup 'unsigned:-eq? d:lookup d:source store
dup 'unsigned:lt? d:lookup d:source store
dup 'unsigned:gt? d:lookup d:source store
dup 'unsigned:shift d:lookup d:source store
dup 'unsigned:*/mod d:lookup d:source store
dup '*/mod d:lookup d:source store
drop
~~~