Commit graph

187 commits

Author SHA1 Message Date
hugova
b7f04d1fcb make circledraw faster by using lookup table 2025-06-29 02:51:34 +02:00
hugova
380728a80a add another part of the circle. now 1/4 circle done 2025-06-29 02:04:08 +02:00
hugova
c2a5af481f rewrote the circle code to use relative position for pixel draw. This made it 2 orders of magnitudes faster! 2025-06-28 22:25:55 +02:00
hugova
484bafa828 Fix quartercircle offset isse (before the circle had the offset (0,0) always!) 2025-06-28 21:10:59 +02:00
hugova
363e3907ff Fix circle-code (wip) Now the test renders the forth quarter of a circle! 2025-06-28 21:05:25 +02:00
hugova
50a17ad691 rewrote circle code (still not working) 2025-06-28 20:53:39 +02:00
hugova
07e12696e5 Fix bugg where screen do not properly clear on startup 2025-06-28 20:14:22 +02:00
hugova
846d792aee Add extended testing of pixel_draw and fix a pixel_draw bugg (error of max 8px) 2025-06-28 20:12:58 +02:00
hugova
d691d692b9 more pritty circle bugs 2025-06-26 22:38:11 +02:00
hugova
8b955a5007 very cool but not working circle. 2025-06-26 22:05:08 +02:00
9e643e6c6d Add compiler middle stage
The compiler middle stage takes high level nodes and produces code in
an intermediate representation more closely resembling assembly code.

Optimizations and the tools for making those are also included. It's
significantly easier to optimize IR than syntax trees or assembly.

Several things need cleaning up, in particular there are things in
jigs.lisp that really should be documented tools, not
jigs (specifically the compilation setup and finalization).
2025-06-26 13:41:43 +02:00
7703c71141 Add tool for quickly defining common PRINT-OBJECT methods 2025-06-26 12:44:43 +02:00
2c529c368a Reorder parsing so calls get properly parsed inside expressions 2025-06-21 21:04:26 +02:00
4011e3b0db Reorder loading of high-level.lisp 2025-06-21 21:02:58 +02:00
61ea8b3773 Move NODE-CONDITIONAL definition to proper place 2025-06-19 15:07:23 +02:00
2b94745734 Some little cleanup 2025-06-13 09:19:00 +02:00
928cdfd318 Add user-side compiler's parser
It ingests tokens via a "token stream", and feeds out a node
tree. It's a mostly handwritten recursive descent parser with the
occasional Lisp macros for convenience.
2025-05-22 13:14:55 +02:00
f9f2694b96 Add two more code examples 2025-05-22 13:14:55 +02:00
08f9cc4a11 Remove premature code generation from high-level and add new nodes
The new nodes are more directly representational of the syntax, and
code generation will be moved to an intermediate stage with a more
linear (yet still node-based) representation.
2025-05-22 13:14:55 +02:00
3f3d94367f Add PRINT-OBJECT method to TOKEN-NUMBER 2025-05-22 13:14:55 +02:00
12d1a905fe Add stub ASM-FUNCTION class 2025-05-22 13:14:55 +02:00
38406c80ee Add various transformation rules 2025-05-22 13:14:55 +02:00
ebe27cf026 Make methods for nodes to list their potential next nodes 2025-05-22 13:14:55 +02:00
4bf1316536 Half-baked and half-hearted attempt to let nodes hold comments 2025-05-22 13:14:55 +02:00
57c2978b71 Adjust reference PRINT-OBJECTs to not error on unbound slots 2025-05-22 13:14:55 +02:00
3c8835eb7b Make references able to hold a name 2025-05-22 13:14:55 +02:00
7639263bed Make TRANSFORM return OBJ if it's already TO-TYPE 2025-05-22 13:14:55 +02:00
1307e31268 Better handling of operators, source, and comments in tokenizer
...among other minor changes to accomodate the parser.
2025-05-22 13:14:55 +02:00
8acbf2caec Define more atomic tokens, and add shortcut macro for doing it 2025-05-22 13:14:55 +02:00
ae39a48890 Add PRINT-OBJECT method for TOKEN-NAME 2025-05-22 13:14:55 +02:00
25fd7675d0 Rename TOKEN-NAME's TEXT slot to NAME to match TOKEN-KEYWORD 2025-05-22 13:14:55 +02:00
45a66ce323 Give tokens an INITFORM for SOURCE (to NIL) 2025-05-22 13:14:55 +02:00
5a18cc9864 Make NODE-DOTIMES hold a counter variable 2025-05-22 13:14:55 +02:00
6b74c0247e Move and rename syntax-example.txt 2025-05-22 13:14:55 +02:00
hugova
89dcec60ff implement general divition 2025-05-17 16:12:13 +02:00
hugova
3283f9a68a fix compiler arguments 2025-05-17 16:12:13 +02:00
hugova
42d6b35713 remove none relevant stuff from build.sh 2025-05-17 16:12:13 +02:00
e6e2e94404 Add symbol table 2025-05-16 21:00:57 +02:00
0867e99cc1 Various messes 2025-05-16 21:00:14 +02:00
5d0f4b4767 Move definition of REFERENCE classes to its own file
Dereferencing is still defined in high-level.lisp, this might change
in the future since I'm sort of restructuring a little bit.
2025-05-16 21:00:14 +02:00
449e36e183 Add reference equality test (only implemented for constants so far) 2025-05-16 21:00:14 +02:00
e88e966521 Add mechanism for transforming objects to different types 2025-05-16 21:00:14 +02:00
hugova
69232b6d53 optimize general multiplication, less cpu cykels in most cases 2025-05-16 18:37:21 +02:00
3211f6d441 Add primitive tokenizer for USC 2025-05-16 12:31:18 +02:00
b9bda5ad68 Add missing RELATIVE-MIXIN 2025-05-16 12:31:18 +02:00
53002f2b8a Slight syntax adjustment
I just couldn't stand "dotimes x 200", and "for x do 200 times" just
feels so much nicer. I also added a space after an opening parenthesis
to ensure that my tokenizer gets to eat this particular type of
unnecessary but permitted whitespace.
2025-05-16 12:31:18 +02:00
hugova
9a06f770c2 add general multiplication implementation 2025-05-16 11:11:21 +02:00
bc3e07356e Add a USC test program 2025-05-16 10:39:03 +02:00
3878b57848 Add syntax example 2025-05-16 10:39:03 +02:00
hugova
c6392088f8 optimize away JMP instruction in mem logic 2025-05-15 17:43:23 +02:00