On Wednesday, December 30, 2020 at 3:22:40 PM UTC-8, Kent Dickey wrote:
It looks like it compiles something to 6502 code. But I'm not sure what.
Can you provide a source example and the 6502 output as an example?
It looks like "boids()" calls compile on some C-like code, but it's not C.
It's C with extensions.
e.g.
https://github.com/glouw/ctl/blob/master/examples/6502.c#L1068
setup(void)
keytype("i16", DEFAULT_WORD_SIZE);
keytype("u16", DEFAULT_WORD_SIZE);
keytype("u8", DEFAULT_BYTE_SIZE);
keytype("i8", DEFAULT_BYTE_SIZE);
keyword("unroll");
keyword("if");
The data type are just typedefs / aliases for standard "int16_t", "uint16_t", etc.
What makes it non-standard is that the for-loop command, "unroll", is using a custom macro mark-up with $ for variables:
"unroll($X, $I : x)\n"
m.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)