Commit graph

278 commits

Author SHA1 Message Date
57a47e6ba3 Add basic unfinished C64 upload function to USC 2025-07-10 18:10:35 +02:00
d22bd4ee49 Ensure asm functions are initialized before compiling 2025-07-10 18:10:17 +02:00
fd70c8d5dc Improve test binary stuff 2025-07-10 17:43:14 +02:00
hugova
385ae9c9e6 simplify branch logic for circle draw 2025-07-10 17:03:33 +02:00
hugova
a1089ccd1c Do some sneaky code reductions in circle draw 2025-07-10 16:46:54 +02:00
hugova
156abddbe7 reduse SEC instruction from circle-draw 2025-07-10 16:40:14 +02:00
hugova
b868156138 reduse zeropage usage of circle-draw 2025-07-10 16:28:17 +02:00
hugova
5e3eb78506 reduse instructions in circle draw 2025-07-10 01:38:37 +02:00
hugova
7cd03c02ba add code comments and compiler flag for circle draw. 2025-07-10 01:08:37 +02:00
hugova
4916678549 reduse instructions in circle draw 2025-07-10 00:45:50 +02:00
hugova
fbb7c395e4 rewrite circle code, such that it works on all X and Y (and not only if rest(X /8)=0 and rest(Y/0)=0. This makes the code alot bigger because the same symetries cant be abused. 2025-07-10 00:24:27 +02:00
06d6b434de Remove unused "NEXT" slots from syntax tree nodes (and related code) 2025-07-09 16:06:56 +02:00
d25f3795f5 Add basic unit tests to user-side compiler 2025-07-09 16:00:54 +02:00
83fdb01368 Add way to make binary test build of user-side compiler 2025-07-09 15:19:06 +02:00
7940298753 Add exported "interface" to user-side compiler 2025-07-09 15:18:04 +02:00
fb8f010e0d Delete test-programs.lisp (unused since long ago) 2025-07-09 15:16:44 +02:00
0f0ba054be Add pre-assembly.lisp, which handles transformations needed for asm 2025-07-09 15:15:57 +02:00
36b28f5b8b Remove QUICK-AND-DIRTY-TEST-COMPILE 2025-07-09 14:39:35 +02:00
fd311232de Add error type for missing ASM-FUNCTION 2025-07-09 14:38:49 +02:00
100086afa2 Improve tokenizer and parser error message header 2025-07-09 14:38:28 +02:00
b4d61c0deb Add example-6.c6l 2025-07-09 14:38:11 +02:00
352f9e897e Add TOKEN-ATOMIC for better tokenization statistics 2025-07-09 14:37:47 +02:00
2b0bcecc66 Fix incorrectly cons'd token source 2025-07-09 14:37:35 +02:00
dd3fe5369d Fix column off-by-one error in source tracking 2025-07-09 14:37:25 +02:00
c3dc447fe4 Remove any trace of the attempt to parse in C6L comments 2025-07-09 14:36:47 +02:00
b65012ed04 Remove warning for uncompilable operations, these should be errors 2025-07-09 14:34:57 +02:00
ea31bac351 Fix compilation of loops with variable as stop value
It was previously decided that, since the language is not to be
Turing-complete, a loop that takes a variable for its upper bound
should use the variable's value at the time of the loop's start, not
look it up. I forgot this while writing the syntax->IR compiler, so
loops with non-constant stop counts failed to compile.
2025-07-09 13:32:00 +02:00
857fa43df0 Allow names to start with underscore 2025-07-08 13:41:16 +02:00
09dc731444 Add code to populate asm function table using listing declarations 2025-07-08 12:53:18 +02:00
3862092ce2 Fix incorrect user procedure declarations in assembly routines 2025-07-08 11:39:24 +02:00
4d6ad30eae Add some proper error handling to user-side compiler 2025-07-07 19:44:57 +02:00
b5fa71c710 Add test program that stores test result for use in later IF 2025-07-07 15:51:56 +02:00
615c66f304 Add remaining arithmetic comparisons (and test program) to USC 2025-07-07 15:51:11 +02:00
4a52ff534f Remove now unused and useless functions from compiler backend 2025-07-07 14:37:45 +02:00
92f2b02675 Add COMPILE-IR methods for remaining arithmetic tests 2025-07-06 22:37:37 +02:00
ccd06bc8cb Fix typo that makes a comment confusing 2025-07-06 22:30:03 +02:00
016d7ededd Various additions and changes to compiler backend for IFs and calls
Branching now exists in a general way (work for tests requiring
multiple branch instructions still needed) that works for both storing
test results and taking branches in code.

De-duplicated arguments to calls now load correctly.
2025-07-06 22:26:34 +02:00
9685f00e10 Make value allocator aware of normal values used in branching
This way we avoid allocating and using a temporary variable when
branching based on the contents of a variable.
2025-07-06 22:22:18 +02:00
b1b7d863b5 Fix parser for "if <variable name> then" 2025-07-06 22:21:59 +02:00
5d9932637d Fix parser for empty argument lists 2025-07-06 22:21:40 +02:00
156edc2f09 Rethink how data works at the assembly code generation level 2025-07-06 19:04:36 +02:00
99d1156e7d Add PRINT-OBJECT method to ASM-FUNCTION 2025-07-06 18:55:27 +02:00
fa4458e2d7 Add example-3.c6l 2025-07-04 11:21:29 +02:00
76cd607bab Add COMPILE-IR method for IR-MINUS 2025-07-03 20:12:59 +02:00
f814f9fbb9 Some horrible flailing for the sake of correctness 2025-07-03 20:11:08 +02:00
c668f4fc78 Some cleanup after deleted code 2025-07-03 19:54:15 +02:00
hugova
590d7533d9 Remove bodge macro in circledraw and use jmp in other addressing mode 2025-07-03 17:50:52 +02:00
f54ecb75b9 Make linking and final compile to byte sequence work 2025-07-03 16:58:29 +02:00
f9a69e2da9 Add macro for iterating over ASM-OBJECTs 2025-07-03 16:57:33 +02:00
0117df02f8 Indentation correction 2025-07-03 16:57:20 +02:00