retroforth/interface/unsigned.retro
crc 467b160797 add */mod and unsigned:*/mod
FossilOrigin-Name: 5340daf57a7bd48e92b07e1f843ec745dd67722366f9c7fd0a1dc4c26817551e
2021-10-14 13:29:09 +00:00

15 lines
725 B
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-n) #1 #0 #8101 io:scan-for dup io:invoke io:invoke ;
:*/mod (nnn-n) #1 #8101 io:scan-for io:invoke ;
~~~