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

618 Commits

Author SHA1 Message Date
mrdudz
253af1ed07 Force 16bit address for absolute-indirect-x-indexed in 65816 mode.
should fix issue #1846 (and hopefully not break anything :))
2022-09-03 18:36:40 +02:00
Marco Aurelio da Costa
71a9ed04a2 Revert: Parse file included inside a macro at definition time
The reverted change broke too many use cases where users
where expecting the compiler quirky behavior to be the correct
behavior.

A better solution is needed for the quirk which does not break
current usage.
2022-08-07 11:24:47 -03:00
mrdudz
b6ffa4af64 Fix endless loop on expanding a recursive macro, fixed issue #1678, patch by kugelfuhr 2022-05-09 21:26:45 +02:00
rofl0r
d78672a4b4 rename AddSubSearchPathFromWinBin to AddSubSearchPathFromBin 2022-04-28 18:35:05 +00:00
mrdudz
7c7c5af59f Merge remote-tracking branch 'upstream/master' into constexpr 2022-04-26 16:43:10 +02:00
rofl0r
bf1ef6157c build: properly quote strings passed as cpp macros
until now, the strings intended to be hardcoded into the binary,
such as directory names and build id, were passed unquoted, which
means they're interpreted by the preprocessor as C tokens, rather
than strings, which can result in all sorts of "interesting"
behaviour such as interpreting paths starting with // as C++-style
comment.
this was then worked around using a stringize macro which turned
the tokens into a string (if they happened to be in a compatible
format).

adresses #1726
2022-04-25 16:52:46 +00:00
mrdudz
23831f08de const value should never have default size, use 32bit instead 2022-04-21 14:50:48 +02:00
mrdudz
a0280d4917 Also handle the case when the non constant side of the AND expression is
known to have a smaller size than the constant side of the expression.
2022-04-20 12:53:34 +02:00
mrdudz
f64bf76ae8 special case for evaluating the AND operator, this should fix the problems
described in issue #1538
2022-04-20 00:13:34 +02:00
mrdudz
8d0098b818 more descriptive error message 2022-04-20 00:12:03 +02:00
mrdudz
89fcb0d404 typo 2022-04-20 00:11:24 +02:00
mrdudz
3c1bb85b8e remove dangling spaces 2022-04-17 16:07:09 +02:00
Karri Kaksonen
3266e70de4 Add target atari7800 2022-03-01 06:44:55 +02:00
Jeff Tranter
2bf8be5b3b Fix some commonly made spelling errors in comments. 2022-02-21 15:44:31 -05:00
Spiro Trikaliotis
364e72921c ca65: .constructor after .export fails
The actor directives (.constructor, .destructor, .interruptor, and .condes)
can't handle a symbol that's already exported.

The relevant code does the checks in the wrong order.

For example, the following correct snippet does not assemble:

        .export         C
C:      .constructor    C, 5

The assembler outputs: test.s:2: Error: Address size mismatch for symbol 'C'

Exchanging both lines makes it work.

This fixes #1647; the patch is provided by 'kugelfuhr' and taken from there.
2022-02-15 22:03:47 +01:00
Spiro Trikaliotis
3d0013ab30 Invalid flagged errors if token is missing
A missing factor in an expression causes an expected but missing token
to be skipped, leading to invalid flagged errors in the following line:

l = 3 +
lda     #$00

An error should be output for line 1, but not for line 2. Actually, both
are flagged as errors:

test.s(1): Error: Syntax error
test.s(2): Error: Unexpected trailing garbage characters

This patch (as proposed in issue #1634 by kugelfuhr) fixes this.
2022-02-15 21:46:07 +01:00
Greg King
86b6514c16 Added code that avoids infinite loops that were caused by circular references
(a symbol that was defined by referring to itself directly or indirectly).  Patch by kugelfuhr.
2022-02-13 07:38:00 -05:00
Oliver Schmidt
8b0de8a931
Merge branch 'master' into master 2021-11-23 22:56:51 +01:00
Wayne Parham
69e2313a63 First round of requested code changes 2021-06-06 23:20:54 +01:00
Greg King
d14148ab4f Restricted commit b9a3c78888 to classic-style Assembly macros.
.include will work at expansion-time for .define macros.
2021-05-17 19:48:47 -04:00
WayneParham
e9fd87d07a
Merge branch 'master' into master 2021-05-16 10:02:37 -05:00
Andrea Odetti
bcc670ee36 Standard formatting of error messages.
https://www.gnu.org/prep/standards/html_node/Errors.html

Issue: https://github.com/cc65/cc65/issues/1494
2021-05-11 17:41:59 +02:00
Wayne Parham
f81aefe8bd Synertek Systems Sym-1 config files 2021-05-09 17:13:24 -05:00
Marco Aurelio da Costa
04cd884f8f Prevent missed .ENDMACRO in included file 2021-05-02 14:17:11 +02:00
Marco Aurelio da Costa
b9a3c78888 Parse file included inside a macro at definition time 2021-05-02 14:17:11 +02:00
Evgeny Vrublevsky
8e02f8f5ec Add .REFTO as an alias to .REFERTO. Update the docs related to it. 2021-04-29 07:55:43 -04:00
Evgeny Vrublevsky
50a58e7706 Added documentation for the .REFERTO. 2021-04-29 07:55:43 -04:00
Evgeny Vrublevsky
83e7c37277 Use .REFERTO instead of .REF as the command. 2021-04-29 07:55:43 -04:00
Evgeny Vrublevsky
e9a72b2462 Add .REF control command implementation. 2021-04-29 07:55:43 -04:00
Oliver Schmidt
5d84a4ba13 Removed non-ASCII chars. 2021-04-19 16:06:10 +02:00
Oliver Schmidt
f272bc8f42 Removed non-ASCII chars. 2021-04-19 15:50:52 +02:00
Marco Aurelio da Costa
fd3d5d35fb mc: Implemented .LITERAL 2021-04-19 15:42:29 +02:00
Marco Aurelio da Costa
c915b5d7f3 Implemented charmap stack
New commands:
 .PUSHCHARMAP: will push the current charmap state into an internal stack
 .POPCHARMAP: will restore the current charmap to the last pushed charmap

Details:
  The push and pop facilities are implemented directly inside the tgttrans.h,
  to facilitate its reuse on the C compiler.
2021-04-18 20:39:05 +02:00
Zsolt Branyiczky
63543dee07 Revert transient modification of EATab Table 0 comment 2020-11-19 22:02:07 +01:00
Zsolt Branyiczky
0e98818db5 assembled SAC and SIR opcodes of 6502DTV cpu were wrong 2020-11-19 22:02:07 +01:00
Zsolt Branyiczky
130d3b52a2 new macros supporting 6502DTV cpu 2020-11-19 22:02:07 +01:00
Zsolt Branyiczky
0f7cf87bfa Synchronizin InsTab6502DTV instructions table for DTV with the illegal opcodes verified by VICE-emu tests 2020-11-15 16:35:55 +01:00
Zsolt Branyiczky
92c013944e Mistyped comment, missing comma 2020-11-15 16:35:55 +01:00
Zsolt Branyiczky
b33b053307 add c64dtv support 2020-11-15 16:35:55 +01:00
Greg King
c05a750f47 Fixed some copy-&-paste typo mistakes about HuC6280's TMA mnemonic. 2020-10-01 07:25:08 -04:00
Greg King
f8be35b41e Fixed some typos in the "large alignment" support. 2020-05-15 21:09:02 -04:00
Greg King
5109c0b68f Made ca65 give error messages when it sees duplicate .define commands. 2020-01-02 04:26:02 -05:00
Greg King
3fa253d31f Updated the cx16 library to the Commander X16 Kernal's prerelease 35. 2019-12-25 10:56:32 -05:00
Greg King
18afc7c703 Created a target and a library for the Commander X16 prototype computer. 2019-09-27 03:38:51 -04:00
Greg King
0896deedef Added a .ORG keyword to ca65 structs/unions.
Allow 24-bit numbers as operands in ca65 structs/unions.
2019-09-11 19:00:08 -04:00
bbbradsmith
9299e550a5 fix NearAddr case in comment 2019-05-11 12:32:44 +02:00
bbbradsmith
10cefdb456 move EXPR_NEARADDR to end of enum list to avoid invalidation of existing object binaries? 2019-05-11 12:32:44 +02:00
bbbradsmith
ac2ecb0b2c 65816 now generate EXPR_NEARADDR instead of EXPR_WORD0 for default assumed address mode, which will be validated by the linker's range check rather than blindly truncated. Assuming the assembler correctly validated this, the linker is allowed to truncate. 2019-05-11 12:32:44 +02:00
Olli Savia
f95481fabf Fixed gcc compiler warning (#867)
* Changed spelling FALLTHRU -> FALLTHROUGH
2019-03-30 16:09:16 -04:00
Oliver Schmidt
cd72f816d3
Merge pull request #829 from inexorabletash/string-escapes
ca65: Add string_escapes feature. Resolves #535
2019-01-20 21:58:06 +01:00