]> code.bitgloo.com Git - clyne/foci.git/commitdiff
emit
authorClyne Sullivan <clyne@bitgloo.com>
Mon, 27 Jan 2025 01:49:26 +0000 (20:49 -0500)
committerClyne Sullivan <clyne@bitgloo.com>
Mon, 27 Jan 2025 01:49:26 +0000 (20:49 -0500)
foci.c

diff --git a/foci.c b/foci.c
index 60c4fcac6d2e63e88e9a616a0d8216707418efa8..c466460b20b8d5b9f138e0309ce4e3990f1c1943 100644 (file)
--- a/foci.c
+++ b/foci.c
@@ -145,8 +145,9 @@ I(ctick,  "[\']",   &w_tick)    FTH(tick), FTH(literal), END
 N(execute, "execute", &w_ctick) { pp = (intptr_t **)*sp++ - 1; NEXT; }
 W(decimal, "decimal", &w_execute) LIT(10), LIT(&BASE), poke, END
 W(hex,     "hex",    &w_decimal) LIT(16), LIT(&BASE), poke, END
-N(dot,    ".",      &w_hex) ;
-#define LATEST_INIT &w_dot
+N(dot,    ".",      &w_hex)     ;
+N(emit,   "emit",   &w_dot)     { foci_putchar(*sp++); NEXT; }
+#define LATEST_INIT &w_emit
 
 void enter_forth(void *ptr)
 {