]> git.sur5r.net Git - cc65/log
cc65
15 years agoFixed a problem with load tracking in OptStackOps.
uz [Fri, 11 Sep 2009 16:36:17 +0000 (16:36 +0000)]
Fixed a problem with load tracking in OptStackOps.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4147 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAllow to run programs as ProDOS SYS files (beside BIN files). To do so detect at...
ol.sc [Fri, 11 Sep 2009 16:27:20 +0000 (16:27 +0000)]
Allow to run programs as ProDOS SYS files (beside BIN files). To do so detect at runtime if BASIC.SYSTEM is present by checking the "signature" of the last system bitmap byte.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4146 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoMake use of the IRQ to swap view and draw pages when they aren't visible.
uz [Fri, 11 Sep 2009 13:56:50 +0000 (13:56 +0000)]
Make use of the IRQ to swap view and draw pages when they aren't visible.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4145 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoChanges by Karri Kaksonen to implement interruptor support.
uz [Fri, 11 Sep 2009 13:56:20 +0000 (13:56 +0000)]
Changes by Karri Kaksonen to implement interruptor support.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4144 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoRemoved '_' prefix from textframe(xy) because this prefix for non-standard symbols...
ol.sc [Thu, 10 Sep 2009 19:18:15 +0000 (19:18 +0000)]
Removed '_' prefix from textframe(xy) because this prefix for non-standard symbols isn't necessary if they are declared in non-standard include files.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4143 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoProDOS 8 requires an page-aligned 1kB IO-buffer for every open file. The implementati...
ol.sc [Thu, 10 Sep 2009 09:59:26 +0000 (09:59 +0000)]
ProDOS 8 requires an page-aligned 1kB IO-buffer for every open file. The implementation using posix_memalign() is universally correct but quite expensive. There I added support for overriding this implementation with maybe limited (i.e. to one open file) but cheaper custom implementations.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4142 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed typo.
ol.sc [Thu, 10 Sep 2009 09:35:37 +0000 (09:35 +0000)]
Fixed typo.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4141 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded support for switching between 40/80 columns. As the Apple //e 80 column firmwar...
ol.sc [Thu, 10 Sep 2009 09:04:05 +0000 (09:04 +0000)]
Added support for switching between 40/80 columns. As the Apple //e 80 column firmware features converting the current screen content on switching if was already active before the idea is to keep the 80 column firmware active and initialize it (which clears the screen) only if necessary.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4140 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed an error in OptPtrLoad16.
uz [Tue, 8 Sep 2009 21:10:19 +0000 (21:10 +0000)]
Fixed an error in OptPtrLoad16.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4139 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed several more problems like the one in Assignment() some time ago: An
uz [Tue, 8 Sep 2009 20:29:12 +0000 (20:29 +0000)]
Fixed several more problems like the one in Assignment() some time ago: An
expression that yields a constant value may have side effects, and the
expression code must not be removed in this case.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4138 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed a problem similar to the one in Assignment() some time ago: An
uz [Tue, 8 Sep 2009 20:08:21 +0000 (20:08 +0000)]
Fixed a problem similar to the one in Assignment() some time ago: An
expression that yields a constant value may have side effects, and the
expression code must not be removed in this case.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4137 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoUse the new function MarkedExprWithCheck.
uz [Tue, 8 Sep 2009 19:49:30 +0000 (19:49 +0000)]
Use the new function MarkedExprWithCheck.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4136 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAllow to store start and end of generated code in the ExprDesc structure. New
uz [Tue, 8 Sep 2009 19:48:22 +0000 (19:48 +0000)]
Allow to store start and end of generated code in the ExprDesc structure. New
function MarkedExprWithCheck.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4135 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoChanged the prototype of videomode() to take and return an unsigned instead of an...
uz [Tue, 8 Sep 2009 16:45:21 +0000 (16:45 +0000)]
Changed the prototype of videomode() to take and return an unsigned instead of an unsigned char.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4134 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoChanged the prototype of videomode() to take and return an unsigned instead of
uz [Tue, 8 Sep 2009 16:25:12 +0000 (16:25 +0000)]
Changed the prototype of videomode() to take and return an unsigned instead of
an unsigned char. Two more video mode constants as discussed on the list.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4133 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed a typo in the docs.
uz [Tue, 8 Sep 2009 16:23:59 +0000 (16:23 +0000)]
Fixed a typo in the docs.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4132 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed flexible array struct members.
uz [Tue, 8 Sep 2009 07:55:44 +0000 (07:55 +0000)]
Fixed flexible array struct members.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4131 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded initialization of bit-fields.
uz [Mon, 7 Sep 2009 16:59:46 +0000 (16:59 +0000)]
Added initialization of bit-fields.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4130 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoA constant right side does not necessarily mean that no code is generated for
uz [Mon, 7 Sep 2009 14:22:27 +0000 (14:22 +0000)]
A constant right side does not necessarily mean that no code is generated for
the right side. The expression may have had side effects. This error is also
found in several other places.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4129 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoRemove stack pointer check in RemoveCodeRange - the calling function has to
uz [Mon, 7 Sep 2009 14:21:19 +0000 (14:21 +0000)]
Remove stack pointer check in RemoveCodeRange - the calling function has to
take care about that.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4128 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoJust presume alternate charset to be active on the //e - how shouldn't it if conio...
ol.sc [Mon, 7 Sep 2009 14:00:17 +0000 (14:00 +0000)]
Just presume alternate charset to be active on the //e - how shouldn't it if conio usage activates it.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4127 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoNew function videomode() for the C128. Marked toggle_videomode as deprecated.
uz [Mon, 7 Sep 2009 13:21:04 +0000 (13:21 +0000)]
New function videomode() for the C128. Marked toggle_videomode as deprecated.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4126 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoChanged a comment line.
uz [Sun, 6 Sep 2009 21:39:28 +0000 (21:39 +0000)]
Changed a comment line.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4125 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoUse xsprintf instead of sprintf.
uz [Sun, 6 Sep 2009 19:07:18 +0000 (19:07 +0000)]
Use xsprintf instead of sprintf.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4124 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoUse SymIsTypeDef and SymIsBitField instead of accessing Sym->Flags directly.
uz [Sun, 6 Sep 2009 16:51:08 +0000 (16:51 +0000)]
Use SymIsTypeDef and SymIsBitField instead of accessing Sym->Flags directly.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4123 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoNew function SymIsBitField.
uz [Sun, 6 Sep 2009 16:50:41 +0000 (16:50 +0000)]
New function SymIsBitField.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4122 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed an error: When initializing unions, only the first member can be
uz [Sun, 6 Sep 2009 16:44:16 +0000 (16:44 +0000)]
Fixed an error: When initializing unions, only the first member can be
initialized.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4121 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdjusted to the changed default start address.
ol.sc [Fri, 4 Sep 2009 21:32:41 +0000 (21:32 +0000)]
Adjusted to the changed default start address.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4120 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoMinor reformatting.
ol.sc [Fri, 4 Sep 2009 21:28:16 +0000 (21:28 +0000)]
Minor reformatting.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4119 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed wrong code generation in g_leasp.
uz [Fri, 4 Sep 2009 20:57:23 +0000 (20:57 +0000)]
Fixed wrong code generation in g_leasp.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4118 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFix problem with OptPtrLoad1 - never insert before the deleted code, always
uz [Fri, 4 Sep 2009 20:16:18 +0000 (20:16 +0000)]
Fix problem with OptPtrLoad1 - never insert before the deleted code, always
delete after! Otherwise labels will get wrong.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4117 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed another problem with OptStackOps: Load tracking will not work across
uz [Fri, 4 Sep 2009 19:54:29 +0000 (19:54 +0000)]
Fixed another problem with OptStackOps: Load tracking will not work across
branches - if we find a label, just forget all information we had before.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4116 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed problems with OptPrecalc. It removed insns because it results were known
uz [Fri, 4 Sep 2009 15:44:48 +0000 (15:44 +0000)]
Fixed problems with OptPrecalc. It removed insns because it results were known
- but the insns generate a carry which may be needed later.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4115 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed a typo in a comment.
uz [Fri, 4 Sep 2009 15:42:36 +0000 (15:42 +0000)]
Fixed a typo in a comment.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4114 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoReplace "lda (zp),y" by "lda (zp,x)" where possible and where it saves us
uz [Thu, 3 Sep 2009 12:13:08 +0000 (12:13 +0000)]
Replace "lda (zp),y" by "lda (zp,x)" where possible and where it saves us
cycles and code bytes.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4113 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoReplacement code for ule and ugt was wrong and did not cover values that were
uz [Thu, 3 Sep 2009 11:58:11 +0000 (11:58 +0000)]
Replacement code for ule and ugt was wrong and did not cover values that were
equal.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4112 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded code replacements for several missing compare functions. Fixed a bug in
uz [Tue, 1 Sep 2009 20:57:39 +0000 (20:57 +0000)]
Added code replacements for several missing compare functions. Fixed a bug in
coptstop.c that popped up if transfer instructions were used to load a value
into X.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4111 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoTerminate after printing the version number when -V is used.
uz [Tue, 1 Sep 2009 14:41:37 +0000 (14:41 +0000)]
Terminate after printing the version number when -V is used.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4110 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoUpdated and clarified the coding hints.
uz [Tue, 1 Sep 2009 10:19:20 +0000 (10:19 +0000)]
Updated and clarified the coding hints.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4109 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoImproved code generation, better tracking.
uz [Tue, 1 Sep 2009 10:07:02 +0000 (10:07 +0000)]
Improved code generation, better tracking.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4108 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed a problem with OptCmp3 that was in there for a while but is now
uz [Tue, 1 Sep 2009 10:06:39 +0000 (10:06 +0000)]
Fixed a problem with OptCmp3 that was in there for a while but is now
triggered because of the new subtraction code sequence.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4107 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoMinor code improvement.
uz [Tue, 1 Sep 2009 09:15:19 +0000 (09:15 +0000)]
Minor code improvement.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4106 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoSimplify code generated for the ?: operator when type conversion code for the
uz [Tue, 1 Sep 2009 08:57:36 +0000 (08:57 +0000)]
Simplify code generated for the ?: operator when type conversion code for the
second operand is necessary. Instead of generating interleaved code with
several jumps, just move the code to the right place.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4105 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoRemember more function infos in the Function struct.
uz [Mon, 31 Aug 2009 20:37:54 +0000 (20:37 +0000)]
Remember more function infos in the Function struct.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4104 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed a bug in Opt_tosaddax.
uz [Mon, 31 Aug 2009 19:36:06 +0000 (19:36 +0000)]
Fixed a bug in Opt_tosaddax.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4103 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoSimplify the code somewhat.
uz [Mon, 31 Aug 2009 18:18:50 +0000 (18:18 +0000)]
Simplify the code somewhat.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4102 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoMake the AddOpLow and AddOpHigh functions usable with both, lhs and rhs
uz [Mon, 31 Aug 2009 18:02:44 +0000 (18:02 +0000)]
Make the AddOpLow and AddOpHigh functions usable with both, lhs and rhs
operands.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4101 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoPrint the SVN version number when -V or --version is used.
uz [Mon, 31 Aug 2009 17:17:18 +0000 (17:17 +0000)]
Print the SVN version number when -V or --version is used.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4100 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed a few C99isms that prevented the sources to compile with Watcom-C.
uz [Mon, 31 Aug 2009 17:15:59 +0000 (17:15 +0000)]
Fixed a few C99isms that prevented the sources to compile with Watcom-C.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4099 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed a copy&paste error in a comment.
uz [Mon, 31 Aug 2009 16:48:45 +0000 (16:48 +0000)]
Fixed a copy&paste error in a comment.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4098 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoImproved code for bit fields.
uz [Mon, 31 Aug 2009 15:11:32 +0000 (15:11 +0000)]
Improved code for bit fields.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4097 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoImproved the code generated for bit-fields.
uz [Mon, 31 Aug 2009 14:59:49 +0000 (14:59 +0000)]
Improved the code generated for bit-fields.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4096 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdd a warning if a function returning something does not contain a return
uz [Mon, 31 Aug 2009 13:18:49 +0000 (13:18 +0000)]
Add a warning if a function returning something does not contain a return
statement.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4095 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoThe pleasp.s module is no longer in use.
uz [Mon, 31 Aug 2009 12:56:54 +0000 (12:56 +0000)]
The pleasp.s module is no longer in use.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4094 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded info about changed leaa0sp and leaaxsp. Rewrote g_leasp to cope with 16
uz [Mon, 31 Aug 2009 12:41:38 +0000 (12:41 +0000)]
Added info about changed leaa0sp and leaaxsp. Rewrote g_leasp to cope with 16
stack offsets, because it's rather easy in this case.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4093 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoOh well. Decided to throw away the separate implementation for leaa0sp,
uz [Mon, 31 Aug 2009 12:22:13 +0000 (12:22 +0000)]
Oh well. Decided to throw away the separate implementation for leaa0sp,
because it's not used too much, may sometimes inlined and can easily be
replaced by another entry in leaaxsp.s

git-svn-id: svn://svn.cc65.org/cc65/trunk@4092 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoRenamed leaasp.s again, this time to leaa0sp.s. Added a new module leaaxsp.s.
uz [Mon, 31 Aug 2009 12:15:51 +0000 (12:15 +0000)]
Renamed leaasp.s again, this time to leaa0sp.s. Added a new module leaaxsp.s.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4091 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoRenamed leasp.s to leaasp.s
uz [Mon, 31 Aug 2009 12:10:59 +0000 (12:10 +0000)]
Renamed leasp.s to leaasp.s

git-svn-id: svn://svn.cc65.org/cc65/trunk@4090 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFor bit fields contained within single bytes, try to do character operations
uz [Sun, 30 Aug 2009 09:01:04 +0000 (09:01 +0000)]
For bit fields contained within single bytes, try to do character operations
instead of word sized ops.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4089 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoUse CHAR_BITS instead of a hardcoded 8 bits/byte.
uz [Sun, 30 Aug 2009 08:37:21 +0000 (08:37 +0000)]
Use CHAR_BITS instead of a hardcoded 8 bits/byte.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4088 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoMake the SIZEOF_XXX constants resolve to unsigned values.
uz [Sun, 30 Aug 2009 08:36:56 +0000 (08:36 +0000)]
Make the SIZEOF_XXX constants resolve to unsigned values.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4087 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAny field without a name is legal but useless in a union.
uz [Sun, 30 Aug 2009 08:30:55 +0000 (08:30 +0000)]
Any field without a name is legal but useless in a union.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4086 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoSeparate the functions that parse unions and structs, because they became too
uz [Sun, 30 Aug 2009 08:28:16 +0000 (08:28 +0000)]
Separate the functions that parse unions and structs, because they became too
different.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4085 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoMissing resp. ignored "volatile".
uz [Sun, 30 Aug 2009 07:55:21 +0000 (07:55 +0000)]
Missing resp. ignored "volatile".

git-svn-id: svn://svn.cc65.org/cc65/trunk@4084 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded even more subroutines to the "harmless calls" list.
uz [Sat, 29 Aug 2009 23:19:01 +0000 (23:19 +0000)]
Added even more subroutines to the "harmless calls" list.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4083 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFew small changes. Started a new section about implementation-defined
uz [Sat, 29 Aug 2009 22:03:41 +0000 (22:03 +0000)]
Few small changes. Started a new section about implementation-defined
behavior.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4082 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoCode improvements
uz [Sat, 29 Aug 2009 21:58:06 +0000 (21:58 +0000)]
Code improvements

git-svn-id: svn://svn.cc65.org/cc65/trunk@4081 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoRewrote the paragraph about compiler limits and standard compliance.
uz [Sat, 29 Aug 2009 21:32:14 +0000 (21:32 +0000)]
Rewrote the paragraph about compiler limits and standard compliance.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4080 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFirst implementation of bit fields.
uz [Sat, 29 Aug 2009 21:20:13 +0000 (21:20 +0000)]
First implementation of bit fields.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4079 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded more harmless functions to the list, so the stuff gets applied in more
uz [Sat, 29 Aug 2009 21:17:28 +0000 (21:17 +0000)]
Added more harmless functions to the list, so the stuff gets applied in more
cases.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4078 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoImproved code for shifts.
uz [Sat, 29 Aug 2009 20:16:52 +0000 (20:16 +0000)]
Improved code for shifts.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4077 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoThe shift long by 4 functions do also destroy Y.
uz [Sat, 29 Aug 2009 20:14:20 +0000 (20:14 +0000)]
The shift long by 4 functions do also destroy Y.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4076 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoInfo for long shift functions was missing or wrong.
uz [Sat, 29 Aug 2009 20:04:18 +0000 (20:04 +0000)]
Info for long shift functions was missing or wrong.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4075 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFix wrong check for typedef which caused non allocation of storage for structs
uz [Sat, 29 Aug 2009 19:05:01 +0000 (19:05 +0000)]
Fix wrong check for typedef which caused non allocation of storage for structs
after the latest changes.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4074 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoRename Width to BitWidth.
uz [Sat, 29 Aug 2009 19:04:21 +0000 (19:04 +0000)]
Rename Width to BitWidth.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4073 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded code to parse bit fields and enter them into the symbol table. They're
uz [Sat, 29 Aug 2009 17:38:53 +0000 (17:38 +0000)]
Added code to parse bit fields and enter them into the symbol table. They're
not supported in code generation until now.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4072 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAnother tiny code improvement for integer compares.
uz [Sat, 29 Aug 2009 11:31:28 +0000 (11:31 +0000)]
Another tiny code improvement for integer compares.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4071 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed a problem with local variables (stack offset for RHS was not corrected).
uz [Sat, 29 Aug 2009 11:31:06 +0000 (11:31 +0000)]
Fixed a problem with local variables (stack offset for RHS was not corrected).

git-svn-id: svn://svn.cc65.org/cc65/trunk@4070 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoJust comment and formatting changes.
uz [Sat, 29 Aug 2009 10:54:59 +0000 (10:54 +0000)]
Just comment and formatting changes.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4069 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoChange mode constants for ParseDecl to an enum.
uz [Fri, 28 Aug 2009 21:34:28 +0000 (21:34 +0000)]
Change mode constants for ParseDecl to an enum.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4068 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoReorder optimimization steps to get better results.
uz [Fri, 28 Aug 2009 21:03:17 +0000 (21:03 +0000)]
Reorder optimimization steps to get better results.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4067 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded more code to improve compares.
uz [Fri, 28 Aug 2009 19:34:35 +0000 (19:34 +0000)]
Added more code to improve compares.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4066 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed a bug introduced by recent changes.
uz [Fri, 28 Aug 2009 17:38:24 +0000 (17:38 +0000)]
Fixed a bug introduced by recent changes.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4065 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoIncrease count to 16384. Simplify complex expression.
uz [Fri, 28 Aug 2009 17:21:58 +0000 (17:21 +0000)]
Increase count to 16384. Simplify complex expression.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4064 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoChanged code generated for compares. Fixed bugs in OptStackOps. Still
uz [Fri, 28 Aug 2009 16:32:58 +0000 (16:32 +0000)]
Changed code generated for compares. Fixed bugs in OptStackOps. Still
generates wrong code in at least one place.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4063 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoChange code generated for compares for special cases.
uz [Fri, 28 Aug 2009 13:44:03 +0000 (13:44 +0000)]
Change code generated for compares for special cases.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4062 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded -u as an alias for --force-import. Updated command line option infos in
uz [Fri, 28 Aug 2009 10:23:19 +0000 (10:23 +0000)]
Added -u as an alias for --force-import. Updated command line option infos in
the cl65 and ld65 docs.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4061 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoRelax the precondition for OPtStackOps somewhat.
uz [Fri, 28 Aug 2009 09:29:11 +0000 (09:29 +0000)]
Relax the precondition for OPtStackOps somewhat.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4060 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoWhen preprocessing, all compares evaluate to constants, so don't print a
uz [Thu, 27 Aug 2009 22:09:46 +0000 (22:09 +0000)]
When preprocessing, all compares evaluate to constants, so don't print a
warning in this case.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4059 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded better code to replace tossubax.
uz [Thu, 27 Aug 2009 22:07:28 +0000 (22:07 +0000)]
Added better code to replace tossubax.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4058 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded a warning if the result of a compare operation is constant. This should
uz [Thu, 27 Aug 2009 22:00:18 +0000 (22:00 +0000)]
Added a warning if the result of a compare operation is constant. This should
protect against missing parenthesis like in (si & 0x7F == 0). Hopefully
without too many false positives.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4057 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoTry to generate more predicable code. clc always before adc or sbc.
uz [Thu, 27 Aug 2009 16:59:26 +0000 (16:59 +0000)]
Try to generate more predicable code. clc always before adc or sbc.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4056 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoCheck for usage of Y instead of reloading it. The latter will destroy the
uz [Thu, 27 Aug 2009 16:38:27 +0000 (16:38 +0000)]
Check for usage of Y instead of reloading it. The latter will destroy the
flags from load of A.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4055 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed a problem with OptPtrLoad6 (must correct stack pointer).
uz [Thu, 27 Aug 2009 16:13:17 +0000 (16:13 +0000)]
Fixed a problem with OptPtrLoad6 (must correct stack pointer).

git-svn-id: svn://svn.cc65.org/cc65/trunk@4054 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded the --force-import option also to the cl65 utility.
uz [Thu, 27 Aug 2009 15:30:52 +0000 (15:30 +0000)]
Added the --force-import option also to the cl65 utility.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4053 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded a new "--force-import" command line option to the linker.
uz [Thu, 27 Aug 2009 14:43:44 +0000 (14:43 +0000)]
Added a new "--force-import" command line option to the linker.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4052 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoUse the new AddrSizeFromStr function.
uz [Thu, 27 Aug 2009 14:19:47 +0000 (14:19 +0000)]
Use the new AddrSizeFromStr function.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4051 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoAdded an AddrSizeFromStr function.
uz [Thu, 27 Aug 2009 14:11:07 +0000 (14:11 +0000)]
Added an AddrSizeFromStr function.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4050 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed two more function that didn't clear the high byte of the function result.
uz [Sun, 23 Aug 2009 21:40:36 +0000 (21:40 +0000)]
Fixed two more function that didn't clear the high byte of the function result.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4049 b7a2c559-68d2-44c3-8de9-860c34a00d81

15 years agoFixed an error in cbm_k_save (on which cbm_save is based): The X register was
uz [Sun, 23 Aug 2009 21:38:11 +0000 (21:38 +0000)]
Fixed an error in cbm_k_save (on which cbm_save is based): The X register was
not cleared on return.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4048 b7a2c559-68d2-44c3-8de9-860c34a00d81