1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-23 18:29:47 +00:00
Commit Graph

2585 Commits

Author SHA1 Message Date
uz
e50649af2c Transform tosshlax and friends into a sequence that doesn't use the stack if
possible.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5764 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-06 20:01:46 +00:00
uz
5f0db62f58 Added info for new shift routines that don't use the stack.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5763 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-06 20:00:22 +00:00
uz
da766d872c Small code changes for more safety (and to be compatible with the new shift
routines that don't use the stack).


git-svn-id: svn://svn.cc65.org/cc65/trunk@5762 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-06 19:59:29 +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
92a0632634 Added register info for the aslaxy and shlaxy routines.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5743 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-24 22:05:56 +00:00
ol.sc
e3fb0233c8 Added secondary linker config for Atari overlays (located below main program like Apple II).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5741 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-24 21:23:25 +00:00
uz
43d0d2fb78 Special handling for a few more runtime functions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5737 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-24 14:29:27 +00:00
uz
87d19de33f OptSize2 needs an extra removal of duplicate transfers.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5734 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-23 19:34:48 +00:00
uz
ec900bc200 Centralize generation of register infos for a code segment. This means that
all optimizer functions can rely on it.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5733 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-23 17:33:31 +00:00
uz
d5810a818c Added two replacements for negax. Shift right for signed values can be treated
like unsigned if X is known to be zero.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5732 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-23 16:58:05 +00:00
uz
4333c76710 The OptNegXXX function were actually handling bnega... runtime stuff. Renamed
them accordingly.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5731 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-23 16:17:56 +00:00
ol.sc
bb41dccfe3 Added secondary linker config for Apple2 overlays (like C64).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5730 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 23:09:20 +00:00
ol.sc
f6ab932b32 The Apple2 linker configs *-loader.cfg only differed in the presumed HIMEM from the default config. Rather have that value adjustable.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5728 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 22:48:45 +00:00
ol.sc
4647e98071 Adjusted comment to recent changes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5727 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 22:24:06 +00:00
ol.sc
610bb14988 Avoid mixing of memory areas and segments in address computations (and made move of segment INIT somewhat more readable).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5726 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 22:13:58 +00:00
ol.sc
7691da610b I just don't like 'file = "" '.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5725 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 21:12:56 +00:00
ol.sc
b7b7de55d0 Replaced "throwing away" of memeory area HEADER with the much more elegant "not referring" of symbol __EXEHDR__. This was recently made possible for the asm program config.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5724 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 21:06:13 +00:00
ol.sc
094ffa1984 Renamed segment 'HIGHCODE' to 'LC because:
1. Its use isn't limited to code. It may as well be used for rodata.
2. This fits better to the new __LCADDR__ / __LCSIZE__ parameters.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5723 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 20:57:49 +00:00
ol.sc
c9555b328a The Apple2 linker configs basically cover two dimension of settings:
1. BIN vs. SYS vs. Loader
2. With Quit code vs. w/o Quit code vs. full LC

Up two now these two dimensions were sort of folded into a number of useful combinations. However with the new asm config and the upcominger overlay config we end up with just to many configs.

Therefore now the second dimension isn't expressed anymore as distinct config. Rather the user has to override __LCADDR__ and __LCSIZE__ in order use the Quite code area or the full LC.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5722 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 20:36:34 +00:00
uz
ec1f955a6e For commutative operators processed by hie_internal, if the left side is a
constant, exchange the order of the operands so that better code can be
generated.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5721 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 18:12:24 +00:00
uz
b5d88fdedd Mark commutative operators as such (no change in code until now).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5720 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 15:49:53 +00:00
uz
c1d7ed26e8 Unified the "store via pointer" optimization routines.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5719 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 15:46:45 +00:00
uz
7c9b27c048 Be more flexible when detecting a special sequence that can be optimized.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5718 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-15 20:51:14 +00:00
ol.sc
b014bd8196 Added basic Apple linker config for assembler programs (similiar to C64).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5717 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-14 20:59:08 +00:00
ol.sc
95686b169e Moved actual computation of DOS 3.3 header to linker configurations:
- This will allow for different "formulas".
- This brings things together in one place.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5716 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-14 20:44:35 +00:00
uz
9142a300c1 Another optimization for array stores.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5715 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-12 18:11:53 +00:00
uz
c66185259b Extend OPtShift3 to shift counts larger than 1.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5713 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-11 17:58:32 +00:00
uz
22078ba924 The new module was missing from the Watcom makefile.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5712 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-11 07:45:47 +00:00
uz
cb9ef2f96a Added a forgotten header file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5711 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-11 07:06:24 +00:00
uz
8dc74f33da Another optimization for right shift of the sum of two bytes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5710 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-10 22:15:00 +00:00
uz
878f469fc8 Removed a unnecessary duplicate call to one routine.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5709 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-10 21:47:52 +00:00
ol.sc
9cc99876b2 Moved Apple EXEHDR to separate module (similiar to CBMs).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5708 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-10 21:05:51 +00:00
uz
cf509a775d Moved "store through pointers" optimizations into its own file and added
another one.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5707 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-10 20:09:40 +00:00
uz
4b80a3b9cd Added new pushl0 runtime function.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5706 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-10 19:23:15 +00:00
ol.sc
45bf954fbe Better define 'EXTBSS' to allow developer to memset() set it to zero on startup.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5698 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-10 12:37:32 +00:00
ol.sc
ffc06fcea3 Apple GEOS reserves beside the main app area at $4000-$C000 a secondary app area at $0C00-$2000. While it was an elegant idea to use that secondary area for overlays at the end of the day those 5 kB are just too small. So now overlays go at the end of the main area (as with GEOS 64/128).
However the stack (usually 1 kB) can be securely placed in the secondary area without effort from the side of the developer. The rest of the secondary area (usually 4 kB) is made available to the developer as (uninitialized) 'EXTBSS'.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5696 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-08 21:46:51 +00:00
uz
5cf9f585a6 In error or warning messages, output the name of the library if this is
relevant. It's otherwise difficult to know what happens when ar65 is called
from within a makefile or similar.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5695 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-07 19:59:51 +00:00
uz
b916fae1cc Generate special memcpy code if the target is less than 256 bytes in size and
located at the stack bottom.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5693 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-07 13:30:21 +00:00
uz
0f7f7796b1 Added info about the subysp function.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5692 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-07 13:14:49 +00:00
uz
cff1a6ffdb Be sure to check the availability of code entries before accessing them.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5691 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-06 22:01:04 +00:00
uz
61c1f6b270 Added more to the list of "harmless" calls that do not interrupt a
pushax/stackop sequence.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5690 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-06 21:52:54 +00:00
uz
fa69f31982 Don't emit special code because it doesn't work well with the optimizer.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5689 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-06 21:52:09 +00:00
uz
fe1c4cd46b Detect an additional sequence that is used with pointers in register
variables.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5688 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-06 21:51:10 +00:00
uz
279dc29b45 Output the optimization steps that had changes when debugging is enabled.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5687 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-06 21:50:10 +00:00
uz
e416092f70 Similar changes as for the C output target: If the attribute "ident" is given,
place the data into a .PROC with this name. Add additional constants named
COLORS, WIDTH and HEIGHT within this .PROC.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5684 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-04 19:29:39 +00:00
uz
e5cdab4544 Fixed a C99ism.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5682 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-04 07:48:37 +00:00
ol.sc
3cb0cce00d Added secondary linker config for C64 overlays (incl. demo program).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5679 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-03 16:16:11 +00:00
uz
d5cf83deba Fix output of segment sizes. It was broken after some changes to the format.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5670 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-03 13:39:28 +00:00
uz
4663245219 Change data generation for C output. The ident attribute is now optional.
Without it, just the data is output. With an identifier given, there will be
additional #defines for xxx_COLORS, xxx_WIDTH, xxx_HEIGHT, and the data is
places into an array with the given name.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5662 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-05-28 11:35:44 +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
7d62062bd2 Added an optimization for signed shift right.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5657 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-05-09 18:00:27 +00:00
uz
2ce084228f Fixed a comment.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5652 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-25 17:26:30 +00:00
uz
0ff4e5cf64 The program dumped core when read/write was used without a conversion of the
input to binary data.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5651 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-22 21:57:28 +00:00
uz
cd7e65f97e Fixed an uniniitalized variable which caused ranom error messages on static
local variables.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5650 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-22 21:38:31 +00:00
uz
7bf80a4d73 Reverted errorneously commited change to the makefile.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5649 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-22 18:09:17 +00:00
uz
faf58a8220 Fixed an error when parsing local variables: Variables must be inserted into
the symbol table *before* the optional initializer is parsed, because they
might be referenced in the intializer.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5648 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-22 18:08:45 +00:00
uz
b0c4678ad2 More cleanup.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5647 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-11 12:23:33 +00:00
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