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

2865 Commits

Author SHA1 Message Date
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