1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-08 10:29:04 +00:00
Commit Graph

455 Commits

Author SHA1 Message Date
Oliver Schmidt
365668785c Allow for warning-free build of ca65 with MS VC on warning level 3. 2013-04-08 00:11:08 +02:00
Oliver Schmidt
29c522fc5a No copyright message here. 2013-04-08 00:11:07 +02:00
Oliver Schmidt
54299fae5a Replaced builtin macro packages with .mac files that are included like ordinary .inc files.
The benefits are:
- Independency of ca65 build from perl
- More transparent behaviour
2013-04-08 00:11:05 +02:00
uz
fa722e351a The scrcode macros lost the last argument in the recursive call.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5966 b7a2c559-68d2-44c3-8de9-860c34a00d81
2013-01-22 21:28:26 +00:00
uz
9fce84c722 Added a new feature "underline_in_numbers" requested by thefox. Using
underlines it is possible to group the digits for easier reading.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5963 b7a2c559-68d2-44c3-8de9-860c34a00d81
2013-01-12 19:07:31 +00:00
uz
aad6cd2a14 Allow to map characters to code zero with .CHARMAP.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5921 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-11-06 20:36:45 +00:00
uz
4682d7542a Add -d (debug mode) to the assembler options. In studyexpr, use the debug
flag, not the verbose flag to decide if the studied expression should be
output.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5919 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-11-06 20:24:44 +00:00
uz
4a41865898 Fixed a problem in line info generation: Recorded token lists emitted the
tokens using the standard ASM line info, overwriting the existing one from the
real source line. Since this info was lost, and couldn't be recovered, the
original source location was omitted in error messages.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5905 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-11-04 12:57:34 +00:00
uz
0b5c667cd9 Output notifications for line info from macro parameters in case of
errors/warnings.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5904 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-11-04 12:36:00 +00:00
uz
5410cdea29 Add line info for macro parameters.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5903 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-11-04 12:35:20 +00:00
uz
f90fa9cc29 Make the old "AllocNew" flag for symbols an enum and add an additional flag
that allows to lookup a symbol without any flags added to it.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5884 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-27 19:50:49 +00:00
uz
a3ae2e9125 Minor code optimization.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5883 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-27 19:32:42 +00:00
uz
757b400aa1 The message "Dropping x additional line infos" had been displayed even if
there weren't any more line infos to display, because they had the wrong type.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5882 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-27 19:16:35 +00:00
uz
0cbc81161c Fixed a problem with the last change: Sym wasn't always NULL when it should
have been.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5881 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-27 15:47:49 +00:00
uz
acb3fcb9c7 Fixed a problem reported by thefox: A symbol reference with an explicit scope
specification that is used when the scope is already closed, has be made a
trampoline symbol later, referencing a symbol outside of the scope explicit
specified.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5880 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-27 11:49:37 +00:00
uz
e6b52ee8d0 Fixed a bug reported by thefox: The .CHARMAP command must not accept indices
or character codes with a value of zero. The assembler runs into a CHECK in
tgttrans anyway if the index is zero.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5826 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-09-17 15:09:39 +00:00
uz
5693df8bf2 Do not try to dump an expression that has errors (circular references in this
case) because the dump routine doesn't detect this and runs into an endless
recursion.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5811 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-08-22 21:24:54 +00:00
uz
c1bbf69d72 New option --relax-checks that disable the check for a match beween size oif
an expression and the address size. Will allow short branches between segments
among other things. Suggested by Spiro Trikaliotis.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5810 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-08-20 20:07:05 +00:00
uz
148363810b Don't add the current directory to the list of search paths. If the main file
is located there, it is added anyway. If the main file is located elsewhere,
we don't want to search in the current directory.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5802 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-08-01 21:42:26 +00:00
uz
6345c4ee25 Fixed an error in the macro package that prevented the macros to work
correctly. The short forms of the jumps were never choosen. The error was
introduced with release 3176 in 2004(!) and reported by thefox.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5787 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-17 18:30:05 +00:00
uz
b4214634b2 Permit the .string builtin function to work with scoped identifiers.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5786 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-17 18:28:07 +00:00
uz
43ea0e3df9 Move evaluation of the argument for .BANK into the linker. It is otherwise too
restricted, since no imported symbols may be used.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5746 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-30 17:18:03 +00:00
uz
47c87eb335 Fixed an error: When guessing the address size of an expression used in an
instruction that contains undefined symbols, and the effective address allows
just one address size, use this size instead of the default data segment size.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5658 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-05-25 16:28:46 +00:00
uz
f9729fd0cf Use the new FileStat function to get correct file modification times under
Windows.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5633 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-01 17:01:05 +00:00
uz
bdeefe31e5 The table for sweet 16 instructions had an invalid length word. Reported by
Jeff Tranter.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5572 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-04 13:01:50 +00:00
uz
b6276e75f3 Fixed a problem with debug symbol ids. Invalid ids were written to the file
because of a wrong check.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5430 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-31 20:44:27 +00:00
uz
7ecb4c50b1 Add bounded expressions for immediate addressing and list the new feature in
the docs.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5406 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-18 19:50:34 +00:00
uz
8ddcbc5f01 Fixed an error in calculation of the fill bytes necessary for alignment.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5396 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-11 18:30:25 +00:00
uz
1fccae4cff Finish support for .BANK.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5384 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-04 22:45:26 +00:00
uz
e7e4877e6e Mark segments that are referenced in a .BANK statement.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5383 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-04 22:15:47 +00:00
uz
02cbc7da25 Moved the segdefs module to ca65, since it was used only there and renamed it
to segdef, since there might be a new segdefs module in common soon.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5381 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-04 22:02:02 +00:00
uz
9e68be3842 Started to add a new .BANK instruction that allows access to a memory area
attribute named "bank". Some error checks and a lot of testing is required.
Don't use for now.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5375 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-03 21:41:34 +00:00
uz
be77192bcf No need to simplify an expression in SegDone() if it is replaced by a constant
anyway.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5372 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-03 19:40:00 +00:00
uz
45f7cc1403 Support for the Mitsubishi 740 CPU for da65. Written and contributed by
Chris Baird, cjb@brushtail.apana.org.au.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5350 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-31 13:09:55 +00:00
uz
5bcbb39bba Make the error message for large alignments more descriptive. Don't use the
real number of fill bytes for an alignment, we didn't accept anyway.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5340 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-28 16:00:16 +00:00
uz
4bdcad03a0 Added TGT_GEOS_CBM and TGT_GEOS_APPLE.
Added new targets to the geos resource compiler already prepared by Oliver.
Changed the target module to allow target name aliases and consolidated target
properties into a TargetProperties structure kept in that module. Numeric
targets are now gone.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5338 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-28 13:33:38 +00:00
uz
badfe85991 Allow arbitrary alignments, not just powers of two. Beware: This needs support
in the linker which is currently missing.
                                         


git-svn-id: svn://svn.cc65.org/cc65/trunk@5334 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:54:52 +00:00
uz
71b134db78 Fix warning about possibly uninitialized variable.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5331 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:45:20 +00:00
uz
e8174de0f1 Fixed an error introduced in revision 4427: The list of 65816 instructions
contained two items less than the counter said (because in 4427 two were
deleted without adjusting the counter). Depending on the compilers
implementation of bsearch(), some of the 65826 instructions were not found
when searching the table.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5310 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-11 23:40:53 +00:00
uz
8fc851b338 Write out global symbols to the debug file. Added some fixes for unusual
situations (extern symbols without attached import, because the import wasn't
referenced and therefore removed by the assembler).


git-svn-id: svn://svn.cc65.org/cc65/trunk@5290 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-31 20:48:40 +00:00
uz
1157cff1bd Validate the type passed in .dbg statements at least loosely.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5288 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 13:18:50 +00:00
uz
aaa21c6417 More work on high level language debug symbols. They are now passed correctly
via the object files to the linker and written to the debug info file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5285 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 11:42:26 +00:00
uz
060cfe66e0 Renamed hldbgsym -> hlldbgsym.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5283 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-29 20:37:28 +00:00
uz
eee6068029 Write the high level debug info to the object file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5281 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-29 20:02:06 +00:00
uz
305cf64d40 Worked on high level language symbol info.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5279 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-29 18:55:03 +00:00
uz
6b8efa8e9b Add a (currently empty) type string to the debug info for symbols and functions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5274 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-26 13:01:29 +00:00
uz
2fbebd25cf Started to add debug infos for C functions and symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5273 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-26 12:05:00 +00:00
uz
3e84a2bd93 Fix type string for .ADDR and .FARADDR.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5269 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-23 18:05:31 +00:00
uz
ecfba0c9b0 Fix a problem with the generated array sizes for span types (they were wrong).
As an optimization, don't create an array for just a few elements.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5260 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:50:39 +00:00
uz
6e47980eb7 Generate span types for .ADDR, .BYTE, .DBYT, .FARADDR and .WORD.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5256 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:17:22 +00:00