1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-28 06:29:30 +00:00
Commit Graph

2528 Commits

Author SHA1 Message Date
uz
b0ed819891 More preparations for loadable CPUs. Will still not compile.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5646 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-09 11:55:18 +00:00
uz
4858614605 Moving around stuff. Preparation for loadable CPUs.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5645 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-06 11:35:56 +00:00
uz
74ee7a44a9 One more intermediate state - not compilable.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5644 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-05 19:55:04 +00:00
uz
10d58204b5 Intermediate state - doesn't run as is.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5643 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-05 13:30:21 +00:00
uz
032c16dda4 Reenable Break(), use a string buffer for safe formatting.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5642 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-03 17:35:34 +00:00
uz
b5d4321a4b Added support for several colors.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5641 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-03 17:34:54 +00:00
uz
31e0666087 Use FileStat instead of stat.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5640 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-03 13:28:33 +00:00
uz
2cd0b5ae91 Fixed an error in the conversion function from Unix time to FILETIME.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5639 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-03 13:27:19 +00:00
uz
7287d86dd1 Use the replacement function to set file times.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5638 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-03 13:13:28 +00:00
uz
a0c6ae2c62 Added a replacement for utime(), because it has the same DST bug as stat().
git-svn-id: svn://svn.cc65.org/cc65/trunk@5637 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-03 13:01:56 +00:00
uz
b833c6c8c5 Explicitly ignore the function result of CloseHandle().
git-svn-id: svn://svn.cc65.org/cc65/trunk@5636 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-03 12:54:17 +00:00
uz
dd6475ac3d Fixed an invalid offset.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5635 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-01 19:29:04 +00:00
uz
a9550ade4c Added a missing #include.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5634 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-01 17:20:10 +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
65fe2ad0d3 Add a new module that works around a bug in the Microsoft version of stat. The
function is buggy since the first version of windows that supports something
else than FAT, and instead of fixing the problem, Microsoft has declared it
"works as designed". The problem has made it into .NET and is also visible in
the standard windows file explorer (modification times of untouched files will
change when entering or leaving DST).
Please note that the new FileStat function returns incorrect times for files
on FAT file systems. This is because I have currently no idea on how to
identify the file system for a given file. However, it should be correct in
quite some more cases than stat().


git-svn-id: svn://svn.cc65.org/cc65/trunk@5632 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-01 16:56:42 +00:00
uz
baa4774b08 Fixed a comment.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5631 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-01 15:48:53 +00:00
uz
35e1184901 Removed unneeded include files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5630 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-01 15:48:11 +00:00
uz
724d1b9160 Fixed an error: When determining where to place initialized data, the compiler
didn't look "deep enough" into nested arrays to determine the constness
correctly.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5622 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-24 14:28:59 +00:00
uz
515661e5f4 Fixed an error: For symbols declared as extern in local scope, the name for
the external assembler symbol wasn't set.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5620 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-24 13:42:10 +00:00
uz
63328d3852 Implement anonymous structs/unions in cc65 mode.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5618 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-17 20:33:09 +00:00
uz
7260b3687a Pass the source image of the conversion down to the output function, so they
are able to output the image properties as comments.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5616 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-15 17:02:12 +00:00
uz
fbbf7e50d2 Added two more conversion targets: geos-bitmap, which will create a GEOS
compacted bitmap, and raw, which is probably mostly useful for debugging. It
converts an indexed image to a row of bytes which correspond to the color
indices of the pixels.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5615 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-13 21:12:27 +00:00
uz
1c91618a5d Fixed a C99ism.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5614 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-12 08:20:20 +00:00
uz
3f25b9d6a2 Fixed a copy&paste error in a comment.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5613 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-11 22:44:22 +00:00
uz
422629ff91 Added conversion to GEOS icon format (which is actually identical to the VIC2
high-res sprite format).


git-svn-id: svn://svn.cc65.org/cc65/trunk@5612 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-11 22:43:44 +00:00
karri
4b6720d32b Add lynx sprite generation skeleton
git-svn-id: svn://svn.cc65.org/cc65/trunk@5610 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-11 14:00:51 +00:00
karri
cba5d0af56 Add lynx sprite generation skeleton
git-svn-id: svn://svn.cc65.org/cc65/trunk@5609 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-11 13:48:40 +00:00
uz
6d0d1575a6 Added generation of C output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5607 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-11 12:38:54 +00:00
uz
b599fe5793 Added the capability to generate multicolor sprites.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5606 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-11 12:17:48 +00:00
uz
4a0a76b012 New function GetBitmapName, inlined GetBitmapColors.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5605 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-11 11:38:37 +00:00
uz
ca691233e4 New option --dump-palette. Fixed a double free in the cleanup code.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5604 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-11 11:25:38 +00:00
uz
c9d65c56c2 Remove the bitmap type since it is not really needed and complicate things.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5603 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-11 11:10:41 +00:00
uz
921ef39162 Added sp65 to the tools makefiles.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5600 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 23:11:42 +00:00
uz
df036dbeaf Free bitmaps and buffers before terminating.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5598 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 22:13:36 +00:00
uz
e39d1e8d10 Allow to pass NULL pointers to FreeStrBuf.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5597 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 22:12:44 +00:00
uz
d06625075d Removed the flags and optimized the Attr structure.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5596 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 22:10:45 +00:00
uz
84d90343ea Removed several memory leaks.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5595 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 21:46:09 +00:00
uz
4c36a39814 Handle "label" and "segment" attributes for assembler output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5594 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 20:51:52 +00:00
uz
74108cd74f Fixed two compiler warnings.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5593 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 20:35:22 +00:00
uz
1a7b115b3c Move evaluation of attributes into the input routine.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5592 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 20:26:47 +00:00
uz
44c70d01cb New option --list-conversions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5591 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 18:51:00 +00:00
uz
c44c7d9f97 New attribute "base".
git-svn-id: svn://svn.cc65.org/cc65/trunk@5590 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 18:50:40 +00:00
uz
c140a15dac Move attribute lookup into the output functions. Allow a bytesperline
attribute for asm output files.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5589 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 14:22:51 +00:00
uz
2d0e71b242 Do also allow ':' as an attribute separator.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5588 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 14:21:46 +00:00
uz
7563f4096c Implemented main conversion module.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5587 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-10 13:50:53 +00:00
uz
1aaff0ce2f Added the main conversion module. New option --convert-to. New short options
for --read and --write.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5586 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-09 13:44:51 +00:00
uz
b55c290823 Added a dummy return to fix a watcom warning.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5585 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-09 11:48:13 +00:00
uz
4e7488d9b9 Added the write routine.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5584 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-09 11:46:16 +00:00
uz
b6329757d7 Export the compare function since it is used in a few places.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5583 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-09 11:45:08 +00:00
uz
006be848f2 Added VIC2 sprites as output format. Started to code the processing pipeline:
--slice, --pop.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5582 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-09 11:37:10 +00:00
uz
8c1aed8b0f Started to add koala output format.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5578 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-05 20:30:25 +00:00
uz
15a8a51aa2 Fix FindInputFormat.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5577 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-05 19:28:22 +00:00
uz
3cef75b26c Added parsing of arguments to --read. The explicit format spec is currently
broken.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5576 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-04 21:02:31 +00:00
uz
594e446ac5 Added a module to manage attribute/value pairs.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5575 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-04 20:17:34 +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
32f4a8d414 Added the output layer.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5566 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-27 21:03:01 +00:00
uz
95eb20dc37 Remove the "Tag" field in struct Bitmap since it is of no real use.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5565 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-27 20:45:14 +00:00
uz
d46c3fc5a9 Fix two watcom (and probably C89) issues.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5564 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-27 20:43:03 +00:00
ol.sc
5817cf1476 Take BSS into account (like done for Apple GEOS in the first place).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5563 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-27 19:37:32 +00:00
uz
e4aab75bb0 Added a module for assembler source output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5562 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-27 18:17:28 +00:00
uz
1e4a4cb72c Removed a declaration for a routine that doesn't exist.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5561 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-27 18:17:13 +00:00
uz
271e604fb7 Added a module for binary output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5560 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-27 17:58:34 +00:00
uz
f0a73e253d Added a new input layer that manages the different input formats.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5559 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-27 16:33:13 +00:00
uz
ca624041a9 Splitted the filetype module into the actual search function (now in fileid)
and the existing file types used by ld65 and cl65.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5558 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-27 16:24:35 +00:00
uz
7a3e6abb13 New function to create a bitmap slice.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5557 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-26 21:45:42 +00:00
uz
4abdecc728 Use only as many palette entries as there are colors in the image.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5556 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-26 21:26:00 +00:00
uz
fa052219e3 First version of PCX reading routine is completed but mostly untested.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5555 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-26 15:27:36 +00:00
uz
6893f52a50 Some more work on reading pcx files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5554 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-26 11:54:05 +00:00
uz
c4721fb4e2 Output usage information to stdout, not stderr. This is consistent with the
other tools.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5553 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-26 11:53:39 +00:00
uz
3265f0cf44 Started to add PCX routines.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5552 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-25 21:45:01 +00:00
uz
eb4001a52f Adapted the file i/o module from od65.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5551 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-25 20:51:16 +00:00
uz
364eb07a59 Started to code the front end base layer modules.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5550 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-25 15:08:38 +00:00
uz
d27c7d5a75 Added base framework for the sp65 sprite and bitmap tool.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5548 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-23 21:32:15 +00:00
uz
083265ed73 Added new cl65 options -Wc and --cc-args.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5538 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-21 20:23:36 +00:00
uz
1d8e059eb2 Remove the check for the target system. It is checked by grc65.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5521 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-09 22:01:03 +00:00
uz
6e04b7dd71 Pass the target to the geos resource compiler.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5520 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-09 21:48:45 +00:00
ol.sc
cc4b960b96 Added support for Apple GEOS VLIR programs.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5519 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-09 21:23:24 +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
44e7225ce6 Fixed an internal error that was triggered by an attempt to move an empty list
of instructions in the code segment (Oliver Schmidt).
                       


git-svn-id: svn://svn.cc65.org/cc65/trunk@5419 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-21 21:35:49 +00:00
uz
631c553233 Reverted some errorneously committed changes which enabled debug output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5414 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-20 16:04:37 +00:00
uz
cbefb85d47 Fixed a problem reported by Greg King. structs returned from functions in the
primary register are actually rvalues and need special treatment.
                                                                 


git-svn-id: svn://svn.cc65.org/cc65/trunk@5413 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-20 16:01:25 +00:00
uz
66f1f82943 Masking a bit field is unnecessary if there was no shift operation or if the
shift operation shifted just zeroes into the value.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5412 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-20 15:54:43 +00:00
uz
772d51aa5e Added handling of new expression opcodes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5411 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-19 11:55:36 +00:00
uz
3f8ceff73f Forgot to check these in. They contain the new expression opcodes for far
addresses (24 bit) and dwords (32 bit).


git-svn-id: svn://svn.cc65.org/cc65/trunk@5409 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-19 11:50:21 +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
ad88e77f43 Fixed an error in file offset calculation.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5380 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-04 21:45:11 +00:00
uz
cb4ba24089 Fixed copy & paste errors in comments.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5379 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-04 21:44:46 +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
ol.sc
74be82e77e Minimal beautification.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5374 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-03 21:14:33 +00:00
ol.sc
9c2cb68b50 The VLIR table description didn't contain that much information anymore, but on the other hand it seems nice to consolidate all application metadata in one place. So the VLIR table description was replaced by a general MEMORY defintion that allows define the stack size and the usage of the background buffer together with the overlay-related settings.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5373 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-03 21:12:43 +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
b16a12d260 Adjusted/added names of geos include files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5371 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-03 08:25:04 +00:00
ol.sc
5863777995 Introduced __BACKBUFSIZE__ which can be set to zero in order to disable the GEOS background buffering.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5370 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-03 00:32:46 +00:00
ol.sc
803686e179 The (to be written) "Apple GEOS UnConvert" tool should be allowed to rely on a valid file size (aka EOF) in the ProDOS directory entry.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5369 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-02 23:30:55 +00:00
ol.sc
110bbeafde Fixed type in target name (it is not supposed to be "geos-apple2") and adjusted the CPU attribute to 65C02 as Apple GEOS only runs on newer Apple machines with 128kB anyway.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5368 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-02 12:45:25 +00:00
uz
a9f48e663b Symbols imported from the linker config must have the config file position
added to the symbol references, not the definitions.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5367 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-02 12:39:55 +00:00
ol.sc
f24ff82ea2 Renamed apple-geos.cfg to geos-apple.cfg and added it as built-in configuration.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5366 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-02 12:28:44 +00:00
ol.sc
4c82d5e0c2 Renamed geos.cfg to geos-cbm.cfg.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5365 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-02 12:18:18 +00:00
ol.sc
6fa0564790 According to http://wweicht.homepage.t-online.de/projekte.htm ("GEOS 64/128 (Wheels and MegaPatch also) use internal a two digit value for year. After the year 99 comes the year 00.") it's advisable to generally limit the year to two digits.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5364 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-02 12:07:03 +00:00
ol.sc
2bac717dee Another try in normalizing C coding style.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5363 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-02 12:01:43 +00:00
ol.sc
8abedd2bae Another try in normalizing C coding style.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5362 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-02 11:54:15 +00:00
uz
e935c8fead Fixed a problem: For symbols of type weak or external defined in the linker
config, a value is mandatory, but the check inside the code checked for the
TYPE attribute instead of the VALUE attribute.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5357 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-01 20:29:42 +00:00
uz
0692c66db3 Fixed a bug: To check for signed types use IsSignSigned, not !IsSignUnsigned.
The latter may be true for types and are neither signed nor unsigned.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5353 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-01 18:26:39 +00:00
uz
081308942c Let the linker generate a new symbol __NAME_FILEOFFS__ that contains the
offset of a memory area in the output file. Partially based on a contribution
by David M. Lloyd, david.lloyd@redhat.com.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5351 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-31 15:21:33 +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
af12aa8b2d Fix SVN version stuff. The old implementation apparently had problems with
subversion >= 1.7.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5349 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-29 21:18:23 +00:00
silverdr
a37c0427a7 removed one conditional in the cc65 Makefile gcc.mak in order to make SVN version work also with SVN 1.7.x working copies
git-svn-id: svn://svn.cc65.org/cc65/trunk@5348 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-29 20:37:32 +00:00
uz
049ff2ce3e Change option processing and options to be more compatible with the other
tools. Support long options. Remove unnecessary newlines from error messages.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5346 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-28 18:12:47 +00:00
uz
3364c1d779 Renamed the main file to main.c for consistency reasons.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5345 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-28 17:46:17 +00:00
uz
8fb6d2c3b1 Removed an anused constant.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5344 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-28 17:43:48 +00:00
uz
70a3bcb0df Order of table entries was wrong, so bsearch failed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5342 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-28 17:09:26 +00:00
uz
6ead4abf24 Added support for arbitrary alignments.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5341 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-28 16:28:19 +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
5be3aeab7f Fixed a compiler warning.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5337 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-28 13:29:09 +00:00
ol.sc
920a3eb794 First steps towards supporting Apple GEOS.
- The generated file is a "Apple GEOS Convert" format.
- VLIR support is yet to come.
- The "Apple GEOS UnConvert" tool is yet to come.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5336 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 23:36:05 +00:00
uz
2a18b0dd1d Small changes for arbitrary alignment in object files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5335 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:56:39 +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
be14b8e5e4 Bumped object file version since file format has changed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5333 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:53:42 +00:00
uz
281b04d066 Added LARGE_ALIGNMENT.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5332 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:53:15 +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
7d187fe92c Export MAX_ALIGNMENT.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5330 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:36:28 +00:00
uz
d0555c400e New function AlignCount.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5329 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:31:36 +00:00
uz
d956320687 Fix the factorization routine and hide it in the module. The others don't need
to know about it, they can use the lcm calculation routine.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5328 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:18:05 +00:00
ol.sc
143dcec5e6 Added preliminary support for -t option.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5327 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 16:53:11 +00:00
ol.sc
e10e029e8c Removed -f option. Just always overwrite files - as the other tools do.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5323 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 14:29:59 +00:00
uz
f1c2684c5b Added functions to factorize a value and to create the lcm of two factorized
numbers.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5322 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 12:58:15 +00:00
ol.sc
5f9a3d2502 Fixed typo.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5319 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 01:23:01 +00:00
ol.sc
90621257e7 Allow for custom icon for a GEOS app by allowing user to specify an external 63-byte sprite file - which is simply translated to an '.incbin' command.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5318 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 01:11:22 +00:00
ol.sc
d810ed97d2 Redesigned GEOS VLIR linking:
- No more post-linking with resource compiler, rather ld65 directly creates the VLIR CVT file.
- No more dynamic linker config creation, rather the built-in 'geos' config is usable both for SEQ CVT and VLIR CVT files.

ToDos:
- Have ld65 accept alignment to $FD.
- Adjust docs / samples.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5314 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-26 22:54:04 +00:00
uz
1947d15c48 New include file for address alignment.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5313 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-26 22:38:06 +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
5449f21d9f When generating the dependency file, escape spaces in file names.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5307 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-05 21:32:59 +00:00
uz
49c457f518 Disallow __asm__ on global level.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5303 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-11-07 21:25:20 +00:00
uz
ab83d5cd78 Fixed an internal error caused by muddling through after an error occurred and
trying to add a duplicate identifier into the symbol table.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5300 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-18 20:36:19 +00:00
uz
6a716ae43b Fixed an error: The output file shouldn't be opened in binary mode (thefox).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5297 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-04 10:41:43 +00:00
uz
76e9fc8c65 Small fix for an error message.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5296 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-03 19:11:12 +00:00
uz
5050157eda Make the type of a C symbol available.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5295 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-01 20:53:42 +00:00
uz
3ec4b296ba Added functions to access the c symbols in the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5294 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-01 20:51:07 +00:00
uz
8504f42497 Postprocess and cross-reference C symbol infos.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5293 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-01 10:21:25 +00:00
uz
e63dcb46f1 Fixed an error: Symbol references for csyms were output as local, not global
ids.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5292 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-01 10:00:31 +00:00
uz
d1abb7e808 New flag that tells if the HLL symbol has an asm symbol attached.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5291 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-31 21:00:20 +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
f204ec956a Parse csym lines in the debug info file. No api functions til now.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5289 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 13:19:28 +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
b4afe56ef1 For now use the void type for all debug symbols to avoid errors in the
backends.
         


git-svn-id: svn://svn.cc65.org/cc65/trunk@5287 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 13:09:34 +00:00
uz
2438497e9f Shorten "extern" -> "ext".
git-svn-id: svn://svn.cc65.org/cc65/trunk@5286 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 13:04:08 +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
2f82cb4fb8 The geos resource compiler was still called by its old name (Greg King).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5284 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 09:38:53 +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
c2bf1b9ba4 Some code cleanup.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5282 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-29 20:30:57 +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
314476de27 Added an offset field to the high level language symbol definition.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5280 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-29 18:55:29 +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
2e7afb6a8d Added a module for high level language debug symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5278 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-28 20:01:51 +00:00
uz
548a29e076 Added output of types.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5277 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-28 15:10:43 +00:00
uz
534c630a23 Fixed the layout for the span output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5276 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-28 14:44:41 +00:00
uz
12035b910e Added span output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5275 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-26 20:03:11 +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
c2d859b9f3 Fix a C89 incompatibility (Stefan Haubenthal).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5272 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-26 10:05:28 +00:00
uz
7c96984473 Pointers passed outside the module should be const.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5271 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-26 10:05:08 +00:00
uz
557b077530 Added code to parse type strings and convert them into a set of cc65_typedata
structures. Added cc65_type_byid and cc65_free_typedata (a dummy).


git-svn-id: svn://svn.cc65.org/cc65/trunk@5270 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-25 18:59:25 +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
262ed5db8b Fixed a bug: Never remember a pointer to a string buffer, since it becomes
invalid when the string buffer gets resized.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5268 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-23 18:04:25 +00:00
uz
d225866449 Renamed GT_GetArraySize to GT_GetElementCount.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5267 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-23 18:01:23 +00:00
uz
25171465d3 Implement variable sized element count for arrays.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5266 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-23 16:15:41 +00:00
uz
1e0ab407cd Added the LineInfo count to the info line of the debug info file. This allows
the debug info module to reduce memory usage.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5265 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 21:52:40 +00:00
uz
3b61ee2f5a Track types, parse the extended debug info format with "type" lines.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5264 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 19:37:10 +00:00
uz
374b106b06 Maintain the types as separate indexed items in the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5263 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 18:22:45 +00:00
uz
b064002266 Added a tpool module that implements a global pool for generic types, so we
can merge duplicate ones and assign them global ids.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5262 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 17:53:00 +00:00
uz
fda7934e68 Do not resolve the lists of spans for LineInfos and Scopes, but keep them as
ids. This way, we can delay loading spans until we know that we definitely
need an object file. 
Did some restructuring for writing of span lists to the debug info file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5261 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 17:36:19 +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
4e43a293c6 Parse (but ignore) type information for spans.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5259 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:18:27 +00:00
uz
660df16d08 Write out type information for spans to the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5258 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:18:09 +00:00
uz
b88dc209fc Change prototype for GT_AsString to make it easier usable.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5257 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:17:43 +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
uz
6583320b79 Added GT_AsString().
git-svn-id: svn://svn.cc65.org/cc65/trunk@5255 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:04:27 +00:00
uz
cc486bb4f5 Don't remember types for spans if no debug info is requested.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5254 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 19:46:47 +00:00
uz
913db79017 Add an optional type to a span.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5253 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 19:44:02 +00:00
uz
f2de523b5d The string with index zero is the first string in the string pool.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5252 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 19:35:51 +00:00
uz
ac2b837285 Some work on the generic type module.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5251 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 19:27:03 +00:00
uz
358ccf236e Write spans out in a separate object file section. This allows to merge
duplicate spans in an object file and more extensions to come.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5250 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 19:08:23 +00:00
uz
37ac033370 Added CollReplaceExpand.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5249 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 17:30:25 +00:00
uz
d0d550be66 Fix errors in tracking the number of items in the table. Added function
HT_GetCount to retrieve the number of items.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5248 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 16:56:40 +00:00
uz
ae98f4bcd8 Fix a problem with macro expansion count in line infos for macros.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5247 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 16:23:38 +00:00
uz
6cdac5eb4c Fixed a bug in SP_Add.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5246 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 16:08:52 +00:00
uz
7fe0958b91 The ...Entry functions from the hashtab module have been renamed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5245 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:35:36 +00:00
uz
58ffb47250 The ..Entry functions from the hashtable module have been renamed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5244 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:33:06 +00:00
uz
96ce71ad5f Removed the functions that work on HashNodes since they are mostly useless
now.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5243 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:31:30 +00:00
uz
77110021ab Implementation of StringPool has changed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5242 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:21:11 +00:00
uz
4461988fd1 Implementation of SP_GetCount has been missing.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5241 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:20:48 +00:00
uz
bf889a1928 Implementation of StringPool has changed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5240 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:16:14 +00:00
uz
e1a861f0a5 Use the hashtab to implement the string pool hash table.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5239 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:15:52 +00:00
uz
f3b49b57bd Add a gentype.c module that contains GT_FromStrBuf.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5238 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-20 22:13:58 +00:00
uz
85584fb404 Small change for better hash table distribution.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5237 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-20 21:53:22 +00:00
uz
ef412bc22c Added a new gentype module for generic (not language dependent) types.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5236 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-20 20:16:13 +00:00
uz
78551ba832 Read segment sizes as var, no longer as 32 bit values.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5235 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 20:58:14 +00:00
uz
6a01a3407a Read the segment size as var, not as 32 bit value.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5234 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 20:56:44 +00:00
uz
1e20489ee1 Renamed some stuff. Write out the segment size as var, not 32 bit.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5233 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 20:55:48 +00:00
uz
607aa871e6 Last fix was wrong. The problem wasn't in the struct code but in SymLeaveLevel
calling CloseSpans, which does not only close spans but might also add some,
in which case the scope became another size.
                                            


git-svn-id: svn://svn.cc65.org/cc65/trunk@5232 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 15:24:11 +00:00
uz
ce85b303c3 Fixed a bug: The size of a scope is now recorded for all scopes in
SymLeaveLevel. Doing so also in the code for .STRUCT/.UNION will try to enter
the .size symbol twice.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5231 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 15:06:51 +00:00
uz
7ee90fb21b Added cc65_line_byspan and cc65_scope_byspan.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5230 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 14:39:11 +00:00
uz
7fa197337b Add the number of attached lines and scopes to a span.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5229 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 14:31:03 +00:00
uz
bc0f3fd99b Removed some debug output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5228 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:30:31 +00:00
uz
61f3e1dce3 Allow more space for symbol names.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5227 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:22:36 +00:00
uz
aff6d02c43 Remove CollConstAt. Let CollAt and CollAtUnchecked take const pointers to
collections. Use const pointers in many places. Some other cleanups.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5226 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:21:22 +00:00
uz
88774521a3 Use CollTransfer where possible.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5225 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:06:52 +00:00
uz
189a9bfb38 New function CollTransfer. Change CollAt and CollAtUnchecked to take a const
Collection pointer instead of just a Collection pointer. This makes more
sense, since the functions do not change the collection.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5224 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:01:01 +00:00
uz
307b8d88c3 Reenable optimizations.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5223 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:46:49 +00:00
uz
68db31c53b Changed data type used to store line numbers from unsigned long to unsigned.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5222 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:44:45 +00:00
uz
5f0e6dd7e9 Output all positions in a file for unresolved externals.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5221 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:40:11 +00:00
uz
c71d236da6 Enable optimizations.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5220 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:05:13 +00:00
uz
1527d26e91 Allow to display symbols and line infos for symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5219 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 20:34:31 +00:00
uz
3a079ff332 Added cc65_line_bysymdef and cc65_line_bysymref.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5218 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 20:11:27 +00:00
uz
69ebab6064 Parse additional def and ref keywords for symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5217 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:57:51 +00:00
uz
2a038ffef9 Output line info for symbol definition and references.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5216 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:55:53 +00:00
uz
1797235794 Read and manage additional line information for symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5215 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:27:18 +00:00
uz
f8e5463278 Adapt to changed information in the object files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5214 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:26:44 +00:00
uz
c52916f461 Remember where each symbol was defined and where it was referenced. Write this
information to the object file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5213 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:25:58 +00:00
uz
2f9e7d2ca0 Add reference counting to line infos. This allows better tracking of the ones
that are actually used.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5212 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 14:36:38 +00:00
uz
bd233ac916 Decrease the minimum size of a collection.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5211 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 14:13:14 +00:00
uz
c9ddc44ebe Change HT_Walk so that it can optionally be used to delete nodes from the hash
table.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5210 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 13:05:21 +00:00
uz
862c0ba70e Don't use a separate Count field for the line info type.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5209 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 12:35:43 +00:00
uz
d3017665d2 Replace single linked list of sections in a segment by a collection.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5208 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 11:58:16 +00:00
uz
2abd77ffe5 Use correct syntax. The old did work but wasn't really right.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5207 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 11:57:57 +00:00
uz
11d46e93b2 Export NewSpan() - this will be needed later.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5206 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 11:57:17 +00:00
uz
4160505c59 Don't write out spans for line infos if no debug info is requested for the
object file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5205 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:36:08 +00:00
uz
ec6acb8606 More changes to account for modules without debug info.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5204 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:26:13 +00:00
uz
0077e37182 If a symbol is an import, the corresponding export does only have a debug
symbol id if the module contains debug information.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5203 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:13:11 +00:00
uz
b76fc52c1b Added an OBJ_HAS_DBGINFO macro.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5202 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:08:56 +00:00
uz
e53f4fa163 Mark imports with a special type tag instead of relying on the export pointer
being valid, because the export may not be available if the module was
compiled without debug information.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5201 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:04:01 +00:00
uz
50adbf61f1 Mark imports using "type=imp".
git-svn-id: svn://svn.cc65.org/cc65/trunk@5200 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 09:56:53 +00:00
uz
ae0fcbf345 Track cheap local symbols. Reduce initial collection size to one. This causes
a small increase in allocations, but about 20% decrease in allocated memory.
Looks like many of the collections are rather small.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5199 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 21:34:26 +00:00
uz
6aae186f7f Added cc65_scope_byname.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5198 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 21:20:10 +00:00
uz
0d8e8a9533 Added cc65_symbol_byscope.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5197 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 19:12:59 +00:00
uz
0ec9ebbfaf Added cc65_childscopes_byid.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5196 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 19:00:34 +00:00
uz
5edd1f7017 Added several commands to display debug file items.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5195 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 16:27:34 +00:00
uz
115db59743 Added cc65_line_bysource
git-svn-id: svn://svn.cc65.org/cc65/trunk@5194 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 16:08:26 +00:00
uz
1d025a3230 Added cc65_line_byid.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5193 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 15:58:21 +00:00
uz
1c7e4b483e Shortened some of the function names.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5192 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 15:55:44 +00:00
uz
386100dade Renamed a struct member.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5191 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 15:50:53 +00:00
uz
9724ed5506 Added cc65_seginfo_byname.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5190 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 15:26:40 +00:00
uz
fa6b2e40fd Added cc65_get_scopelist. Added a few statistics field to the DbgInfo
structure.
          


git-svn-id: svn://svn.cc65.org/cc65/trunk@5189 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 15:18:22 +00:00
uz
771695577d Replaced the old dbgtest program by a debug info shell.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5188 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 22:37:01 +00:00
uz
7d7667f782 Handle imports correctly.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5187 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 14:25:18 +00:00