ref: 69044c8e50303da4ad4481c66a5749d98af053a8
parent: d92d12e0457965c36542769d2195d5d29b981207
author: cancel <cancel@cancel.fm>
date: Sat Dec 29 19:20:53 EST 2018
Cleanup
--- a/sim.c
+++ b/sim.c
@@ -69,12 +69,6 @@
return indexed_glyphs[index];
}
-static Glyph glyphs_add(Glyph a, Glyph b) {
- Usz ia = index_of(a);
- Usz ib = index_of(b);
- return indexed_glyphs[(ia + ib) % Glyphs_index_count];
-}
-
static inline bool glyph_is_lowercase(Glyph g) { return g & (1 << 5); }
static inline Glyph glyph_lowered_unsafe(Glyph g) {
return (Glyph)(g | (1 << 5));
@@ -409,7 +403,9 @@
PORT(0, 1, IN);
PORT(0, 2, IN);
PORT(1, 0, OUT);
- POKE(1, 0, glyphs_add(PEEK(0, 1), PEEK(0, 2)));
+ Usz a = index_of(PEEK(0, 1));
+ Usz b = index_of(PEEK(0, 2));
+ POKE(1, 0, indexed_glyphs[(a + b) % Glyphs_index_count]);
END_OPERATOR
BEGIN_OPERATOR(banger)