NOBASIC

While working with the nobasic 0.1.9 demo as a test of the CMOC/LWTools toolchain, I ran into a compile time error:

>>> make
cmoc --deps-only --coco -DNDEBUG  -O2 -DVERSION=\"0.1.9\" -I ../decbfile nobasic.c
cmoc -c --coco -DNDEBUG  -O2 -DVERSION=\"0.1.9\" -I ../decbfile -o nobasic.o nobasic.c
nobasic.s(499) : ERROR : Undefined symbol s
nobasic.s:00499  sts s
make: *** [Makefile:45: nobasic.o] Error 1

Note: yes I am using -02 here, but it happened even with the stock makefile.

The fix, courtesy of the CMOC manual proved easy to find.

--- nobasic-0.1.9-dist/nobasic.c 2018-11-09 23:27:52.000000000 -0600
+++ nobasic.c 2019-12-07 16:57:33.999096764 -0600
@@ -363,7 +363,7 @@
wordToHex(hexPCAddr, pc);
unsigned s;
-        asm { sts s };
+        asm { sts :s };
wordToHex(hexStackAddr, s);
}

REFERENCE

nobasic 0.1.9 https://perso.b2b2c.ca/~sarrazip/dev/nobasic-0.1.9.tar.gz
CMOC 0.1.61 https://perso.b2b2c.ca/~sarrazip/dev/cmoc.html
LWTools 4.17 http://www.lwtools.ca/
gcc (Debian 8.3.0-6) 8.3.0 https://gcc.gnu.org/
Debian GNU/Linux 10 (buster) update 2 https://www.debian.org/
Linux 4.19.67 https://kernel.org