Commit Graph

4150 Commits

Author SHA1 Message Date
Kugel Fuhr
23086bccff Much improved diagnostics for macros. 2025-07-06 10:41:12 +02:00
Kugel Fuhr
7cd137afb4 Improved diagnostics. 2025-07-06 10:40:25 +02:00
Kugel Fuhr
45a326750c Added a function to output notifications. 2025-07-06 10:39:29 +02:00
Kugel Fuhr
bcd29de443 Much improved error messages for ca65. For most errors it will now say what
was expected and what was found instead. Also improved error recovery in a few
places.
2025-07-06 08:40:05 +02:00
Kugel Fuhr
500b86f1e2 Improve error recovery. 2025-07-04 14:56:20 +02:00
Kugel Fuhr
2e6f04034b Improved an error message. 2025-07-04 14:51:56 +02:00
Bob Andrews
29f7ab3809 Merge pull request #2760 from kugelfuhr/kugelfuhr/fix-2753
Add ".CAPABILITY" to ca65, remove ".MACPACK cpu"
2025-07-03 18:43:05 +02:00
Bob Andrews
dbb6ff5482 Merge pull request #2761 from kugelfuhr/kugelfuhr/fix-2231
Allow comments within _Pragma()
2025-07-03 18:36:43 +02:00
Bob Andrews
4edf1ad363 Merge pull request #2767 from kugelfuhr/kugelfuhr/fix-836
Remove invalid characters from labels in the VICE label file
2025-07-03 18:32:37 +02:00
Kugel Fuhr
dd27ec8696 When creating a VICE label file, replace characters in labels that VICE
doesn't understand with '_'. Fixes #836.
2025-07-03 08:54:10 +02:00
Bob Andrews
92fa7cb23f Merge pull request #2762 from kugelfuhr/kugelfuhr/fix-1778
Change notification message used when pointing to the macro an error comes from
2025-07-02 00:35:24 +02:00
Kugel Fuhr
ec67b49d7d Change notification message used when pointing to the macro an error comes from. 2025-07-01 17:37:39 +02:00
Kugel Fuhr
64d35b6a86 Allow comments within _Pragma(). Fixes #2231. 2025-07-01 17:24:24 +02:00
Kugel Fuhr
60ec9045fc Use CPUIsets from cpu.c instead of recreating the CPU_xxx constants. 2025-07-01 13:02:15 +02:00
Kugel Fuhr
37414199c7 Hopefully fix windows build files. 2025-07-01 09:33:38 +02:00
Kugel Fuhr
c162f6a286 Warning fix. 2025-07-01 09:21:18 +02:00
Kugel Fuhr
8d3112e24f Small code simplification. 2025-07-01 08:47:16 +02:00
Kugel Fuhr
29c8846f7d Add an additional hook (currently unused) for target specific capabilities. 2025-07-01 08:44:13 +02:00
Kugel Fuhr
59e7158512 Make the CPU_xxx constants from cpu.mac internal to the assembler and replace
cpu.mac by a file that just emits a warning when used.
2025-07-01 08:29:42 +02:00
Kugel Fuhr
f333b300f1 Added the CPU_HAS_BITIMM capability. 2025-07-01 07:16:33 +02:00
Kugel Fuhr
d4e57278c6 Add a new .cap pseudo function to the assembler that allows to check for
certain capabilities of the CPU or target system.
2025-06-30 21:37:43 +02:00
mrdudz
483ef7844b also test DESTDIR 2025-06-30 16:03:36 +02:00
mrdudz
705081af34 Merge branch 'master' into quietagain 2025-06-29 23:01:47 +02:00
mrdudz
831eedfb58 add some reasonable warnings/errors when PREFIX is empty 2025-06-29 22:46:42 +02:00
mrdudz
ce99bfb195 forgot some case values /o\ 2025-06-29 21:05:51 +02:00
mrdudz
af89b22252 add missing pseudos for sweet16 2025-06-29 19:13:56 +02:00
mrdudz
dd0d908d57 65816 does not have Rockwell extensions 2025-06-29 17:21:22 +02:00
mrdudz
cf8af80dce add missing pseudo(s) for HUC6280, fix cpudetect for 6280 2025-06-29 01:57:28 +02:00
mrdudz
629252c562 its CSG extensions, not GTE 2025-06-29 01:51:10 +02:00
mrdudz
0168835456 handle extra address mode(s) for 65CE02 in the scanner 2025-06-28 18:17:37 +02:00
mrdudz
bf1dbc54fc fix instruction bitfields. 65CE02 derivates can not use 65SC02, because of the zp-ind-z clash 2025-06-28 18:17:13 +02:00
mrdudz
8e4936d68d add related pseudos 2025-06-28 18:15:57 +02:00
mrdudz
c16b8dcf43 add new files 2025-06-28 02:08:01 +02:00
mrdudz
f6becd1b27 compiler should know about W65C02/65CE02 as well 2025-06-28 01:51:13 +02:00
mrdudz
b05e418e0b rp6502 actually uses W65C02 2025-06-28 01:45:26 +02:00
mrdudz
d472ac8fc0 fix table 2025-06-28 01:44:40 +02:00
mrdudz
0b49d66f05 sort table 2025-06-28 01:06:37 +02:00
mrdudz
b38422ef9f 65CE02 has phz and asw 2025-06-28 00:58:19 +02:00
mrdudz
e3140349b0 add 65CE02 and W65C02 to disassembler 2025-06-28 00:54:13 +02:00
mrdudz
e93356e3bb add 65CE02 table 2025-06-28 00:38:16 +02:00
mrdudz
76aa7cbc40 add names and bit(field)s for WDC65C02 and 65CE02 2025-06-27 19:40:41 +02:00
Bob Andrews
d909a2c285 Merge pull request #2746 from mrdudz/bequiet
Fix -s vs QUIET in the makefiles
2025-06-27 16:43:13 +02:00
Bob Andrews
270552af48 Merge pull request #2734 from mrdudz/mega65c
C65 and Mega65 initial C support
2025-06-27 16:41:28 +02:00
mrdudz
0c22e310ef ...and patch the Makefile in src the same way 2025-06-26 23:44:56 +02:00
Kugel Fuhr
d5e7c94eb2 Introduce an optimization for (header) files containing include guards: If
such an include guard exists, the file is not read and parsed multiple times
(as before) but duplicate inclusion is detected before opening the file and
the additional overhead is avoided.
2025-06-26 10:10:11 +02:00
mrdudz
01ba0b562d Merge branch 'master' into mega65c 2025-06-26 01:52:10 +02:00
Bob Andrews
801508aecf Merge pull request #2735 from kugelfuhr/kugelfuhr/fix-2025
Add an optimization that removes compare instructions preceeding RTS or function calls
2025-06-26 00:29:29 +02:00
Kugel Fuhr
55d9b2dbd0 Rewrite the optimization step from c0a1b1b887 to
remove compares not only before RTS but also befoire function calls that don't
use the flags but destroy all of them. The latter is currently the case for
all functions called. This way the optimization covers a lot more cases than
just checking for RTS.
2025-06-25 20:07:36 +02:00
mrdudz
d6cc893940 fix instruction set bits set by the compiler. in particular do not set the 65SC02 bit for 4510/45GS02, else we get clashes with sta(zp) 2025-06-24 21:39:39 +02:00
Kugel Fuhr
7a6c60ade4 Do also sort variables to satisfy sorted_codeopt.sh. 2025-06-24 20:21:43 +02:00