1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-27 19:55:09 +00:00
Commit Graph

2953 Commits

Author SHA1 Message Date
Joshua Bell
c8bf652982 ca65: Add string_escapes feature. Resolves #535 2019-01-05 11:29:54 -08:00
Greg King
5ac11b5e88 Added an error message, in case there's a typo in the definitions of long command-line options. 2019-01-04 03:35:49 -05:00
Greg King
cd6e167982 Fixed a duplicate-label test.
Don't call strcmp() if either argument is NULL.
2019-01-04 02:29:17 -05:00
Oliver Schmidt
01857cd4de Updated Visual Studio solution files to VS 2017. 2018-11-24 14:10:58 +01:00
Greg King
554448a1f1 .byt "" emits no data; avoid a ca65 crash.
Fixes #775 on GitHub.
2018-10-20 13:41:52 -04:00
Evgeny Vrublevsky
f73aa2af71 '--no-std-lib' was renamed to '--no-target-lib' 2018-10-19 10:57:10 +02:00
Evgeny Vrublevsky
d4088f9eee Don't output a warning about alignment when section address is defined by START or OFFSET and fits required alignment requirements 2018-10-18 15:37:14 +02:00
Oliver Schmidt
96196f00e9 Adjusted library name. 2018-10-18 13:22:26 +02:00
Evgeny Vrublevsky
8084702a58 Renamed to '--no-std-lib' 2018-10-18 13:08:56 +02:00
Evgeny Vrublevsky
23b5cc870e Renamed to '--no-crt-lib' 2018-10-18 13:08:56 +02:00
Evgeny Vrublevsky
2a9bb0d8de CL65: --no-rtl option for disabling default runtime library 2018-10-18 13:08:56 +02:00
laubzega
5fa79be997 Post-review tweaks. 2018-10-16 09:55:02 +02:00
laubzega
7d9485f6bc Typo 2018-10-16 09:55:02 +02:00
laubzega
cf7f3abadd Even more optimization, cleanup, bugfix, comments. 2018-10-16 09:55:02 +02:00
laubzega
d3665b263e Stack adjustment code optimizations. 2018-10-16 09:55:02 +02:00
laubzega
249248ccc8 Formatting tweaks. 2018-10-16 09:45:30 +02:00
laubzega
8eb9f4a8aa Fix for issue #735 2018-10-16 09:45:30 +02:00
Greg King
03e43d1fbf Changed a comment and an error message into more specific text. 2018-10-08 20:39:46 -04:00
laubzega
92defb7a2b Fix crash due to mistaken symbol identity. 2018-10-08 16:27:00 +02:00
Egor
0149de4da7 da65: properly scan empty strings
Previously, doing something like `LABEL { NAME ""; ADDR $1000; };` would
result in $1000 being labeled as NAME: instead of being unnamed.
2018-10-06 21:55:42 +03:00
Greg King
f11ae87ada Always put goto stack-adjustments in the RODATA segment. 2018-10-02 23:19:38 -04:00
Oliver Schmidt
88d1d20cd0
Minor style adjustment. 2018-10-02 18:53:01 +02:00
laubzega
02a914625b Formatting fixes. 2018-10-02 18:49:53 +02:00
laubzega
2ec21c5b7f Fix non-goto jumps (i.e. inline assembly). 2018-10-02 18:49:53 +02:00
laubzega
8845e71161 Another warning. 2018-10-02 18:49:53 +02:00
laubzega
6ad79067ac Fix a warning. 2018-10-02 18:49:53 +02:00
laubzega
c797b3b376 Proper warnings for "risky" gotos. 2018-10-02 18:49:53 +02:00
laubzega
c835f49913 Clean-up 2018-10-02 18:49:53 +02:00
laubzega
2ac2ffcd43 Adjust SP on gotos between blocks with local variables. 2018-10-02 18:49:53 +02:00
laubzega
a48bbc4be0 Switched from warning to error. Tightened the testcase. 2018-10-02 18:49:53 +02:00
Laubzega
a4b6bb63c0 Minor changes after review. 2018-10-02 18:49:53 +02:00
Laubzega
f5b3c5351e Fix for variableless main(). 2018-10-02 18:49:53 +02:00
Laubzega
581c46c213 Add checks for risky goto statements. 2018-10-02 18:49:53 +02:00
Laubzega
d293d766ef New segment type renamed to "overwrite". 2018-09-08 19:18:41 -07:00
Laubzega
c7bb27bac9 Rename more stuff from "overlay" to "replace". 2018-09-06 00:18:39 -07:00
Laubzega
cd9efd53fe Segment OVERLAY renamed to REPLACE. Bugfix for read-only segments. Formatting. 2018-09-04 00:34:28 -07:00
Laubzega
1b0e2cf783 Fix for multiple overlay segments. 2018-08-25 20:21:12 -07:00
Laubzega
8b584cb89f Add segment type "overlay". 2018-08-25 10:18:23 -07:00
Greg King
31461aaf02 Made cc65's "Illegal escaped character" diagnostic show which code was escaped. 2018-08-21 08:58:21 -04:00
Greg King
a76dcdc419 Removed the compiler's recovery code for illegal escaped characters.
It caused the error cascade that it was supposed to prevent.
2018-08-20 17:51:22 -04:00
Stefan
b93b88211c WDM support (#721)
WDM support
2018-08-19 10:29:25 -04:00
Oliver Schmidt
3598fb505d Fixed Visual C++ build (and some style adjustments). 2018-08-19 00:01:40 +02:00
Patrick Pelletier
e549e23a87 Use non-POSIX values for S_IREAD and S_IWRITE.
(As requested in the PR.)
2018-08-17 23:28:45 +02:00
Patrick Pelletier
f72d355b18 sim65: Use mode_t for OMode. 2018-08-17 23:28:45 +02:00
Patrick Pelletier
b30f790587 sim65: Blindly guessing to get Travis build to pass. 2018-08-17 23:28:45 +02:00
Patrick Pelletier
a7d158e077 sim65: Build was failing on Windows, too.
Microsoft loves putting underscores in front of everything!
2018-08-17 23:28:45 +02:00
Patrick Pelletier
12fbdbf418 sim65: S_IREAD and S_IWRITE are nonstandard.
The Linux build was failing with:

sim65/paravirt.c: In function ‘PVOpen’:
sim65/paravirt.c:217:18: error: ‘S_IREAD’ undeclared (first use in this function)
         OMode |= S_IREAD;
                  ^
sim65/paravirt.c:217:18: note: each undeclared identifier is reported only once for each function it appears in
sim65/paravirt.c:220:18: error: ‘S_IWRITE’ undeclared (first use in this function)
         OMode |= S_IWRITE;
                  ^
make[1]: *** [../wrk/sim65/paravirt.o] Error 1
2018-08-17 23:28:45 +02:00
Patrick Pelletier
974188796c sim65: If mode argument is omitted, use a reasonable default. 2018-08-17 23:28:45 +02:00
Patrick Pelletier
aba320eade Allow "mode" argument to open() to be passed from 6502 code.
Implements this suggestion:
https://github.com/cc65/cc65/pull/719#issuecomment-413809096
2018-08-17 23:28:45 +02:00
Patrick Pelletier
d602572bbe Fix permissions for files created by sim65.
Files created by my programs running under sim65 had really weird permissions:
--w-r--r-x  1 ppelleti  staff  19 Aug 16 23:22 json.test.print.tmp

So, for example, my program running under sim65 was not able to read
the file it had just written.

This is because the third argument to open (mode) was not being
specified in paravirt.c, so it was just picking up random crud off the
stack to use as the mode.

I added a mode of 0666, and now my program runs correctly.
2018-08-17 23:28:45 +02:00
Greg King
d13d068e71 Fixed the generation of the opcode byte when BRK is given an operand, in 65816 CPU mode.
The bug was created by commit 7e8bb7b700.
2018-08-16 23:51:04 -04:00
Patrick Pelletier
5cdaa96e4c sim65: Fix "$2C: BIT abs" to access the correct address.
Bug is documented here:
http://forum.6502.org/viewtopic.php?f=2&t=5242
2018-08-10 12:58:48 -07:00
Greg King
ad6c2dbe7b Added code to make the 65816's MVN and MVP instructions handle both immediate (bank) and far-address operands. 2018-07-29 03:50:02 -04:00
Greg King
eeb1b927ce Fixed the order in which the 65816's block-move instructions' operands are written and assembled.
The source bank number is written first; but, assembled second.
The destination bank is written second; but, assembled first.
2018-07-05 10:58:59 -04:00
AIDA Shinra
31fdec2e2e Style fix 2018-06-25 23:50:46 +09:00
AIDA Shinra
fd67284b4d Followed the discussions in the Pull request #682.
* Fixed a misspelling
* Fixed styles
* Added sample codes
2018-06-14 02:02:16 +09:00
AIDA Shinra
2b25329423 Support for preprocessing info file via cpp or m4. 2018-06-14 02:02:16 +09:00
AIDA Shinra
75c4972021 Style and alignment fixes. 2018-06-13 21:24:34 +09:00
AIDA Shinra
03bb2f6a48 Followed discussions in the Pull reequest #681.
In particular, renamed "virtual operands" to "inline parameters".
2018-06-12 00:18:11 +09:00
AIDA Shinra
9283e9ca98 Support for "virtual operands" of subroutines like this:
jsr	SomeProc
.byte	$00, $01 ; argument to SomeProc
; return here from SomeProc
bit	$3F
2018-06-10 18:09:11 +09:00
Oliver Schmidt
b74ab9de89 Allow spaces in path names.
The Microsoft C Library needs to have spawnvp() parameters with spaces quoted manually. We do this only if actually necessary to limit issues with parameters already containing double quotes.
2018-06-08 19:16:18 +02:00
Oliver Schmidt
d861be8ad5 Escape spaces in target path.
cc65 escapes spaces in paths it writes to dependency files (see WriteEscaped() in cc65/input.c). Given that the output of OptPrintTargetPath() is supposed to be used in Makefiles in pretty much the same way it is appropriate to escape spaces here too.
2018-06-07 17:10:33 +02:00
Oliver Schmidt
aea34c5410
Merge pull request #673 from bengdahl/master
Fix `make` failing in parent directories containing spaces
2018-06-07 17:01:42 +02:00
Oliver Schmidt
e99a5ff1fe
Fixed usage indentation. 2018-06-06 18:59:25 +02:00
existensialMemory
4fd17161eb
Update Makefile 2018-06-04 22:17:25 -04:00
Ben
1f245fbc0b Fix make failing in parent directories containing spaces 2018-06-04 21:27:04 -04:00
Greg King
362b6afacf Made a C union declaration know the sizes of anonymous struct/union members when it determines its size.
The bug was located, and the fix was written, by Francesco.
2018-05-13 18:54:45 -04:00
Michael Kohn
5ecd902fbf The opcode for BS should be 0x0C. 2018-05-13 06:31:05 -05:00
greg-king5
ca31e3af1e
Fixed a bug that didn't preserve the accumulator's value when a simple 16-bit fetch-and-store is optimized. (#637)
Fix a 16-bit fetch-and-store cc65 optimizer bug.
2018-05-12 13:46:16 -04:00
Oliver Schmidt
8b3e12d632
Added missing ror absolute override.
Fixes https://github.com/cc65/cc65/issues/489 as suggested by EtchedPixels.
2018-03-12 12:14:25 +01:00
Oliver Schmidt
8e75906737 Switched Apple II output format to AppleSingle.
Although the primary target OS for the Apple II for sure isn't DOS 3.3 but ProDOS 8 the Apple II binary files contained a DOS 3.3 4-byte header. Recently I was made aware of the AppleSingle file format. That format is a much better way to transport Apple II meta data from the cc65 toolchain to the ProDOS 8 file system. Therefore I asked AppleCommander to support the AppleSingle file format. Now that there's an AppleCommander BETA with AppleSingle support it's the right time for this change.

I bumped version to 2.17 because of this from the perspective of Apple II users of course incompatible change.
2018-03-07 23:05:21 +01:00
Oliver Schmidt
bc58bf572c Fixed -W cmdline option handling.
Reverted part of 3157e4be1e as it actually introduced a regression.

It doesn't make sense to check for Arg[3] == '\0' _before_ checking Arg[2] != '\0'. This made the Win32 builds fail to correctly parse e.g. cl65 -W unused-var test.c
2018-03-05 22:31:10 +01:00
Oliver Schmidt
19f3229f45 Made 'wrapped call' code build with VS 2015. 2018-03-05 20:44:32 +01:00
Oliver Schmidt
c3610aa971 Updated from Visual Studio 2013 to Visual Studio 2015. 2018-03-05 20:42:37 +01:00
prandeamus
1a95be9c3a 65C02 JMP (ind,x) opcode 7C 2018-01-14 19:42:29 +00:00
prandeamus
009f56afb6 65C02 version too. 2018-01-13 22:42:39 +00:00
prandeamus
c23f264fe4 Call ParaVirtHooks on JMP (indirect) 2018-01-13 18:30:53 +00:00
Oliver Schmidt
9229bb1f3e
Merge pull request #571 from greg-king5/win64
Change the type of a cc65 variable that holds both integers and pointers.
2018-01-10 12:48:28 +00:00
Greg King
c67e90dd19 Changed the type of a compiler variable that holds either integers or pointers.
The change allows cc65 to be compiled on 64-bit Windows, without getting warnings.  That OS is actually 32 bits with 64-bit pointers.  Its pointers are "long long" instead of "long".  The change uses type-names that are configured for the actual pointer width.
2018-01-09 05:34:16 -05:00
prandeamus
e7aabce8e9 Complain if unsupported flags are provided after -O 2018-01-07 18:57:48 +00:00
bauen1
60c68b1111
cl65 now links against none.lib when using --target none 2018-01-04 17:11:44 +01:00
greg-king5
c8dd88efad
Added missing "break;" statements to a "switch" statement. 2017-12-18 17:09:06 -05:00
Oliver Schmidt
e485e96de0 Suppress potential svnversion error output. 2017-11-30 19:17:45 +01:00
Stefan
7e4db1fdd6
Option removed 2017-11-22 18:17:43 +01:00
Stefan
44b13c1ca0
Subversion fallback
If you use don't use Git to access the repository, you will still get a revision number.
2017-11-22 01:02:02 +01:00
Greg King
de1f80571a Fixed the way that the disassembler looks for the end of a segment.
It checks only the bytes that actually were printed.  It won't show a bad error message when disassembling address $0000.  Fixes #506 on cc65's Github project.
2017-10-31 00:47:07 -04:00
Oliver Schmidt
c8d6ca908d Minor style fix. 2017-10-23 18:22:51 +02:00
Lauri Kasanen
ca4ed290d5 cl65: Add support for --all-cdecl 2017-10-03 18:46:39 +03:00
Oliver Schmidt
5d333239c6 Merge pull request #468 from pmjdebruijn/samples
make changes
2017-07-23 02:09:20 +02:00
Pascal de Bruijn
19f6ae1d54 make: change uppercase prefix var 2017-07-22 16:38:50 +02:00
Pascal de Bruijn
6e93c1ba73 pragma: add minimalist message pragma implementation
for example:

#pragma message ("in a bottle")

results in:

hello.c(207): Note: in a bottle
2017-07-19 17:58:13 +02:00
Pascal de Bruijn
ea7f4d7489 pragma: bring pragma_t enum in line with Pragmas struct
fixes an inconsequential inconsistency, might prevent some
confusion in the future.
2017-07-17 19:43:11 +02:00
Piotr Fusik
c0812670c1 Fix coding style. 2017-06-30 07:35:21 +02:00
Piotr Fusik
b31ae57be1 Make some arrays const. 2017-06-28 20:43:31 +02:00
Greg King
d3ccc289c1 Stopped cc65 from putting redundant .segment directives into its Assembly output. 2017-06-16 21:53:50 -04:00
Oliver Schmidt
682fd226ae Merge pull request #442 from polluks/patch-6
Use verbosity
2017-06-03 22:06:27 +02:00
Stefan
80feb80168 Update main.c 2017-05-28 16:17:34 +02:00
Stefan
49e22f566f Update main.c 2017-05-28 15:29:49 +02:00
Stefan
ea9430e28e Update list.c 2017-05-28 15:22:33 +02:00
Stefan
c9c2562c14 Update list.c 2017-05-28 15:13:43 +02:00