ref: feab5f0d6229e3cec111b975126f07da484eb746
parent: 20de73bb10a09a52c2be23acddb7cabbd6e6644d
author: Devine Lu Linvega <aliceffekt@gmail.com>
date: Mon May 20 16:12:26 EDT 2019
Renamed and fixed overflow in M
--- a/sim.c
+++ b/sim.c
@@ -232,7 +232,7 @@
_('J', jump) \
_('K', konkat) \
_('L', loop) \
- _('M', modulo) \
+ _('M', multiply) \
_('N', movement) \
_('O', offset) \
_('P', push) \
@@ -575,7 +575,7 @@
}
END_OPERATOR
-BEGIN_OPERATOR(modulo)
+BEGIN_OPERATOR(multiply)
LOWERCASE_REQUIRES_BANG;
PORT(0, -1, IN);
PORT(0, 1, IN);
@@ -582,7 +582,7 @@
PORT(1, 0, OUT);
Usz ia = index_of(PEEK(0, -1));
Usz ib = index_of(PEEK(0, 1));
- POKE(1, 0, indexed_glyphs[ia * ib]);
+ POKE(1, 0, indexed_glyphs[(ia * ib) % Glyphs_index_count]);
END_OPERATOR
BEGIN_OPERATOR(offset)