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

2045 Commits

Author SHA1 Message Date
uz
c142061ca5 Removed unnecessary \n's in calls to Error().
git-svn-id: svn://svn.cc65.org/cc65/trunk@5008 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-01 18:00:51 +00:00
uz
845ad64633 Fixed an error in the last change: Arguments for option -W were not passed
correctly to the compiler.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5007 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-01 17:58:45 +00:00
uz
417b14432c Fix problem with changed syntax of option -W for the compiler: -W will now
only be passed to the compiler together with all warning names.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5006 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-01 17:56:44 +00:00
uz
928c76235f Fix output of --help regarding -W. Added new option --list-warnings.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5005 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-01 17:42:49 +00:00
uz
671a4a653f Reverted the change by Stefan Haubenthal - order of segments is important for
the heap to work correctly.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4995 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-04-25 18:45:57 +00:00
uz
ccd1f5fcd7 Fix tape header output. Add version info in the header. By Stefan Haubenthal.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4984 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-04-16 12:09:28 +00:00
uz
d78e52fd40 New uploader that can be hiding in top of memory waiting for a BLL-kind of
loadable application over the ComLynx serial port. By Karri Kaksonen.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4982 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-04-06 19:54:55 +00:00
uz
00a11e642c Lynx boot stuff split up into several files. Changes by Karri Kaksonen.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4979 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-03-21 17:49:03 +00:00
uz
9528aae744 Improved and much smaller bootloader by Karri Kaksonen.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4978 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-03-17 22:36:09 +00:00
uz
93f8985e47 Fixed an error: The collection for the line infos hasn't been initialized.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4974 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-02-10 22:18:24 +00:00
uz
f5de5144d3 Initialize variables to avoid gcc warnings.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4970 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-02-07 23:04:10 +00:00
uz
a6389e6406 The assembler options -l and --listing will now take the name of the listing
file as an argument.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4967 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-02-06 20:10:19 +00:00
uz
3b9032a7c4 Added disassembler support for the NMOS 6502 with illegal opcodes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4966 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-02-06 16:04:46 +00:00
uz
2056097a91 Fixed a bug reported by thefox.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4965 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-02-06 14:36:31 +00:00
uz
7c1cd6c8d8 Added two new global options, NewlineAfterJMP and NewlineAfterRTS.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4963 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-02-05 16:03:06 +00:00
uz
bcfa2c31cf Redid the whole line info stuff, because the old data structures weren't able
to manage the new information.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4961 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-02-03 17:08:20 +00:00
uz
405cb07e7a Fixed a bug.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4959 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-30 14:51:50 +00:00
uz
a6e099e9ac Bump version number of generated debug info files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4958 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-29 22:19:37 +00:00
uz
299a0ed4cd Pass type of line info through the object files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4957 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-29 22:16:03 +00:00
uz
0e32325ca6 New include file for line info definitions shared between assembler, linker
and od65 utility.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4956 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-29 22:08:58 +00:00
uz
88e6b86427 Changed text of notification.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4952 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-29 20:30:38 +00:00
uz
f0a0095c25 Create separate line infos for macros and .repeat statements and other token
lists. These are also output as diagnostic in case of an error.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4951 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-29 20:24:44 +00:00
uz
1072edb0d8 Use line infos to output more verbose error and warning messages whenever
possible.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4950 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-29 18:43:36 +00:00
uz
d5109f6319 Fixed an error in the macro versions of the inline functions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4948 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 16:33:04 +00:00
uz
81c90667bf Small fix for debug info output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4947 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 16:20:39 +00:00
uz
8af53cf22a Adapted to new library format.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4946 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 16:03:55 +00:00
uz
fa1b5f5f3c Fixed a bug: Wrong variable size trucates data.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4945 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 16:03:41 +00:00
uz
5855137d8c Change how data is stored in the library. To simplify things, the index
(=directory) entry is now shorter, and additional data necessary for checking
in the archiver is not stored in the directory but read from the object file
data in the library.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4944 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 15:42:32 +00:00
uz
8386b47074 No need to specify explicit paths in #include statements.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4943 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 12:21:48 +00:00
uz
8c0a0fa4a3 Use routine from common library instead of separate code.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4942 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 12:14:22 +00:00
uz
5d7001dc93 Simplify things using collections. Some more generic overhaul.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4940 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 11:54:35 +00:00
uz
a214ccff92 Use a collection for the modules in a library.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4938 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 22:43:33 +00:00
uz
9023d0c6f2 On errors and warnings, output additional information using extra line info
supplied using the .dbg statements.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4937 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 22:25:32 +00:00
uz
036282aced Fix forgotten stuff from last change.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4936 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 22:23:01 +00:00
uz
81555b223d More lineinfo usage.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4935 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 21:40:37 +00:00
uz
73548dbfb3 Adapted to changes in the object file format.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4931 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 17:35:48 +00:00
uz
88b3489d89 Adapt to changed object file format.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4930 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 16:47:45 +00:00
uz
713c019a24 Save a few bytes when writing file list entries to the object file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4929 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 16:40:48 +00:00
uz
b2b1edc4ab Actually generate basic line info.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4928 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 16:39:30 +00:00
uz
d7d1ad7fd0 Must read line infos earlier when reading in an object files, because later
data references it.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4927 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 16:20:14 +00:00
uz
b903e818d1 More detailed error message.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4926 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 16:12:10 +00:00
uz
e654ad49eb Allow different output formats using additional linker configs. Contributed by
Karri Kaksonen.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4925 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-26 22:14:42 +00:00
uz
733e832b5d Use LineInfo instead of raw FilePos objects. Most information in the object
files does now have lists of LineInfos attached. Compiles but UNTESTED!


git-svn-id: svn://svn.cc65.org/cc65/trunk@4921 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-26 19:42:17 +00:00
uz
5b79d7e685 Convert imports, exports and debug symbols to use and write line infos instead
of embedded file positions.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4918 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-25 16:27:17 +00:00
uz
f3487b7c0f No need to search for the correct line info entry, the source position is
always in slot zero.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4917 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-25 16:26:50 +00:00
uz
6ddf79fc30 Fragments and assertions reference LineInfo items instead of having separate
embedded FilePos items.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4915 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-24 22:39:07 +00:00
uz
06e3152035 Started to generalize line info handling. Remove separate FilePos fields and
try to manage all and everything with LineInfos.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4914 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-24 22:38:22 +00:00
uz
0f9ced267e Bumped the object file version number.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4913 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-24 22:37:12 +00:00
uz
a7bd3ad0db Added a compar function for file positions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4912 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-24 16:15:35 +00:00
uz
3b59a8ca6f Mark tokens with the file position from where they're read. Restore this
position for tokens read from a token list. This means that line info does
now show the actual point of definition. This is an improvement but needs to
be refined.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4911 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-20 20:54:30 +00:00
uz
ddb7296b6c Move all attributes and other information that is attached to a token into a
structure named Token.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4910 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-16 16:05:43 +00:00
uz
dbfae85f54 Renamed the Token enumeration to token_t.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4909 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-16 14:51:13 +00:00
uz
1d36b7f1b3 Add missing braces in macro definition. No error but could cause one.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4908 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-16 14:19:58 +00:00
uz
e2485f100e Removed two defines that are no longer in use.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4907 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-16 14:18:03 +00:00
uz
839e2c4202 Added new .FATAL pseudo op.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4903 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-09 11:00:22 +00:00
uz
d60c627cb6 When replaying a token list, be sure to zero terminate the string attribute of
a token.
        


git-svn-id: svn://svn.cc65.org/cc65/trunk@4900 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-05 10:47:32 +00:00
uz
a2ec97ac13 More changes by Karri Kaksonen.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4899 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-04 19:39:07 +00:00
uz
78c2b66e58 When collecting tokens to be repeated inside of a .REPEAT section, do this in
raw token mode, otherwise stuff is already partially evaluated.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4897 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-04 19:17:20 +00:00
uz
338844cb2e Patch by Gary Wong: The smbx and rmbx instructions are two byte insns (not one
byte).


git-svn-id: svn://svn.cc65.org/cc65/trunk@4895 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-12-30 19:35:10 +00:00
uz
212941ddb4 Fix consecutive false errors when a label without a following statement is
encountered.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4894 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-12-30 19:30:54 +00:00
uz
d993b332a4 Lynx update including file routines that access a file system on a cartridge
by Karri Kaksonen.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4892 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-12-29 10:37:57 +00:00
uz
4a92522c82 In the generated assembly file, add import statements for all zero page
variables known by the runtime. They aren't currently accessed by the compiler
itself but may be useful for inline assembly.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4891 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-12-29 10:18:29 +00:00
uz
f11067e260 Latest versions of startup code and config by Karri Kaksonen. Citing: The new
header contains an encrypted loader, a small directory structure and a single
pixel black title screen. This is directly bootable on a real Lynx.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4890 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-12-22 15:37:20 +00:00
uz
3f5b2a8fbd Allow to disable the "Result of comparison is constant" warning.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4883 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-28 21:16:46 +00:00
uz
94f1a17a47 Renamed grc -> grc65.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4881 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-25 17:29:59 +00:00
uz
bb1d6d94a3 Renamed grc to grc65 to avoid name conflicts with another software named grc.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4875 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-18 18:47:01 +00:00
uz
81cfbe06c6 Changed the startup module and the linker config for the Commodore VIC to use
the common loadaddr and exehdr modules.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4874 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-17 13:35:43 +00:00
uz
9a9cea5a61 Changed the startup module and the linker config for the Commodore PET to use
the common loadaddr and exehdr modules.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4873 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-17 13:27:43 +00:00
uz
7252f071a2 Changed the startup module and the linker config for the C128 to use the
common loadaddr and exehdr modules.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4872 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-17 13:00:34 +00:00
uz
da59130820 Changed the startup module and the linker config for the C16 to use the common
loadaddr and exehdr modules.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4871 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-17 12:46:55 +00:00
uz
8aff2a9159 Fixed a problem with the last change in crt0.s: The symbols for the RAM memory
area had been used but not defined in the linker config. Changed the startup
module and the linker config to use the common loadaddr and exehdr modules.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4870 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-16 17:33:25 +00:00
uz
461bf5e81e Fixed wrong size of HEADER area. The invalid size had no bad effects, but it
was wrong anyway.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4869 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-16 17:30:42 +00:00
uz
0e0bb60d21 Removed some left over debug output
git-svn-id: svn://svn.cc65.org/cc65/trunk@4868 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-16 10:14:56 +00:00
uz
dfd4c0ab63 Limit RAM area to $CFFF instead of $FFFF.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4865 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-14 17:00:21 +00:00
uz
b6d872e5b7 Added the first implementation of a linker config suited for c64 assembly
programs.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4864 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-14 13:11:09 +00:00
uz
413491d1b2 Modified the builtin c64 config to force inclusion of the new exehdr module.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4863 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-14 11:51:43 +00:00
uz
268e093469 Fix order of command line arguments: -o should precede -C or -t.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4859 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-13 22:52:13 +00:00
uz
09a62690f3 Fixed typo in warning message.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4858 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-13 22:48:39 +00:00
uz
36dc806193 Force inclusion of the load address.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4857 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-13 16:57:42 +00:00
uz
4786caf496 For modules, the ZP memory area must be written to the output file. This is
required by the logic in the linker.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4854 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-13 10:20:28 +00:00
uz
c797be4767 Add an additional file = "" to memory areas that contain only bss or zp type
segments and aren't written to the output file. Before that, the "not going to
output file" was implicit because of the bss type of the segments contained.
The new attribute makes this explicit.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4853 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-12 19:59:02 +00:00
uz
de14990fbb Define the __XX_START__ symbol for a memory area earlier, so it may be used in
the expression for the size of the same area.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4852 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-12 18:01:31 +00:00
uz
5e8252fa36 Reworked and improved the SYMBOLS section. The old syntax (using symbol =
value) is now gone, attributes are used instead. The SYMBOLS section does now
support imports, so the linker config can be used to force symbols (and
therefore module) imports. Evaluation of start address and size for memory
areas has been delayed even further, so it is now possible to use the values
from one memory area in the definition of the next one.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4851 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-12 14:17:35 +00:00
uz
a0a0347ecc Make the Name and Col fields unsigned instead of short.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4850 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-12 14:14:27 +00:00
uz
7c1094c086 Keep the config file position in a FilePos structure.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4847 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-10 19:52:40 +00:00
uz
c695829813 Added a static initializer for struct FilePos.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4846 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-10 19:16:29 +00:00
uz
3f24c88355 SegNum has been renamed to SecNum.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4845 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-10 10:22:55 +00:00
uz
7bd19b737a One more place where OutputNameUsed must be flagged.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4844 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-09 22:07:45 +00:00
uz
a2b7ef2b08 Merge CfgProcess and CfgAssignSegments because both do some sort of
postprocessing. Print a warning if %O was used in the config file and the
output file name is changed later using -o.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4842 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-09 21:01:27 +00:00
uz
c9b9069208 Better handling of imports in the ExprNode structure.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4841 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-09 20:34:08 +00:00
uz
da792b3fd0 Separate processing the linker config file into two phases: The config file is
read when the -t or -C switch is encountered and parts of it are processed.
The remaining parts are processed when all object files and libraries have
been read. To make this work, the expression evaluation in cfgexpr has been
rewritten to generate true expression trees. This means that expressions in
the linker config may use exports from the object files. 

Separation of config file processing is the base for several enhancements, for
example forced imports by linker config.

This code needs more work and is only very, very, very roughly tested.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4840 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-08 21:52:24 +00:00
uz
6c0a9c0438 Patch to correct the linkorder in the make files to make the --as-needed
ldflag work. By Mario Fetka.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4838 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-07 11:34:51 +00:00
uz
f1ce44edfe Fixed register info for several runtime functions. Info for the Y register was
wrong, so the optimizer assumed it wouldn't change across a call.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4836 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-02 18:05:19 +00:00
uz
d08ff2b6df Fix parsing of push/pop so that #pragma warn works without.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4824 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-10-02 19:43:18 +00:00
uz
e048d2aeba Make the warning "statement has no effect" switchable.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4823 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-10-02 19:32:11 +00:00
ol.sc
aaf90c1252 Exclude (small) stack from RAM memory area (like on most other targets) to make explicit that the linker may not use all RAM. If the cc65 parameter stack isn't used at all the __STACKSIZE__ symbol may be overridden on the linker command line with -D __STACKSIZE__=0.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4820 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-10-02 10:20:00 +00:00
uz
172d33e584 Fixed problem with last change: Static declaration do also set the SC_EXTERN
flag (have to check why).


git-svn-id: svn://svn.cc65.org/cc65/trunk@4818 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-24 07:28:08 +00:00
uz
5aff0764a1 Allow initialization of variables declared with "extern".
git-svn-id: svn://svn.cc65.org/cc65/trunk@4816 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-23 18:18:53 +00:00
uz
674289e471 use ReadVar to read the type. This doesn't make a difference for now but will
come handy later. Add output for all of the symbol flags from symdefs.h.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4814 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-17 21:04:28 +00:00
uz
017bdf970a Include information about the type of the symbol in the flags written to the
object file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4813 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-17 20:54:02 +00:00
uz
112ae0e3db Renamed the defines in symdefs.h to something more meaningful. They were named
EXP_xxx for historic reasons, but SYM_ does make much more sense now.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4812 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-17 20:47:27 +00:00
uz
d62af9de80 Debug symbolid for each symbol that goes into the debug symbol output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4811 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-17 20:11:27 +00:00
uz
b2b2a05a46 SF_INDEXED is no longer needed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4810 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-17 20:02:30 +00:00
uz
c921c409e8 Rename symbol index => import id because that's what it really is.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4809 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-17 20:01:54 +00:00
uz
e55b19fa8b Maintain some additional information for scopes. Write a dummy scope section
into the object file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4808 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-17 16:58:41 +00:00
uz
41c119deca Bumped the year in the copyright notice. It hasn't changed for five years:-)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4807 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-11 19:43:48 +00:00
uz
1a4a02821e New function cc65_symbol_inrange. Fixed an error in cc65_symbol_byname.
Restructured the dbgtest.c source.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4806 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-11 19:31:30 +00:00
uz
d627b1ac83 First support for symbols - mostly untested.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4805 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-09 22:05:44 +00:00
uz
03d3868d45 Start adding (limited) support for symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4804 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-09 21:29:15 +00:00
uz
7e72e7d46b Change output for symbols in the debug info file to match that of the other
lines. The name is now preceeded by "name=".


git-svn-id: svn://svn.cc65.org/cc65/trunk@4803 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-09 21:28:47 +00:00
uz
8f03c4e9cf Move the collection containing all line infos into the DbgInfo struct and keep
it there. It will be used to search for line info by address in some future
version, which is faster than searching through all the source files in a
linear fashion.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4802 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-09 20:54:12 +00:00
uz
5625977188 Add 'extern "C"' so the module may be used from C++ sources.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4801 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-09 15:55:49 +00:00
uz
3f7fc55c7e Added some more checks and initialization.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4800 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-09 15:52:23 +00:00
uz
b936617eb4 Fixed a C99ism.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4799 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-09 05:47:22 +00:00
uz
99fd891126 Major changes: Names of structures, fields and subroutine names have changed.
Support for additional segment info and file offsets for an address. The
version number is now mandatory and checked to avoid problems with old
formats.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4798 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-08 20:38:15 +00:00
uz
14e567aed2 Another format change: Record the output file and offset for each segment
written to the output. Make this information available in the debug info file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4797 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-08 20:32:13 +00:00
uz
6272c93556 Allow access to segment information.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4796 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-08 15:43:13 +00:00
uz
34c938e7ac More collection usage. This has also removed the need for the MemListNode
structure.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4795 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-08 15:35:56 +00:00
uz
fedb265a22 More collection usage.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4794 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-08 15:23:22 +00:00
uz
ad140bede4 Replace more linked lists by collections.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4793 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-08 15:13:53 +00:00
uz
026724482f Use collections instead of linked lists to simplify things.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4792 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-08 15:03:58 +00:00
uz
3eed1bffbc Some more test and example code.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4790 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-07 13:40:16 +00:00
uz
d645a797cb Improved info API.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4789 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-07 13:25:09 +00:00
uz
8c39874daa Some changes in debug info generation.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4788 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-07 12:46:12 +00:00
uz
1dbb84bcee Add some code that tries to skip unknown keywords that may have been added by
later version of the debug info.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4787 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-06 09:17:43 +00:00
uz
3d2cb567dc The stuff will not link with Watcom because of vsnprintf, but a makefile is
still useful for testing.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4786 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-05 21:16:07 +00:00
uz
1877af89cc Several fixes detected when using another C compiler.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4785 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-05 21:15:00 +00:00
uz
4b1c5e4157 First working version with complete API for line information.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4784 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-05 21:00:36 +00:00
uz
12e7cc010d Output version information into the debug file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4783 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-05 20:41:27 +00:00
uz
0807da74bd Corrected indentation - no code change.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4782 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-05 19:34:25 +00:00
uz
b8e7feb788 Fix relocation of line infos.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4781 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-05 19:34:03 +00:00
uz
abda26a309 Don't output multiple code ranges per line, since this is harder to parse.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4780 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-03 19:00:14 +00:00
uz
54e22eb53c First version of a module that reads debug files generated by ld65.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4779 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-03 18:46:50 +00:00
uz
e046ecbcf2 Be sure to generate line info for all segments.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4778 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-01 13:52:06 +00:00
uz
83e5252785 Changed a comment
git-svn-id: svn://svn.cc65.org/cc65/trunk@4777 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-01 13:48:32 +00:00
uz
031ae666e3 Fixed an error in the macro version of HasObjData().
git-svn-id: svn://svn.cc65.org/cc65/trunk@4776 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-07-31 12:37:14 +00:00
uz
b2321ebdf7 Fixed an error: Some of the collections weren't initialized.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4775 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-07-31 09:44:25 +00:00
uz
23b867b7a4 Handle file position information for fragments differently: Instead of
handling them separately (which has historic reasons), generate real line info
information. This means that line info for the assembler source will be part
of the debug info file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4774 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-07-30 22:44:09 +00:00
uz
f308a3c4d1 Use collections in the object file structure instead of managing the items
manually.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4773 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-07-30 20:58:51 +00:00
uz
5bffbc98ff Added a new function CollGrow.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4772 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-07-30 20:58:09 +00:00
uz
7d506c84c9 Make .DEF, .REF and friends also work with cheap local symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4767 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-07-26 17:28:34 +00:00
uz
477b77f528 Another minor improvement in compares.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4745 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-07-11 21:53:48 +00:00
uz
2bb2d97ab0 Fixed and improved the code for compares. Before, compares of chars to a
constant where sometimes passed down to the code generator in a way that
caused wrong code to be generated.

This change may go into 2.13 after some testing.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4743 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-07-11 16:11:45 +00:00
uz
a89231ece7 Fixed an error: A function wasn't converted to a void pointer automatically by
the compiler.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4741 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-07-10 20:48:05 +00:00
uz
abbfaef2aa A negative token count for .LEFT was incorrectly adjusted to 1, not to 0.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4738 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-07-10 12:32:05 +00:00
uz
125ab37c09 Added relative include path handling: The path of an input file is now pushed
onto the search path list, so include files will be searched relative to this
path first.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4676 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-05-30 13:31:09 +00:00
uz
b942fd0b56 Check for a size of zero in SB_CopyBuf to make the code somewhat faster.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4675 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-05-29 21:23:34 +00:00
uz
314893619a Don't ignore empty paths when adding the path of a file to the search path
list.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4674 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-05-29 21:20:48 +00:00
uz
02f5b5499e Changed search path logic: Include files are now search first in the directory
containing the file that had the #include statement. The path of the main file
will also added to the front of the search path list, so includes will not be
search in the current directory first, but in the directory that contains the
main file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4673 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-05-28 12:00:12 +00:00
uz
9a6f97cfe1 PushSearchPath will add the path only if it's not already there.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4672 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-05-28 11:56:01 +00:00