1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-26 12:49:21 +00:00
Commit Graph

2037 Commits

Author SHA1 Message Date
jespergravgaard
0d15872d6f Improved NES demo code slightly. 2020-05-25 08:07:49 +02:00
jespergravgaard
6c3ba36459 Upgraded to KickAss 5.15. Fixed NES linker file. Closes #459 2020-05-25 07:44:04 +02:00
jespergravgaard
8f4d3e0efe Added fragment ref data. 2020-05-24 08:00:30 +02:00
jespergravgaard
7c965b6ef6 Introduces OAM struct. 2020-05-24 01:15:58 +02:00
jespergravgaard
c8cd5a0e51 Added support for NES platform with a working demo program. Closes #456 2020-05-24 00:28:38 +02:00
jespergravgaard
0ed5059c8a Added support for reserved ZP variables in the target platform .TGT file. Atari 2600 platform file now uses zp range reserving. Closes #447 2020-05-22 15:52:51 +02:00
jespergravgaard
978d85055a Added support for reserving ZP ranges using NN..NN range syntax "#pragma zp_reserve(0x00..0x1f, 0x22). Changed name of #pragma and function directive to zp_reserve() and __zp_reserve(). Closes #238 2020-05-22 15:24:03 +02:00
jespergravgaard
d714c6ab4c Added Atari 2600 Sprite test. 2020-05-21 21:34:34 +02:00
jespergravgaard
c9965b2cc7 Added test for memory variable used inside inline ASM. 2020-05-21 09:38:03 +02:00
Jesper Gravgaard
8102cc57f4 Optimized conio.c by using x-indexing and a line-cursor instead of having a char-cursor. 2020-05-20 22:25:39 +02:00
jespergravgaard
f44a7132d1 Fixed file name inside disk. 2020-05-18 00:48:46 +02:00
jespergravgaard
da2fd8545b Fixed test reference. 2020-05-18 00:46:25 +02:00
jespergravgaard
65b59c6745 Fixed comment. 2020-05-17 23:54:59 +02:00
jespergravgaard
af90a910f2 Added a sinus movement to the Atari 2600 raster bars. Separated Vars and Data fragments in the Atari 2600 target platform linker file. Moved atari 2600 demo to /examples/. Closes #445 2020-05-17 23:52:58 +02:00
jespergravgaard
2faaae5d93 Implemented support for controlling output file extension using #pragma extension("xxx"), property "extension" in the target platform file or command-line option -oext. Closes #446 2020-05-17 23:33:18 +02:00
jespergravgaard
c2993e4d82 Updated Atari 2600 minial sample. 2020-05-17 00:19:22 +02:00
jespergravgaard
26718942e9 Added Atari 2600 target platform and a minimal sample program. It is functional, but still needs some work. 2020-05-16 22:13:47 +02:00
jespergravgaard
9693ea125a Added VIC 20 raster bars. 2020-05-16 17:35:25 +02:00
jespergravgaard
7364e3a877 Fixed VIC 20 Basic target. 2020-05-16 16:35:09 +02:00
jespergravgaard
557212c847 Added a VIC 20 target. Added CONIO support for VIC 20. 2020-05-16 16:28:24 +02:00
jespergravgaard
97f49cb93c Fixed syntax error. 2020-05-16 13:05:59 +02:00
jespergravgaard
969301af0f Added plus/4 keyboard tester. 2020-05-16 12:45:35 +02:00
jespergravgaard
d9fdaca1b0 Added conio.h support for PLUS4. Fixed problem where anonymous structs failed because scopes were mixed up. 2020-05-16 12:40:01 +02:00
jespergravgaard
1b9f523f8f Fixed processor port addresses. 2020-05-16 09:39:24 +02:00
jespergravgaard
8d0d36e50b Added all Plus/4 IC's and I/O addresses. 2020-05-16 09:33:01 +02:00
jespergravgaard
1d534dcc3d Implemented target platform defines by putting the handling of #pragma target() into the preprocessor/parser. 2020-05-15 08:19:26 +02:00
jespergravgaard
e046e27e52 Added missing fragment found by G.B. 2020-05-14 22:25:48 +02:00
jespergravgaard
a9551beec2 Added test file. 2020-05-12 00:08:40 +02:00
jespergravgaard
b2045c7874 Working on #pragma target handling in preprocessor - to fix the embedded #defines. 2020-05-12 00:08:11 +02:00
jespergravgaard
362ec9bb0b Fixed missing fragment. Closes #435 2020-05-11 20:55:29 +02:00
jespergravgaard
86358c66be Added target files. 2020-05-11 11:04:32 +02:00
jespergravgaard
239cfdb48e Implemented #platform target() functionality configured by a TGT-file in JSON. 2020-05-11 02:36:37 +02:00
jespergravgaard
f2ece49ded Upgraded to Picocli 4.2.0. Added support for -Dname command-line option for defining a macro on the command line. 2020-05-10 00:07:12 +02:00
jespergravgaard
16d19d69a4 Added -Dname=body command-line option for defining macros on the command line. 2020-05-09 23:17:11 +02:00
jespergravgaard
8651ee8886 Updated test data. 2020-05-09 11:52:17 +02:00
jespergravgaard
ab670df01f Renamed #pragma emulator. Added headers for Plus/4. Closes #436 2020-05-09 11:44:29 +02:00
jespergravgaard
c3a9ced0f5 Added support for #pragma emulator() specifying which emulator to execute. 2020-05-09 08:12:28 +02:00
jespergravgaard
7e859fa8ae Added support for -emu option specifying which emulator to execute. 2020-05-09 00:04:03 +02:00
jespergravgaard
6aa88fe3e6 Added random walk for Plus/4 to examples. Thanks to Carrion of Bonzai! 2020-05-08 18:28:48 +02:00
jespergravgaard
6a5aa72ed5 Fixed tests. 2020-05-08 09:10:59 +02:00
jespergravgaard
aa66273149 Optimized line buffer and rendering sequence slightly 2020-05-08 09:07:46 +02:00
jespergravgaard
6da9a8f9f8 Introduced line buffer. 2020-05-07 09:04:42 +02:00
jespergravgaard
42aa2d9a8f Added missing fragment. 2020-05-07 08:42:27 +02:00
Jesper Gravgaard
21ee39aafa Fixed tests. 2020-05-06 22:38:59 +02:00
Jesper Gravgaard
a6d0f4a541 Added circle chars test. 2020-05-06 22:36:46 +02:00
Jesper Gravgaard
1aa1551ea8 Describing a more ambitious eor filler design. 2020-05-06 20:09:01 +02:00
jespergravgaard
4cd7e638c9 Optimized ln in <conio.h> 2020-05-05 08:37:49 +02:00
jespergravgaard
ed6df148f7 Added test for rand() 2020-05-05 07:49:32 +02:00
jespergravgaard
36f82d5745 Added pseuso random number generator to <stdlib.h>. Closes #434 2020-05-05 07:46:48 +02:00
jespergravgaard
4d4169ef32 Optimized word rol/ror by 6-9. 2020-05-05 07:22:02 +02:00
jespergravgaard
60e6d3a645 Added a test for a pseudo random number generator and struct-of-arrays vs array of strucs. 2020-05-04 01:24:28 +02:00
jespergravgaard
b2052e0ab4 Added scroll mode configuration to <conio.h>. 2020-05-03 14:01:23 +02:00
jespergravgaard
f7f9ef4a6c Fixed exception when using a return value from a VOID function. Added proper error message when printf() is missing parameters referenced in the format string. 2020-05-03 13:59:48 +02:00
jespergravgaard
dbbde914c7 Fixed test reference files. 2020-05-03 08:53:52 +02:00
jespergravgaard
e7ca7913f1 Integrated <conio.h> and <printf.h> to work together. Added missing fragments. 2020-05-03 00:34:06 +02:00
jespergravgaard
3948ffd3df Updated helloworld.c to use <stdio.h> and printf() 2020-05-02 15:38:02 +02:00
jespergravgaard
f3e27c1e3d Updated version number. 2020-05-02 12:14:27 +02:00
jespergravgaard
f8af7172d4 Added test reference files. 2020-05-02 12:07:12 +02:00
jespergravgaard
95a3759087 Renamed a few VIC II registers 2020-05-02 11:38:51 +02:00
jespergravgaard
4ffba62276 Added support for address-of on struct value members. Closes #429 2020-04-30 23:42:45 +02:00
jespergravgaard
30b7e32902 Added error message. 2020-04-30 22:40:42 +02:00
jespergravgaard
facd70053d Added support for address-of pointers to members of structs. 2020-04-30 22:15:59 +02:00
jespergravgaard
bf0dbfde63 Slight changes to <mos6569.h> 2020-04-29 08:09:45 +02:00
jespergravgaard
bc85b3c0d1 Improved equality of constants. Moved more VIC-II variabes into struct. 2020-04-29 07:53:45 +02:00
jespergravgaard
0a9cee999d Updated C64 header file. 2020-04-28 22:58:16 +02:00
jespergravgaard
73d737ac79 Fixed tests. Started work in VICII struct. 2020-04-28 21:21:32 +02:00
jespergravgaard
013159c16d Fixes optimization problem with post-increment/decrement of calculated pointers. Closes #428 2020-04-28 20:13:29 +02:00
jespergravgaard
eed25ff1cd Inlined sid_rnd() functions. 2020-04-28 00:32:36 +02:00
jespergravgaard
8f2b1c2134 Moved MOS 6526 and MOS 6581 to separate H-files. Removed log noise causes by structs in H-files. 2020-04-28 00:30:35 +02:00
jespergravgaard
a8384bbebe Fixed CIA problems. 2020-04-27 00:20:53 +02:00
jespergravgaard
b10c365513 Using time-of-day in both 8 queens programs. 2020-04-26 23:50:19 +02:00
jespergravgaard
b82c3f0a07 Added time-of-day utility for commodore 64 <tod.h>. Moved MOS 6526 CIA to structs. 2020-04-26 23:30:04 +02:00
jespergravgaard
d8d0cc1ff8 Added 8 queens example programs with and without recursion. 2020-04-26 13:57:53 +02:00
jespergravgaard
e960c71448 Fixed fragment test. 2020-04-26 00:01:31 +02:00
jespergravgaard
9ddcb9790a Implemented 8 queen problem recursive solution. 2020-04-25 23:28:38 +02:00
jespergravgaard
0da4300069 Fixed atoi(). 2020-04-25 21:25:27 +02:00
jespergravgaard
ad76f3a9ed Added atoi() and a test. optimized printf(). 2020-04-25 21:09:46 +02:00
jespergravgaard
7069a8c17c Added test of toupper() 2020-04-25 20:23:40 +02:00
jespergravgaard
793a776b04 Clean-up of pass 1 log to avoid modifying log-files evey time stdlib is modified. 2020-04-25 20:10:49 +02:00
jespergravgaard
031cde10e9 Fixed test data. 2020-04-25 17:57:48 +02:00
jespergravgaard
5b2e993994 Fixed stack-overflow on recursive __stackcall functions. Added <math.h> abs(). Added <stdio.h> printf(). Closes #415 2020-04-25 16:51:35 +02:00
jespergravgaard
3b6c14be7a Added support for __intrinsic only being present in .c-file while absent in .h-file. Closes #417 2020-04-25 15:46:27 +02:00
jespergravgaard
4c3b000fbd Added a few more printf() error tests. 2020-04-25 14:53:14 +02:00
jespergravgaard
986ad3b77f Added support for printf() parameter index format string (eg. %2$d). Closes #420 2020-04-25 14:48:20 +02:00
jespergravgaard
ae28cb9c67 Improved minus literal implementation. Added <ctype.h> toupper(), <string.h> strupr(). Added support for %X (upper case HEX) in printf() format. Closes #419 2020-04-25 13:15:22 +02:00
jespergravgaard
d160e45c8a changed printf() cursor to be x,y-based. 2020-04-22 00:14:30 +02:00
Jesper Gravgaard
64660c626a Updated VS.Code files for Windows & MacOs. 2020-04-21 18:27:49 +02:00
Jesper Gravgaard
bc70424634 Added automatic type identification to numeric printf handler without %l / %hh. 2020-04-21 10:39:07 +02:00
Jesper Gravgaard
839911e0a0 Fixed test data. 2020-04-21 09:50:36 +02:00
jespergravgaard
f6ee599d79 Added printf() support for newlines, %% and %c. Added tests for different formats. #410 #415 2020-04-21 08:41:52 +02:00
Jesper Gravgaard
d7143771ba Added printf() support for %d, %i, %x, %o and length specifiers %hhd %ld. 2020-04-20 19:00:16 +02:00
jespergravgaard
28c9b2ada7 Improved implementation of intrinsic printf() to support rudimentary %d / %x. #410 #415 2020-04-20 08:55:50 +02:00
jespergravgaard
9fa2e5d734 Added support for declaring var-length parameter lists in functions. Added __intrinsic directive for specifying that a function is implemented in the compiler. Added initial tiny implementation of intrinsic printf(), which only handles %s. #410 #415 2020-04-19 23:29:37 +02:00
jespergravgaard
9c6e67ddc5 Printf tests rewritten to use inline struct constructors. 2020-04-19 11:53:15 +02:00
jespergravgaard
933d23fd0a Fixed problem with negating negative number generating illegal ASM. Closes #414 2020-04-19 11:13:57 +02:00
jespergravgaard
6a2937aa29 Casts are now inlined during parse - so they can be used for struct unwinding and more. They are then de-inlined around pass 1. This fixes problem with passing struct constructor as parameter to function. Closes #413 2020-04-19 11:05:54 +02:00
jespergravgaard
7bac2776b1 Added missing ref files. 2020-04-18 21:51:42 +02:00
jespergravgaard
897cde29e4 Added printf.h which contains functions for printing formatted numbers and strings. 2020-04-18 20:54:39 +02:00
jespergravgaard
7803f6710b Added primes test C-file. 2020-04-17 01:13:41 +02:00
jespergravgaard
a84cb1a977 Updated reference manual. 2020-04-13 22:04:11 +02:00
jespergravgaard
cb07791eab Renamed print.h functions. 2020-04-13 20:06:30 +02:00
jespergravgaard
d12daf874d Updated all stdlib files to use standard C types. 2020-04-13 20:00:13 +02:00
jespergravgaard
a877da3c7d Updated ref files. 2020-04-13 15:07:23 +02:00
jespergravgaard
ba372afeb3 Improved chrout() implementation. 2020-04-13 11:09:24 +02:00
jespergravgaard
3dcec77fb7 Added proper error when returning value from void function. Closes #400 2020-04-13 10:50:57 +02:00
jespergravgaard
ab10f2184d Upgraded to KickAsm 5.14. Fixed PETSCII encoding problem. Closes #401 2020-04-13 10:33:44 +02:00
jespergravgaard
cf4d25b5f6 Added additional screensize operations to allow better optimization. 2020-04-13 08:19:39 +02:00
jespergravgaard
c604e16630 Added first conio implementation compatible with cc65 and included a conio example from cc65. 2020-04-12 23:52:23 +02:00
jespergravgaard
2de71b4cd1 Fixed problem with post-increment sometimes happening to early when evaluating conditions. Closes #388 2020-04-12 10:15:32 +02:00
jespergravgaard
b4787eb45c Updated to KickAss 5.13. Closes #389 2020-04-12 08:03:01 +02:00
jespergravgaard
9c40c2f0f2 Added initial strncat() implementation. Found error in post-increment when used in a condition. 2020-04-11 22:48:33 +02:00
jespergravgaard
9e5e8ddf3b Cleaned up release file structure moving JAR's to JAR-folder. 2020-04-11 21:24:08 +02:00
jespergravgaard
a378e831e2 Added support for header-files found in include-folders and C-files found in library-folders. The compiler auto-searches for the C-file in the defined lib search path whenever a H-file is included. Closes #387 2020-04-11 21:15:34 +02:00
jespergravgaard
c150976b2f Retired special file extension .kc. Now using .c for all examples and tests. Closes #195 2020-04-11 16:06:15 +02:00
jespergravgaard
d95fea6975 Added -E commandline option for running only the proprocessor. Closes #385 2020-04-11 13:41:10 +02:00
jespergravgaard
1c59ad61fd Added support for compiling multiple C-files using a single command line. Closes #382 2020-04-11 13:03:36 +02:00
jespergravgaard
f42a921d2b Now supports \xnn syntax for all values - even those without a proper encoding. Closes #383 2020-04-11 09:13:22 +02:00
jespergravgaard
e506732779 Improved function names and documentation. 2020-04-11 08:30:42 +02:00
jespergravgaard
56227c36b6 Moved getters to StringEncoding. 2020-04-10 22:02:30 +02:00
jespergravgaard
61c5914f73 Added support for \xnn as escape in strings. However only characters defined in the current encoding works. Refactored handling of escapes and encodings. Closes #383 2020-04-10 11:24:20 +02:00
jespergravgaard
b36a8b087c Fixed import parsing by introducing another lexer mode. 2020-04-10 01:25:08 +02:00
jespergravgaard
8c5500822c Nuw using #include<> in test files where possible. 2020-04-10 01:10:18 +02:00
jespergravgaard
5ff8fce61d Added support for #include <> syntax. Closes #381 2020-04-09 23:56:43 +02:00
jespergravgaard
8dac19aca0 Added caching of global symbols. Results in faster compilation. 2020-04-09 22:38:30 +02:00
jespergravgaard
096d7c0640 Cleaned up scope getters. Might have caused a slow-down of compilation. 2020-04-09 22:17:33 +02:00
jespergravgaard
ab10bd59b4 Added a few more c's to test. 2020-04-09 09:36:09 +02:00
jespergravgaard
23ae5cf5f5 Variable extern declarations are now supported. Closes #196 2020-04-09 09:21:43 +02:00
jespergravgaard
8bdc927694 Fixed test for missing function definition. #196 2020-04-09 08:13:44 +02:00
jespergravgaard
ebdce3b2a7 Added test for missing function definition. #196 2020-04-08 23:52:49 +02:00
jespergravgaard
273819d2a4 Added test for two error cases. #196 2020-04-08 23:44:40 +02:00
jespergravgaard
db92daf4bf Added initial support for function declarations without a body. #196 2020-04-08 23:40:27 +02:00
jespergravgaard
433fcd3dd4 Added support for macro parameters with proper pre-expansion allowing nested macro calls. Closes #169 2020-04-07 14:12:25 +02:00
jespergravgaard
682757b10c Renamed import to #include. #169 2020-04-07 12:43:31 +02:00
jespergravgaard
d8138615ac Implemented #elif. #169 2020-04-07 12:06:42 +02:00
Jesper Gravgaard
4352874305 Added support for #if reusing the expression parser. Added support for the special defined operator. Now using the base parser for the preprocessor test. #169 2020-04-06 14:34:42 +02:00
jespergravgaard
0a11eefda0 Syntax changes. 2020-04-06 08:06:00 +02:00
jespergravgaard
263987f059 Added an expression parser to use for #if. #169 2020-04-06 08:00:55 +02:00
jespergravgaard
88b2cd86c2 Added test for #define containing inline ASM/KickAsm. Fixed problem with ASM. #169 2020-04-05 22:54:00 +02:00
jespergravgaard
ba1ecac84b Added test for recursive #define. #169 2020-04-05 20:34:33 +02:00
jespergravgaard
7c9c2955b4 Added test for multi-line #define. #169 2020-04-05 20:13:40 +02:00
jespergravgaard
9fea02e7ad Added support for #ifdef #ifndef #else #endif. #169 2020-04-05 20:09:34 +02:00
jespergravgaard
524d789805 Added test for #defines inside imported file. #169 2020-04-05 18:28:32 +02:00
jespergravgaard
a01c6b5680 Added support for #undef. #169 2020-04-05 18:06:06 +02:00
jespergravgaard
c4550b5aec Added test of defines with complex body. #169 2020-04-05 14:45:32 +02:00
jespergravgaard
30e35bee41 Added simple preprocessor to the KickC compiler (only supports #define without parameters). #169 2020-04-05 14:32:07 +02:00
jespergravgaard
375578e7df Added #define to KickC lexer. #169 2020-04-05 09:32:10 +02:00
jespergravgaard
ea49dc910a Now supports multi-line #defines, nested #defines and ends recursive #defines correctly. #169 2020-04-04 17:39:41 +02:00
jespergravgaard
a2de5faf47 Added peeking iterator. 2020-04-03 08:21:27 +02:00
jespergravgaard
b2466df1e4 Moved simple macro expander to main source. 2020-04-02 08:33:32 +02:00
Jesper Gravgaard
3bb6efb92d Updated test data. 2020-04-01 14:53:02 +02:00