ref: 624a27200c2c94d09f05b372f0912cc7b9d98a7f
parent: 18b164f740cfa2429edab6eacf619e5437ba6ede
author: Nicola Pisanti <nicola@npisanti.com>
date: Mon Jun 10 18:57:01 EDT 2019
updates L to match orcaJS, fixes #41
--- a/sim.c
+++ b/sim.c
@@ -557,7 +557,12 @@
LOWERCASE_REQUIRES_BANG;
PORT(0, -2, IN | PARAM);
PORT(0, -1, IN | PARAM);
- Usz rate = index_of(PEEK(0, -2));
+ PORT(0, 1, IN | PARAM);
+ PORT(1, 0, OUT);
+ Glyph g = PEEK(0, -2);
+ Usz rate = 1;
+ if (g != '.' && g != '*')
+ rate = index_of(g);
Usz len = safe_index_of(PEEK(0, -1));
if (len > width - x - 1)
len = width - x - 1;
@@ -577,6 +582,7 @@
for (Usz i = 0; i < len; ++i) {
gs[i] = buff[i];
}
+ POKE(1, 0, PEEK(0, 1));
END_OPERATOR
BEGIN_OPERATOR(multiply)