1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00

Compare commits

...

2736 Commits

Author SHA1 Message Date
mrdudz
2c4d4d3314 add -j2 to make test invocations 2024-05-16 18:57:29 +02:00
mrdudz
86e5acd679 fix race condition as proposed in #2420 2024-05-16 18:57:08 +02:00
Bob Andrews
84153e809e
Merge pull request #2438 from ops/exehdr
Add missing EXEHDR
2024-05-15 14:11:08 +02:00
Bob Andrews
90723d7dd1
Merge pull request #2132 from vrubleg/ulabel
Add support of unnamed labels with @ (.localchar) prefix
2024-05-14 20:10:06 +02:00
Bob Andrews
b1e1c13d4b
Merge pull request #2437 from bbbradsmith/sim65-examples
provide simple examples for using sim65 with C and assembly code
2024-04-25 23:52:08 +02:00
bbbradsmith
8804dc7a58 give cl65 alternative 2024-04-16 16:56:13 -04:00
bbbradsmith
4bc726ebe2 clarify the meaning of the exit code unsigned limitation 2024-04-16 16:41:00 -04:00
bbbradsmith
fa1a426c29 add -t sim6502 to cc65 and ca65 examples 2024-04-16 14:06:45 -04:00
Evgeny Vrublevsky
f789316f86 Add a test for the unnamed labels. 2024-04-07 13:34:49 +03:00
Evgeny Vrublevsky
270f3544b5 Document changes in unnamed labels. 2024-04-07 13:34:48 +03:00
Evgeny Vrublevsky
c500cb9086 Add support of unnamed labels with @ (.localchar) prefix. 2024-04-07 13:34:48 +03:00
Olli Savia
074ec82126 Added missing EXEHDR 2024-04-02 19:25:15 +03:00
bbbradsmith
89b709c7f8 make it clearer that explicit lib is required, note that exit is from stdlib.h, exit codes are unsigned, tweak "see below" for spacing, clarify that assembly can be used with C tests as well 2024-03-28 16:55:55 -04:00
bbbradsmith
79585194e6 provide simple examples for using sim65 with C and assembly code 2024-03-28 16:33:20 -04:00
mrdudz
b993d88339 second half of #2420 - don't use the loop macro. Fixes -j13 for me 2024-03-17 17:19:42 +01:00
Bob Andrews
25967e65b5
Merge pull request #2424 from acqn/Cleanup
[cc65] Cleanups in src/cc65/declare.c
2024-03-10 02:39:14 +01:00
Bob Andrews
a372ead4de
Merge pull request #2334 from carlo-bramini/fix-sim65-1
[SIM65] Support undocumented opcodes for 6502
2024-03-10 00:37:18 +01:00
Bob Andrews
081d18f7d7
Merge pull request #2422 from acqn/SubFix
[cc65] Fixed potential errors with subtraction evaluation of identifiers at different memory locations
2024-03-09 13:02:27 +01:00
Bob Andrews
a293920fb3
Merge pull request #2423 from acqn/BitfieldFix
[cc65] Fixed the error recovery integer type used for bit-fields
2024-03-09 12:05:20 +01:00
Bob Andrews
60c75bdb54
Merge pull request #2414 from SvenMichaelKlose/master
vic-asm.cfg: Fix size of MAIN to end at $1E00.
2024-03-09 12:00:42 +01:00
Sven Michael Klose
1fe12f112e
Merge branch 'cc65:master' into master 2024-03-08 17:41:06 +01:00
Sven Michael Klose
a887b29ffb Revert "Test strtok()."
This reverts commit 3a7bd53956.
2024-03-05 07:04:59 +01:00
acqn
731f349b24 Removed ParamTypeCvt(). 2024-02-29 18:24:22 +08:00
acqn
98767741ce Reorganized stuff in src/cc65/declare.c. 2024-02-29 18:24:22 +08:00
acqn
9b2d27d1e1 Fixed the error recovery integer type used for bit-fields. 2024-02-29 18:23:04 +08:00
acqn
23aa562094 Fixed potential errors with subtraction evaluation of identifiers at different memory locations. 2024-02-24 15:34:38 +08:00
Bob Andrews
5c3ff714ae
Merge pull request #2415 from polluks/patch-13
[grc65] Fixed segv of empty resource file
2024-02-23 16:16:46 +01:00
Colin Leroy-Mira
86317711e0 IIgs SCC: Rework branches to X-indexed variables
and general cleanup/commenting
2024-02-23 01:20:47 +01:00
Colin Leroy-Mira
8b71fafb84 IIgs SCC: Allow choosing 115200bps as the card allows it
Of course, that won't work full speed with the standard
IRQ-based RX. But that will allow users to setup the port
at this speed without duplicating the setup part of the
code. Up to them to add hooks to disable IRQs and read
directly in a tight asm loop.
2024-02-23 01:20:47 +01:00
Colin Leroy-Mira
3fd78208ba Disable IRQ if opening at 115200 bps 2024-02-19 19:31:47 +01:00
Colin Leroy-Mira
7a12399b39 Allow choosing 115200bps as the card allows it
Of course, that won't work full speed with the
standard IRQ-based RX. But that will allow users
to setup the port at this speed without duplicating
the setup part of the code. Up to them to add hooks
to disable IRQs and read directly in a tight asm
loop.
2024-02-19 19:31:47 +01:00
Sven Michael Klose
294b034920 Add configuration files for expanded VICs. 2024-02-15 17:32:44 +01:00
Stefan
ab0eb4fe58
oops 2024-02-15 09:03:46 +01:00
Stefan
8d4946b3f4
Fixed segv
touch /tmp/xx
grc65 /tmp/xx
2024-02-15 07:52:42 +01:00
Sven Michael Klose
3a7bd53956 Test strtok(). 2024-02-15 01:05:35 +01:00
Sven Michael Klose
8173c850fd Fix size of MAIN to end at $1E00.
Caused negative size of MAIN in cc65-contrib/quikmans2k8.
2024-02-15 00:00:46 +01:00
Bob Andrews
4bde3afd80
Merge pull request #2410 from alexthissen/serial
Improvements and fixes in serial support for Atari Lynx
2024-02-12 12:50:02 +01:00
Alex Thissen
7d6f3d24d4 Changed sta (ptr1,x) to sta (ptr1)
Reset serial status on ser_close
Fixed error for saving serial state
2024-02-11 23:12:27 +00:00
Alex Thissen
8b172e05bc Applied optimization as per review 42Bastian 2024-02-11 20:59:08 +00:00
Alex Thissen
1deb9e52ae Replaced last literal value for SERCTL 2024-02-11 15:46:23 +00:00
Alex Thissen
acff429eb8 Added redeye check for SER_HS_SW handshake 2024-02-11 15:33:22 +00:00
Alex Thissen
6cf8ee8eb5 Removed baud rates from 150 and lower.
Fixed tab
Replaced uploader references to SERIAL_INTERRUPT
2024-02-10 23:19:05 +00:00
Alex Thissen
65bce9ecde Implemented mark and space checks. 2024-02-10 23:19:04 +00:00
Alex Thissen
014f85f226 Fixed baud rates 2024-02-10 23:19:04 +00:00
Alex Thissen
788ae82d30 Fixes to serial driver implementation 2024-02-10 23:19:02 +00:00
Carlo Bramini
b04d79b1da [SIM65] Support undocumented opcodes for 6502
This PR is mostly a complete rewrite of the emulator for 6502/65c02 opcodes.
It provides an easier to maintain implementation of the instructions, by using few macros rather than having hand-written code for each function.
All undocumented, previously missing opcodes for 6502 are also implemented.
The patch also includes a detailed documentation of those opcodes, for reference to developers.
This PR should fix one of the milestones listed here for the next version of CC65:

https://github.com/cc65/wiki/wiki/Before-the-next-release
2024-02-08 12:13:17 +01:00
mrdudz
3dfe033000 update actions/upload-artifact@v3->actions/upload-artifact@v4, actions/cache@v3->actions/cache@v4 2024-02-03 17:02:08 +01:00
mrdudz
5acfb02794 update actions/checkout@v3 -> actions/checkout@v4 and microsoft/setup-msbuild@v1.1 -> microsoft/setup-msbuild@v2. lets see what happens :) 2024-02-03 16:20:17 +01:00
mrdudz
934de685bc this is pr #2194 - removed ramfont.o 2024-02-03 01:34:21 +01:00
Bob Andrews
ce14f0f8ad
Merge pull request #2401 from colinleroy/enabled-windows-tests-on-PR
Enable Windows tests on pull requests
2024-02-02 21:59:09 +01:00
Bob Andrews
a06431a8f9
Merge pull request #2402 from colinleroy/a-bit-of-65c02-optimisations
a BIT of 65C02 optimisations
2024-02-02 21:58:04 +01:00
Bob Andrews
eb503cc542
Merge pull request #2390 from colinleroy/implement-shifts-by-7
Implement aslax7/shlax7/asrax7/shrax7
2024-02-02 20:17:48 +01:00
Colin Leroy-Mira
1fab179cb4 a BIT of 65C02 optimisations
Use BIT immediate instead of AND when reloading A is required
afterwards.
Add an fread unit test as the optimisation touches fread.
Sprinkle a few zero page indexed while we're at it.
2024-02-02 19:45:49 +01:00
Colin Leroy-Mira
c4c6967e4a Enable Windows tests on pull requests 2024-02-02 19:45:17 +01:00
Bob Andrews
2a03e5d8c9
Merge pull request #2392 from colinleroy/asm-fputc-fputs
Asm fputc fputs
2024-02-02 19:41:23 +01:00
Bob Andrews
128f261c3a
Merge pull request #2389 from colinleroy/fix-2388
Fix #2388
2024-02-02 18:25:39 +01:00
Bob Andrews
d5c84e7828
Merge pull request #2398 from acqn/OptFix
[cc65] Fixed optimization for char-size bitwise XOR/OR/AND when the rhs operand is complicated
2024-02-02 17:20:31 +01:00
Bob Andrews
54b423a99e
fix test 2024-02-02 13:13:57 +01:00
acqn
96d55e3703 Fixed optimization for char-size bitwise XOR/OR/AND when the rhs operand is complicated. 2024-02-02 19:00:33 +08:00
Bob Andrews
a7ac9b7ef2
Merge pull request #2397 from colinleroy/bug-2395-test
Add test case for issue #2395
2024-02-01 23:09:12 +01:00
Colin Leroy-Mira
1e300bf768 Add test case for issue #2395 2024-02-01 22:06:56 +01:00
Colin Leroy-Mira
ce606bb19e Fix tests... 2024-01-31 08:40:36 +01:00
Colin Leroy-Mira
afd8ee627e Remove useless branching code in fgets 2024-01-30 19:52:48 +01:00
Colin Leroy-Mira
2b97735d5d Factorize file pointer check 2024-01-30 19:40:28 +01:00
Colin Leroy-Mira
1a5a7d67a7 Rewrite fputc in assembly
-36 bytes, -12% cycles
2024-01-30 17:19:13 +01:00
Colin Leroy-Mira
ba36071022 Rewrite fputs in assembly
-28 bytes, -1% cycles
2024-01-30 17:12:52 +01:00
Colin Leroy-Mira
7594af553a Fix #2388
Reopen stdin in binary mode instead of closing/opening
2024-01-30 09:39:44 +01:00
Colin Leroy-Mira
7d7cf2d1e0 Implement aslax7/shlax7/asrax7/shrax7 2024-01-29 07:59:11 +01:00
Bob Andrews
51b946bf25
Merge pull request #2387 from colinleroy/sim65-implement-remove
Implement __sysremove for sim65
2024-01-28 16:53:29 +01:00
Colin Leroy-Mira
0dd7b0c3a5 Implement __sysremove for sim65
This will allow using unlink()/remove() in sim65 programs
Use it to unlink fgets' test output file
2024-01-28 13:58:57 +01:00
Bob Andrews
8682095f9f
Merge pull request #2384 from colinleroy/asm-realloc
Rewrite realloc in asm
2024-01-27 00:28:17 +01:00
Bob Andrews
782dad23da
Merge pull request #2382 from colinleroy/asm-gets
Rewrite gets in asm
2024-01-27 00:26:12 +01:00
Colin Leroy-Mira
aa6f850b8d Rewrite gets in assembler
+19 bytes if used alone, because it pulls in fgets, but as code is
factorized, -128 bytes in programs using both fgets and gets.
2024-01-26 20:29:17 +01:00
Colin Leroy-Mira
a8b870555e Rewrite realloc in asm
-80 bytes, -39% cycles
2024-01-26 20:25:59 +01:00
Bob Andrews
65937684a0
Merge pull request #2380 from colinleroy/asm-fgetc
Rewrite fgetc in asm
2024-01-26 20:12:41 +01:00
Bob Andrews
ba6f9f5d3f
Merge pull request #2381 from colinleroy/asm-fgets
Rewrite fgets in asm
2024-01-26 19:36:57 +01:00
Bob Andrews
4b9bf9bb98
Merge pull request #2386 from polluks/patch-12
Added link for your interest
2024-01-25 14:36:51 +01:00
Stefan
f1d95f1f07
Added link for your interest 2024-01-25 11:27:54 +01:00
Colin Leroy-Mira
476591e8b7 Rewrite fgetc in asm
-82 bytes, -20% cycles
2024-01-25 09:13:39 +01:00
Colin Leroy-Mira
f7388cfb79 add fgets/fgetc test 2024-01-25 09:13:35 +01:00
Bob Andrews
ee3a542539
Merge pull request #2383 from colinleroy/pmemalign-size-opt
Optimize -36 bytes out of posix_memalign
2024-01-24 21:26:50 +01:00
Bob Andrews
a2d722639f
Merge pull request #2385 from polluks/master
Fixed comment
2024-01-24 21:17:19 +01:00
Bob Andrews
9ba270d97b
Merge pull request #2378 from colinleroy/fix-overflow-in-malloc-and-realloc
Fix malloc and realloc overflow
2024-01-24 21:15:31 +01:00
Stefan
34f37c873e
Fixed comment 2024-01-24 16:32:45 +01:00
Bob Andrews
ebf43ddb05
Merge pull request #2379 from colinleroy/add-return-minus-1-helper
add a return -1 helper
2024-01-24 15:53:19 +01:00
Colin Leroy-Mira
f0b5b02966 Swap in LC before destructors, ROM after 2024-01-24 12:28:57 +01:00
Colin Leroy-Mira
b87df9e1c6 Optimize -36 bytes out of posix_memalign
And add a unit test
2024-01-24 10:23:53 +01:00
Colin Leroy-Mira
1f820d0ae8 Rewrite fgets in asm
-104 bytes, -1% cycles
2024-01-24 10:16:26 +01:00
Colin Leroy-Mira
5d49fde788 add a return -1 helper 2024-01-24 09:58:09 +01:00
Colin Leroy-Mira
3e01ac9b04 Fix malloc and realloc overflow
If user requests a size >= 65532, adding the heap admin size
overflows size. Fixes #2358.
2024-01-24 09:54:54 +01:00
Bob Andrews
57e65a6bf6
Merge pull request #2348 from colinleroy/time-functions-pass-2
Convert more time functions to asm
2024-01-23 23:45:10 +01:00
Bob Andrews
13ddd734db
Add note about contacting the devs when starting to work on huge patches 2024-01-23 23:26:26 +01:00
Colin Leroy-Mira
2ba176372e Add beep for apple2 2024-01-23 23:04:50 +01:00
Bob Andrews
6c7106c9d9
Merge pull request #2377 from acqn/Diagnostics
[cc65] Diagnosis improvements
2024-01-23 22:16:35 +01:00
Bob Andrews
ea83b9fa53
Merge pull request #2347 from acqn/SrcFile
[cc65] fixes and enhancements for source file info in diagnosis and debug output
2024-01-23 22:15:31 +01:00
acqn
ba75a2ac26 Added missing checks for forward declarations of the main() function.
More accurate diagnosis on implicit 'int' type specifiers.
2024-01-23 14:33:05 +08:00
Bob Andrews
bea2e86210
Merge pull request #2354 from acqn/Diagnostics
[cc65] Improved diagnosis
2024-01-22 19:09:51 +01:00
Bob Andrews
998dfd6fa7
Merge pull request #2370 from acqn/VisibilityFix
[cc65] Fixed visibility of undeclared functions and objects
2024-01-22 18:31:47 +01:00
Bob Andrews
deaf27d6a8
Merge pull request #2372 from acqn/C99Inline
[cc65] Added primitive support for the ISO C99 inline feature as well as the __inline__ extension
2024-01-22 17:30:09 +01:00
Colin Leroy-Mira
01ee903cdf Fixup gmtime/localtime/mktime tests with all cases 2024-01-22 16:38:39 +01:00
Bob Andrews
7a7e98d799
Merge pull request #2371 from alexthissen/lynx-upload
Lynx upload fixes for IRQ and configuration
2024-01-22 15:50:40 +01:00
Bob Andrews
6a03fda453
Merge pull request #2374 from colinleroy/save-two-bytes
Save two cycles in pushax and popptr1
2024-01-22 15:48:49 +01:00
Colin Leroy-Mira
b23a7ec407 Save two bytes in pushax and popptr1
It's not because Y must equal zero on rts that we should'nt spare one byte
and one cycle.
2024-01-19 21:14:47 +01:00
Alex Thissen
83691f30c1 Missed a tab in config 2024-01-19 10:52:42 +00:00
Alex Thissen
6bab3f921b
Merge branch 'cc65:master' into lynx-upload 2024-01-19 09:49:20 +01:00
Alex Thissen
ad90a3a421 Replaced references to __BLOCKSIZE__ with __BANK0BLOCKSIZE__ 2024-01-18 18:57:57 +00:00
Bob Andrews
a173428fab
Merge pull request #2367 from acqn/PragmaFix
[cc65] Fixed segname pragmas right after a function definition
2024-01-18 18:44:39 +01:00
Alex Thissen
2e56dcc521 Fix for mising import 2024-01-18 18:13:39 +01:00
Alex Thissen
acce24fedc Switched to __BANK0BLOCKSIZE__ instead of __BLOCKSIZE__ to make current lynx config files work 2024-01-18 18:13:02 +01:00
Alex Thissen
93f9cb6e48 Adjusted uploader configuration. Split into two MEMORY areas, so it can be just below video memory. 2024-01-18 18:06:10 +01:00
Alex Thissen
d906748691 Fix uploader implementation to reset IRQ bit for timer 4 (serial) interrupt 2024-01-18 17:37:09 +01:00
Colin Leroy-Mira
166a4b25f7 Apple2: implement sleep using MONWAIT
Also publish detect_iigs(), set_iigs_speed() and get_iigs_speed(). Refactor to only store one ostype variable.
2024-01-18 16:17:10 +01:00
acqn
9471e128b5 Fixed segname pragmas right after a function definition. 2024-01-18 20:59:46 +08:00
Colin Leroy-Mira
10282a9b74 Rewrite asctime() in assembler (-7 bytes) 2024-01-18 09:09:38 +01:00
Colin Leroy-Mira
03d5e5fba0 Rewrite mktime in assembly
-415 bytes,
-39% cycles,
Unit test expanded to cover more cases (there was a bug in 2100 before!)
2024-01-18 09:09:38 +01:00
Colin Leroy-Mira
348a9048b7 Convert _time_t_to_tm to asm
46 bytes size gain, -8% cycles on the unit tests
2024-01-18 09:09:31 +01:00
Bob Andrews
92ee03f9e9
Merge pull request #2362 from colinleroy/fix-2357-bis
Add test case for bug #2357
2024-01-16 21:08:38 +01:00
Colin Leroy-Mira
0c53e7e0da Add test case for bug #2357 2024-01-16 20:55:48 +01:00
Bob Andrews
5e267ccfca
Merge pull request #2361 from colinleroy/fix-2357-bis
Cleaner instruction updating for long opt
2024-01-16 20:26:05 +01:00
Colin Leroy-Mira
db8ac355cb Cleaner updating of instructions 2024-01-16 09:33:33 +01:00
Colin Leroy-Mira
dec65176f0 Fix #2357 - Copy est.size and flags of op when moving it 2024-01-16 08:45:20 +01:00
Bob Andrews
43c2239e94
Merge pull request #2360 from cc65/revert-2359-fix-2357
Revert "Fix #2357 - Copy est.size and flags of op when moving it"
2024-01-15 23:04:35 +01:00
Bob Andrews
2c4ebe812c
Revert "Fix #2357 - Copy est.size and flags of op when moving it" 2024-01-15 23:03:13 +01:00
Bob Andrews
8e25a7b376
Merge pull request #2359 from colinleroy/fix-2357
Fix #2357 - Copy est.size and flags of op when moving it
2024-01-15 23:00:09 +01:00
Colin Leroy-Mira
b388ca0236 Fix #2357 - Copy est.size and flags of op when moving it 2024-01-15 21:51:17 +01:00
acqn
e9bd9330c0 Added warning on some code patterns of faulty attempt to declare anonymous structs/unions.
Removed unnecessary warning on tagless enum/struct/unions that would be invisible out of a function declaration.
2024-01-15 23:56:42 +08:00
acqn
07e349c517 Skipped anonymous tag names in diagnosis on empty structs/unions. 2024-01-15 23:56:39 +08:00
acqn
afdf398a0b Fixed repeated diagnosis when reading EOF in certain cases. 2024-01-15 23:56:11 +08:00
acqn
de3087a7e9 Removed the extra "unused parameter" warning when the parameter had an duplicated identifier error. 2024-01-14 00:19:11 +08:00
acqn
0b06c34dfc Added primitive support for the ISO C99 inline feature as well as the __inline__ extension.
No inlining is actually done but that part is not required by the standard.
2024-01-14 00:08:41 +08:00
acqn
7e80e55b6d Added a warning on implicit int in typedefs. 2024-01-13 16:40:44 +08:00
acqn
3d0dc58153 Fixed visibility of undeclared functions and objects. 2024-01-13 00:46:14 +08:00
Bob Andrews
8c329dfd1a
Merge pull request #2344 from acqn/Cleanup
[cc65] Cleanup for symbol types and flags
2024-01-12 16:02:08 +01:00
Bob Andrews
0f7d2dd818
Merge pull request #2351 from groessler/something_to_pull
mention John Dunning as original author
2024-01-11 19:46:16 +01:00
Christian Groessler
6ab3c0c75f elaborate more about Uz's contributions 2024-01-11 19:40:41 +01:00
Christian Groessler
44b2e48e3e mention John Dunning as original author 2024-01-11 17:41:17 +01:00
Bob Andrews
28f892bb3c
Merge pull request #2345 from acqn/PtrFix
[cc65] Fixed regression on comparison to null pointer
2024-01-11 16:50:49 +01:00
Bob Andrews
17c2622382
Merge pull request #2346 from acqn/Diagnostics
[cc65] Diagnosis fixes
2024-01-11 16:49:36 +01:00
acqn
38dac907e8 Cleanup for symbol types and flags. 2024-01-10 04:51:59 +08:00
acqn
2682fc0b79 Fixed regression on comparison to null pointer. 2024-01-10 04:51:20 +08:00
acqn
8e43c4706f Added hierarchy info about source file inclusion in diagnostic output.
Fixed presumed names of source files in disgnosis.
Fixed line number of source files in debug output.
2024-01-10 04:50:42 +08:00
acqn
94dfc08c0e Fixed false "Non constant initializers" error messages on wrong places, which could be resulted from failed array declarations etc. 2024-01-10 04:43:50 +08:00
acqn
2564aaa12c Refix for diagnosis on expected expressions. 2024-01-10 04:48:27 +08:00
Bob Andrews
8aa59e4af3
Merge pull request #2325 from acqn/Cleanup
[cc65] Cleanups
2024-01-08 23:02:40 +01:00
Bob Andrews
773ed23cea
Merge pull request #2326 from acqn/Diagnostics
[cc65] Diagnostics
2024-01-08 22:45:44 +01:00
Bob Andrews
2127778239
Merge pull request #2336 from colinleroy/optimize-strdup
Optimize strdup
2024-01-08 22:13:43 +01:00
Bob Andrews
e1065d0c89
Merge pull request #2342 from colinleroy/rework-mktime
Rework time functions a bit
2024-01-08 22:13:05 +01:00
Bob Andrews
1e3b063b4a
Merge pull request #2320 from pm100/cl65_type
bug 2319 - dont allow -t after input files given
2024-01-08 21:59:21 +01:00
Bob Andrews
a71865f6ec
Merge pull request #2331 from acqn/FuncDeclFix
[cc65] Fixed calling convention parsing in type names and function parameter types
2024-01-08 21:58:01 +01:00
Bob Andrews
fa7dca5fa3
Merge pull request #2338 from colinleroy/fix-2237-keep-time-h-standard
Remove non-standard (and useless) include
2024-01-08 21:52:40 +01:00
Colin Leroy-Mira
df193c0947 Rework time functions a bit
- mktime: Work unsigned as time_t's type implies (shifting Y2K38 bug to 2106)
- mktime: Add unit tests
- gmtime/localtime: factorize
- gmtime/localtime: Add unit tests
- mktime/gmtime/localtime: Size optimisation (-130 bytes wrt master)
- mktime: Speed optimisation (from 23M cycles on the unit test to 2M)
2024-01-08 18:24:13 +01:00
Colin Leroy-Mira
3a439e0e1b Little strdup optimisation
-12 bytes on disk
-20 cycles per strdup
-6 cycles per strlen called from strdup
2024-01-07 14:25:06 +01:00
Colin Leroy-Mira
7ce982cc68 Remove non-standard (and useless) include
Fixes #2337
2024-01-07 10:21:05 +01:00
mrdudz
29801a2fde remove extra format specifier, fixed #2330 2024-01-06 17:53:24 +01:00
Bob Andrews
82f01af6ec
Merge pull request #2333 from polluks/patch-11
Update README.md for new target
2024-01-06 17:41:39 +01:00
Bob Andrews
c379d03dfb
Merge pull request #2332 from polluks/patch-10
Clean-up
2024-01-06 17:40:58 +01:00
Colin Leroy-Mira
169c9c0da0 Add strdup tests 2024-01-05 22:26:06 +01:00
Bob Andrews
1b5371b42d
Merge pull request #2335 from jedeoric/master
Add routine identifier for Telestrat target
2024-01-05 11:07:16 +01:00
jedeoric
bcea5dfa8f
fix comment telestrat 2024-01-05 00:46:15 +01:00
jedeoric
726b70a534
add XMAINARGS and XGETARGV for Telestrat 2024-01-05 00:45:03 +01:00
Stefan
dc9d2f0dbd
Update README.md 2024-01-03 16:46:07 +01:00
Stefan
075ece5faf
Clean-up
void is always fast
2024-01-03 16:35:12 +01:00
Colin Leroy-Mira
75461e1319 Apple2: implement stat(2) and statvfs(3) 2024-01-01 19:12:51 +01:00
acqn
7aab84628d Fixed calling convention parsing in type names and function parameter types. 2024-01-01 16:11:30 +08:00
acqn
acbd87b576 Renamed GetUnqualTypeCode() to GetUnderlyingTypeCode() for consistency with GetUnderlyingType(). 2024-01-01 15:27:57 +08:00
acqn
88246f852d Removed RefineFuncDesc() as an unnecessary wrapper. 2024-01-01 15:04:50 +08:00
acqn
4e820677ee ED_AddrExpr() and ED_IndExpr() need no return values. 2024-01-01 15:03:45 +08:00
acqn
0b7d9d8216 Fixed missing calling convention and address size qualifiers in diagnosis on function types. 2024-01-01 14:48:05 +08:00
acqn
f734f43a35 Removed extra 'const' qualifier in array-to-pointer and function-to-pointer conversions. 2024-01-01 14:48:05 +08:00
acqn
f3199e4308 Fixed type name output with K&R-style functions. 2024-01-01 14:48:03 +08:00
Bob Andrews
4343eebe67
Merge pull request #2314 from acqn/PPFix
[cc65] Separated C preprocessor errors from other errors
2023-12-31 19:16:44 +01:00
Bob Andrews
9e3d1e1027
Merge pull request #2309 from acqn/Diagnostics
[cc65] Added warning on static functions that are used but not defined
2023-12-31 19:15:48 +01:00
paul moore
c262929a62 doc cl65 change 2023-12-31 10:14:53 -08:00
Bob Andrews
0ece9449d7
Merge pull request #2307 from acqn/FuncDeclFix
[cc65] Fixed function declarator parser when a parameter has a function type
2023-12-31 19:11:25 +01:00
Bob Andrews
7297d2c8b6
Merge pull request #2310 from pm100/vs64
second try at fixing win64 build
2023-12-31 18:54:23 +01:00
Bob Andrews
d0903ba225
Merge pull request #2311 from bbbradsmith/ca65-struct-doc-clarify
ca65 struct and union documentation improvement and feature testing.
2023-12-31 18:51:09 +01:00
Bob Andrews
98b9814692
Merge pull request #2318 from alexthissen/lynxincludes
Added SPRCTL0 and SPRCTL1  bit definitions for ca65
2023-12-31 18:46:49 +01:00
paul moore
096bd0b633 bug 2319 2023-12-29 17:02:45 -08:00
Alex Thissen
66e354961c Missed some tabs 2023-12-29 22:48:36 +01:00
Alex Thissen
061d907a11 Fixed tabs instead of spaces 2023-12-29 22:46:15 +01:00
Alex Thissen
e5f9def572 Added SPRCTL0 and SPRCTL1 bit definitions for ca65 2023-12-29 22:37:18 +01:00
acqn
b876a6b213 Fixed cc65 exitcode when there are only preprocessor errors. 2023-12-19 19:30:50 +08:00
acqn
cd7c688dff Separated C preprocessor errors from other errors. 2023-12-18 15:30:53 +08:00
bbbradsmith
9892c8f6c4 using less generic names for the example to avoid confusion, adding cautionary example for what I think is the most error prone case 2023-12-17 05:40:00 -05:00
bbbradsmith
302c4f7409 clarify offsets of anonymous nested scope, missing quotes for names 2023-12-17 05:01:06 -05:00
bbbradsmith
0ff1b20f2a nested struct example needs a .tag 2023-12-16 19:52:57 -05:00
bbbradsmith
f6838be162 missing <tt> 2023-12-16 19:32:52 -05:00
bbbradsmith
6cb8717c24 fix dangling space, mention .union in test comment 2023-12-16 19:25:21 -05:00
bbbradsmith
0d74b84ce4 Test of .struct and .union features. Update documentation with more examples, better clarity, and fixes to incorrect data. 2023-12-16 19:18:25 -05:00
paul moore
103d4b82c5 more msbuild syntax fixes 2023-12-14 14:43:58 -08:00
paul moore
269786a5ae fix msbuild syntax 2023-12-14 14:38:24 -08:00
paul moore
08341aae30 second try at fixing win64 build 2023-12-14 14:25:35 -08:00
Colin Leroy-Mira
1093d169ad Fix BSS obliteration by mliparam during exec().
Using mliparam at this time could lead to corruption at the
start of the new executed program if BSS is real full and
mliparam is over $BB00.
The fix is to open the file from the loader stub instead of doing
it before the C library shutdown.
2023-12-14 16:47:33 +01:00
acqn
a5746227dc Added warning on static functions that are used but not defined. 2023-12-14 21:27:48 +08:00
acqn
1e4d1b4311 Fixed function declarator parser when a parameter has a function type.
Ensured check on parameter lists without types in non-definition declarations.
2023-12-14 02:34:03 +08:00
Bob Andrews
05aae60816
Merge pull request #2305 from acqn/FuncDeclFix
[cc65] Fixed missing diagnosis on function parameter lists with trailing commas
2023-12-13 19:17:59 +01:00
acqn
f8fe1d1560 Fixed missing diagnosis on function parameter lists with trailing commas. 2023-12-13 22:57:32 +08:00
Bob Andrews
bc97bce8c1
Merge pull request #2297 from acqn/WrappedCall
[cc65] Fixed wrapped call when the function was defined before its later declaration gets wrapped with the pragma
2023-12-12 17:11:47 +01:00
Bob Andrews
e90e7f46de
Merge pull request #2298 from acqn/Diagnostics
[cc65] More accurate diagnostic messages on empty declarations without any type specifiers
2023-12-12 17:06:54 +01:00
mrdudz
b1c1502494 MS compiler insists on those typecasts apparently 2023-12-11 00:35:07 +01:00
mrdudz
9985ee7f61 fix %hhn and %hn in the internal xvsnprintf function 2023-12-11 00:18:40 +01:00
mrdudz
6b855d562a use -std=gnu17 for the references, so the test bench will not break with GCC 14. see #2277 2023-12-10 23:18:55 +01:00
mrdudz
0b077f561f exclude test directory from some style checks - it makes no sense to enforce these things in the test bench, we need to be able to test all kinds of spaces and tabs :) 2023-12-10 22:43:47 +01:00
Bob Andrews
cc5e9c38ca
Merge pull request #2296 from acqn/Diagnostics
[cc65] Fixed and improved diagnostics regarding type names and declarations
2023-12-10 22:32:33 +01:00
mrdudz
b31a1c7c0c test for regression that occured after #2262 2023-12-10 22:18:59 +01:00
Bob Andrews
9634cc4d1e
Merge pull request #2295 from colinleroy/fix-2262-too-eager-opt
Fix #2262: Make sure there's no branching after the sequence
2023-12-10 19:16:38 +01:00
acqn
befc9533c6 More accurate diagnostic messages on empty declarations without any type specifiers. 2023-12-10 20:21:50 +08:00
acqn
bbd542fac7 Fixed missing diagnosis on extra identifiers in type names. 2023-12-10 17:01:54 +08:00
Colin Leroy-Mira
07c71541f4 Fix #2262: Make sure there's no branching after the sequence
Also better check that arguments match
2023-12-10 09:45:15 +01:00
acqn
3215d377ea More accurate diagnostic messages on wrong missing declaration specifiers. 2023-12-10 15:46:48 +08:00
acqn
cadf8012f6 Improved error recovery with type cast and sizeof. 2023-12-10 15:43:24 +08:00
acqn
a1a060c291 Declaration specifier flags cleanup. 2023-12-10 15:43:24 +08:00
acqn
79b4690077 Fixed missing diagnostics on empty enum/struct/union declareations without tag names.
Improved error recovery with local declarations and _Static_assert.
2023-12-10 15:43:24 +08:00
Bob Andrews
a16a6298e2
Merge pull request #2287 from acqn/Diagnostics
[cc65] Minor diagnostics improvements
2023-12-09 22:16:47 +01:00
Bob Andrews
92f869cdfb
Merge pull request #2288 from acqn/TypeFix
[cc65] Fixed an iteration bug in type composition
2023-12-09 22:15:24 +01:00
Bob Andrews
a956f6f9ed
Merge pull request #2289 from acqn/FuncDeclFix
[cc65] Fixed the issue that qualifiers of pointees of function parameters were ignored for type compatibility check
2023-12-09 22:14:41 +01:00
Bob Andrews
9e19a2e6a3
Merge pull request #2290 from acqn/TestFix
Updated test/misc/Makefile
2023-12-09 22:12:59 +01:00
Bob Andrews
d805211002
Merge pull request #2291 from colinleroy/fix-256-minus-1
Fix bug introduced in #2260
2023-12-09 22:11:33 +01:00
acqn
b66682a05b Fixed wrapped call when the function to wrap has already got defined before it is wrapped with the pragma. 2023-12-10 00:47:10 +08:00
Colin Leroy-Mira
2a2cc6cad6 Fix bug introduced in #2260
bne should have applied to A, not X, but adding a cmp #$00 before
makes the change less optimized than the existing.
2023-12-09 16:43:23 +01:00
acqn
d8e61552be Removed outdated testcases no longer in the directory from test/misc/Makefile. 2023-12-09 18:04:29 +08:00
acqn
d8a722b638 Improved diagnostics on multiple definition of struct/union types. 2023-12-09 17:34:01 +08:00
acqn
87f8893886 Avoided "Variable 'XXX' is defined but never used" error message resulted from an earlier error. 2023-12-09 17:33:46 +08:00
acqn
98ffc031d1 Fixed an iteration bug in type composition. 2023-12-09 14:35:00 +08:00
acqn
b7e7bb7489 Fixed the issue that qualifiers of pointees of function parameters were ignored for type compatibility check. 2023-12-09 14:34:37 +08:00
Bob Andrews
519a52d92c
Merge pull request #2209 from vrubleg/linecont
ca65: `.LINECONT` as a part of `.FEATURE`
2023-12-08 02:10:45 +01:00
Bob Andrews
66bfc31988
Merge pull request #2262 from colinleroy/optimize-long-assign
Optimize static long assignment a bit
2023-12-08 01:58:01 +01:00
Bob Andrews
09735b26c5
Merge pull request #2274 from acqn/UnionFix
[cc65] Fixed initialization of union when it has an anonymous bit-field as the first member declaration
2023-12-08 01:55:06 +01:00
Bob Andrews
c4575ec2c4
Merge pull request #2275 from acqn/BitfieldFix
[cc65] Fixed constness of bit-fields
2023-12-08 01:54:02 +01:00
Bob Andrews
85a15007ec
Merge pull request #2276 from acqn/Diagnostics
[cc65] Fixed diagnostics
2023-12-08 01:53:08 +01:00
Colin Leroy-Mira
63861766e1 Fix Makefile change 2023-12-01 14:22:30 +01:00
Colin Leroy-Mira
d8a3938f2b Optimize a bit static long assignation 2023-12-01 14:20:00 +01:00
acqn
47e7ed2f56 Fixed wrong "Mixed declarations and code are not supported in cc65" error message when it should be "Expression expected". 2023-11-30 00:36:13 +08:00
acqn
c0a2021d9a Fixed endlessly repeated disgnostics when there are some certain patterns of syntax errors in a struct/union declaration. 2023-11-30 00:35:30 +08:00
acqn
6434176909 Fixed constness of bit-fields. 2023-11-29 12:27:01 +08:00
Bob Andrews
5537b61e6a
Merge pull request #2272 from acqn/Diagnostics
[cc65] Improved diagnostics
2023-11-28 15:06:39 +01:00
Bob Andrews
2af16ee82b
Merge pull request #2271 from acqn/InternalFix
[cc65] Fixed assertion failure when there is an undeclared symbol used in a parameter list
2023-11-28 15:03:09 +01:00
Bob Andrews
97cfb8c67a
Merge pull request #2266 from acqn/StructFix
[cc65] Fixes for structs/unions
2023-11-28 15:00:58 +01:00
Bob Andrews
86b09f56a6
Merge pull request #2260 from colinleroy/optimize-substraction
Optimize integer decrements by 1
2023-11-28 14:40:51 +01:00
Bob Andrews
acf159adbc
Merge pull request #2269 from colinleroy/optimize_gt_255
Optimize unsigned int and long > 255
2023-11-28 14:36:39 +01:00
Bob Andrews
ad0b778008
Merge pull request #2265 from acqn/C99Main
[cc65] Enabled implicit "return 0" in C99 standard main function in default cc65 mode
2023-11-28 14:27:55 +01:00
Bob Andrews
7e6399d439
Merge pull request #2268 from picocomputer/master
add rp6502 target
2023-11-27 17:53:43 +01:00
acqn
546be1d5dd Fixed assertion failure when there is an undefined symbol used in a parameter list. 2023-11-27 20:42:50 +08:00
acqn
b99ebc1256 Fixed diagnostic messages about undeclared identifiers. 2023-11-27 20:39:15 +08:00
acqn
7574e36e95 Improved error recovery with function declarations.
Fixed some rare cases when a single file-scope error could get reapeated endlessly until the maximum total count of errors allowed is reached.
2023-11-27 20:39:15 +08:00
acqn
ac04394254 Fixed and improved diagnostics about declaration errors. 2023-11-27 20:39:15 +08:00
acqn
79214530e0 Maximum total count of errors before the compiler unconditionally bails out is now 200.
If more than 20 errors occur on the same source line, the compiler will immediately bail out.
2023-11-27 20:39:15 +08:00
rumbledethumps
3905e43068 style update 2023-11-26 15:12:20 -08:00
Bob Andrews
ab0ab8e36f
Merge pull request #2267 from acqn/Diagnostics
[cc65] Removed extra "'}' expected" error message
2023-11-26 22:14:30 +01:00
Bob Andrews
e6c8f896b0
Merge pull request #2264 from ryandesign/patch-2
Fix typos; other copyediting
2023-11-26 22:06:06 +01:00
Bob Andrews
f95e3a1e49
Merge pull request #2263 from ryandesign/patch-1
Fix typo
2023-11-26 22:05:03 +01:00
rumbledethumps
502e13173a
Merge branch 'cc65:master' into master 2023-11-25 19:55:56 -08:00
Colin Leroy-Mira
f1b0fbebd5 Remove all indexed accesses to SCC registers
Some IIgs models had issues sending bytes out.
Also make channel tests clearer.
2023-11-24 18:37:43 +01:00
Colin Leroy-Mira
3066b1f9b4 Optimize unsigned int and long > 255 2023-11-17 22:49:03 +01:00
rumbledethumps
564c85235f style update and add rp6502 doc 2023-11-17 11:08:51 -08:00
rumbledethumps
b17c4d3434 add rp6502 target 2023-11-16 18:46:16 -08:00
acqn
3b7af398a9 Fixed initialization of union when it has an anonymous bit-field as the first member declaration. 2023-11-15 21:32:24 +08:00
acqn
f6c3a1b209 Removed the extra "'}' expected" error message following a "Excess elements in struct/union initializer" error message. 2023-11-15 21:17:05 +08:00
acqn
5332eeecc2 Fixed empty declarations in structs/unions. 2023-11-15 18:17:36 +08:00
Ryan Carsten Schmidt
e9e3cd969e
Fix typos; other copyediting 2023-11-14 00:57:07 -06:00
Ryan Carsten Schmidt
913ab3607f
Fix typo 2023-11-14 00:22:36 -06:00
Colin Leroy-Mira
b3eca51264 Add int decrement tests 2023-11-13 10:32:27 +01:00
Colin Leroy-Mira
076137f41b Optimize lda/sta/lda and friends 2023-11-13 10:32:09 +01:00
Colin Leroy-Mira
9242508abf Optimize substraction of 1 2023-11-13 10:31:48 +01:00
acqn
0eb38770bd Fixed const qualifiers on named structs/unions members that should prevent assignments to the whole structs/unions.
Added warning on ignored qualifiers on anonymous structs/unions.
2023-11-13 17:17:46 +08:00
Bob Andrews
d7d1d89698
Merge pull request #2252 from colinleroy/optimize-multiply-by-zero
Optimize multiplication by zero
2023-11-12 18:47:34 +01:00
Bob Andrews
be49751ad2
Merge pull request #2254 from brian6932/upload-64-bit-snapshot
Upload 64-bit Windows snapshot to Sourceforge
2023-11-12 18:44:41 +01:00
Colin Leroy-Mira
d00a23feff Update Apple 2 serial documentation
Reflect the new support of SER_HS_NONE.
2023-11-12 15:16:47 +01:00
Bob Andrews
ab2163f2c8
Merge pull request #2255 from polluks/patch-9
Fixed typo
2023-11-11 13:37:41 +01:00
Colin Leroy-Mira
86d498b7b3 Implement SER_HS_NONE on Apple IIgs serial driver 2023-11-10 21:56:43 +01:00
Stefan
f8d7c0cd4c
Fixed typo 2023-11-08 11:13:31 +01:00
Brian
83f51b1e3c
mention in readme 2023-11-06 21:53:14 -05:00
Brian
23f37c40aa
Upload 64-bit Windows snapshot to Sourceforge 2023-11-06 21:36:58 -05:00
Colin Leroy-Mira
cff611711b Optimize multiplication by zero 2023-11-06 11:04:00 +01:00
Colin Leroy-Mira
fe115fb621 Revert "Apple 2 SSC: Handle SER_HS_NONE with no performance impact"
This reverts commit 0eafb6d1d5.
This was buggy, as we sta Stopped when asserting flow, and this stops
SER_GET.
2023-11-05 11:34:51 +01:00
Colin Leroy-Mira
8a797095c1 Apple 2 SSC: Handle SER_HS_NONE with no performance impact 2023-11-05 11:34:51 +01:00
Colin Leroy-Mira
94239525ca Apple2 SSC: Implement no flow control 2023-11-05 11:34:51 +01:00
Bob Andrews
5b47def166
Merge pull request #2248 from acqn/ReturnTypeCheck
[cc65] Improved function return type check
2023-11-01 15:08:48 +01:00
Bob Andrews
f381d23001
Merge pull request #2236 from acqn/TypeFix
[cc65] Fixed some type-related bugs which don't have any impact yet
2023-10-29 12:37:07 +01:00
Bob Andrews
f7cf14bf58
Merge pull request #2246 from acqn/ArrayFix
[cc65] Fixes for nested unspecified-length/flexible arrays
2023-10-29 12:10:30 +01:00
Bob Andrews
65aad16d83
Merge pull request #2245 from acqn/MinorFix
[cc65] Avoided unnecessary BSS name duplication for tentative global variables
2023-10-28 15:26:31 +02:00
acqn
d424883716 Fixed diagnostics on qualifiers of function return types. 2023-10-28 15:24:13 +08:00
acqn
8e45a4c960 Fixed the bug that a union type containing a struct with a flexible array member was accepted as a struct member or array element type. 2023-10-27 23:46:10 +08:00
acqn
85e63e99a6 Fixed regression: array element of incomplete type. 2023-10-27 21:51:45 +08:00
Bob Andrews
94ef5856d0
Merge pull request #2235 from acqn/Cleanup
[cc65] Cleanups
2023-10-26 20:07:39 +02:00
Bob Andrews
401bcaa5ff
Merge pull request #2237 from acqn/CGType
[cc65] Renamed type facility functions for deciding code generation type flags
2023-10-26 19:50:10 +02:00
Bob Andrews
16f6860f57
Merge pull request #2243 from acqn/StdFuncFix
[cc65] Inlined std functions fixes
2023-10-26 17:39:07 +02:00
Bob Andrews
10f709eeb7
Merge pull request #2234 from acqn/Diagnostics
[cc65] Minor fix for error recovery from duplicated struct members
2023-10-26 17:10:01 +02:00
Bob Andrews
316ae886d7
Merge pull request #2242 from acqn/SwitchFix
[cc65] Fixed type promotion of switch case values
2023-10-26 16:56:01 +02:00
Bob Andrews
a8d00bfaae
Merge pull request #2240 from acqn/BitwiseOpt
[cc65] New TOS optimization steps for 8-bit subtraction and bitwise operations
2023-10-26 16:53:37 +02:00
Bob Andrews
8e6c0c1466
Merge pull request #2238 from acqn/BoolOptFix
[cc65] Bool opt fixes
2023-10-26 13:06:33 +02:00
acqn
df392fc104 Fixed type promotion of switch case values. 2023-10-25 22:38:21 +08:00
acqn
a31b35b2a6 Fixed naming of local variables in CG_TypeOfBySize and CG_TypeOf. 2023-10-22 10:42:17 +08:00
acqn
70549e868e New optimizer steps to restore some possibly lost optimization with boolean due to the previous fix. 2023-10-21 23:56:13 +08:00
acqn
f321bb16e5 Fixed potential bugs with boolean branch optimizers when more than one jeq/jne follows. 2023-10-21 23:56:07 +08:00
acqn
79c52e742f Added new opts OptBoolUnary1/OptBoolUnary2 to remove unnecessary cmp + bcastax/bnegax,
as well as OptBoolUnary3 to "strength-reduce" certain bcastax/bnegax to boolne/booleq.
2023-10-21 23:56:04 +08:00
acqn
e5bbdfa995 Separated boolean optimizers from bitwise unary operator optimizers.
Renamed OptCmp6 to OptBoolCmp.
2023-10-21 23:56:01 +08:00
acqn
c52427fc65 Minor fix for error recovery from duplicated struct members. 2023-10-21 23:52:14 +08:00
Bob Andrews
bb1b5c363e
Merge pull request #2233 from acqn/ArraySubscriptFix
[cc65] Fixed array subscript with a bit-field with patch by kugelfuhr
2023-10-18 12:51:36 +02:00
Bob Andrews
3e60268243
add newline at the end 2023-10-17 20:39:15 +02:00
acqn
178573a128 Fixed inlined strlen when it takes a string literal with extra characters after the first '\0'.
Added testcases.
2023-10-17 17:57:19 +08:00
Bob Andrews
77c6a6a693
Merge pull request #2226 from acqn/PragmaFix
[cc65] Pragma fixes
2023-10-16 16:57:09 +02:00
Oliver Schmidt
3c864fc7d8
Minimal style adjustment 2023-10-15 17:00:15 +02:00
Colin Leroy-Mira
882f6fd103 Fix ACIA check so we don't enable RX/TX with IRQs on 2023-10-15 16:58:59 +02:00
Colin Leroy-Mira
3107f34ec9 Put back 6551 test as a last verification 2023-10-15 16:58:59 +02:00
Colin Leroy-Mira
6e035c864e Apple2 SSC: on IIgs, verify slot mode
If the slot is not in "Your Card" mode, there's no way it is an SSC
2023-10-15 16:58:59 +02:00
Colin Leroy-Mira
96e893795b Better check for 6551 2023-10-15 16:58:59 +02:00
acqn
21b6cbb66e Updated documentation on string literal translation in asm() and _Static_assert(). 2023-10-15 16:43:40 +08:00
acqn
8111946731 Fixed array subscript with a bit-field with patch by kugelfuhr. 2023-10-15 15:53:03 +08:00
mrdudz
6222cd9115 don't use a label in the bgt macro, as that may cause subtle problems. fixes #2222 2023-10-14 23:04:30 +02:00
Bob Andrews
2726192aaf
Merge pull request #2224 from acqn/DeclCleanUp
[cc65] Made functions in src/cc65/declare.c less confusing
2023-10-14 20:09:05 +02:00
mrdudz
bb92144717 changed "inline assembler statement" to "inline assembler expression" as suggested in #2191 2023-10-14 16:21:30 +02:00
Colin Leroy-Mira
e138403727 Move cli in common out path 2023-10-14 14:36:09 +02:00
Colin Leroy-Mira
6e0bbb00ee Fix logic error on parameters checks 2023-10-14 14:36:09 +02:00
Colin Leroy-Mira
c7db08b4e3 Move hardware check to ser_install 2023-10-14 14:36:09 +02:00
Colin Leroy-Mira
e90a8f3123 Address code review comments 2023-10-14 14:36:09 +02:00
Colin Leroy-Mira
39d6080945 Do the IIgs check as documented 2023-10-14 14:36:09 +02:00
Colin Leroy-Mira
e3759a3ead Spare cycles on IRQ path 2023-10-14 14:36:09 +02:00
Colin Leroy-Mira
65ce3a6792 Don't check firmware at $C200, as we don't use it
Just check that we're on a IIgs instead.
2023-10-14 14:36:09 +02:00
Colin Leroy-Mira
9e87e558d2 Fix register r/w timing 2023-10-14 14:36:09 +02:00
Bob Andrews
b300b7ac8b
Merge pull request #1799 from acqn/#1489
[cc65] Post-inc/post-dec won't affect __A__/__AX__/__EAX__ in the same statement
2023-10-14 13:25:14 +02:00
Bob Andrews
ed2f1f6b90
Merge pull request #2223 from acqn/VSLineEndingFix
Reverted EOL settings (LF vs CRLF) for Visual Studio
2023-10-14 13:19:57 +02:00
acqn
7b0d1d9679 Added warning on concatenated string literals in _Pragma operations. 2023-10-13 14:54:54 +08:00
acqn
25832ef5fc Fixed timing of #pragma charmap.
Now it is immediately applied and affects almost all characters and string literals after it.
Exceptions:
- String literals as the message of a static assertion or inline assembler code (only the required one, not any optional formatted arguments) in an asm() expression are not translated with either #pragma charmap or target presets.
- String literals used for preprocessor directives or as the result of stringized macro arguments are never translated.
2023-10-13 16:32:06 +08:00
acqn
c6ead99b00 Fixed string literal concatenation with pragmas in between. 2023-10-13 16:32:05 +08:00
acqn
74922afa7c Made the intension of functions in src/cc65/declare.c less confusing. 2023-10-12 17:31:49 +08:00
acqn
b14efbb578 Fixed EOL settings (LF vs CRLF) for Visual Studio. 2023-10-11 23:57:45 +08:00
acqn
7b6f8249a0 General fixes for prerequisites for optimization on certain std functions.
Added utility functions for extracting expression info.
2023-10-11 22:29:15 +08:00
Bob Andrews
494bf10e80
Merge pull request #2216 from acqn/FuncDefFix
[cc65] Type category in a function definition cannot be inherited from a typedef
2023-10-08 18:58:29 +02:00
Bob Andrews
181a8cd64c
Merge pull request #2212 from BrianPeek/removeabc
Remove unused abc_score_ptr zp entries for lynx lib
2023-10-08 14:51:26 +02:00
Bob Andrews
ee6118f235
Merge pull request #2215 from acqn/VariadicCallCheck
[cc65] Added check for total arguments size for variadic functions
2023-10-08 13:13:08 +02:00
Brian Peek
32a20cf5ca remove abc ptrs 2023-10-06 19:53:18 -07:00
acqn
0028b14071 The type category in a function definition cannot be inherited from a typedef. 2023-10-05 17:48:16 +08:00
Evgeny Vrublevsky
850007cb44 Document line_continuations feature. 2023-10-05 08:28:37 +03:00
Evgeny Vrublevsky
c8df241337 Add line_continuations feature that works as .LINECONT but in a consistent way with other features. 2023-10-05 08:28:37 +03:00
Bob Andrews
12193790e5
Merge pull request #2199 from acqn/FAMFix
[cc65] Forbidden struct itself with flexible array member as struct member or array element
2023-10-05 03:21:31 +02:00
Bob Andrews
327281b869
Merge pull request #2200 from acqn/CompoundInitFix
[cc65] Fixed compound initialization with certain omitted enclosing curly braces
2023-10-05 03:20:33 +02:00
Bob Andrews
bdb13350e3
Merge pull request #2201 from acqn/Diagnostics
[cc65] Improved diagnostics
2023-10-05 03:19:31 +02:00
Bob Andrews
eb5e888499
Merge pull request #2204 from vrubleg/general_fixes
General project fixes and quality of life improvements
2023-10-05 03:17:51 +02:00
acqn
20c3e994c6 Fixed compiling with pragmas in the middle of declarations or statements. 2023-10-04 21:22:04 +08:00
Colin Leroy-Mira
9667a5f991 Re-introduce necessary comments, wit a clearer wording 2023-10-03 18:35:23 +02:00
Colin Leroy-Mira
3c17c13357 Address latest comments 2023-10-03 18:34:22 +02:00
Colin Leroy-Mira
996a2659d5 Address code review comments 2023-10-03 18:34:22 +02:00
Colin Leroy-Mira
e16a5e0dbe Add Apple IIgs serial driver 2023-10-03 18:34:22 +02:00
Colin Leroy-Mira
330b1ab3f9 Remove useless comments 2023-10-03 13:55:10 +02:00
Colin Leroy-Mira
df4902157a Cleanup coding style a bit 2023-10-03 13:55:10 +02:00
Colin Leroy-Mira
4ff917816e Apple2: Always copy cmdline
Otherwise, the last exec() cmdline lingers around for the next exec("file", NULL).
2023-09-29 10:51:53 +02:00
Evgeny Vrublevsky
148942ff1d Don't use hardcoded Visual Studio installation path in msbuild.cmd. 2023-09-23 14:26:09 +03:00
Evgeny Vrublevsky
9b9e955eb1 Add basic .editorconfig. 2023-09-23 14:26:08 +03:00
Evgeny Vrublevsky
d83354a8dd Fix default VS project settings. 2023-09-23 14:26:08 +03:00
Bob Andrews
4944c92f9a
Merge pull request #2202 from polluks/patch-8
Update funcref cx16
2023-09-22 23:10:34 +02:00
Stefan
b81e5d00f2
Update funcref cx16 2023-09-22 16:43:03 +02:00
Colin Leroy-Mira
e3bc143f27 Another two bytes saved 2023-09-22 11:51:29 +02:00
acqn
13e1ed3e7b Fixed compound initialization with omitted enclosing curly braces when an array/struct/union to initialize is nested. 2023-09-22 10:29:52 +08:00
Bob Andrews
dd833125a8
Merge pull request #2198 from acqn/DeclFix
[cc65] Fixed check for conflicting extern vs no-linkage/static declarations in functions
2023-09-21 00:35:35 +02:00
Bob Andrews
c82e877451
Merge pull request #2188 from colinleroy/serial-kernel-fix-driver-lifecycle
Serial kernel: Fix driver lifecycle
2023-09-21 00:34:09 +02:00
Bob Andrews
6bc68b9763
Merge pull request #2195 from polluks/kim
Added KIM-1 refs
2023-09-21 00:19:22 +02:00
Bob Andrews
40b0315be9
Merge pull request #2196 from ToboterXP/add_fx
Added FX registers to cx16.h
2023-09-21 00:18:00 +02:00
acqn
51e304f10f Added check for total arguments size for variadic functions. 2023-09-18 16:44:04 +08:00
acqn
fc603129da A structure with a flexible array member shall not be a member of a structure or an element of an array according to the ISO C Standard. 2023-09-18 15:44:58 +08:00
ToboterXP
0815c8890b Added semicolon 2023-09-17 22:57:42 +02:00
ToboterXP
d251bd46c8 Removed dangling spaces 2023-09-17 22:54:48 +02:00
ToboterXP
3626c94c97 Added FX registers to cx16.h 2023-09-17 22:48:47 +02:00
acqn
39abd233fe Fixed check for conflicting extern vs no-linkage/static declarations in functions. 2023-09-17 23:47:22 +08:00
Stefan
e145145fbb
Added KIM-1 refs
some clean-up
2023-09-16 21:01:37 +02:00
Bob Andrews
5ed3108eea
Merge pull request #2190 from polluks2/patch-12
optimisation scandisplay
2023-09-15 15:49:11 +02:00
polluks2
2e9843b32d
optimisation scandisplay 2023-09-15 10:35:36 +02:00
acqn
878264d948 Minor consistency improvement for AddEnumSym() usage. No impact. 2023-09-13 22:26:41 +08:00
acqn
8e62cbf092 Improved checks on function return types. 2023-09-13 22:26:41 +08:00
Colin Leroy-Mira
3fc074014e Serial kernel: Fix driver lifecycle
- Make sure we don't install a driver on top of another one
- Make sure we don't uninstall a driver twice
- Make sure we uninstall a driver if needed at exit
2023-09-12 20:58:21 +02:00
Colin Leroy-Mira
aa5ee8423a Clearer wording for the firmware check 2023-09-11 08:31:15 +02:00
Colin Leroy-Mira
38f7daf40e Make sure not to load ACIA driver on IIgs' Z8530
The Pascal Firmware Protocol Bytes ID are not enough to differentiate an SSC card from a IIgs serial firmware:
http://www.1000bit.it/support/manuali/apple/technotes/misc/tn.misc.08.html

Loading a2(e).ssc.ser on a IIgs succeeds, then goes to limbo when one tries to use the serial port.

Check first byte on the slot's firmware in addition to the four existing ones, as it's supposed to be $2C (BIT instruction) on an SSC card, and $EF (65C816 SEP instruction) on the IIgs' serial firmware (ROM revisions 0, 1, 3).
2023-09-11 08:31:15 +02:00
Bob Andrews
043590c971
Merge pull request #2182 from colinleroy/add-ntohs
Add ntohs/htons and ntohl/htonl
2023-09-08 18:47:09 +02:00
Bob Andrews
caf8186565
Merge pull request #2166 from colinleroy/rfc-serial-optimisation
Possible serial driver optimisations
2023-09-08 18:42:39 +02:00
Bob Andrews
537aa665cf
Merge pull request #2006 from bbbradsmith/ca65_jmp_abs_wrap_error
jmp (abs) wrap warning promoted to an error, suppressed on 65C02/etc
2023-09-08 18:26:55 +02:00
Colin Leroy-Mira
9e5620f127 Fix coding-style on header 2023-09-07 23:06:51 +02:00
Colin Leroy-Mira
9669710cc3 Fix usage of __OPT_i__ 2023-09-07 21:36:39 +02:00
Colin Leroy-Mira
cbc5603d63 Inline ntohs/htons as a macro if -i is passed 2023-09-07 21:00:30 +02:00
Colin Leroy-Mira
a90aa57510 Address Oliver's comments 2023-09-07 16:48:56 +02:00
Colin Leroy-Mira
734541ee05 Serial: Optimize SER_GET
There is no need to TryToSend before getting the character. We
send bytes during SER_PUT, and if interrupted during sending, we
still try to do it at the beginning of the next SER_PUT.
2023-09-07 07:14:01 +02:00
Colin Leroy-Mira
a89a311abf Serial: Micro-optimisation for apple2enh
On 65C02 we can spare one cycle on sta (abs); we also
not have to care about the 6502 false reads
2023-09-07 07:13:59 +02:00
Colin Leroy-Mira
e8f5ad2471 Serial: Optimize SER_PUT
We don't need to reload SendFreeCnt if we don't jsr TryToSend.
2023-09-07 07:13:57 +02:00
Colin Leroy-Mira
89af42e5cb Serial: Optimize SER_IRQ
Apple2 and Atmos have Index in X, but can still use it for the
best-case path as long as we reload it in the worst-case part
(when we assert flow control).
Also, standardize the free space to trigger flow control to 32
characters left (compare with RecvFreeCnt before decrement)
2023-09-07 07:13:54 +02:00
Colin Leroy-Mira
3f3b6123b9 Serial: Optimize TryToSend
We don't need to reload SendFreeCnt each time we loop to wait
for the ACIA to be ready.
2023-09-07 07:13:48 +02:00
Colin Leroy-Mira
dfe7562f76 Add ntohs, htons, ntohl, htons. 2023-09-07 07:03:34 +02:00
Bob Andrews
c674b7ced4
Merge pull request #2183 from polluks2/patch-10
Update README.md
2023-09-06 19:40:58 +02:00
polluks2
1a6e20ca6e
Update README.md 2023-09-06 14:47:14 +02:00
polluks2
30b80548d4
Update README.md
For the sake of completeness
2023-09-06 12:16:14 +02:00
Bob Andrews
e52e350498
Merge pull request #2180 from polluks2/patch-9
Added missing detail
2023-09-05 19:51:41 +02:00
Bob Andrews
84a01816fd
Merge pull request #2181 from bbbradsmith/init-revert
change INIT back to rw for configurations that needed it
2023-09-05 19:42:57 +02:00
bbbradsmith
d4c4786ff0 undo change of INIT to bss for configurations that were also using rw to reserve space, add a comment documenting the reason 2023-09-05 00:24:18 -04:00
polluks2
e28e32129a
Added missing detail 2023-09-04 20:38:05 +02:00
Bob Andrews
7eaa5c507f
Merge pull request #2177 from polluks2/patch-11
Don't mix apple2 with apple2enh
2023-09-04 20:36:31 +02:00
Bob Andrews
870581a4d4
Merge pull request #2174 from colinleroy/conio-65c02-optimisations
Conio: 65c02 optimisations
2023-09-04 18:00:23 +02:00
Bob Andrews
980727d62d
Merge pull request #2178 from polluks2/patch-9
Fixed typo
2023-09-04 17:58:47 +02:00
polluks2
4ebc3b8b04
Don't mix apple2 and apple2enh 2023-09-03 20:47:48 +02:00
Bob Andrews
16e90187e8
Merge pull request #2163 from bbbradsmith/init-bss
INIT segment definitions should be consistent, and bss is the appropriate semantic type
2023-09-03 00:30:44 +02:00
Colin Leroy-Mira
8a140e6503 Conio: 65c02 optimisations
cputc: -2 cycles per char, -2 cycles per carriage return
cputs: -5 cycles per char, -3 cycles on cputsxy
vcprintf: -6 cycles per char
2023-09-02 12:44:53 +02:00
Bob Andrews
d70c902a02
Merge pull request #2170 from colinleroy/build-libs-with-debug-info
Build libs with debug symbols
2023-09-01 17:58:17 +02:00
Colin Leroy-Mira
a2c115fc3e Build libs with debug symbols 2023-08-26 15:35:28 +02:00
Bob Andrews
05cd805cbc
Merge pull request #2085 from bbbradsmith/numerical_constant_errors-float
Numerical constant errors and improvements (float)
2023-08-25 22:30:07 +02:00
bbbradsmith
97e59b0756 ref link doesn't work within the usage verb 2023-08-19 15:50:22 -04:00
bbbradsmith
28ffe2f59b add jmp page crossing to --relax-checks, document it, fix --relax-checks documentation (segment branch error is not suppressed) 2023-08-19 15:39:51 -04:00
bbbradsmith
f31d8efc1e tabs are forbidden 2023-08-19 15:07:32 -04:00
bbbradsmith
07f08fc547 tests verifying jmp (indirect) page crossing error on 6502, and the lack of error for other CPU types 2023-08-19 14:36:30 -04:00
bbbradsmith
d09e0a7f20 Merge branch 'master' into ca65_jmp_abs_wrap_error 2023-08-19 14:07:52 -04:00
bbbradsmith
2431fb7d85 correct INIT segment semantic is bss, make this consistent across all default cfg 2023-08-19 13:08:46 -04:00
mrdudz
39619b629d fix docs on .version (forgot to update it when __CC65__ was fixed) 2023-08-19 15:39:16 +02:00
Colin Leroy-Mira
148be69f97 Optimize and fix comments (thanks to Oliver Schmidt) 2023-08-19 14:11:36 +02:00
Colin Leroy-Mira
1f68846116 Avoid using mli.s to initcwd 2023-08-19 14:11:36 +02:00
Bob Andrews
ce3bcadd24
Merge pull request #2146 from baktragh/master
Update _atari5200os.h
2023-07-02 19:10:39 +02:00
baktragh
7a85473cb0
Update _atari5200os.h
Remove dangling spaces
2023-07-02 15:16:33 +02:00
baktragh
6c127d6a83
Update _atari5200os.h
Update the page 0 symbols, synchronize  the names with the _atarios.h, add locations used by Atari 5200 conio
2023-07-02 14:59:00 +02:00
Bob Andrews
3efa517d96
Merge pull request #2141 from baktragh/master
Update _atari5200os.h with POT shadows
2023-06-27 00:18:23 +02:00
baktragh
aaec2a6270
Update _atari5200os.h - Remove dangling spaces 2023-06-26 16:46:42 +02:00
baktragh
3e166c760d
Update _atari5200os.h with POT shadows
Update the OS struct with POT shadow registers, according to the https://web.archive.org/web/20120830055323/http://www.atarimuseum.com/videogames/consoles/5200/conv_to_5200.html document
2023-06-26 16:38:41 +02:00
Bob Andrews
c2e5937724
Merge pull request #2138 from mooinglemur/20230615-cx16-memsiz
cx16: use KERNAL memsiz for MEMSIZE in asminc/cx16.inc
2023-06-19 18:59:47 +02:00
MooingLemur
59941d9464 cx16: use KERNAL memsiz for MEMSIZE in asminc/cx16.inc 2023-06-15 21:30:26 -04:00
mrdudz
c8aa9cc703 add struct assign check related to #2079 2023-05-29 17:20:09 +02:00
Bob Andrews
31bac03d01
Merge pull request #2124 from jedeoric/telestrat_fix_compute_length_bytes_read_write
Fix computed length for read and write for telestrat target
2023-05-29 16:02:41 +02:00
jede
480600093c fix pla/pha instead of tmp1 2023-05-25 18:09:03 +02:00
jede
1ca9d7e9e7 fix tab 2023-05-23 23:15:23 +02:00
jede
1377ba0d36 fix compute length for read and write for telestrat target 2023-05-23 23:08:56 +02:00
Bob Andrews
652949f183
Merge pull request #2104 from Movax12/remove-feature-requirement-addrsize
ca65: Remove .feature requirement for .addrsize
2023-05-22 00:39:04 +02:00
Bob Andrews
47ee29f239
Merge pull request #2120 from polluks2/patch-10
Fixed typo
2023-05-19 17:25:34 +02:00
polluks2
40ff9281c6
Fixed typo 2023-05-19 16:36:19 +02:00
polluks2
3831feba75
Fixed typo 2023-05-19 16:32:09 +02:00
Bob Andrews
9ff7b88192
Merge pull request #2113 from polluks2/patch-9
Unified NULL #2110
2023-05-19 16:06:46 +02:00
polluks2
accd57460b
Reverted gconst.h 2023-05-19 15:48:31 +02:00
polluks2
8ff008722b
Fixed test
Don't define NULL yourself. QED
2023-05-19 02:49:49 +02:00
polluks2
767875b5a7
Added guard 2023-05-18 00:08:26 +02:00
polluks2
19436f5159
Update gconst.h 2023-05-17 20:24:36 +02:00
Bob Andrews
70bf4d492b
Merge pull request #2105 from bbbradsmith/sim65-64bit-cycle-count
Sim65 64bit cycle count
2023-05-16 15:53:23 +02:00
Bob Andrews
d41f53e252
Merge pull request #2108 from bbbradsmith/windows-workflow-scheduled-cmd
Scheduled windows build/test and cmd.exe subshell
2023-05-16 15:37:18 +02:00
polluks2
dd58c7ff50
Update stddef.h 2023-05-14 17:32:30 +02:00
polluks2
ba6747f5da
Update time.h 2023-05-14 17:29:42 +02:00
polluks2
c55459b287
Update string.h 2023-05-14 17:28:48 +02:00
polluks2
fd74e6b005
Update stdio.h 2023-05-14 17:28:09 +02:00
polluks2
680ddaf37d
Update locale.h 2023-05-14 17:27:04 +02:00
polluks2
6579df4e91
Update stdlib.h 2023-05-14 02:43:35 +02:00
Bob Andrews
55723f4977
Merge pull request #2112 from bbbradsmith/extern-static-conflict-error
Error/warning for extern/static linkage declaration conflict
2023-05-12 11:22:59 +02:00
polluks2
5d9306fed3
Fixed header #2110 2023-05-12 02:32:14 +02:00
bbbradsmith
5a30d746b4 extern/static conflict test: remove warning as errors to match the new expected cases 2023-05-11 20:15:27 -04:00
bbbradsmith
3b7be09a7f extern redeclared as static = error (C spec: undefined)
static redeclared as extern = warning (C spec: ignore extern)
See: #2111
2023-05-11 19:50:58 -04:00
bbbradsmith
eb2b013d62 remove workflow comments this obsoletes 2023-05-08 21:22:18 -04:00
bbbradsmith
76328da682 librsc/Makefile: ../lib directory must be created globally before make lib targets in parallel
prevents conflict of individual targets each trying to create ../lib
enable -j2 in make lib windows action
2023-05-08 20:57:50 -04:00
bbbradsmith
07963abd52 replace manual-only tests with scheduled test and manual dispatch
cache is used to prevent unnecessary rebuild if the previous build was successful
make steps now use SHELL=cmd to provide cmd.exe subshell
2023-05-08 18:21:21 -04:00
bbbradsmith
ce6097ea7e rename windows-test-manual to windows-test-scheduled 2023-05-08 18:12:57 -04:00
Movax12
a058d4a2f3 Fix warning message, remove comment 2023-05-08 16:55:54 -04:00
Bob Andrews
79018fd424
Merge pull request #2107 from IrgendwerA8/patch-2
Fixed comments for Atari OS memory location
2023-05-08 18:34:30 +02:00
Irgendwer
02d38ae17e
Fixed comments for Atari OS memory location 2023-05-08 15:28:22 +02:00
bbbradsmith
f15e9c4159 Linux build rejects %llu in ErrorCode 2023-05-07 17:41:54 -04:00
bbbradsmith
2cb457b85f sim65 use error codes outside the simulated program's range for non-sim errors 2023-05-07 16:51:12 -04:00
bbbradsmith
7f0baff792 document how to return from assembly sim65 test 2023-05-07 16:35:05 -04:00
bbbradsmith
3419cbd348 sim65 64-bit cycle count tests
These take ~10 seconds to run locally
2023-05-07 16:33:47 -04:00
bbbradsmith
aad64063c9 makefiles no longer need comment about sim65 64-bit support 2023-05-07 16:33:07 -04:00
bbbradsmith
0081fe548c sim64 universal 64-bit cycle count support:
MaxCycleCount is accounted by countdown, eliminating the 1-instruction-overhead issue, and removing the need to compare against a growing TotalCycles.
Makes main.c responsible for counting total cycles, instead of 6502.c, so the size of MaxCycleCount etc. is fully determined in one location.
Makes error.c responsible for PrintCycles instead of paravirt.c, so that it can be treated globally instead of
Return value of main() should be SIM65_ERROR because it is unreachable by design.
2023-05-07 16:26:42 -04:00
mvax
56df849101 add warning for .feature addrsize, clean up switch in SetFeature 2023-05-07 14:53:44 -04:00
Bob Andrews
6de85b2e2a
Merge pull request #2093 from bbbradsmith/split2089-workflow-docs-artifact
Workflow docs artifact and snapshot
2023-05-07 19:44:41 +02:00
Brad Smith
8b682b3c5a
Merge branch 'master' into split2089-workflow-docs-artifact 2023-05-07 13:34:37 -04:00
Bob Andrews
c9857d9962
Merge pull request #2069 from jefftranter/bootstrap-fix
Source listing in bootstrap.s is incorrect.
2023-05-07 13:49:12 +02:00
mvax
bee29dedd1 fix feature.s test 2023-05-06 17:11:57 -04:00
mvax
560085cb17 modify and add tests 2023-05-06 16:22:04 -04:00
Bob Andrews
9c70235173
Merge pull request #2096 from Movax12/BugFix-for-ismnemonic-function
Bugfix for the .ISMNEMONIC, .ISMNEM builtin function
2023-05-06 21:42:59 +02:00
Bob Andrews
9c27084fa5
Merge pull request #2084 from bbbradsmith/numerical_constant_errors-int
Numerical constant errors and improvements (integer)
2023-05-06 21:36:59 +02:00
Bob Andrews
066953c435
Merge pull request #2101 from bbbradsmith/split2092-windows-test-manual
workflow for manually dispatched Windows build and test
2023-05-06 21:23:50 +02:00
Bob Andrews
7b40515506
Merge pull request #2099 from bbbradsmith/split2092-sim65-fix
sim65 fix platform-dependent issues
2023-05-06 20:36:59 +02:00
mvax
11cc5b6f06 remove .feature requirment for addrsize function, silently ignore '.feature addrsize' 2023-05-06 14:24:53 -04:00
Bob Andrews
f87c7f3f14
Merge pull request #2098 from bbbradsmith/split2092-grc65-fix
grc65 fix flawed text parsing
2023-05-06 20:07:20 +02:00
bbbradsmith
84f0ab322d sim65: cycles does not increment 1 at a time, so some small overhead is needed in range check 2023-05-06 13:54:28 -04:00
mvax
fe35386b79 add test - add overloading instruction test 2023-05-06 12:56:34 -04:00
bbbradsmith
532681c961 braces were requested
combining the two a = ' ' cases was requested
2023-05-06 12:06:06 -04:00
bbbradsmith
1df7ab0352 opening brace on same line as while
other AbEnd messages don't end in .
2023-05-06 11:55:21 -04:00
Bob Andrews
027ec91944
Merge pull request #2094 from bbbradsmith/workflow-docs-tweak
More specific git commit error suppression in doc upload
2023-05-06 12:04:57 +02:00
Bob Andrews
0d0369983a
Merge pull request #2100 from bbbradsmith/split2092-libtest
libtest target alternative to lib
2023-05-06 11:30:05 +02:00
Bob Andrews
9014165612
Merge pull request #2097 from jefftranter/c1p-video-mode
Add support for 48x12 video mode on Challenger 1P
2023-05-06 11:17:45 +02:00
bbbradsmith
a022f7203d workflow for manually dispatched Windows build and test 2023-05-05 22:05:10 -04:00
bbbradsmith
df749abbfb libtest target alternative to libs
saves me about 20 minutes if I only want to run tests
2023-05-05 21:56:52 -04:00
bbbradsmith
c03d00bc80 sim65 suppress uninitialized variable warning
the EOF check was protecting uninitialized Val2 but the compiler can't figure that out
2023-05-05 21:46:42 -04:00
bbbradsmith
773716c32a sim65 close(-1) crash fix
test/val/constexpr.c relies on close(-1) to return -1 for some reason (comment says "abuse"), but on MSVC close(-1) is treated as a security issue and terminates the program instead of returning -1
simulating this desire for sim65, though constexpr.c may also warrant a review
2023-05-05 21:46:11 -04:00
bbbradsmith
f2e7609046 sim65 cycles 32-bit range fix
long is 64-bit on some platforms, making this inconsistent, added range check to catch overflow.
reduced tests requesting 5 billion cycles to 2^32-1 so they can fun on 32-bit long sim65.
2023-05-05 21:45:57 -04:00
bbbradsmith
8d048699ee grc65 fix flawed text parsing
Was using fseek(F,-1,SEEK_CUR) which is invalid for text files, behaviour unreliable across platforms.
Added check for internal buffer overflow.
2023-05-05 21:32:34 -04:00
mvax
dd0a2bf1bc add test - fix stlye 2023-05-05 19:10:16 -04:00
mvax
7994889213 add test - fix again 2023-05-05 19:07:14 -04:00
mvax
c5cf32ac47 add test - fix 2023-05-05 18:50:44 -04:00
mvax
18570d18b8 add test 2023-05-05 18:43:10 -04:00
Jeff Tranter
17706208e8 Add support for 48x12 video mode on Challenger 1P.
Tested on real C1P hardware.
2023-05-05 18:02:42 -04:00
Bob Andrews
a325c95652
Merge pull request #2090 from bbbradsmith/split2089-make-test-standard
add test/standard to test makefile
2023-05-05 20:42:57 +02:00
Bob Andrews
7a040978d7
Merge pull request #2088 from bbbradsmith/struct-3byte-misc-todo
guard test to ensure 3-byte struct isn't re-enabled without evaluation by accident
2023-05-05 20:39:37 +02:00
Bob Andrews
34d9d55b95
Merge pull request #2091 from bbbradsmith/split2089-test-todo-testwrk
test/todo makefile uses testwrk/val by mistake
2023-05-05 20:36:10 +02:00
mvax
1c58b302d8 Bugfix for the .ISMNEMONIC, .ISMNEM builtin function 2023-05-05 12:31:19 -04:00
bbbradsmith
c662c7a36f use diff-index to prevent commit instead of bash if
preferred because the if suppresses all git commit errors, instead of the one error we need to suppress (commit with no changes)
2023-05-05 12:02:50 -04:00
bbbradsmith
5c20fb2812 test/todo makefile uses testwrk/val by mistake 2023-05-05 11:28:42 -04:00
bbbradsmith
9f3e47e9c9 test/standard was never added to test makefile 2023-05-05 11:04:31 -04:00
bbbradsmith
8f356f5093 artifact upload should not end with .zip as it is appended automatically
fixes ".zip.zip" artifact filenames
2023-05-05 11:00:06 -04:00
bbbradsmith
0cad5bef81 include docs snapshot with pull request build so that PRs can preview it easily 2023-05-05 10:58:18 -04:00
bbbradsmith
e57c991de7 master push workflow can include a docs snapshot 2023-05-05 10:56:43 -04:00
bbbradsmith
cfc8a41a03 guard test to ensure 3-byte struct isn't re-enabled without evaluation by accident 2023-05-04 17:07:34 -04:00
Bob Andrews
a7676bdff5
Merge pull request #2075 from bbbradsmith/struct-duplicate-member-error
Error for struct/union with a duplicate member
2023-05-04 22:43:17 +02:00
mrdudz
69fd3d7998 tweak 2023-05-04 22:21:36 +02:00
mrdudz
71bb11bee1 make the commit message a url, also check if it really doesnt fail when there is nothing to commit 2023-05-04 22:09:22 +02:00
mrdudz
e228e4d65c try something else, again 2023-05-04 21:58:37 +02:00
mrdudz
4ef849cb81 Force background image to snap left, adapted from https://github.com/cc65/doc/pull/1 2023-05-04 21:44:57 +02:00
mrdudz
769b316376 lets see if this will not fail when there are no changes in the docs 2023-05-04 21:27:48 +02:00
mrdudz
7053dac3a9 remove token from cc65/doc, reenable the tests again 2023-05-04 21:13:37 +02:00
mrdudz
610dfbb41c try normal push, also try actions/upload-artifact@v3 2023-05-04 21:07:23 +02:00
mrdudz
ea90c934d7 try gain with classic token 2023-05-04 20:59:18 +02:00
mrdudz
17f58d934f AGAIN 2023-05-04 20:52:50 +02:00
mrdudz
926d09a14d i'm not patient enough 2023-05-04 20:48:52 +02:00
mrdudz
0369838f24 bleh 2023-05-04 20:45:35 +02:00
mrdudz
3536761110 another try 2023-05-04 20:30:28 +02:00
mrdudz
99a0d64b93 lets see if that token stuff works 2023-05-04 20:03:27 +02:00
mrdudz
20f0427fa4 comment out the push again. who knows whats wrong. sigh 2023-05-04 15:20:33 +02:00
mrdudz
681c51b37e yawn 2023-05-04 15:12:46 +02:00
mrdudz
c0dd3b9d9a like this? awesome how everyone does something different :) 2023-05-04 15:10:10 +02:00
mrdudz
7c5595efbc another try 2023-05-04 15:02:32 +02:00
mrdudz
45258d060d lets see if this works 2023-05-04 14:47:02 +02:00
mrdudz
0957c36115 try verbose dry run to see what it does :) 2023-05-04 14:19:27 +02:00
bbbradsmith
69f4cd1847 limits.h was apparently already included somewhere on windows but not linux 2023-05-04 05:48:48 -04:00
bbbradsmith
ca8201a314 Overflow test optimization suggested by kugelfuhr
User CHAR_BIT instead of 8
2023-05-04 05:44:20 -04:00
Bob Andrews
13f317e660
Update Contributing.md 2023-05-04 09:18:33 +02:00
Brad Smith
5ed7153841
Merge branch 'master' into ca65_jmp_abs_wrap_error 2023-05-03 21:12:37 -04:00
bbbradsmith
84eafb7f9c err test for struct with duplicate member 2023-05-03 21:09:03 -04:00
bbbradsmith
b5f255f912 Test case for const-overflow warnings 2023-05-03 19:54:40 -04:00
bbbradsmith
8e75e5b51a Suppress overflow warning when conversion is an explicit cast 2023-05-03 19:42:05 -04:00
bbbradsmith
e3cb8dfb9b Numerical constant scanner requires explicitly 32-bit sized type for cross-platform consistency 2023-05-03 19:27:37 -04:00
Bob Andrews
b743b1a8c2
Merge pull request #2081 from bbbradsmith/suppress-size-error
ca65: Suppress '.size' error for multiply-defined symbols
2023-05-04 00:36:48 +02:00
Bob Andrews
45bdeb62ad
Merge pull request #2070 from bbbradsmith/fix2060
RHS primary integer promotion must happen after loading the primary, not before
2023-05-03 23:57:19 +02:00
bbbradsmith
49bd568113 error test for integer constant too large for internal representation 2023-05-03 17:55:02 -04:00
bbbradsmith
dbdadaa3f3 accidental tabs, printf long expectts explicit %ld 2023-05-03 16:59:48 -04:00
bbbradsmith
2ac9c6f51e Suppress the floating point precision warning if an explicit cast is used 2023-05-03 16:53:51 -04:00
bbbradsmith
e3887d7ead Test to demonstrate availability of floating point constants, document the possibility. 2023-05-03 16:48:02 -04:00
bbbradsmith
7ff74b2c47 Give a better error for unsupported floating point arithmetic, instead of internal "Precondition violated" error. 2023-05-03 16:48:02 -04:00
bbbradsmith
52f0e6a29c Allow floating point constants to be converted to integer (warning if loss of precision) 2023-05-03 16:48:02 -04:00
bbbradsmith
a686d1fa8e Allow unary +/- for floating point constants 2023-05-03 16:48:02 -04:00
bbbradsmith
a109f475ed Fix broken/incomplete floating point parsing
- Fractional digit scale was broken
- Base was partially ignored
- Exponent sign was ignored
- Exponent for hex float is 2 not 10
2023-05-03 16:48:02 -04:00
bbbradsmith
9a502c69dc fix tab, braces for 1-line if, Expr->Ival is signed 2023-05-03 16:46:59 -04:00
Bob Andrews
83ff62d5e2
Merge pull request #2078 from bbbradsmith/line-endings
ca65 support for three line ending types: \r, \r\n, \n
2023-05-03 21:19:03 +02:00
Bob Andrews
f4676e11b4
Merge pull request #2083 from bbbradsmith/struct-passing
Improve struct size error message to include the detected size
2023-05-03 21:00:25 +02:00
Bob Andrews
6386788843
Merge pull request #2082 from cc65/revert-2080-revert-2072-struct-passing
Revert "Revert "Forbid 3-byte struct pass/return by value, document struct value pass/return""
2023-05-03 20:49:37 +02:00
bbbradsmith
440c91fad9 braces for 1-line if 2023-05-03 14:11:30 -04:00
Bob Andrews
ae7a1416fe
Revert "Revert "Forbid 3-byte struct pass/return by value, document struct value pass/return"" 2023-05-03 20:02:12 +02:00
bbbradsmith
1f18ab218e Improve struct size error message to include the detected size 2023-05-03 13:35:51 -04:00
Brad Smith
4e6b94de5c
braces 2023-05-03 12:19:05 -04:00
bbbradsmith
016008b6df ca65: Suppress '.size' error for multiply-defined symbols 2023-05-03 11:57:50 -04:00
Jeff Tranter
387d455cb4 Revised patch.
Uses code in source listing. Tested on a real OSI C1P machine.
2023-05-03 11:16:22 -04:00
Jeff Tranter
fdd4d35887
Merge branch 'cc65:master' into bootstrap-fix 2023-05-03 10:43:44 -04:00
Bob Andrews
59bd5fdd4c
Merge pull request #2071 from bbbradsmith/bug895_warningspam
bug895.c compliant token pasting syntax to remove warnings
2023-05-03 15:02:30 +02:00
Bob Andrews
0bded728ae
Merge pull request #2080 from cc65/revert-2072-struct-passing
Revert "Forbid 3-byte struct pass/return by value, document struct value pass/return"
2023-05-03 14:37:21 +02:00
Bob Andrews
6ffc4004d7
Revert "Forbid 3-byte struct pass/return by value, document struct value pass/return" 2023-05-03 14:24:13 +02:00
Bob Andrews
f3c0f7c6ce
Merge pull request #2074 from bbbradsmith/zp_override_not_suspicious
Explicit z: should suppress "Suspicious address expression" warning
2023-05-03 14:09:23 +02:00
Bob Andrews
7d9a736b7f
Merge pull request #2072 from bbbradsmith/struct-passing
Forbid 3-byte struct pass/return by value, document struct value pass/return
2023-05-03 13:57:09 +02:00
Bob Andrews
dd0e902a08
Merge pull request #2077 from bbbradsmith/doc-setbooloption-must-can
Document directives that use SetBoolOption "can" use +/- rather than "must"
2023-05-03 13:15:35 +02:00
Bob Andrews
88f581c796
Merge pull request #2076 from bbbradsmith/macro-axy-document
Don't use a,x,y in macro parameter example, document why not.
2023-05-03 13:10:57 +02:00
bbbradsmith
456fa9f963 cc65 document: both pass and return of structs are allowed 2023-05-03 05:36:37 -04:00
bbbradsmith
86e3a640d5 Support for three line ending types: \r, \r\n, \n.
#1894
2023-05-03 05:03:11 -04:00
bbbradsmith
2b60adfa11 Document directives that use SetBoolOption "can" use +/- rather than "must"
#1772
2023-05-03 03:26:10 -04:00
bbbradsmith
4d698bf18c Don't use a,x,y in macro parameter example, document why not.
#392
2023-05-03 03:05:14 -04:00
bbbradsmith
56c715af40 Error for struct/union with a duplicate member #2015 2023-05-03 01:14:27 -04:00
bbbradsmith
65f773f5ee Explicit z: should suppress "Suspicious address expression" warning #194 2023-05-03 01:01:21 -04:00
bbbradsmith
409235aee6 Optional warning for implicit constant conversion overflow 2023-05-02 22:27:28 -04:00
bbbradsmith
bf5b37a3b2 Error check for internal overflow of numerical constant
See bug #2026
2023-05-02 21:27:02 -04:00
bbbradsmith
bf22f94a43 struct pass and return by value test 2023-05-02 20:02:58 -04:00
bbbradsmith
af11d4d947 Document that struct-param is default off since: 3129266 2023-05-02 19:21:21 -04:00
bbbradsmith
e7046a02ff Disallow pass/return of 3-byte struct (#2022), document capability added in #1102. 2023-05-02 19:00:34 -04:00
Brad Smith
2c47ea45af
bug895.c compliant token pasting syntax to remove warnings
Gets rid of some unnecessary warning spam in the test log of lines like this:
```
bug895.c:95: Warning: Pasting formed "unsigned_long_14(", an invalid preprocessing token
```
2023-05-02 18:18:10 -04:00
bbbradsmith
1c26b1cf1b RHS primary integer promotion must happen after loading the primary, not before. See: #2060 2023-05-02 14:42:00 -04:00
Bob Andrews
805e98a7aa
Merge pull request #2027 from bbbradsmith/ca65_jmp_abs_wrap_cpu_filter
ca65 jmp (abs) wrap warning only applies to 6502, later CPUs do not have this bug
2023-05-02 12:52:03 +02:00
Bob Andrews
08223360d5
Update instr.c 2023-05-02 12:43:50 +02:00
Jeff Tranter
1fe39514bc Merge branch 'bootstrap-fix' of github.com:jefftranter/cc65 into bootstrap-fix 2023-05-01 10:13:52 -04:00
Jeff Tranter
4d97e30b55 Source listing in bootstrap.s is incorrect.
The OSI C1P alternative boot file format works, but the code in the
source listing does not match the ASCII-coded hex translation (which
is actually used). This is confusing to anyone trying to maintain the
code.

Also, the source code did not assemble when ASM is defined.

Also removed use of branch macros and an unnecessary "<" operator.

With these changes the source file should correctly match what
is used at run time.
2023-05-01 09:49:41 -04:00
Jeff Tranter
613ee94f44 Source listing in bootstrap.s is incorrect.
The OSI C1P alternative boot file format works, but the code in the
source listing does not match the ASCII-coded hex translation (which
is actually used). This is confusing to anyone trying to maintain the
code.

Also, the source code does not assemble when ASM is defined.

With these changes the source file should correctly match what
is used at run time.
2023-04-30 18:40:09 -04:00
Bob Andrews
e5f4ca6b89
Merge pull request #2058 from icepic/patch-1
Update lynxsprite.c
2023-04-19 15:07:16 +02:00
Janne Johansson
1f9594560e
Update lynxsprite.c
Remove compiler warning about (signed) char wrapping around to -1 when set to 255.
2023-04-19 09:15:03 +02:00
Bob Andrews
128b15a71e
Merge pull request #2051 from sodero/topic/disable_hardcoded_paths_on_amiga
Don't use hardcoded paths on Amiga
2023-04-08 17:40:47 +02:00
Ola Söder
2a7533268c Don't use hardcoded paths on Amiga
Hardcoded paths don't make sense on AmigaOS, AROS and MorphOS.
2023-04-07 23:44:30 +02:00
Christian Groessler
19349acdcf fix typo in README.md 2023-04-04 00:57:52 +02:00
Christian Groessler
ed4edd908b fix copy'n'paste typo 2023-04-04 00:40:33 +02:00
Bob Andrews
1f7318f527
Merge pull request #2042 from jefftranter/kim1-api-additions
Add Additional KIM-1 Functions
2023-03-30 20:23:54 +02:00
Jeff Tranter
3a5fbd34da Add KIM-1 functions to write to the 7-segment LED display and get
keypresses from the keypad.
Includes sample program illustrating how to use them.
Tested on real KIM-1 hardware.
2023-03-29 18:40:10 -04:00
Bob Andrews
d69117c0c1
Merge pull request #2037 from jefftranter/kim1-io-fixes
Fixes and improvements to KIM-1 i/o routines.
2023-03-29 22:41:34 +02:00
Bob Andrews
9fb4854f6c
Merge pull request #2040 from mooinglemur/20230328-cx16-r42
cx16: update RAM constants for ROM ver R42
2023-03-29 22:40:24 +02:00
mooinglemur
2dd558eae9 cx16: update RAM constants for ROM ver R42 2023-03-28 21:18:02 -07:00
Jeff Tranter
806ffe5675 Fixes and improvements to KIM-1 i/o routines.
Tested on real KIM-1 hardware.

read.s:
- Remove commented out line.
- Remove unused check for bell character.
- Remove echo of newline (hardware always echoes entered characters).
- This fixes gets() and fgets() so they return when CR is entered.

write.s:
- Fix check for adding return after linefeed (failed to work because OUTCHR changes A)
- Remove unused check for bell character.

kim1.inc:
- Add symbol for monitor entry

crt0.s:
- Jump to KIM-1 monitor by address rather than using BRK (which relies on vector being set in RAM)
2023-03-27 17:56:25 -04:00
Bob Andrews
f74775b841
Merge pull request #2036 from jefftranter/master
Make some documentation fixes for KIM-1 platform.
2023-03-27 17:57:14 +02:00
Jeff Tranter
fcbcbea4ad Make some documentation fixes for KIM-1 platform. 2023-03-27 09:23:40 -04:00
Bob Andrews
8692630369
Merge pull request #2032 from jedeoric/telestrat_lseek
[Telestrat Target]  Add fseek to telestrat target (Orix)
2023-03-19 11:51:24 +01:00
jede
c8c6fc6a40 add xfseek 2023-03-17 23:10:15 +01:00
Bob Andrews
7f1dd09bcb
Merge pull request #2028 from bbbradsmith/linker_test_overwrite
Linker test capability and overwrite segment tests
2023-03-09 18:20:48 +01:00
bbbradsmith
99220f60af test/asm readme val description revision 2023-03-07 18:53:30 -05:00
bbbradsmith
6be7c16013 linkter test with custom config should not use none.lib 2023-03-07 18:48:30 -05:00
bbbradsmith
4732e937ad overwrite segment tests
asm/listing linker CFG support
asm and asm/listing test documentation
2023-03-07 18:44:56 -05:00
bbbradsmith
8b818aac67 remove trailing space on segment "bytes" warning plural 2023-03-07 18:42:20 -05:00
bbbradsmith
016b03e356 ca65 jmp (abs) wrap warning only applies to 6502, later CPUs do not have this bug 2023-03-07 17:00:38 -05:00
Bob Andrews
c226e58a3c
Merge pull request #2007 from groessler/something_to_pull
fix for issue #1973 (printf("%c", '\0') doesn't _write '\0' to fd 0)
2023-03-04 13:30:18 +01:00
Bob Andrews
b9cf6266e7
Merge pull request #2010 from bbbradsmith/ca65_brk_optional_signature
optional BRK signature on all 6502 CPUs, not just 65816
2023-03-04 13:21:28 +01:00
Bob Andrews
c0559dd931
Merge pull request #2009 from bbbradsmith/ca65_feature_disable
ca65: allow .feature to both enable and disable
2023-03-04 13:08:18 +01:00
Bob Andrews
34189b85ab
Merge pull request #2013 from Movax12/fix-endmacro-not-at-start-of-line
Fix endmacro not at start of line
2023-03-03 12:29:30 +01:00
mvax
c092f57b73 Consistent case for .endmacro in comments, remove trailing spaces 2023-03-02 17:31:55 -05:00
mvax
90d5f41b37 Consistent case for .endmacro in comments 2023-03-02 17:26:05 -05:00
mvax
3f2129894b Fix .endmacro not at the start of the line. Rename test files. 2023-03-02 15:12:30 -05:00
Bob Andrews
6fe649ecab
Merge pull request #1994 from Compyx/make-avail-sanity-check
make avail: check for presence of binaries before creating symbolic links
2023-03-02 18:56:04 +01:00
mvax
98d2d9ee4e Fix .endmacro not at the start of the line. Fix style 2023-03-01 21:59:00 -05:00
mvax
0b71d1cfff Fix .endmacro not at the start of the line. Fix last commit 2023-03-01 21:55:14 -05:00
mvax
1c60bc5009 Fix .endmacro not at the start of the line. Fix style, add doc., add tests 2023-03-01 21:47:50 -05:00
mvax
993054c9d3 Fix .endmacro not at the start of the line. .ENDMACRO error with line number of macro definition start 2023-03-01 11:58:42 -05:00
mrdudz
ffa83c32a4 clean-up of driver return codes 2023-02-26 20:03:41 +01:00
mvax
7d894fbe04 Fix .endmacro not at the start of the line. Fix comment 2023-02-25 13:52:13 -05:00
mvax
4b29615f2b Fix .endmacro not at the start of the line. Allow empty macro 2023-02-25 13:49:19 -05:00
mvax
0a05f78d47 Fix .endmacro not at the start of the line. 2023-02-25 13:38:02 -05:00
mvax
429e90dffd Fix .endmacro in a .define in a macro body 2023-02-25 12:42:26 -05:00
mvax
e87325033d Fix .endmacro in a .define in a macro body 2023-02-25 12:39:36 -05:00
bbbradsmith
3d41a5b516 allow immedite style syntax variation for BRK signature byte 2023-02-25 08:23:47 -05:00
bbbradsmith
3f8252311e 65C816 document brk optional signature, and mvn/mvp syntax 2023-02-24 23:00:30 -05:00
bbbradsmith
cd8fa39066 optional BRK signature on all 6502 CPUs, not just 65816 (also COP) 2023-02-24 22:40:29 -05:00
bbbradsmith
c2bc40f213 test for all ca65 .feature options 2023-02-24 20:00:56 -05:00
bbbradsmith
230230819e document the undocumented test/asm/listing behaviours 2023-02-24 19:35:38 -05:00
bbbradsmith
da150aeeac allow .feature to both enable and disable 2023-02-24 18:00:58 -05:00
Bob Andrews
a299ef4210
Merge pull request #1995 from bbbradsmith/overwrite_segment_fix
ld65 fix overwrite segments adding wrong padding or causing internal errors
2023-02-24 21:27:33 +01:00
Bob Andrews
302d6ee4a4
Merge pull request #2001 from bbbradsmith/ca65_long_jsr_jmp_rts
ca65 jsr/jmp/rts will not promote to jsl/jml/rtl by default, new feature long_jsr_jmp_rts to re-enable this ability
2023-02-24 19:34:37 +01:00
Bob Andrews
12fc59351e
Merge branch 'master' into ca65_long_jsr_jmp_rts 2023-02-24 19:25:32 +01:00
Bob Andrews
e105f6049d
Merge pull request #2003 from bbbradsmith/large_align_false_positive_fix
supress spurious "large alignment" warnings
2023-02-24 16:32:41 +01:00
Bob Andrews
d810b12c6d
Merge pull request #1998 from bbbradsmith/ca65_local_scope_error_info
ca65 improve error for unclosed scopes
2023-02-24 16:24:05 +01:00
Bob Andrews
221e6b53ef
Merge pull request #1992 from bbbradsmith/optstackops_toscmpbool_fix
OptStackOps label migration fix
2023-02-24 13:43:07 +01:00
Bob Andrews
d808088c64
Merge pull request #1997 from bbbradsmith/doc_ca65_a8_a16_description
ca65 doc for A8/A18/I8/I16: use "assume" instead of "switch" to avoid implying that a hardware state is changed
2023-02-24 13:04:48 +01:00
Bob Andrews
0c462467e3
Merge pull request #1999 from bbbradsmith/ca65_ld65_warnings_as_errors
--warnings-as-errors for ca65 and ld65
2023-02-24 13:02:49 +01:00
Christian Groessler
fedfc3443d fix for issue #1973 (printf("%c", '\0') doesn't _write '\0' to fd 0) 2023-02-24 02:12:19 +01:00
bbbradsmith
ba038e921f jmp (abs) page wrapping should be an error, not a warning, also only applies to 6502 CPU 2023-02-21 17:06:21 -05:00
Bob Andrews
ac987e2439
Merge pull request #2000 from bbbradsmith/doc_cc65_intern_linker_config
Document expected linker configuration and special segments used by cc65
2023-02-21 22:00:23 +01:00
bbbradsmith
23cc295b08 improve description of large-alignment warning 2023-02-21 07:32:38 -05:00
bbbradsmith
13f1d37403 suppress spurious "large alignment" warning when the combined alignment is not larger than any of the explictly requested ones 2023-02-21 06:48:46 -05:00
bbbradsmith
2cdab999f5 dasm test extend 65816.info to include added code 2023-02-21 05:22:28 -05:00
bbbradsmith
4b29d257d9 fix dasm test65816 which relied on JMP automatic promotion, add test of new long_jsr_jmp_rts and smart 2023-02-21 04:38:42 -05:00
bbbradsmith
ccf3994e3b ca65 jsr/jmp/rts will not promote to jsl/jml/rtl by default, but can still be enabled with new feature long_jsr_jmp_rts 2023-02-21 04:00:34 -05:00
bbbradsmith
99ecd9b69d Document expected linker configuration and special segments used by cc65 2023-02-21 00:53:55 -05:00
bbbradsmith
45d0d60349 --warnings-as-errors for ca65 and ld65 2023-02-20 22:24:26 -05:00
bbbradsmith
f1134cc5f1 ca65 improve error for unclosed scopes
See: #1779
2023-02-20 20:49:04 -05:00
bbbradsmith
864eecf7c3 ca16 doc for A8/A18/I8/I16: use "assume" instead of "switch" to avoid implying that a hardware state is changed. See: #1759 2023-02-20 20:08:58 -05:00
compyx
68ce335f59 Replace shell code with GNU Make conditionals and functions
Use `ifeq` to provide two rules for the `avail` target: one that reports
an error if any of the symlink targets are missing and one that installs
the symlinks for the targets if they're all present.
2023-02-19 19:17:45 +01:00
Bob Andrews
d0f17ba602
Merge pull request #1996 from bbbradsmith/negative_memory_size_error
ld65 error if computed memory size is negative
2023-02-19 18:45:09 +01:00
Bob Andrews
0ff18510c3
Merge pull request #1993 from bbbradsmith/sim65_pvopen_safety
sim65 path length safety for PVOpen
2023-02-19 16:27:46 +01:00
bbbradsmith
3df5b9f41f relocate dasm test start-addr to avoid producing negative memory area size with none.cfg (conflicted with stack position at $8000) 2023-02-19 09:30:07 -05:00
bbbradsmith
5bc8ff98de error if computed memory size is negative 2023-02-19 09:01:17 -05:00
bbbradsmith
4fc19a3d4c ld65 overwrite segment should pad with fill value if the desired seek position is beyond the end of the file so far 2023-02-19 08:37:07 -05:00
bbbradsmith
2ac055383f ld65 fix overwrite segments adding wrong padding or causing internal errors 2023-02-19 08:14:04 -05:00
compyx
5c12659cf4 make avail: check for presence of binaries before creating symbolic
links

To avoid creating broken symlinks, first check if the binaries exists in
bin/ and exit when they don't, with a message to first run `make`.
2023-02-19 14:01:14 +01:00
bbbradsmith
4d30333099 sim65 path length safety for PVOpen 2023-02-19 05:31:46 -05:00
bbbradsmith
4e411e8526 Opt_a_tosicmp likely has a bug which will incorrectly migrate a label on a replaced op in one case. 2023-02-18 00:13:34 -05:00
bbbradsmith
78263cd24b Fix OptStackOps label migration case for toscmpbool, add test case 2023-02-17 23:48:32 -05:00
Bob Andrews
c097401f8b
Merge pull request #1991 from spiro-trikaliotis/fix-msys2-test
Remove .exe from file output
2023-02-17 18:29:39 +01:00
Spiro Trikaliotis
727b3288d6 Remove .exe from file output
Whenever a tool like ld65 wants to output its name into a log file, it
uses the name of command-line parameter 0. However, this parameter also
includes the .exe suffix if it is on Windows.

This patch removes the .exe suffix, so that the output is clean and
consistent across platforms.

This fixes #1990.
2023-02-17 17:22:55 +01:00
Bob Andrews
544a49c060
Merge pull request #1983 from mrdudz/fix1941
fix for #1941
2023-02-05 17:28:22 +01:00
mrdudz
8ac5e2f7b6 fix devicestr call, so related posix function work on cbm targets 2023-01-28 15:08:14 +01:00
mrdudz
1764b7aca9 fix for #1941, taken from 22d435b689 2023-01-28 12:29:05 +01:00
Bob Andrews
6267db6b01
Merge pull request #1980 from TommiRommi/patch-1
fixed spelling mistake
2023-01-28 11:29:50 +01:00
tomas
1d73c8d259
Update typeconv.c 2023-01-27 16:53:36 +00:00
tomas
ed909dba1d
fixed spelling mistake
there was a spelling mistake in one of pointer warnings
2023-01-27 10:52:20 +00:00
Christian Groessler
60f56c43c7 some documentation fixes 2023-01-18 11:55:52 +01:00
Bob Andrews
dbefd12571
Merge pull request #1968 from mseabold/master
Allow line_bynumber to return more than one result
2023-01-18 04:34:58 +01:00
Matt Seabold
3360734487 Update comment to match in source file 2023-01-17 22:17:23 -05:00
Matt Seabold
9ee0c835e5 Update documentation for line_bynumber 2023-01-17 22:15:27 -05:00
Bob Andrews
645fa982af
Merge pull request #1975 from marianodominguez/add_sound_documentation
add documentation for _sound.
2023-01-17 22:41:12 +01:00
Bob Andrews
cc9b91363f
Merge pull request #1971 from polluks2/patch-8
Create disk of GEOS samples
2023-01-17 22:36:53 +01:00
Mariano Dominguez
c6d183c31b add documentation for _sound. 2023-01-16 19:09:01 -08:00
Christian Groessler
67564d83c8 libsrc/atari/sound.s: fix indentation 2023-01-16 18:01:11 +01:00
Christian Groessler
c2e8f75bec
Merge pull request #1962 from marianodominguez/feature_add_sound_command
add sound command
2023-01-16 17:59:34 +01:00
Mariano Dominguez
40656ffb6e more style 2023-01-15 17:05:24 -08:00
Mariano Dominguez
6236e82850 change storage to pager zero
fix bug that kills keyboard.
2023-01-15 17:00:05 -08:00
polluks2
a5a8225a58
Create disk of GEOS samples
You don't need to convert anymore.
2023-01-14 13:49:16 +01:00
Matt Seabold
8ea0dfe453 Allow line_bynumber to return more than one result 2023-01-11 20:18:51 -05:00
Mariano Dominguez
42c39c6bfc remove trailing spacew, use correct user 2023-01-10 11:26:12 -08:00
Mariano Dominguez
27ecb555ea
Rename sound to _sound.
remove extra comments.
2023-01-10 11:16:36 -08:00
Bob Andrews
7979f8a41f
Merge pull request #1965 from polluks2/patch-7
Wrong file "geover.cvt"
2023-01-08 18:54:27 +01:00
polluks2
e4d9dbf0c0
Wrong file "geover.cvt"
See line 106
2023-01-08 17:47:04 +01:00
Mariano Dominguez
bf9fb6dcdb increase delay in sound test 2023-01-06 11:23:33 -08:00
Mariano Dominguez
196962adac remove lasy pesky space 2023-01-06 10:54:16 -08:00
Mariano Dominguez
2a961a870b add target test 2023-01-06 09:56:15 -08:00
Mariano Dominguez
c3e1ae3478 last trailing space 2023-01-05 21:36:44 -08:00
Mariano Dominguez
8c97b54f5d more trailing spaces :( 2023-01-05 21:34:43 -08:00
Mariano Dominguez
658c1ad711 only missing space 2023-01-05 21:33:40 -08:00
Mariano Dominguez
85f657b35e missing space 2023-01-05 21:30:31 -08:00
Mariano Dominguez
4e8b18c035 missing tab 2023-01-05 21:29:33 -08:00
Mariano Dominguez
29a80065cc fix tab indentation 2023-01-05 21:27:54 -08:00
Mariano Dominguez
30df733c31 remove dangling spaces 2023-01-05 21:20:16 -08:00
Mariano Dominguez
fa05294054 add newline for style 2023-01-05 21:16:58 -08:00
Mariano Dominguez
f9024d132a add sound command
this behives the same as BASIC

sound(voice, pitch, distortion, volume)
2023-01-05 21:12:58 -08:00
Bob Andrews
e944a30b6a
Merge pull request #1955 from davepl/master
Add KIM-1 support
2023-01-04 19:10:14 +01:00
Rutger van Bergen
7ea2d8ab18
Address review comment 2023-01-04 19:05:08 +01:00
Bob Andrews
072f4188ac
Merge pull request #1939 from acqn/TypeFix
[cc65] Renamed/added/removed some C type facility and fixed a few comments
2023-01-04 19:01:23 +01:00
Bob Andrews
167e940361
Merge pull request #1958 from karrika/sprite
[sp65] Sprite generation fixed for 1BPP Lynx sprites. Fix for #1957
2023-01-04 18:16:46 +01:00
Bob Andrews
ce3a987d2d
Merge pull request #1956 from karrika/master
[sp65] Add support for 4 pixels per plane. Add feature for current GIMP pcx files.
2023-01-04 17:42:38 +01:00
Bob Andrews
9cda019669
Merge pull request #1960 from karrika/palette
[sp65] New feature to extract the palette from the bitmap. Lynx format implemented. #1959
2023-01-04 17:25:34 +01:00
Bob Andrews
36a56faa14
Merge pull request #1961 from clbr/da816
Teach da65 about table units
2023-01-04 17:21:26 +01:00
karri
e2c6d06b0d Update dosc 2023-01-04 12:14:37 +02:00
Karri Kaksonen
34aa53affb
Merge branch 'cc65:master' into master 2022-12-30 17:48:04 +02:00
Lauri Kasanen
56a414593a Teach da65 about table units 2022-12-30 17:25:47 +02:00
Bob Andrews
cce119a9e7
Merge pull request #1871 from clbr/da816
da65 support for 65816
2022-12-30 15:34:40 +01:00
karri
878a20ab59 Fix dangling space 2022-12-30 15:27:17 +02:00
karri
b6d06288e0 Fix warnings 2022-12-30 15:20:54 +02:00
karri
f85951ab24 Add to build 2022-12-30 15:06:22 +02:00
karri
4117e94ed5 Add palette extraction functions 2022-12-30 14:44:18 +02:00
karri
c2e9e5961d Add fixed Lynx sprite generation 2022-12-30 12:57:50 +02:00
karri
f6b3bdda21 Add fixed Lynx sprite generation 2022-12-30 12:36:49 +02:00
karri
b4aa853e6f Add fixed Lynx sprite generation 2022-12-30 12:21:49 +02:00
karri
aed6591b19 Add new method GetBitmapBPP as we need it for sprite math 2022-12-30 12:16:46 +02:00
karri
ebd1381030 Use same style in comments 2022-12-29 21:55:25 +02:00
karri
9cb0667260 Use same style in comments 2022-12-29 21:53:50 +02:00
karri
5ec5050af2 Remove redundant code 2022-12-29 21:48:28 +02:00
karri
05766d4bfe Add support for 4 pixels per plane 2022-12-29 19:40:00 +02:00
karri
e953c1aa08 Add support for 4 pixels per plane 2022-12-29 19:28:16 +02:00
karri
817d129be8 Add support for 4 pixels per plane 2022-12-29 19:18:00 +02:00
Rutger van Bergen
37954dffe7 Specify supported tests 2022-12-26 20:26:29 +01:00
Rutger van Bergen
a8c6409689
Delete kimHello 2022-12-26 19:54:00 +01:00
Rutger van Bergen
ae23e47eb5
Merge branch 'cc65:master' into master 2022-12-26 13:57:10 +01:00
Oliver Schmidt
de30a57c0c Added minimalistic terminal program.
So far there was no sample code at all making use of the serial drivers.
2022-12-23 16:20:26 +01:00
Oliver Schmidt
1daa445310 Fixed recently introduced addressing mode bug. 2022-12-22 22:09:23 +01:00
Oliver Schmidt
d90c7e9853 Introduced the notion of a standard serial driver.
There's no target with more than one serial driver (and I don't see that change anytime soon) so it's a no-brainer to apply the standard driver concept to serial drivers.
2022-12-22 18:13:24 +01:00
mrdudz
d9ebfa7192 all good things are three 2022-12-11 12:29:11 +01:00
mrdudz
2b941e255a move test. oops 2022-12-11 12:22:41 +01:00
mrdudz
ddab16007a run branch fixer again after replacing BRA by JMP. should fix #1936 2022-12-11 12:08:30 +01:00
Bob Andrews
299f764c5d
Merge pull request #1942 from IrgendwerA8/patch-1
Fixed floating point naming in Contributing.md
2022-12-07 08:21:24 +01:00
Irgendwer
78e6bcf643
Update Contributing.md 2022-12-07 00:20:20 +01:00
Bob Andrews
dae4b2d9b0
add note on optimizer 2022-12-06 14:47:03 +01:00
mrdudz
bad961b36f add missing newline 2022-11-28 06:34:05 +01:00
mrdudz
61ee5fe1d5 test for bug #1933 2022-11-28 06:26:47 +01:00
mrdudz
15eb1c5f5e support the msvc specific I64 specifier in our sprintf 2022-11-28 06:26:14 +01:00
mrdudz
05c2530243 it should have been I64x, not I64u 2022-11-28 06:25:45 +01:00
Bob Andrews
765e7d1efa
Merge pull request #1927 from smuehlst/osi-conio-chardefs
Character defines for osic1p target
2022-11-28 04:15:34 +01:00
Stephan Mühlstrasser
a46de2f6d4 Fix macro order 2022-11-20 15:22:37 +01:00
Stephan Mühlstrasser
484e1dc9fd Character defines for osic1p target
Added character definitions for line graphics and enter character
for osic1p target.
2022-11-20 13:30:57 +01:00
Stephan Mühlstrasser
ec652367d0 Support targets without cursor keys
Not all targets to have cursor keys on their keyboard. Add corresponding
#ifdefs to the conio test program.
2022-11-20 13:28:45 +01:00
Bob Andrews
e4f01a260d
Merge pull request #1844 from mrdudz/underscores
Fix name conflicts in standard headers by adding more Underscores
2022-11-19 22:09:03 +01:00
mrdudz
9a9bf9f2ea update note on identifiers 2022-11-19 19:06:14 +01:00
mrdudz
d6c37a757d Merge branch 'master' into underscores 2022-11-19 17:11:11 +01:00
Bob Andrews
3513342445
Merge pull request #1913 from acqn/Diagnostics
[cc65] Improved diagnostics on div-by-zero/bitwise-shift in unevaluated context and overall
2022-11-18 19:55:51 +01:00
Bob Andrews
a0a9cfdcd3
Merge pull request #1918 from acqn/PPFix
[cc65] Fixed bitwise-shift in preprocessor
2022-11-18 19:09:55 +01:00
Bob Andrews
93b015660d
Merge pull request #1899 from acqn/TypeCmpFix
[cc65] Fixed compatibility checks on "pointer to pointer" vs "pointer to array" etc.
2022-11-18 19:04:35 +01:00
mrdudz
eb8dbcd04d really update all jobs 2022-11-18 19:00:35 +01:00
mrdudz
9d78e10d4b update actions to use node16 instead of node12 2022-11-18 18:39:58 +01:00
mrdudz
b166dc4261 hopefully thats it 2022-11-18 18:19:31 +01:00
mrdudz
4c047bf11e yawn 2022-11-18 18:13:54 +01:00
mrdudz
bbe8c62e9d coffee 2022-11-18 18:13:15 +01:00
mrdudz
a6feeac5ed or msvc I64u ? 2022-11-18 18:10:07 +01:00
mrdudz
ca94cfcbac that perhaps? 2022-11-18 18:03:40 +01:00
mrdudz
4c6fddd300 i want a cookie each time i do this 2022-11-18 17:58:12 +01:00
mrdudz
feb839e7f0 narrisch werd i! 2022-11-18 17:55:22 +01:00
mrdudz
8a9029d393 hnnngg 2022-11-18 17:50:32 +01:00
mrdudz
c6ecee0748 Babydino sagt: nochmal! 2022-11-18 17:45:21 +01:00
mrdudz
5fb20dec91 commit message 2022-11-18 17:41:22 +01:00
mrdudz
5638e0916a spül es noch einmal, Sam 2022-11-18 17:39:35 +01:00
mrdudz
d1b7768064 yeah! 2022-11-18 17:27:51 +01:00
mrdudz
d68598165c and another 2022-11-18 17:24:05 +01:00
mrdudz
d459b5da87 another try 2022-11-18 17:20:44 +01:00
mrdudz
fdcc683997 shoot in the dark, try to fix ming build issue 2022-11-18 17:13:37 +01:00
Bob Andrews
0408d71cc5 fixes so "make clean" will work without failing on cmd.exe 2022-11-18 16:28:25 +01:00
Bob Andrews
1ce044c2b4
Merge pull request #1916 from spiro-trikaliotis/split-asm-listing-test-stdout-stderr
Split stdout and stderr in test/asm/
2022-11-18 16:17:20 +01:00
Bob Andrews
88b926e914
Merge pull request #1917 from acqn/CodeGen
[cc65] Clearer comments on and usage of code generator flags with type conversions in the primary register
2022-11-13 12:51:17 +01:00
acqn
dadca9e033 Fixed bitwise-shift in PP. 2022-11-13 16:32:41 +08:00
acqn
3bcfa735cb clearer comments on and usage of code generator flags with type conversions in the primary register. 2022-11-13 14:57:48 +08:00
Spiro Trikaliotis
d7a804d120 Split stdin and stdout in test/asm/
Some tests pipe the stdout and stderr of the compiler or assembler into
a file and compare the result with a reference. This has the subtle
problem that both stdout and stderr and buffered i/o streams that may or
may not work the same on different OSs or even shells. That means the
order of the lines in the resulting file is not guaranteed.

In practise it is "mostly" not an issue, but "we" still stumbled about
one test where different behaviour can be triggered depending on running
it in cmd.exe or bash (msys): test/asm/listing output of
010-paramcount.bin differs from the reference output when running the
test from cmd.exe.

The solution is most likely to have two reference files and not redirect
into one file.

This patch fixes the issue (cf. #1912) for the directory test/asm/.
2022-11-12 23:12:25 +01:00
acqn
7b436e9823 Added tests for #1895 fix. 2022-11-13 01:01:24 +08:00
acqn
9d693d2c80 Warnings instead of errors for division-by-zero/modulo-with-zero in evaluation. 2022-11-12 22:13:56 +08:00
acqn
cc177208b4 Added tests for diagnostics in unevaluated context. 2022-11-12 21:05:01 +08:00
acqn
73897aface Additional check for out of ranges of bit-fields in bitwise-shifts. 2022-11-12 12:36:22 +08:00
acqn
75be73cc8d Added utility functions to acquire bit width of types. 2022-11-12 12:32:27 +08:00
acqn
d0c9b2de99 Added basic shift count check for <<= and >>= operations. 2022-11-12 12:34:16 +08:00
acqn
2c3ca15d90 Fixed marking unevaluated subexpressions for conditional operator. 2022-11-12 12:32:27 +08:00
acqn
3af77e7333 Improved error recovery in declarations with curly braces. 2022-11-12 12:28:29 +08:00
acqn
eb595b1f5f Improved error recovery with K&R-style function declarations. 2022-11-12 12:28:27 +08:00
acqn
894ba49cb5 Improved error messages about missing type specifiers. 2022-11-12 12:28:24 +08:00
acqn
b0ef3572ea Improved error messages about missing identifiers. 2022-11-12 12:28:22 +08:00
Bob Andrews
6924d44564
Merge pull request #1911 from acqn/TypeFix
[cc65] Organized type-related stuff better
2022-11-11 22:05:45 +01:00
Bob Andrews
ec2688b50e
Merge pull request #1910 from acqn/DeclFix
[cc65] Renamed a few functions and struct used for declaration parser
2022-11-11 21:41:04 +01:00
Bob Andrews
ace39197e5 move test to test/ref 2022-11-11 21:22:20 +01:00
Bob Andrews
9c48c0ab8a
Merge pull request #1900 from acqn/Diagnostics
[cc65] Fixed endlessly repeated error messages when a declaration lacks a required identifier
2022-11-11 21:08:53 +01:00
Bob Andrews
ebb33ee8b4 fix problem with copy command in cmd.exe 2022-11-11 20:54:38 +01:00
acqn
9253f0d6bc Added testcase for #1889. 2022-11-10 02:11:54 +08:00
mrdudz
a09053ce0b make test work again also on linux. why did this not break the github actions? 2022-11-09 01:07:36 +01:00
acqn
e10b5fd79b Renamed a few functions and struct used for declaration parser. 2022-11-08 14:42:52 +08:00
Bob Andrews
800c30604f
Merge pull request #1909 from silverdr/master
Updated ATTR_UNUSED() for clang
2022-11-06 14:06:56 +01:00
Silver Dream !
2dcccae036 Updated ATTR_UNUSED() for clang 2022-11-06 11:27:08 +00:00
mrdudz
5d1ad05cb8 oops 2022-11-05 20:48:53 +01:00
mrdudz
e5777f7ccf add ATTR_UNUSED on the flags variable 2022-11-05 20:38:07 +01:00
mrdudz
1452d8164d add ATTR_UNUSED and ATTR_NORETURN 2022-11-05 20:37:41 +01:00
Bob Andrews
d066fbbcf5
Merge pull request #1908 from mrdudz/maketweaks
cmd.exe related tweaks
2022-11-05 19:55:53 +01:00
mrdudz
bf924395fb fix some bashisms, hopefully makes "check" work again in cmd.exe 2022-11-05 19:41:02 +01:00
Bob Andrews
680aacd4a7
Merge pull request #1907 from acqn/InputLineInfo
[cc65] Renamed some misleading functions relevent with input file info
2022-11-05 18:45:17 +01:00
mrdudz
699ba1fbd6 when running on cmd.exe only print a message, the style tests
require bash
2022-11-05 16:42:01 +01:00
Bob Andrews
53b62184e8
Merge pull request #1905 from acqn/DeclFix
[cc65] Fixed some missing declaration features
2022-11-05 16:03:09 +01:00
Bob Andrews
fe43e13706
Merge pull request #1906 from acqn/Testcase
[cc65] Renamed several tests
2022-11-05 15:35:18 +01:00
acqn
e608f8a94f Renamed several tests. 2022-11-05 18:30:02 +08:00
Bob Andrews
fef8436eb4
Merge pull request #1881 from acqn/ExprDesc
[cc65] Organized ExprDesc functions and fixed several comments
2022-11-04 14:22:22 +01:00
Bob Andrews
7146dbc87d
Merge pull request #1879 from acqn/SymEntryFix
[cc65] SymEntry cleanups
2022-11-04 14:06:47 +01:00
mrdudz
79fd078ae3 add check for line endings containing CR. 2022-11-03 18:27:10 +01:00
mrdudz
cc450706d1 testcase related to bug #1888 2022-11-03 18:03:47 +01:00
mrdudz
44b2e4f331 added examples for tests that compare the compiler output with a reference 2022-11-03 17:40:13 +01:00
acqn
8a7f566387 Fixed support for storage class specifiers after type specifiers. 2022-11-03 21:46:42 +08:00
acqn
991af3755b Added support for _Static_assert in unions. 2022-11-03 21:46:41 +08:00
Lauri Kasanen
9aae1efd03 Add a da65 65186 test 2022-11-03 08:17:51 +02:00
Lauri Kasanen
3ea999f034 Correct mvn, mvp, pei 2022-11-03 08:17:51 +02:00
Lauri Kasanen
b90bf258e2 Implement far override 2022-11-03 08:17:51 +02:00
Lauri Kasanen
db351b4228 Output remaining long labels 2022-11-03 08:17:51 +02:00
Lauri Kasanen
65907b1f10 Output MX states 2022-11-03 08:17:51 +02:00
Lauri Kasanen
4b04f81d37 Fix jsl length 2022-11-03 08:17:51 +02:00
Lauri Kasanen
1294c1c253 Implement changing-size opcodes 2022-11-03 08:17:51 +02:00
Lauri Kasanen
e8ee8435e9 Add addrMode to RANGE 2022-11-03 08:16:45 +02:00
Lauri Kasanen
89fc5e30c4 Remove unused and conflicting value 2022-11-03 08:15:48 +02:00
Lauri Kasanen
ea924ededd Teach attrtab, labels and comments about long addresses 2022-11-03 08:15:48 +02:00
Lauri Kasanen
67384a29b7 Start on 65816 2022-11-03 08:08:38 +02:00
Bob Andrews
0eba33ee74
Merge pull request #1897 from acqn/TernaryFix
[cc65] Fixed errors in the conditional operator "? :" parser
2022-11-02 18:13:45 +01:00
Bob Andrews
37efb40c69
Merge pull request #1898 from acqn/PPFix
[cc65] Fixed '\\' + newline
2022-11-02 18:09:04 +01:00
Bob Andrews
d151a1e38a
Merge pull request #1902 from silverdr/master
Silencing confusing util/zlib 'warning' target
2022-11-02 18:00:53 +01:00
Silver Dream !
c90d078fb7 Silencing confusing util/zlib 'warning' target 2022-11-02 16:43:21 +00:00
Bob Andrews
5fd2b6fe4b
Merge pull request #1896 from acqn/EnumFix
[cc65] Fixed diagnostic messages on enumerator overflow
2022-11-02 17:34:31 +01:00
Bob Andrews
eede412959
Merge pull request #1885 from clbr/da65-range-end
Allow specifying range end as a size
2022-11-02 17:15:38 +01:00
acqn
aa5d44b2b0 Fixed endlessly repeated error messages when a declaration lacks a required identifier. 2022-11-02 23:58:20 +08:00
acqn
9b39c3f949 Fixed garbage enum tag name appeared in diagnostic messages if the enum tag declaration failed. 2022-11-02 23:58:18 +08:00
acqn
d2f74db4d8 Fixed compatibility checks on "pointer to pointer" vs "pointer to array" etc. 2022-11-02 22:44:57 +08:00
acqn
deb5e97732 Fixed diagnostic messages on enumerator overflow.
An enumerator that would be incremented greater than ULONG_MAX now causes an error.
2022-11-02 14:22:21 +08:00
acqn
e9413567d7 Renamed several functions relevent with input file info. 2022-11-02 14:16:15 +08:00
acqn
8fb2576626 Fixed processing '\\' followed with a newline and line number output (-E) with it. 2022-11-02 14:09:15 +08:00
acqn
d84cc2d122 Fixed errors in the conditional operator "? :" parser. 2022-11-02 13:56:55 +08:00
Lauri Kasanen
c95c9c2749 Allow specifying range end as a size 2022-10-27 18:20:37 +03:00
acqn
b81e54c1d2 Organized ExprDesc functions and fixed several comments. 2022-10-24 14:55:39 +08:00
acqn
03ceeb4ad1 Removed warning on implicit "return 0" in C99 standard main function in default cc65 mode. 2022-10-22 12:45:51 +08:00
Bob Andrews
ad7c5a6617
Merge pull request #1878 from clbr/sim65opt
Speed up sim65 by 10%
2022-10-17 17:46:11 +02:00
Lauri Kasanen
b052e64089 Speed up sim65 by 10% 2022-10-17 13:32:38 +03:00
Bob Andrews
34ff99aef0
Merge pull request #1877 from bbbradsmith/integer_constant_warning_rephrase
Rephrasing warnings for suspicious decimal integer constants
2022-10-16 22:15:59 +02:00
Bob Andrews
89031594eb
Merge pull request #1876 from bbbradsmith/constant_overflow_warning
Emit warning for signed integer constant overflow
2022-10-16 22:15:22 +02:00
Bob Andrews
b2238fdcd4
Merge pull request #1868 from acqn/PPFix
[cc65] Fixed and improved C preprocessor
2022-10-16 19:02:23 +02:00
Bob Andrews
3aadf6c66e
Merge pull request #1867 from acqn/Diagnostics
[cc65] Diagnostics improvements
2022-10-16 18:26:26 +02:00
bbbradsmith
66698d4b1a Rephrasing warnings for suspicious decimal integer constants 2022-10-14 16:47:11 -04:00
bbbradsmith
4540205b0d Emit warning for signed integer constant overflow 2022-10-13 23:49:07 -04:00
Bob Andrews
4ed31cec69
Merge pull request #1870 from clbr/postproc-compilefix
Fix compilation after the postproc merge
2022-10-12 21:44:46 +02:00
Bob Andrews
f1612218a3
Merge pull request #1874 from clbr/sprintf-clarify
Clarify sprintf-test's output so it doesn't look like the entire test…
2022-10-12 17:54:30 +02:00
Lauri Kasanen
1e6279aee5 Clarify sprintf-test's output so it doesn't look like the entire test bench summary 2022-10-12 18:38:33 +03:00
Lauri Kasanen
d52ef67d51 Fix compilation after the postproc merge 2022-10-12 10:28:14 +03:00
acqn
e57c409894 Fixed TypeHasAttrData(), GetSignedType() and GetUnsignedType(), none in use yet though. 2022-10-12 13:13:15 +08:00
acqn
45da20e770 Fixed CheckedSizeOf() for unknown-size types (no such use case yet though). 2022-10-12 13:13:37 +08:00
acqn
1dccd1333b Added more type utility functions.
Changed result of GetBasicTypeName() for unknown types from "type" to "<type>".
2022-10-12 13:10:17 +08:00
acqn
cf3a0c4a30 Corrected and entailed comments and cleaned up code with type comparison. 2022-10-13 13:45:22 +08:00
acqn
01d2b809a1 Renamed struct Segments to SegContext as well as some related functions. 2023-10-21 23:41:36 +08:00
acqn
5fd9169904 Renamed type facility functions for deciding code generation type flags. 2022-10-12 13:10:17 +08:00
acqn
a4a1230c62 Renamed some C type facility and fixed a few comments.
Added some new C type code facility.
Removed some unused type predicates.
2022-10-12 13:10:17 +08:00
acqn
feaedc5b50 Better organized stuff related to C types. 2022-10-12 13:10:17 +08:00
acqn
a2dfa7c721 More consistent names for SymEntry functions. 2022-10-12 13:10:17 +08:00
acqn
164eb198ce Moved type facility functions for deciding code generation type flags. 2022-10-12 13:10:17 +08:00
acqn
d1e84a6dae Avoided unnecessary BSS name duplication for tentative global variables. 2022-10-11 14:23:21 +08:00
acqn
2cda47cd36 More descriptive names for SymEntry usage. 2022-10-11 14:14:48 +08:00
acqn
959be2c98c SymEntry struct cleanups. 2022-10-11 14:14:38 +08:00
Bob Andrews
71d64a3c1c
Merge pull request #1857 from acqn/PPFix
[cc65] Improved preprocessor
2022-10-09 19:00:07 +02:00
Bob Andrews
a169e67e43
Merge pull request #1863 from acqn/LinkageFix
[cc65] Fixed symbol visibility and usage problems with extern/static declarations
2022-10-09 18:59:12 +02:00
Bob Andrews
911ff40f6b
Merge pull request #1862 from acqn/Testcase
[cc65] Renamed some more testcases
2022-09-30 16:50:02 +02:00
acqn
9eab36b95a Fixed block-scope extern declarations visibility.
Fixed missing file-scope static function codegen output in a rare care.
2022-09-30 14:32:08 +08:00
acqn
f6003b8e8c Renamed some testcases. 2022-09-30 09:41:54 +08:00
acqn
9900e7361d #pragma message now uses the new "note" level message routine. 2022-09-30 09:09:09 +08:00
Bob Andrews
702ec52161
Merge pull request #1861 from acqn/TestcaseFix
[cc65] Testcase whitespace/comments fixes
2022-09-29 17:53:14 +02:00
acqn
715aa919e6 C++ style comments in C89 mode will cause errors only once per input file. 2022-09-29 19:47:31 +08:00
acqn
29c9cb3e00 Improved diagnostics on conflicting type declarations. 2022-09-29 19:38:32 +08:00
acqn
96df4e8b5e Added a diagnostic level "note" for infomative messages. 2022-09-29 19:38:32 +08:00
acqn
1cbd6bc3f9 Fixed comments in test/val/bug1462-biefield-assign-4.c. 2022-09-29 18:23:41 +08:00
acqn
376afd0edb Fixed trailing spaces in some testcases. 2022-09-29 18:23:32 +08:00
acqn
133507b031 Fixed line info for #pragma messages and diagnostics. 2022-09-29 17:55:09 +08:00
mrdudz
846d51db72 change line endings to unix style, should fix #1858 2022-09-22 20:29:57 +02:00
Rutger van Bergen
61f48f7620 Merge branch 'kim1' of github.com:davepl/cc65 2022-09-19 23:58:26 +02:00
Rutger van Bergen
3b431d9fa3 Remove trailing whitespace 2022-09-19 23:57:26 +02:00
David W Plummer
c43b3582db
Merge pull request #1 from davepl/kim1
Add KIM-1 Support
2022-09-19 14:20:29 -07:00
David W Plummer
ab6840712b
Update kim1.sgml 2022-09-19 14:17:41 -07:00
Rutger van Bergen
3dd8968876 Merge branch 'master' of github.com:davepl/cc65 into kim1 2022-09-19 21:59:57 +02:00
Rutger van Bergen
fa6a5d9b72
Merge branch 'cc65:master' into master 2022-09-19 20:31:36 +02:00
Rutger van Bergen
2b07204952
Merge branch 'cc65:master' into kim1 2022-09-19 20:03:23 +02:00
Rutger van Bergen
d2a8e907ae
Merge pull request #2 from davepl/kim1-doc
Add documentation, make capitalization uniform
2022-09-19 19:59:19 +02:00
Rutger van Bergen
cb8cb876ec Add documentation, make capitalization uniform 2022-09-19 19:56:57 +02:00
Bob Andrews
65ce036b2e
Merge pull request #1854 from acqn/Testcase
[cc65] Renamed, fixed and added testcases
2022-09-19 13:19:09 +02:00
Rutger van Bergen
6cb6c241aa
Merge branch 'cc65:master' into master 2022-09-19 03:20:49 +02:00
acqn
5e7d9b5fe3 Renamed a few testcases. 2022-09-18 22:29:41 +08:00
acqn
080ec131d8 Added testcase for constant operands with side-effects. 2022-09-18 22:29:30 +08:00
acqn
16ba232d08 Fixed some testcases. 2022-09-18 22:29:01 +08:00
mrdudz
6fc2cd9f61 add test related to bug #1853 2022-09-17 14:42:18 +02:00
mrdudz
fd6d00a4dd revert 6096a24 - this breaks the case when the "label" is an expression containing spaces.
fixes bug #1853
2022-09-17 14:41:59 +02:00
Oliver Schmidt
5493c9e7c2
Don't empty the Receive Data Register on filling the Transmit Data Register
The Receive Data Register and the Transmit Data Register share share a single address. Accessing that address with STA abs,X in order to fill the Transmit Data Register causes a 6502 false read which causes the Receive Data Register to be emptied.

The simplest way to work around that issue - which I chose here - is to move the base address for all ACIA accesses from page $C0 to page $BF. However, that adds an additional cycle to all read accesses. An alternative approach would be to only modify the single line `sta ACIA_DATA,x`.
2022-09-08 17:11:30 +02:00
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
Bob Andrews
1d01777943
Merge pull request #1849 from acqn/StructFix
[cc65] Reverted E_ADDRESS_OF logic fix
2022-09-02 17:27:34 +02:00
Bob Andrews
fe0d383bea
Merge pull request #1850 from polluks2/patch-6
Don't hide errors in error handling
2022-09-02 12:08:40 +02:00
polluks2
446a785f95
Don't hide errors in error handling
You don't want the low byte, see grep _ERR_ libsrc/tgi/*
2022-09-02 11:55:54 +02:00
acqn
b4ddd01d78 Fixed checks on __VA_ARGS__. 2022-09-01 12:58:52 +08:00
acqn
950606d46a Improved diagnostics on wrong number of arguments in function-like macro calls. 2022-09-01 12:59:00 +08:00
acqn
92f94e4e5b A space character will be inserted in front of a leading '#' pp-token as the result of macro expansion. 2022-09-01 12:58:52 +08:00
acqn
770e529b20 Fixed newline counting inside old C style comments. 2022-09-01 12:58:52 +08:00
acqn
3d1e322519 Fixed keeping spacing in certain rare cases. 2022-09-01 12:58:52 +08:00
acqn
942ee47d05 Changed supposed usage of the original line input stack. It is now used for reusing input lines. 2022-09-01 12:58:52 +08:00
acqn
dc001cb4be Reverted E_ADDRESS_OF logic fix.
Added testcase.
2022-09-01 12:56:46 +08:00
mrdudz
5bda57de87 add extra underscore to _bzero, add a test for bzero/memset 2022-08-29 23:20:48 +02:00
mrdudz
3b03a96375 add underscores to _poserror and _stroserror 2022-08-29 21:06:48 +02:00
mrdudz
89c08dc6d4 extra underscores for _randomize and _swap 2022-08-29 20:52:35 +02:00
mrdudz
145adf61ea define old names also for heap stuff 2022-08-29 20:10:21 +02:00
mrdudz
b09024aa32 add extra underscore to heap stuff 2022-08-29 19:55:48 +02:00
mrdudz
df4b6f9d14 remove extra spaces 2022-08-28 22:37:33 +02:00
mrdudz
54aff47513 fix some errno related stuff, "make all" works again 2022-08-28 22:09:44 +02:00
mrdudz
2dabb65ee0 fix errno related underscores in all libsrc/*.s files 2022-08-28 21:52:53 +02:00
mrdudz
5d390489a8 fix underscores in errno (and related) headers 2022-08-28 21:36:22 +02:00
mrdudz
6ba3deffa4 use __clocks_per_sec instead of _clocks_per_sec 2022-08-28 20:22:25 +02:00
mrdudz
f70020a2b8 use __sig_ign and __sig_dft instead of _sig_ign and _sig_dft 2022-08-28 20:18:34 +02:00
mrdudz
9246775ebe use __afailed instead of _afailed 2022-08-28 20:08:13 +02:00
mrdudz
8e5f6b822d fix setjmp.h 2022-08-28 20:05:11 +02:00
mrdudz
ce6ee1b891 test some more possible cases and move test into test/val 2022-08-28 03:43:54 +02:00
mrdudz
d371046ae4 Despite not technically needed, it seems to be desirable to remove all trailing whitespace from inline assembly 2022-08-28 03:43:02 +02:00
mrdudz
6096a24f1d dont add whitespace after a label to the actual label, this fixes the root cause of #1252 2022-08-28 03:41:48 +02:00
Bob Andrews
eb21e484ee
Merge pull request #1842 from acqn/PPCounter
[cc65] Added support for the popular __COUNTER__ macro
2022-08-27 11:18:29 +02:00
mrdudz
168f42bb83 fix whitespace 2022-08-27 02:14:52 +02:00
mrdudz
41b29d5c81 add testcase related to issue #1252 2022-08-27 02:10:02 +02:00
mrdudz
90b9438b48 added testcase related to issue #1768 2022-08-27 01:15:06 +02:00
Bob Andrews
d2628d5949
Merge pull request #1840 from acqn/FnParamFix
[cc65] Fixed function parameters declared as function types rather than function pointers
2022-08-26 23:19:55 +02:00
Bob Andrews
68610490c9
Merge pull request #1837 from acqn/PPLineFix
[cc65] Fixed predefined __FILE__, __LINE__ and added missing preprocessing directive #line
2022-08-26 23:12:59 +02:00
Bob Andrews
13fbd7d1b4
Merge pull request #1836 from acqn/PPDiag
[cc65] Fixes and improvements for preprocessor diagnostics and error handling
2022-08-26 23:08:29 +02:00
acqn
1dbc5cb325 Simple testcase for __LINE__, __FILE__ as well as #line. 2022-08-24 16:39:44 +08:00
acqn
26945c32ac Fixed function parameters declared as function types rather than function pointers. 2022-08-24 15:30:52 +08:00
Bob Andrews
22ea30c75f
"cat" result to console on failure (only on *nix right now) 2022-08-23 11:56:05 +02:00
acqn
9f8bfb859c Fixed handling adjacent macro expansions that should not concatenate.
Example: F()G /* expansion results of F() shall not be concatenated with G */
2022-08-22 14:34:50 +08:00
acqn
c7ff416ce9 Fixed wide strings for preprocessor. 2022-08-22 14:34:50 +08:00
acqn
be95cb8f58 Fixed stringized macro argument concatenation.
Example: #define s(a) L## #a.
2022-08-22 14:34:50 +08:00
acqn
6260414136 The '#' operator in macro replacement is now checked at macro definition instead of macro expansion. 2022-08-22 14:34:50 +08:00
acqn
2f6b5621cc Changed handling on nested macro replacement to match up with the behavior of other major C compilers, which is unspecified by the C standard. 2022-08-22 14:34:50 +08:00
acqn
95e5471cd6 Better preprocess macro expansion. 2022-08-22 14:34:50 +08:00
acqn
57ad7c8766 Improved diagnostics about C++ style comments for c89. 2022-08-22 14:31:53 +08:00
acqn
fd7f32ecd3 Improved error handling and diagnostics with failed macro definitions. 2022-08-22 14:31:51 +08:00
Bob Andrews
8605393953
Merge pull request #1834 from acqn/PPFix
[cc65] Minor improvements, fixes and cleanups with the preprocessor
2022-08-21 19:18:46 +02:00
Bob Andrews
f838ba7341
Merge pull request #1833 from acqn/TokenizerFix
[cc65] Tokenizer fixes
2022-08-21 17:45:38 +02:00
acqn
47ee543fe0 Added testcase for some part of PR #1833. 2022-08-21 00:11:19 +08:00
Bob Andrews
12b9b10355
Merge pull request #1832 from acqn/PPDefineFix
[cc65] Preprocessor directive #define fixes
2022-08-20 14:27:25 +02:00
Bob Andrews
03421694b2
Merge pull request #1817 from acqn/PPFix
[cc65] More preprocessor fixes
2022-08-19 21:37:16 +02:00
Bob Andrews
98491d7c92
Merge pull request #1831 from acqn/DeclFix
[cc65] Fixed issues with forward declaration of enums and global static variables put on zeropage
2022-08-19 20:58:28 +02:00
acqn
3fbefdef45 Fixed warning on forward declaration of enums.
Fixed the issue that global static variables put on zeropage were missing optimization.
2022-08-19 18:48:52 +08:00
acqn
9565f41381 Improved Diagnostic with #include. 2022-08-19 13:27:56 +08:00
acqn
5d5bd472c6 Removed extra whitespace at line ends in preprocess-only output (-E).
Increased threshold from 5 to 7 for skipped newlines with #line directives in preprocess-only output (-E).
2022-08-22 00:27:21 +08:00
acqn
79f97e7714 Reused code more for macros in preprocessing directives. 2022-08-22 00:24:28 +08:00
acqn
cf7558add3 Added check for ## at either end of macro expansion. 2022-08-18 23:16:29 +08:00
acqn
b93f9fbba4 Updated documents about the predefined macros. 2022-08-18 22:51:23 +08:00
acqn
47d5e74a6e Modified way to keep undefined macro handling more consistent. 2022-08-18 22:51:23 +08:00
Bob Andrews
b8211a2921
Update Contributing.md 2022-08-17 21:42:42 +02:00
acqn
624e5025b0 Fixed parsing wide char constants. 2022-08-17 22:28:00 +08:00
acqn
5cca1e8b1d Fixed parsing numeric constants. 2022-08-11 10:55:16 +08:00
Bob Andrews
623f047397
Merge pull request #1509 from mrdudz/rremd
C64 Retro Replay EMD driver
2022-08-11 01:11:16 +02:00
Bob Andrews
38c4449ab1
Merge pull request #1826 from alejandro-colomar/master
Make NULL conform to POSIX
2022-08-11 01:10:16 +02:00
mrdudz
c1fd3218df add test related to pr #1799 2022-08-11 00:59:09 +02:00
mrdudz
f942c629d7 simple test related to issue #1655 2022-08-11 00:04:36 +02:00
Bob Andrews
ec310fceb8
Merge pull request #1825 from ReallyNiceGuy/master
Revert: Parse file included inside a macro at definition time
2022-08-11 00:03:12 +02:00
Alejandro Colomar
f14e793197 Make NULL conform to POSIX
POSIX.1-2008 tightened the definition of NULL to be 0 cast to the
type 'void *'.

Defining NULL as 0 is problematic, because it requires users to
cast NULL to a pointer type before passing it to variadic
functions.  Using POSIX's definition is safer, because NULL can be
used in all contexts without a cast, due to the alignment of
'void *' and 'char *' being the same.  It also helps the compiler
be able to detect when NULL is being used in an integer context.

Link: <http://ewontfix.com/11/>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-08-10 12:56:23 +02:00
Bob Andrews
bdcc5ba549
Merge pull request #1821 from ZeroByteOrg/x16_waitvsync
CX16 waitvsync uses Kernal API to retreive jiffies
2022-08-09 19:02:15 +02:00
Bob Andrews
e30e233064
Merge pull request #1829 from acqn/VoidPtrFix
[cc65] Fixed superfluous warning on pointer types comparing a non-void pointer to a void pointer.
2022-08-09 14:29:56 +02:00
acqn
78e80eb942 Fixed superfluous warning on pointer types comparing a non-void pointer to a void pointer. 2022-08-09 13:13:33 +08:00
Bob Andrews
0c8366c1e9
Merge pull request #1828 from ZeroByteOrg/x16_ym
Fixed YM2151 struct to match HW behavior
2022-08-09 00:50:08 +02:00
ZeroByteOrg
5608453aea Fixed YM2151 struct to match HW behavior 2022-08-08 16:16:37 -05:00
ZeroByteOrg
582e43931d import RDTIM symbol instead of hard-wiring it here 2022-08-08 15:21:30 -05:00
ZeroByteOrg
9b3b652fa5 Switched to using tmp1 instead of self-mod to store the jiffies value 2022-08-08 15:17:28 -05: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
acqn
4bb4f033ea Fixed the bug that C keywords were not simply recognized as identifiers in preprocessing. 2022-08-07 16:14:45 +08:00
acqn
a3a5fbe809 Disallowed 'defined' as a macro name. 2022-08-07 13:56:47 +08:00
acqn
7971eec3cc Fixed parentheses handling when a function-like macro name itself is used as an macro argument. 2022-08-07 12:45:48 +08:00
acqn
7a139a800e Added # and ## as punctuators recognized by the tokenizer.
Reorganized the token enum.
2022-08-06 18:45:49 +08:00
acqn
ae811baaf1 Fixed the bug that redefined macros could co-exist but not all be undefined with a single #undef. 2022-08-06 18:21:42 +08:00
acqn
0a051a4dee Unsupported #pragma within argument lists of function-like macro invocation. 2022-08-06 16:56:28 +08:00
ZeroByteOrg
78870219a4 CX16 waitvsync uses Kernal API to retreive jiffies 2022-08-05 17:44:18 -05:00
acqn
251e984ba8 Fixed error recovery with preprocessing directives failures. 2022-08-05 14:03:51 +08:00
Bob Andrews
4de40a20cb
Merge pull request #1820 from polluks2/patch-5
Shorter isascii
2022-08-04 00:43:10 +02:00
polluks2
7a93d3c707
Shorter isascii 2022-08-04 00:25:04 +02:00
mrdudz
fb8de287be test related to pr #1800 2022-07-28 01:50:54 +02:00
Bob Andrews
2c742ffc1c
Merge pull request #1800 from acqn/PPFix
[cc65] Preprocessor fixes
2022-07-28 01:48:41 +02:00
Bob Andrews
15756cc730
Update Contributing.md 2022-07-28 00:29:05 +02:00
Bob Andrews
9ab8026dbb
Merge pull request #1813 from IrgendwerA8/CharmapFixDocUpdate
Updated documentation while char-mapping is fixed.
2022-07-27 17:58:57 +02:00
IrgendwerA8
b3015ef731 Updated documentation while char-mapping is fixed. 2022-07-27 13:54:00 +02:00
mrdudz
5164b88a27 test was moved to test/val 2022-07-26 17:21:33 +02:00
Bob Andrews
a41b76795a
Merge pull request #1807 from acqn/CharmapFix
[cc65] Fixed #pragma charmap for string literals
2022-07-26 17:19:58 +02:00
acqn
f8d08b1e1a More post-C99 predefined macros. 2022-07-26 21:40:19 +08:00
acqn
2f357ba9b2 Preprocessor directives can now appear in the argument list of function-like macro calls.
#pragma PP-tokens can now be macro replaced.
#include header names directly enclosed in <> are free of macro replacement.
Preprocess-only mode (-E) now outputs with #line as source info.
Moved testcases for #760 and #1357.
Added testcase for #1643.
2022-07-26 21:10:38 +08:00
acqn
80fc8cd11e Added preprocessor warning on missing terminating characters of character/string literals. 2022-07-26 21:10:36 +08:00
acqn
2c9c8ee196 Fixed extra "Macro argument count mismatch" message when a macro argument list is unterminated. 2022-07-26 21:10:31 +08:00
acqn
60c1290468 Fixed the bug that preprocessor could run past the end of included files.
Fixed the wrong filename and 0 line number in disgnostics when a preprocessor error occurred at the end of a file.
Fixed diagnostics for missing #endif.
2022-07-26 21:10:26 +08:00
acqn
9f767770ac Added test case for #pragma charmap. 2022-07-26 15:19:48 +08:00
acqn
8289c94e69 Fixed skipped lines consist of a leading # followed by any non-directive PP-token sequence. 2022-07-26 14:28:27 +08:00
mrdudz
f99cb177c6 added example/test for cbm_read, related to issue #1306 2022-07-25 21:01:31 +02:00
mrdudz
d03f28d0ed dangling! 2022-07-24 23:52:53 +02:00
mrdudz
3c71455bd6 test related to issue #1373, should be move to val in pr #1807 2022-07-24 23:49:45 +02:00
mrdudz
416040dfb6 add prototype for static driver 2022-07-24 23:43:53 +02:00
Bob Andrews
073443d865
Merge pull request #1809 from cc65/revert-1805-something_to_pull
Revert "rename '_poserror' to '__poserror'"
2022-07-24 18:22:37 +02:00
Bob Andrews
6239fbe18c
Revert "rename '_poserror' to '__poserror'" 2022-07-24 18:14:21 +02:00
Bob Andrews
c642c07ea0
Merge pull request #1808 from acqn/LibFix
[Lib] Removed an extra colon from libsrc/dbg/dbg.c
2022-07-24 17:59:57 +02:00
acqn
43d2fd2a96 Added support for the popular __COUNTER__ macro. 2022-07-24 23:19:05 +08:00
acqn
bb9c98f4c9 Added support for the #line directive. 2022-07-24 23:19:05 +08:00
acqn
36123c9c8f Improved naming for stuff related to preprocessing directives. 2022-07-24 23:19:05 +08:00
acqn
0063f73f8a Fixed __FILE__ and __LINE__ macros for preprocessor. 2022-07-24 23:19:05 +08:00
acqn
8485d59aa6 Removed an extra colon from libsrc/dbg/dbg/c. 2022-07-24 20:58:10 +08:00
acqn
7381a2c420 Added check for extra tokens at the end of directives.
Improved diagnostics on missing/illegal macro names.
2022-07-24 19:07:16 +08:00
acqn
be26b0631b Fixed #ifdef and #ifndef. 2022-07-24 19:07:02 +08:00
acqn
066a5e0fec Fixed #pragma charmap for string literals. 2022-07-24 16:38:41 +08:00
Bob Andrews
fa9ec1fb71
Merge pull request #1805 from groessler/something_to_pull
rename '_poserror' to '__poserror'
2022-07-24 02:48:51 +02:00
mrdudz
8e19d84cb4 detect number of RAM pages 2022-07-24 02:47:02 +02:00
mrdudz
8db0def88b add a target for testcode.d81, which contains all drivers too 2022-07-24 02:43:18 +02:00
mrdudz
1bc05a7aa0 add rrr driver to list 2022-07-24 02:42:49 +02:00
Christian Groessler
758d9466c0 rename '_poserror' to '__poserror'
The old name could be non-conforming to the C standard. The new name
is definitely in the "implementation name space".

See issue #1796.
2022-07-24 00:33:56 +02:00
mrdudz
bc44bd583c Merge remote-tracking branch 'upstream/master' into rremd 2022-07-23 20:03:28 +02:00
Bob Andrews
d85ca8aedd
Merge pull request #1771 from spiro-trikaliotis/testsuite
Some test cases for ca65
2022-07-21 18:12:41 +02:00
Bob Andrews
46849a2919
Merge pull request #1798 from acqn/MiscFix
[cc65] Removed a mysterious "Hey!" message
2022-07-21 18:10:48 +02:00
acqn
ac4cb258be Removed a mysterious "Hey!" message. 2022-07-21 11:59:38 +08:00
acqn
16a8a64746 Use a dedicated expression parser for the preprocessor. 2022-07-21 11:10:02 +08:00
acqn
f91c8ad247 Allowed comments right after "#" in preporcessor directives. 2022-07-21 11:09:59 +08:00
acqn
d3d6de2704 Allowed the pp-tokens following #error and #warning directives to be optional. 2022-07-21 11:09:56 +08:00
mrdudz
3cb3d5dad3 cleanup 2022-07-21 03:45:40 +02:00
mrdudz
86091ac6bf some cleanup 2022-07-21 03:43:54 +02:00
mrdudz
a55807f682 cleanup 2022-07-21 03:30:47 +02:00
mrdudz
a5225b46fe Merge remote-tracking branch 'upstream/master' into rremd 2022-07-21 03:27:41 +02:00
Bob Andrews
c680c9fa05 Update lynx.h
remove TGI_COLOR_DARKBROWN
2022-07-21 03:24:17 +02:00
Kevin Pulo
35a4a03c51 lynx: fix TGI_COLOR_DARKBROWN 2022-07-21 03:24:17 +02:00
polluks2
358084806a Fixed term #1553 2022-07-21 03:24:17 +02:00
polluks2
ad051efa0b Fixed typo 2022-07-21 03:24:17 +02:00
acqn
4dcf18eca7 Fixed ICE with duplicate macro parameters. 2022-07-21 03:24:17 +02:00
acqn
a4ad212316 Now the compiler removes code that has no observable effect. 2022-07-21 03:24:17 +02:00
acqn
4cb5063e9c Now the compiler tracks code that has no observable effect. 2022-07-21 03:24:17 +02:00
acqn
fcbb4a5246 NoCodeConstExpr() fix to avoid exessive error messages. 2022-07-21 03:24:17 +02:00
acqn
51d7c0f1eb More detailed diagnostic info about conflicted function types. 2022-07-21 03:24:17 +02:00
acqn
80a468f8bd E_ADDRESS_OF logic fix. 2022-07-21 03:24:17 +02:00
acqn
9e82de4607 Better future-proof bit-masking. 2022-07-21 03:24:17 +02:00
acqn
55881e913d Replaced certain usage of "(New-)PointerTo()" with "AddressOf()". 2022-07-21 03:24:17 +02:00
acqn
7e1df39432 Replaced several occurance of PtrConversion() with StdConversion().
Variadic arguments of functions should be default-promoted.
2022-07-21 03:24:17 +02:00
acqn
3a6920bf10 Minor clean-ups and typo fixes. 2022-07-21 03:24:17 +02:00
acqn
9004c4fccb Made it easier to support 0-size structs in the future. 2022-07-21 03:24:17 +02:00
mrdudz
36315ecc06 omit an error message also when an unresolved import was added by the compiler. fixes bug #1551 2022-07-21 03:24:17 +02:00
mrdudz
1dae5062e9 more verbose comment 2022-07-21 03:24:17 +02:00
mrdudz
f614f3b9e2 reserve enough space for the longest string we can expect 2022-07-21 03:24:17 +02:00
jede
e60836add8 Telestrat cfg : fix space 2022-07-21 03:24:17 +02:00
jede
36a27055e8 Telestrat : change default start address 2022-07-21 03:24:17 +02:00
Greg King
a94b614f2d Removed an environment experiment. 2022-07-21 03:24:17 +02:00
Greg King
3bf3bfa294 Commented out the push command. 2022-07-21 03:24:17 +02:00
Greg King
f835412562 Changed a line that Github Actions claimed was bad. 2022-07-21 03:24:17 +02:00
Greg King
bcc8c5049b Went back to using actions/checkout@v2.
(Direct cloning doesn't support pushing with a hidden token.)

I'm putting this aside, for now. A Personal Access Token must be made for the repository. "git push" does a dry-run, so that the workflow will succeed.
2022-07-21 03:24:17 +02:00
Greg King
9dec4034e3 Passed the token through the environment. 2022-07-21 03:24:17 +02:00
Greg King
c00c89c2b7 Directly clone the document repo. 2022-07-21 03:24:17 +02:00
Greg King
4d045a68e3 Put doc.git next to cc65. 2022-07-21 03:24:17 +02:00
Greg King
964c4a220e Find out where doc.git is. 2022-07-21 03:24:17 +02:00
Greg King
e004e92f21 Fixed the action/checkout steps.
I misunderstood that action's docs.
2022-07-21 03:24:17 +02:00
Greg King
2290e70e0c Experiment: checkout the second repo first.
Maybe that will give it the github.token that it needs.
2022-07-21 03:24:17 +02:00
Greg King
4c74d4b851 Trying a verbose Git push.
If I'm lucky, it will tell me more.
2022-07-21 03:24:17 +02:00
Greg King
cb20b2e968 Tried to authorize a push by setting the access token explicitly. 2022-07-21 03:24:17 +02:00
Greg King
3232ce1bad Fixed a shell syntax bug. Try again. 2022-07-21 03:24:17 +02:00
Greg King
735f0cda25 Added Github action steps that update the online documentation repo. 2022-07-21 03:24:16 +02:00
mrdudz
e8e1889b0b handle loadaddr the same as with the other CBM targets 2022-07-21 03:22:52 +02:00
rofl0r
9cb8bf9500 cl65: fix regression in --print-target-path
since the "empty prefix means run from current dir" hack was removed,
cl65 --print-target-path no longer prints the path relative to the
binary, but the hardcoded library path which points to prefix, because
the code adds the hardcoded path first to the pathsearch, but then actually
only returns the first entry rather than looking whether the path exists.

closes #1754
2022-07-21 03:22:52 +02:00
Stephan Mühlstrasser
8ec1f76b9c Fix switched meaning of '\n' and '\r'
When conio was implemented for the osic1p target, the cbm
target was used as a blueprint. But it was overlooked that the
cbm target encodes CR as 0x0A and LF as 0x0D, while the
osic1p target uses the ASCII encoding of CR and LF. Therefore
conio output of '\n' moved the active position to the start of the
line and '\r' moved the active position to the next line.

This change implements the correct semantics of '\n' and '\r'
in conio for the osic1p target.

Fixes #1747.
2022-07-21 03:22:52 +02:00
Greg King
f69b993ee6 Fixed a multi-line comment.
The left border is thicker in cc65 than it is in VICE.
2022-07-21 03:22:52 +02:00
mrdudz
85fb6ba944 add check for +x flag 2022-07-21 03:22:52 +02:00
mrdudz
8e787c0c0a remove +x flag 2022-07-21 03:22:52 +02:00
compyx
4595d08c6e Fix set but unused variable 2022-07-21 03:22:52 +02:00
mrdudz
3717f36c52 rename the actual checkstyle target too :) 2022-07-21 03:22:52 +02:00
mrdudz
0e4d3aa7c5 rename the "check" target to "checkstyle".
also created a new "check" target which runs all tests, as it is common with GNU programs
2022-07-21 03:22:52 +02:00
mrdudz
0113d1328b don't try to build the checkversion sample for targets that do not have printf 2022-07-21 03:22:52 +02:00
mrdudz
976d07b98f clean and mostlyclean should also clean the test and targettest directories 2022-07-21 03:22:52 +02:00
Bob Andrews
08bad5b93b Update README.md 2022-07-21 03:22:52 +02:00
polluks2
133d703964 smarter manufacturer
some kind of promotion
2022-07-21 03:22:52 +02:00
mrdudz
1334a10101 sample program that demonstrates how to compare the value of __CC65__ for
any version of the compiler
2022-07-21 03:22:52 +02:00
mrdudz
b9779927e7 document changes to __CC65__ 2022-07-21 03:22:52 +02:00
mrdudz
354dcd6101 define __CC65__ as ((VER_MAJOR * 0x100) + VER_MINOR), fixes issue #1667 2022-07-21 03:22:52 +02:00
mrdudz
15047d9754 simple test related to #1678 2022-07-21 03:22:52 +02:00
mrdudz
3943dc1216 Fix endless loop on expanding a recursive macro, fixed issue #1678, patch by kugelfuhr 2022-07-21 03:22:52 +02:00
mrdudz
b8d0bd7f95 Add a directory for tests that exercise the supported C standard differences.
As a first test added the snippet given in issue #1670
2022-07-21 03:22:52 +02:00
mrdudz
4579d584b1 fix some header files to conform with C99 hopefully, should fix issue #1670 2022-07-21 03:22:52 +02:00
mrdudz
db2dfc9226 must include stdarg.h to use varargs 2022-07-21 03:22:52 +02:00
Bob Andrews
738d6dba88 Update Contributing.md 2022-07-21 03:22:52 +02:00
Bob Andrews
cb5ced7c9d Update Contributing.md 2022-07-21 03:22:52 +02:00
mrdudz
4285a30236 At the end of the optimizer run, remove jump cascades again. fixes the
regression reported in #1652
2022-07-21 03:22:52 +02:00
mrdudz
8ec41083e9 add extra optimizer step that replaces BRA by JMP if the target is external 2022-07-21 03:22:52 +02:00
mrdudz
4ddbe5f838 test related to issue #1652, shows regression broken by #1231 and the
case that #1231 improved.
2022-07-21 03:22:52 +02:00
mrdudz
ab7079df00 add sourcelines to the generated asm for easier inspection,
redirect output of sim65, including cycle count, into a seperate .out file per program
2022-07-21 03:22:52 +02:00
Bob Andrews
bfe9ddeb6a Update Contributing.md 2022-07-21 03:22:52 +02:00
polluks2
f8a940bce4 Some clean-up
One exit() too much
file is not optional
2022-07-21 03:22:52 +02:00
polluks2
395e072c3b typo 2022-07-21 03:22:52 +02:00
Bob Andrews
d365b8a4ee Adjust comments 2022-07-21 03:22:52 +02:00
rofl0r
5867d3a020 change GetProgPath() to return full & resolved binary path
GetProgPath() now resolves the path derived from argv[0] always
via realpath(3p) to its real location in the filesystem, and returns
the path including binary name, effectively making it work like
windows' GetModuleFileName(), so we can re-use the existing code
to strip the trailing binary name.
since symlinks are now always resolved, we no longer need the
special case code for linux to use /proc/self/exe for this purpose.
2022-07-21 03:22:52 +02:00
Bob Andrews
546e82965d Try reading from /proc/self first on linux, this is needed to make the edgy "make avail" work 2022-07-21 03:22:52 +02:00
rofl0r
6f74a2e9c7 rename AddSubSearchPathFromWinBin to AddSubSearchPathFromBin 2022-07-21 03:22:52 +02:00
rofl0r
6a5375ace4 implement AddSubSearchPathFromWinBin() counterpart for unix
this looks up paths relative to the binary used to start the
specific application.
2022-07-21 03:22:52 +02:00
rofl0r
6eeaf7485c build: allow empty prefix
there was some concern that this will break windows' way of doing
file lookups relatively from the binary, rather than via hardcoded
locations, but so far each occurence adding e.g. "CA65_INC" to
the pathsearch is already shielded with an #ifndef _WIN32.

addressing #1726
2022-07-21 03:22:52 +02:00
jede
e9bf0dd64f fix space 2022-07-21 03:22:52 +02:00
jede
16d896b73f fix mkdir 2022-07-21 03:22:52 +02:00
jede
e1fbb8465b fix spaces 2022-07-21 03:22:52 +02:00
jede
e1b8508798 fix typo 2022-07-21 03:22:52 +02:00
jede
244da9c911 missing fd_management and cleaning 2022-07-21 03:22:52 +02:00
Wayne Parham
dfab2b27cd Added myself as an external contributor for the Sym-1 target 2022-07-21 03:22:52 +02:00
Greg King
55ea831e2d Upgraded the cx16 library to the Commander X16 Kernal ROM's prerelease 39. 2022-07-21 03:22:52 +02:00
Bob Andrews
6e3e98220b Update Contributing.md 2022-07-21 03:22:52 +02:00
Bob Andrews
6fac3be97c Update README.md 2022-07-21 03:22:50 +02:00
mrdudz
976c6af74b test some more cases that should not change size 2022-07-21 03:20:45 +02:00
mrdudz
72e2751bfd added a test that must fail 2022-07-21 03:20:45 +02:00
jede
84e2fee9a4 fix bss 2022-07-21 03:20:45 +02:00
jede
164acad6cb fix space 2022-07-21 03:20:45 +02:00
jede
ebcf6ec52d FIX space 2022-07-21 03:20:45 +02:00
jede
c38504b06d cgetc export data now 2022-07-21 03:20:45 +02:00
rofl0r
058126ae41 remove orphaned STRINGIZE macro 2022-07-21 03:20:45 +02:00
rofl0r
910ce5c1fd 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-07-21 03:20:45 +02:00
rofl0r
09e0dd02a0 build: allow the user to specify make V=1 for verbose build
it's often required to see the full commandline when things go wrong.
the standard way for Makefile-only based buildsystems and autoconf
is to pass V=1 to make.
2022-07-21 03:20:45 +02:00
Karri Kaksonen
3922cccafb Speed up the cursor a bit 2022-07-21 03:20:45 +02:00
Karri Kaksonen
249a04dbde Move cursor IRQ processing to when the screen is being drawn 2022-07-21 03:20:45 +02:00
Bob Andrews
d2e8f7bc90 Update Contributing.md 2022-07-21 03:20:45 +02:00
Karri Kaksonen
7684918112 Too much time in irq fix 2022-07-21 03:20:45 +02:00
Karri Kaksonen
4ee3e59f19 Fix race condition 2022-07-21 03:20:45 +02:00
Bob Andrews
7f9909ef81 use jmp instead of jsr/rts 2022-07-21 03:20:45 +02:00
Karri Kaksonen
d8b8368e4e Add documentation 2022-07-21 03:20:45 +02:00
Karri Kaksonen
9ad2eea146 Add color setup 2022-07-21 03:20:45 +02:00
Karri Kaksonen
29b9a9f615 Rename font 2022-07-21 03:20:45 +02:00
Karri Kaksonen
5d0f064edc Not sharing umula0 and fix cursor bug 2022-07-21 03:20:45 +02:00
Karri Kaksonen
627ec17b14 Fix typo 2022-07-21 03:20:45 +02:00
Karri Kaksonen
4f195d46f9 Use consisten line lenght values 2022-07-21 03:20:45 +02:00
Karri Kaksonen
3954e9bccb Fix wrong screen in 2022-07-21 03:20:45 +02:00
Karri Kaksonen
9fab67761f Fix tabs 2022-07-21 03:20:45 +02:00
Karri Kaksonen
2e51b2b17c Fix tabs 2022-07-21 03:20:45 +02:00
Karri Kaksonen
f2f358262e Add mono conio files 2022-07-21 03:20:45 +02:00
Karri Kaksonen
b8c450cb46 Add mono conio files 2022-07-21 03:20:45 +02:00
Karri Kaksonen
bb20af1695 Add info 2022-07-21 03:20:45 +02:00
Karri Kaksonen
2db4592029 Add info 2022-07-21 03:20:45 +02:00
Karri Kaksonen
190911e26f Add x=0 to textcolor 2022-07-21 03:20:45 +02:00
Karri Kaksonen
a2aaeb0d1d Fix tabs 2022-07-21 03:20:45 +02:00
Karri Kaksonen
057fd866da Remove obsolete file and fix tabs 2022-07-21 03:20:45 +02:00
Karri Kaksonen
3edb27aa3b Remove obsolete file and fix tabs 2022-07-21 03:20:45 +02:00
Karri Kaksonen
02fbcad697 Split files 2022-07-21 03:20:45 +02:00
Karri Kaksonen
f0e16514e0 Split files 2022-07-21 03:20:45 +02:00
Karri Kaksonen
e0c7880e34 Split files 2022-07-21 03:20:45 +02:00
Karri Kaksonen
6a6581815d Import conio automatically 2022-07-21 03:20:45 +02:00
Karri Kaksonen
0f404280a1 Change attributes on gotoxy 2022-07-21 03:20:45 +02:00
Karri Kaksonen
141b887d4d Change order of gotox gotoy for correct x after newline 2022-07-21 03:20:45 +02:00
Karri Kaksonen
770b22e14d Remove duplicate code 2022-07-21 03:20:45 +02:00
Karri Kaksonen
7e7f9ffa58 Add blinking cursor 2022-07-21 03:20:45 +02:00
Karri Kaksonen
ff8d2e84bf Fix screen index bug 2022-07-21 03:20:45 +02:00
Karri Kaksonen
1d7bcb9348 Cleanup 2022-07-21 03:20:45 +02:00
Karri Kaksonen
3ba6dd0a4a Use local multiply for cursorzone calculations 2022-07-21 03:20:45 +02:00
Karri Kaksonen
9d4f1a0415 Add local multiply routine 2022-07-21 03:20:45 +02:00
Karri Kaksonen
c6b9a012c8 Allocate own zp pointer for conio implementation 2022-07-21 03:20:45 +02:00
Karri Kaksonen
60fffb289a Allocate own zp pointer for conio implementation 2022-07-21 03:20:45 +02:00
Karri Kaksonen
0eaf3eef6d Align font to 256 bytes 2022-07-21 03:20:45 +02:00
Karri Kaksonen
0f250d06b9 Fix conflicts with some conio routines 2022-07-21 03:20:45 +02:00
Karri Kaksonen
b8dbe0254a Add cputc method 2022-07-21 03:20:45 +02:00
Karri Kaksonen
1a2207ffc9 Add setcursor method 2022-07-21 03:20:45 +02:00
Karri Kaksonen
ebd2e5085a Remove export 2022-07-21 03:20:45 +02:00
Karri Kaksonen
9cdaf82f95 Add space to config 2022-07-21 03:20:45 +02:00
Karri Kaksonen
7f1e69f5e0 Add cursor processing 2022-07-21 03:20:45 +02:00
Karri Kaksonen
f576764214 Remove cursor from conio init 2022-07-21 03:20:45 +02:00
Karri Kaksonen
8b06ff18c0 Don't set cursor in clrscr 2022-07-21 03:20:45 +02:00
Karri Kaksonen
fce4bc0c58 Change order to make decoding easier 2022-07-21 03:20:45 +02:00
Karri Kaksonen
9775a71433 Use question mark instead of exclamation mark 2022-07-21 03:20:45 +02:00
Karri Kaksonen
8f86d5533b Remove clrscr from init 2022-07-21 03:20:45 +02:00
Karri Kaksonen
7fc69a34ac Change blue to white 2022-07-21 03:20:45 +02:00
Karri Kaksonen
ce313922d1 Change blue to white 2022-07-21 03:20:45 +02:00
Karri Kaksonen
646997ed43 Add the build tools for the font 2022-07-21 03:20:45 +02:00
Karri Kaksonen
f5c24be572 Fix cursor character 2022-07-21 03:20:45 +02:00
Karri Kaksonen
ff0ddcb52b Add the font160.png 2022-07-21 03:20:45 +02:00
Karri Kaksonen
e4c1bf15da Add basic conio buffer 2022-07-21 03:20:45 +02:00
Karri Kaksonen
ba3cd27d30 Add basic conio buffer 2022-07-21 03:20:45 +02:00
mrdudz
7c96af75c5 const value should never have default size, use 32bit instead 2022-07-21 03:20:45 +02:00
mrdudz
87d26b68f4 fix workdir path 2022-07-21 03:20:45 +02:00
mrdudz
623d763457 added a testprogram to check for some of the edge cases 2022-07-21 03:20:45 +02:00
mrdudz
501da2de2b 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-07-21 03:20:45 +02:00
mrdudz
6702b3c85e special case for evaluating the AND operator, this should fix the problems
described in issue #1538
2022-07-21 03:20:45 +02:00
mrdudz
b523d72471 more descriptive error message 2022-07-21 03:20:45 +02:00
mrdudz
964546d444 typo 2022-07-21 03:20:45 +02:00
Greg King
320312e7cc Made the style-check scripts send their file lists to stderr.
A complete list will be shown before make shows its error message.  There will be less confusion about which lines are in the list.
2022-07-21 03:20:45 +02:00
mrdudz
4bb152eb65 remove dangling spaces
when changing the checker scripts and/or directly comitting to git head, please make sure to also run the checks first so you don't break the autobuilds
2022-07-21 03:20:45 +02:00
acqn
933e8c967d Testcases for long bit-fields. 2022-07-21 03:20:45 +02:00
acqn
bf7ef02fbc Added supports for long bit-fields. 2022-07-21 03:20:45 +02:00
acqn
3e614d9353 Separated data initializer stuff from declaration stuff. 2022-07-21 03:20:44 +02:00
acqn
087b7bd8c8 Optimized g_testbitfield() and g_extractbitfield() with enhanced support for long bit-fields. 2022-07-21 03:20:44 +02:00
acqn
ff1eca5701 Added and used new utility type functions for bit-fields.
Fixed GetUnderlyingTypeCode() for bit-fields with widths > 16.
2022-07-21 03:20:44 +02:00
Greg King
be5298925c Oops, forgot to check macros. 2022-07-21 03:20:44 +02:00
Greg King
fb97ce4bfd Remove work directory paths _before_ checking for style errors. 2022-07-21 03:20:44 +02:00
Greg King
1ea27c35d0 Moved a constant expression out of a loop. 2022-07-21 03:20:44 +02:00
Greg King
17b9f9c2a8 Fixed and tightenned the find commands' expressions. 2022-07-21 03:20:44 +02:00
Greg King
f8b05deef4 Made all of the Makefile's rules be phony. 2022-07-21 03:20:44 +02:00
mrdudz
37ebe3781b define CHECK_PATH rather than leaving it open 2022-07-21 03:20:44 +02:00
mrdudz
3834232c29 also check spaces at end of lines 2022-07-21 03:20:44 +02:00
mrdudz
eec62257c7 remove dangling spaces 2022-07-21 03:20:44 +02:00
mrdudz
9d3cdc5a10 remove dangling spaces 2022-07-21 03:20:44 +02:00
mrdudz
b54fb2dfd1 remove dangling spaces 2022-07-21 03:20:44 +02:00
mrdudz
78244351b7 remove dangling spaces 2022-07-21 03:20:44 +02:00
mrdudz
cd1b7a9e9d remove dangling spaces 2022-07-21 03:20:44 +02:00
mrdudz
c6f23eefc8 remove dangling spaces 2022-07-21 03:20:44 +02:00
mrdudz
5276033be1 remove dangling spaces 2022-07-21 03:20:44 +02:00
mrdudz
eb8490f13a remove dangling spaces 2022-07-21 03:20:44 +02:00
mrdudz
c317319d09 remove dangling spaces 2022-07-21 03:20:44 +02:00
mrdudz
3e84da0aca updated a bit 2022-07-21 03:20:44 +02:00
mrdudz
302016997a add more style checks 2022-07-21 03:20:44 +02:00
mrdudz
2cc46e11d3 add comment explaining what the empty file is about 2022-07-21 03:20:44 +02:00
mrdudz
be22b8ad4d add missing newline to a bunch of files 2022-07-21 03:20:44 +02:00
mrdudz
5d45c655bd add check action also to the snapshot build 2022-07-21 03:20:44 +02:00
mrdudz
db20b1dc14 run style checks on PR 2022-07-21 03:20:44 +02:00
mrdudz
59d386e18f added TAB checker script, to be added to the PR checker action 2022-07-21 03:20:44 +02:00
mrdudz
cbbdd3d9cf remove a bunch of TABs 2022-07-21 03:20:44 +02:00
mrdudz
45cbb04a04 remove literal TABs 2022-07-21 03:20:44 +02:00
Bob Andrews
c611077e3d Update README.md
link Contributing.md
2022-07-21 03:20:44 +02:00
Bob Andrews
722bdebd39 Create Contributing.md
Starting to move info hidden elsewhere into this file
2022-07-21 03:20:44 +02:00
mrdudz
175da4bcd6 add gitignores 2022-07-21 03:20:44 +02:00
Karri Kaksonen
f92e1f2e3c Change polarity for 2600 buttons 2022-07-21 03:20:44 +02:00
Karri Kaksonen
851c65344c Add comments 2022-07-21 03:20:44 +02:00
Karri Kaksonen
3ceae59857 Add stdjoy driver 2022-07-21 03:20:44 +02:00
Karri Kaksonen
cdf83d2a26 Fixed logic flaw 2022-07-21 03:20:44 +02:00
Karri Kaksonen
14956f3b15 Add atari7800-stdjoy 2022-07-21 03:20:44 +02:00
Fabrizio Caruso
1effa5944b Optimize delete cycles 2022-07-21 03:20:44 +02:00
Fabrizio Caruso
3050e3afcd Use lsr 2022-07-21 03:20:44 +02:00
Fabrizio Caruso
c40e099969 Ignore executables in util directory 2022-07-21 03:20:44 +02:00
Fabrizio Caruso
3d4772e1fe Remove executables 2022-07-21 03:20:44 +02:00
Fabrizio Caruso
6b3920f9e0 Make the intermediate gray/green levels available 2022-07-21 03:20:44 +02:00
Fabrizio Caruso
fc6548db5c Fix color 1 and 2 (grey/green levels) 2022-07-21 03:20:44 +02:00
polluks2
87e90b6e9a Fixed documentation typo 2022-07-21 03:20:44 +02:00
Fabrizio Caruso
82cfbb5fa8 Fix Gamate CONIO: non-solid characters bug 2022-07-21 03:20:44 +02:00
Karri Kaksonen
6f11c4ffad Export paldetected 2022-07-21 03:20:44 +02:00
Karri Kaksonen
ef13a470e8 Use proper mnemonics 2022-07-21 03:20:44 +02:00
Karri Kaksonen
fd305c1e31 Separate machine detection from crt0 and put it in get_tv 2022-07-21 03:20:44 +02:00
Karri Kaksonen
9fbeb68b22 Make STARTUP segment larger 2022-07-21 03:20:44 +02:00
Karri Kaksonen
cf8c7ee28d Split clock file to components 2022-07-21 03:20:44 +02:00
Karri Kaksonen
218c98d4d5 Add get_tv.s 2022-07-21 03:20:44 +02:00
Karri Kaksonen
9cf4f166c0 Add more space to init segmen 2022-07-21 03:20:44 +02:00
Karri Kaksonen
7c12916718 Add irq handling, PAL/NTSC detection and clock() 2022-07-21 03:20:44 +02:00
Karri Kaksonen
76fae9da82 Add irq handling, PAL/NTSC detection and clock() 2022-07-21 03:20:44 +02:00
Karri Kaksonen
d099df0533 Clear hw palette and set AUDIN low at startup 2022-07-21 03:20:44 +02:00
Karri Kaksonen
926959d80a Fix offset for MARIA 2022-07-21 03:20:44 +02:00
Karri Kaksonen
750ce30768 Make start of ROM depend on CARTSIZE 2022-07-21 03:20:44 +02:00
Karri Kaksonen
0be3882f08 Remove the EXEHDR from the default build 2022-07-21 03:20:44 +02:00
Karri Kaksonen
f7c59ee1ec Add CARTSIZE to cfg file for configuring the a78 header. Add descriptions of usage. 2022-07-21 03:20:44 +02:00
Karri Kaksonen
db48605434 Update docs 2022-07-21 03:20:44 +02:00
Karri Kaksonen
d586c83dae Add exehdr 2022-07-21 03:20:44 +02:00
Karri Kaksonen
dc75972e9e Add exehdr 2022-07-21 03:20:44 +02:00
Karri Kaksonen
4cd32829ea Add segment ONCE 2022-07-21 03:20:44 +02:00
Karri Kaksonen
3792347d5d Add crt0.s and ctype.s 2022-07-21 03:20:44 +02:00
Karri Kaksonen
92043bc7c8 Remove garbage 2022-07-21 03:20:44 +02:00
Karri Kaksonen
e653204ffe Add target atari7800 2022-07-21 03:20:44 +02:00
Karri Kaksonen
89716ac831 Add target atari7800 2022-07-21 03:20:44 +02:00
empathicqubit
06ddd042f2 Documentation 2022-07-21 03:20:44 +02:00
empathicqubit
2bd30afdeb Add --debug-tables <filename> option and output struct and union fields 2022-07-21 03:20:44 +02:00
Greg King
314cdd7feb Added Atari Lynx versions of three sample programs.
The Lynx target can't build the usual versions because its library doesn't have conio output and stdio.
2022-07-21 03:20:44 +02:00
Greg King
1951e84505 Made tgidemo draw circles in blue instead of orange.
That change lets it be built on two more platforms (Atmos, Telestrat).
2022-07-21 03:20:44 +02:00
Greg King
c6c199bd59 Added a URL to the snapshot's commit history as a comment in the Windows snapshot ZIPs. 2022-07-21 03:20:44 +02:00
nyanpasu64
aebf61464d Replace #include "inttypes.h" with <inttypes.h> 2022-07-21 03:20:44 +02:00
nyanpasu64
8afbf3f5ff Fix format strings to properly format uintptr_t 2022-07-21 03:20:44 +02:00
nyanpasu64
190e04b0ce Remove broken inttypes.h
src/common/inttypes.h is a shim to fix building cc65 on
non-C99-compliant compilers missing inttypes.h (like VS2012 and
earlier). The shim is actually incomplete and does not define the PRI...
macros supplied by the actual compiler headers. Since we're planning to
use those macros, delete this header so cc65's source files instead use
host-supplied inttypes.h containing macro definitions.
2022-07-21 03:20:44 +02:00
nyanpasu64
b9651e4b06 Fix segfault on 64-bit LLP64 Windows builds
There are many occurrences of unsigned long in codegen.h's function
arguments. Changing g_getimmed and g_defdata makes `make` succeed
without segfaulting. I don't know if it makes cc65 behave correctly in
all cases, or if there are more unsigned long that need to be changed.
2022-07-21 03:20:44 +02:00
mrdudz
eb2f2a2fca fix #warning directive so the test could actually compile :) 2022-07-21 03:20:44 +02:00
Wayne Parham
eb25027f7b Minor updates 2022-07-21 03:20:44 +02:00
Wayne Parham
cb322551e5 Documentation clarifications 2022-07-21 03:20:44 +02:00
Wayne Parham
d6fe34107e unsigned int format specifier 2022-07-21 03:20:44 +02:00
Wayne Parham
5dd952ba8c Added Sym-1 extended memory sample program and documentation 2022-07-21 03:20:44 +02:00
Karri Kaksonen
4f9b30d50d Fix black index in tgi_colors.s 2022-07-21 03:20:44 +02:00
Karri Kaksonen
b252059369 Mark index 0 as TRANSPARENT. Let palette start from index 1 2022-07-21 03:20:40 +02:00
Wayne Parham
12aa8693b8 Corrected size of BASROM definition 2022-07-21 03:18:13 +02:00
acqn
43abc5b01f Fixed signed long comparisons with smaller unsigned types. 2022-07-21 03:18:13 +02:00
acqn
0dc82c0d11 Fixed test/asm/listing/Makefile with mingw32-make.exe that has problems with comments lead with tabulators. 2022-07-21 03:18:13 +02:00
acqn
e95184e20e Testcase for #1675. 2022-07-21 03:18:13 +02:00
acqn
f0242fb7d5 Fixed LimitExprValue() for 64-bit long env. 2022-07-21 03:18:13 +02:00
acqn
7e3aaf199a Fixed bitwise shift with numeric constant operand(s). 2022-07-21 03:18:13 +02:00
Greg King
74bdc06529 Added a more general test to test/val/bug1690.c 2022-07-21 03:18:13 +02:00
acqn
1579d2ec41 Fixed OptCmp1 with certain code patterns with labels. 2022-07-21 03:18:13 +02:00
Jeff Tranter
93291add05 A couple of addtional fixes. 2022-07-21 03:18:13 +02:00
Jeff Tranter
ba13ba32a1 Fix some commonly made spelling errors in comments. 2022-07-21 03:18:13 +02:00
Greg King
cac1e26372 Made the c128, not the c64, target build the c128 version of "c64-c128-scpu-test.c".
Its placement in the wrong list caused a parallel race condition that sometimes led to failed test builds.
2022-07-21 03:18:13 +02:00
Greg King
9dcd7f8858 Reverted "do not use cl65 to prevent tests from failing randomly because of one process deleting the temp files from another".
This reverted commit 02a46e0237.  That commit didn't fix the real bug (a program name in the wrong list).
2022-07-21 03:18:13 +02:00
Spiro Trikaliotis
49bf32dc06 Add proper readmes 2022-07-21 03:18:13 +02:00
Spiro Trikaliotis
e85d7756a6 Rename target test to asm 2022-07-21 03:18:13 +02:00
Spiro Trikaliotis
2edd9543ce Reorganized test/asm 2022-07-21 03:18:13 +02:00
mrdudz
14b27f8317 do not use cl65 to prevent tests from failing randomly because of one process deleting the temp files from another 2022-07-21 03:18:13 +02:00
Greg King
e4f38f4476 Made the snapshot-on-push Github action run on only the upstream repository. 2022-07-21 03:18:13 +02:00
Spiro Trikaliotis
77fa71994f 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-07-21 03:18:13 +02:00
Spiro Trikaliotis
bfaa2b37e0 Add link to DEB and RPM snapshots 2022-07-21 03:18:13 +02:00
Spiro Trikaliotis
e35f4fb48f 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-07-21 03:18:13 +02:00
mrdudz
3b964c9674 add hint on VICE -moncommands 2022-07-21 03:18:13 +02:00
acqn
479f450d11 Testcase for #1662. 2022-07-21 03:18:13 +02:00
acqn
ace0bc414b Fixed anonymous bit-fields declared with typedef'ed type names. 2022-07-21 03:18:13 +02:00
acqn
879ed5bb95 Fixed crash with labels in non-function/block scopes. 2022-07-21 03:18:13 +02:00
Greg King
800568dd58 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-07-21 03:18:13 +02:00
mrdudz
2628a176f9 attempt to prevent utils being compiled with cc65 2022-07-21 03:18:13 +02:00
mrdudz
648c8e21e3 build utilities in a seperate step 2022-07-21 03:18:13 +02:00
Greg King
c138454bcc Removed geos_apple and geos_cbm from the lists of targets.
They need resource files to go with the program source files.  The top-level samples and targettest programs don't have those resources.
2022-07-21 03:18:13 +02:00
Greg King
bc46c90cfa Added '+' to another SUBDIRS_recipe. 2022-07-21 03:18:13 +02:00
Greg King
9c1c1c04d8 Moved the platform-test enumerations from Github Actions over to makefiles.
Now, we can run those tests locally, as well as on Github.
2022-07-21 03:18:13 +02:00
Wayne Parham
bf46abf8c5 Correction of link typos 2022-07-21 03:18:13 +02:00
Wayne Parham
dd38de6263 Added note about return value being function status. 2022-07-21 03:18:13 +02:00
Wayne Parham
0302e7be97 Typo correction. 2022-07-21 03:18:13 +02:00
Wayne Parham
c60144afbb Documentation updates for Sym-1. 2022-07-21 03:18:13 +02:00
mrdudz
138d2badb2 upload snapshot to sourceforge 2022-07-21 03:18:08 +02:00
mrdudz
b9bda8c40d test upload again 2022-07-21 03:13:10 +02:00
mrdudz
561e973c5d try publishing on sf after snapshot 2022-07-21 03:13:10 +02:00
mrdudz
76026ed59e use gamate-fixcart from util dir 2022-07-21 03:13:10 +02:00
mrdudz
16acb7675e move some things from targettest to samples 2022-07-21 03:13:10 +02:00
mrdudz
1af84ed9a0 fix this too 2022-07-21 03:13:10 +02:00
mrdudz
6129ff532b fix again. sigh 2022-07-21 03:13:10 +02:00
mrdudz
f6e7a91fb4 fix 2022-07-21 03:13:10 +02:00
mrdudz
9509288b80 remove programs in util dir before making a snapshot. we might later
decide to leave them there anyway.
2022-07-21 03:13:10 +02:00
mrdudz
f800e71d7a cleanup 2022-07-21 03:13:10 +02:00
mrdudz
0300d4fcd1 utils before samples 2022-07-21 03:13:10 +02:00
mrdudz
0046d8ec5c build util dir when testing 2022-07-21 03:13:10 +02:00
mrdudz
bcc03acfc8 also compile the programs in the util directory by default, not only
do we want to test they can be compiled, but also samples may use/require
them. we might want to install them too, perhaps
2022-07-21 03:13:10 +02:00
Greg King
e0b23258dc Added the names of samples and targettest programs that the telestrat library can build now. 2022-07-21 03:13:10 +02:00
Greg King
8bf9766e9e Added to the telestrat library the name of the standard dynamic TGI driver. 2022-07-21 03:13:10 +02:00
Greg King
bdd7466afd Added telestrat to <time.h>.
That library has clock().
2022-07-21 03:13:10 +02:00
polluks
2ed9df708f Fixed many typos 2022-07-21 03:13:10 +02:00
polluks
ad95ba7854 Added tail call optimization 2022-07-21 03:13:10 +02:00
Oliver Schmidt
27f975666c Disable double hires on exit.
A program being run afterwards might not even know about the existence of double hires. So it's our task to turn double hires off on exit.
2022-07-21 03:13:10 +02:00
Greg King
103d3ccfcd Fixed the cart directory build code to handle even simple programs.
Carts can be built containing programs that don't link some segments.
2022-07-21 03:13:10 +02:00
Greg King
3885dd8504 Removed an obsolete command-line option from the cc65 compiler. 2022-07-21 03:13:10 +02:00
Greg King
5cad3ce55a Fixed heaptest.c compiler warnings in a way that's better than PR #1621.
This fix adds "unsigned" to one line instead of removing it from several lines.
2022-07-21 03:13:10 +02:00
mrdudz
f1e70517ec the forgotten minimal testprog 2022-07-21 03:13:10 +02:00
mrdudz
afc80949e3 build targettest progrs for all targets 2022-07-21 03:13:10 +02:00
mrdudz
6eca9a6aac fix Makefiles for all targets, dive into subdirs like in samples 2022-07-21 03:13:10 +02:00
polluks
33bb1a22ff Removed the colour purple
This commit may break compatibility.
2022-07-21 03:13:10 +02:00
polluks
df662f4b66 Added more purple (rain) 2022-07-21 03:13:10 +02:00
polluks
d6349e0f92 Save a few bytes 2022-07-21 03:13:10 +02:00
mrdudz
69346960b8 samples makefile already goes through the subdirs correctly 2022-07-21 03:13:10 +02:00
mrdudz
7a0d630d1b actually use all targets for the samples dir 2022-07-21 03:13:10 +02:00
mrdudz
f82208b009 fix for atari5200 2022-07-21 03:13:10 +02:00
mrdudz
1e7886b9c7 build samples for all targets 2022-07-21 03:13:10 +02:00
polluks
5f151b1316 Revert commits 2022-07-21 03:13:10 +02:00
mrdudz
09f2dc8d69 comment out all the non working targets 2022-07-21 03:13:10 +02:00
mrdudz
e602d6e9c3 add sym1 target 2022-07-21 03:13:10 +02:00
mrdudz
3fbfddc5fb fix pathes 2022-07-21 03:13:10 +02:00
mrdudz
53fed67bbc fix pathes 2022-07-21 03:13:10 +02:00
mrdudz
8867d55b83 and another 2022-07-21 03:13:10 +02:00
mrdudz
f2ac6796aa another try 2022-07-21 03:13:10 +02:00
mrdudz
e9e9d7aab8 iterate through all targettest builds 2022-07-21 03:13:10 +02:00
Sven Michael Klose
24a9886717 mostlyclean: Clean up. 2022-07-21 03:13:10 +02:00
Sven Michael Klose
a45a92a71f main(): No return value. 2022-07-21 03:13:10 +02:00
Sven Michael Klose
a60ac67783 main(): Re-introduce return value. Compiler rejects 'void'. 2022-07-21 03:13:10 +02:00
Sven Michael Klose
d23c83dd1e Remove command line arguments and return value from main(). 2022-07-21 03:13:10 +02:00
Sven Michael Klose
d5591bc184 Make label file for c610 platform. 2022-07-21 03:13:10 +02:00
Sven Michael Klose
6aabee0564 Remove -t option for linker only. 2022-07-21 03:13:10 +02:00
Sven Michael Klose
a5ca1928f5 Use -t option alongside -C. 2022-07-21 03:13:10 +02:00
Sven Michael Klose
582c2f65e3 Use suffix '.lbl' instead of '.lst'. 2022-07-21 03:13:10 +02:00
Sven Michael Klose
0ac1b8d6b1 Remove most compiler warnings. 2022-07-21 03:13:10 +02:00
Sven Michael Klose
20f7320bae cbmdir-test for VICs needs memory expansion. 2022-07-21 03:13:10 +02:00
Sven Michael Klose
4bc9a9d9cc Make VICE monitor command lists for Commodore platforms. 2022-07-21 03:13:10 +02:00
Sven Michael Klose
b40c76a632 Do not compile petscii test for unsupported platforms.
Only C64 is supported.
2022-07-21 03:13:10 +02:00
Matthew D. Steele
815e30c47f Add space after function names 2022-07-21 03:13:10 +02:00
Matthew D. Steele
db02a89b5d Move local variable declaration to top of block 2022-07-21 03:13:10 +02:00
Matthew D. Steele
ceca1c496d Adjust Pop() sequencing in paravirt.c 2022-07-21 03:13:10 +02:00
Matthew D. Steele
623e951e33 Fix Pop() implementation in src/sim65/paravirt.c (fixes #1625)
The Pop() function was not handling stack pointer wrap around correctly.

Also, change the simulated RTS implementation in ParaVirtHooks() to
explicitly sequence the two Pop() calls in the correct order.
2022-07-21 03:13:10 +02:00
Sven Michael Klose
c2608599aa More strict printf() format string. 2022-07-21 03:13:10 +02:00
Sven Michael Klose
d29ec4c800 Move strnlen() to non-ANSI section. 2022-07-21 03:13:09 +02:00
Sven Michael Klose
34e03fd9ec Add test of strnlen(). 2022-07-21 03:13:09 +02:00
Sven Michael Klose
2c27c075a9 strnlen(): Add comment with POSIX standard. 2022-07-21 03:13:09 +02:00
Sven Michael Klose
3ee9b35080 Fix strnlen(). 2022-07-21 03:13:09 +02:00
Sven Michael Klose
88fdaeb490 Add standard C library function strnlen(). 2022-07-21 03:13:09 +02:00
Daniel Lehenbauer
be594912eb asminc/pet.inc: Add PIA1 & PIA2 2022-07-21 03:13:09 +02:00
Christian Groessler
ded575c477 put Atari 20-column note to where it belongs... 2022-07-21 03:13:09 +02:00
Scott Prive
caa74b325d document special case on sub 40-col modes 2022-07-21 03:13:09 +02:00
polluks2
a270a56a71 Wrong platform
There was no conio for Lynx
````
../bin/ld65   -o mandelbrot -t lynx -m mandelbrot.map mandelbrot.o lynx.lib
mandelbrot.s:516: Error: Unresolved external '_clrscr'
conio/vcprintf.s:85: Error: Unresolved external '_cputc'
conio/cputs.s:25: Error: Unresolved external '_cputc'
conio/cputs.s:15: Error: Unresolved external 'gotoxy'
ld65: Error: 3 unresolved external(s) found - cannot create output file
make: *** [mandelbrot] Error 1
````
2022-07-21 03:13:09 +02:00
Greg King
baa582ac0b Made cbm_open() be more efficient.
The fastcall argument doesn't need to be put on a stack.  SETNAM can be called before SETLFS.
2022-07-21 03:13:09 +02:00
polluks2
5b97a74dbc Delete c-cpp.yml 2022-07-21 03:13:09 +02:00
Greg King
e1ef1325ec Put the alignment decrement code back into posix_memalign().
Without that code, the function returns a very broken pointer.
2022-07-21 03:13:09 +02:00
Oliver Schmidt
152241f26c Don't rely on (actually changed) unspecified compiler behavior. 2022-07-21 03:13:09 +02:00
polluks2
a08f9e51a0 Fixed many typos 2022-07-21 03:13:09 +02:00
polluks2
7a0a0edb89 Fixed many typos 2022-07-21 03:13:09 +02:00
polluks2
5afc349199 Fixed typo 2022-07-21 03:13:09 +02:00
Greg King
dd27a66a7b Install system packages before checking out the repo. 2022-07-21 03:13:09 +02:00
Greg King
81930053dd Used (size_t), instead of (long) where converting between pointers and integers.
(long) still is 32 bits on 64-bit Windows!
2022-07-21 03:13:09 +02:00
Greg King
c143dd1f41 Added a 64-bit Windows cross-compile.
That compiler catches pointer-integer width mismatches that other compilers ignore.
2022-07-21 03:13:09 +02:00
Greg King
32253a4e51 Removed unneeded package names.
sshpass isn't needed because the Windows packages are put on Github.
linuxdoc-tools is a dependency of linuxdoc-tools-info.
The binutils package is a dependency of the gcc package.
2022-07-21 03:13:09 +02:00
Greg King
67fc9a4d36 Changed a big script into separate named steps.
It makes the job log easier to navigate.

Also, Pull Requests don't need a Zip file.
2022-07-21 03:13:09 +02:00
Oliver Schmidt
919645f283 Updated URL and improved consistency. 2022-07-21 03:13:09 +02:00
polluks
687c8052ae Save a few bytes 2022-07-21 03:13:09 +02:00
polluks2
6c1c260e7b Create c-cpp.yml 2022-07-21 03:13:09 +02:00
polluks2
27bfc8e35f Update README.md
Commander X16
2022-07-21 03:13:07 +02:00
Bob Andrews
19ddffecba
Merge pull request #1770 from devkev/lynx_darkbrown
lynx: fix TGI_COLOR_DARKBROWN
2022-07-21 00:03:37 +02:00
Bob Andrews
dcbd75f6bf
Merge pull request #1760 from polluks2/master
Fixed term #1553
2022-07-21 00:02:13 +02:00
Bob Andrews
6a8160c374
Merge pull request #1756 from polluks2/patch-4
Fixed typo
2022-07-21 00:02:01 +02:00
Bob Andrews
092c0a6531
Update lynx.h
remove TGI_COLOR_DARKBROWN
2022-07-20 23:54:57 +02:00
Bob Andrews
560317c8ba
Merge pull request #1789 from acqn/PPDiagnostics
[cc65] Fixed ICE with duplicate macro parameters
2022-07-19 17:38:29 +02:00
Bob Andrews
6b0afe0834
Merge pull request #1785 from acqn/Effectless
[cc65] Avoid generating asm from C code that has no observable effects
2022-07-19 17:38:03 +02:00
Bob Andrews
c802980d6a
Merge pull request #1784 from acqn/Diagnostics
[cc65] Slight improvements on diagnostics
2022-07-19 17:37:42 +02:00
Bob Andrews
82b268ee50
Merge pull request #1783 from acqn/MiscFixes
[cc65] Misc fixes and improvements
2022-07-19 17:37:19 +02:00
mrdudz
7165b29809 omit an error message also when an unresolved import was added by the compiler. fixes bug #1551 2022-07-14 22:54:18 +02:00
mrdudz
a6b807b1d8 more verbose comment 2022-07-14 22:39:29 +02:00
mrdudz
16bf472e66 reserve enough space for the longest string we can expect 2022-07-13 23:10:19 +02:00
acqn
9e3b759540 Fixed ICE with duplicate macro parameters. 2022-07-05 22:22:49 +08:00
Bob Andrews
e95db437a9
Merge pull request #1781 from jedeoric/cfg_telestrat_start_addr
Telestrat : change default start address
2022-06-25 00:34:36 +02:00
jede
e0718314b3 Telestrat cfg : fix space 2022-06-25 00:21:19 +02:00
jede
590de7566d Telestrat : change default start address 2022-06-25 00:19:21 +02:00
Spiro Trikaliotis
6b7d23ca74 isequal with --wildcard: Allow DOS/Win paths
Allow a colon (':') at the second position of a DOS or Windows path, so
a path with drive specifier (i.e., "c:") is recognized as a path of the
wildcard should end with a colon.
2022-06-22 21:23:44 +02:00
Spiro Trikaliotis
a7b2a92fc2 isequal: add --wildcards option 2022-06-21 22:23:10 +02:00
Spiro Trikaliotis
c738c94935 Debugging fix 2022-06-20 23:13:49 +02:00
Spiro Trikaliotis
0d7fba2332 More make test output for debugging 2022-06-20 23:10:32 +02:00
Spiro Trikaliotis
b5b3654017 Un-silence Make 2022-06-20 23:07:36 +02:00
Spiro Trikaliotis
aa64234707 Testcases for case 2022-06-20 23:03:12 +02:00
Spiro Trikaliotis
3a5fee75a3 Remove TAB for reference file, too 2022-06-20 22:57:20 +02:00
Spiro Trikaliotis
b816ee6676 Remove TABs again 2022-06-20 22:53:46 +02:00
Spiro Trikaliotis
b3846ee1c4 Complete check of ld65 output
ld65 output was only checked for listing build before. No, both builds
are tested separately for better test coverage.
2022-06-20 22:19:22 +02:00
Spiro Trikaliotis
343bc1a489 More assert tests
Also test ldwarning and lderror options.
2022-06-20 22:16:55 +02:00
Spiro Trikaliotis
e9888a0c28 testcase for ca65 .align 2022-06-20 22:01:01 +02:00
Spiro Trikaliotis
77a6ea3704 Makefile fix for ld65 error processing 2022-06-20 16:34:14 +02:00
Spiro Trikaliotis
7476c86ba9 More .assert testcases
Add testcases with error generation.
2022-06-20 16:33:25 +02:00
Spiro Trikaliotis
2040da0520 Reorga of test/asm/listing/
add ref/ and control/ subdirectories, so the control files and result
files do not clutter the directory, and it is clear which file has which
purpose.
2022-06-20 16:30:51 +02:00
Greg King
68da626d9c Removed an environment experiment. 2022-06-20 03:08:47 -04:00
Spiro Trikaliotis
e17cb6d602 isequal: add --skip for both left and right file
isequal: New option --skip as a shortcut for --skipleft and --skipright
at once.

Use that for the .list-ref files, so they now contain the first line of
the output, too, which is ignored.
2022-06-19 22:42:44 +02:00
Spiro Trikaliotis
1446b7dcc3 isequal: Add options for better handling
--binary: handled binary files
--empty:  check if file is empty

--skipleft=<n>: Skip <n> lines at the start of the left (first) file
--skipright=<n>: Skip <n> lines at the start of the right (second) file

Note that --binary, --empty and one or both of --skipXXX are mutual
exclusive; that is, you cannot specify more than one of them at the same
time, or the behaviour will be unpredictable.
2022-06-18 23:50:26 +02:00
Spiro Trikaliotis
297a11fcec Add more assert tests 2022-06-18 22:22:27 +02:00
Spiro Trikaliotis
794ebd7a0b Test cases for .assert warnings 2022-06-18 21:04:36 +02:00
Greg King
16d259d2b4 Commented out the push command. 2022-06-17 21:44:42 -04:00
Greg King
268823fdbb Changed a line that Github Actions claimed was bad. 2022-06-17 21:22:43 -04:00
Greg King
a0e0c789db Went back to using actions/checkout@v2.
(Direct cloning doesn't support pushing with a hidden token.)

I'm putting this aside, for now. A Personal Access Token must be made for the repository. "git push" does a dry-run, so that the workflow will succeed.
2022-06-17 18:42:12 -04:00
Greg King
65c8b49430 Passed the token through the environment. 2022-06-17 13:52:45 -04:00
Greg King
43c0f5ecd7 Directly clone the document repo. 2022-06-17 12:58:56 -04:00
Greg King
997c67de35 Put doc.git next to cc65. 2022-06-17 09:00:53 -04:00
Greg King
0dab508c75 Find out where doc.git is. 2022-06-17 08:35:06 -04:00
Greg King
3f314c0ee9 Fixed the action/checkout steps.
I misunderstood that action's docs.
2022-06-17 08:18:51 -04:00
Greg King
86d68bea8c Experiment: checkout the second repo first.
Maybe that will give it the github.token that it needs.
2022-06-17 08:06:21 -04:00
Greg King
b4231401bd Trying a verbose Git push.
If I'm lucky, it will tell me more.
2022-06-17 05:38:59 -04:00
Greg King
0d5dbb2ce2 Tried to authorize a push by setting the access token explicitly. 2022-06-17 03:46:31 -04:00
Greg King
5b0023c3df Fixed a shell syntax bug. Try again. 2022-06-17 02:30:52 -04:00
Greg King
1628efd569 Added Github action steps that update the online documentation repo. 2022-06-17 01:44:40 -04:00
Spiro Trikaliotis
a9e0dba991 Remove TAB to comply to style 2022-06-16 21:59:37 +02:00
Spiro Trikaliotis
48ae6716ad Some test cases for ca65 2022-06-16 20:57:53 +02:00
Kevin Pulo
3ef8dd3c0c lynx: fix TGI_COLOR_DARKBROWN 2022-06-16 15:06:02 +10:00
David W Plummer
db44d59f7c
Update README.md 2022-06-06 15:17:39 -07:00
David W Plummer
46541237e0
Add to contributor list for KIM-1 target 2022-06-06 15:17:19 -07:00
Dave Plummer
8f9777d9e0 Fix ushot overflow, capitalization 2022-06-06 15:14:01 -07:00
mrdudz
5aa75ae81f handle loadaddr the same as with the other CBM targets 2022-06-06 14:01:16 +02:00
Dave Plummer
799aec23a6 Add KIM-1 Support 2022-06-04 13:00:48 -07:00
Bob Andrews
30dc9b8d1a
Merge pull request #1755 from rofl0r/fix_target_path
cl65: fix regression in --print-target-path
2022-06-04 16:33:46 +02:00
polluks2
e6e93f3d18
Fixed term #1553 2022-06-03 12:36:04 +02:00
polluks2
c2b8479ea3
Fixed typo 2022-05-30 17:10:33 +02:00
rofl0r
94e7b11870 cl65: fix regression in --print-target-path
since the "empty prefix means run from current dir" hack was removed,
cl65 --print-target-path no longer prints the path relative to the
binary, but the hardcoded library path which points to prefix, because
the code adds the hardcoded path first to the pathsearch, but then actually
only returns the first entry rather than looking whether the path exists.

closes #1754
2022-05-30 12:22:02 +00:00
Bob Andrews
dcdf7ade08
Merge pull request #1748 from smuehlst/issue-1747
Fix switched meaning of '\n' and '\r' for osic1p target
2022-05-19 01:04:17 +02:00
Stephan Mühlstrasser
44257b9b4a Fix switched meaning of '\n' and '\r'
When conio was implemented for the osic1p target, the cbm
target was used as a blueprint. But it was overlooked that the
cbm target encodes CR as 0x0A and LF as 0x0D, while the
osic1p target uses the ASCII encoding of CR and LF. Therefore
conio output of '\n' moved the active position to the start of the
line and '\r' moved the active position to the next line.

This change implements the correct semantics of '\n' and '\r'
in conio for the osic1p target.

Fixes #1747.
2022-05-18 18:57:52 +02:00
Greg King
93e94c8dea Fixed a multi-line comment.
The left border is thicker in cc65 than it is in VICE.
2022-05-18 05:09:48 -04:00
Bob Andrews
93ee91fb4b
Merge pull request #1644 from polluks2/missing-purple
Added more purple and removed the colour violet
2022-05-17 15:54:59 +02:00
Bob Andrews
e0cc3650e4
Merge branch 'master' into missing-purple 2022-05-17 15:34:51 +02:00
mrdudz
d30fc65dd5 add check for +x flag 2022-05-17 15:28:51 +02:00
mrdudz
91199c57e8 remove +x flag 2022-05-17 15:28:51 +02:00
Bob Andrews
25efedf3e6
Merge pull request #1745 from Compyx/codeopt-unused-var-fix
Fix set but unused variable
2022-05-17 14:47:19 +02:00
mrdudz
0f291aee86 rename the actual checkstyle target too :) 2022-05-17 14:39:35 +02:00
mrdudz
75441afb71 rename the "check" target to "checkstyle".
also created a new "check" target which runs all tests, as it is common with GNU programs
2022-05-17 14:30:41 +02:00
mrdudz
1a5852ab91 don't try to build the checkversion sample for targets that do not have printf 2022-05-17 13:52:30 +02:00
mrdudz
4674b09421 clean and mostlyclean should also clean the test and targettest directories 2022-05-17 13:25:12 +02:00
compyx
2fdb1e6b0d Fix set but unused variable 2022-05-17 10:05:25 +02:00
Bob Andrews
8328bbf51d
Update README.md 2022-05-10 01:56:52 +02:00
Bob Andrews
4da7e1553f
Merge pull request #1676 from polluks2/patch-1
smarter manufacturer
2022-05-10 01:32:10 +02:00
mrdudz
8062f8d029 sample program that demonstrates how to compare the value of __CC65__ for
any version of the compiler
2022-05-10 01:16:19 +02:00
mrdudz
1b73ffb8ae document changes to __CC65__ 2022-05-10 01:13:24 +02:00
mrdudz
f67fb3b326 define __CC65__ as ((VER_MAJOR * 0x100) + VER_MINOR), fixes issue #1667 2022-05-10 01:12:13 +02:00
mrdudz
1c3d386e09 simple test related to #1678 2022-05-09 21:27:21 +02: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
mrdudz
1abb5f4734 Add a directory for tests that exercise the supported C standard differences.
As a first test added the snippet given in issue #1670
2022-05-08 19:29:57 +02:00
mrdudz
3640beaa46 fix some header files to conform with C99 hopefully, should fix issue #1670 2022-05-08 19:29:57 +02:00
mrdudz
d0ac06c9b0 must include stdarg.h to use varargs 2022-05-08 19:29:57 +02:00
Bob Andrews
1c34d798be
Update Contributing.md 2022-05-08 19:27:32 +02:00
Bob Andrews
fc4faa582a
Update Contributing.md 2022-05-08 18:46:12 +02:00
mrdudz
43af562ce1 At the end of the optimizer run, remove jump cascades again. fixes the
regression reported in #1652
2022-05-08 13:22:10 +02:00
mrdudz
5813fd81d3 add extra optimizer step that replaces BRA by JMP if the target is external 2022-05-08 13:20:18 +02:00
mrdudz
e6b9a4b292 test related to issue #1652, shows regression broken by #1231 and the
case that #1231 improved.
2022-05-08 13:19:32 +02:00
mrdudz
e0ae8ddc68 add sourcelines to the generated asm for easier inspection,
redirect output of sim65, including cycle count, into a seperate .out file per program
2022-05-08 13:18:27 +02:00
Bob Andrews
8bdc3b092c
Update Contributing.md 2022-05-06 22:13:33 +02:00
Bob Andrews
2314cddb5a
Merge pull request #1718 from polluks2/patch-2
Some clean-up
2022-05-06 13:08:14 +02:00
Bob Andrews
61bd7be6be
Merge pull request #1725 from polluks2/patch-4
typo in markdown
2022-05-06 13:05:01 +02:00
Bob Andrews
9beedbafdd
Merge pull request #1735 from rofl0r/empty_prefix
build: allow empty prefix - should this break on Amiga or other non POSIX systems, please speak up
2022-05-06 13:04:00 +02:00
Bob Andrews
14c7ae6f0c
Merge pull request #1742 from jedeoric/mkdir_fix_telestrat
Mkdir : fix registers calls
2022-05-06 13:00:03 +02:00
jede
47743d5fcf fix space 2022-05-05 22:50:37 +02:00
jede
348ea815b0 fix mkdir 2022-05-05 22:43:06 +02:00
Bob Andrews
71cec58d86
Adjust comments 2022-05-05 14:24:02 +02:00
Bob Andrews
b8f7167dcd
Merge pull request #1729 from jedeoric/fix_fd_cleaning_telestrat
[Telestrat] missing fd_management and cleaning
2022-05-04 02:34:58 +02:00
Bob Andrews
0fc1fb4a36
Merge pull request #1740 from WayneParham/master
Added myself as an external contributor for the Sym-1 target
2022-05-02 18:58:22 +02:00
Wayne Parham
f34bd59660 Added myself as an external contributor for the Sym-1 target 2022-05-02 11:44:47 -05:00
rofl0r
20dd6fd872 change GetProgPath() to return full & resolved binary path
GetProgPath() now resolves the path derived from argv[0] always
via realpath(3p) to its real location in the filesystem, and returns
the path including binary name, effectively making it work like
windows' GetModuleFileName(), so we can re-use the existing code
to strip the trailing binary name.
since symlinks are now always resolved, we no longer need the
special case code for linux to use /proc/self/exe for this purpose.
2022-05-02 08:22:21 +00:00
Bob Andrews
74f92564c3
Try reading from /proc/self first on linux, this is needed to make the edgy "make avail" work 2022-04-30 15:01:58 +02:00
Greg King
a5e69e7ea6 Upgraded the cx16 library to the Commander X16 Kernal ROM's prerelease 39. 2022-04-29 16:56:54 -04:00
rofl0r
d78672a4b4 rename AddSubSearchPathFromWinBin to AddSubSearchPathFromBin 2022-04-28 18:35:05 +00:00
rofl0r
b32c12dd83 implement AddSubSearchPathFromWinBin() counterpart for unix
this looks up paths relative to the binary used to start the
specific application.
2022-04-28 18:35:05 +00:00
Bob Andrews
75ee10478e
Update Contributing.md 2022-04-28 15:14:34 +02:00
rofl0r
8669710c0f build: allow empty prefix
there was some concern that this will break windows' way of doing
file lookups relatively from the binary, rather than via hardcoded
locations, but so far each occurence adding e.g. "CA65_INC" to
the pathsearch is already shielded with an #ifndef _WIN32.

addressing #1726
2022-04-27 16:19:06 +00:00
Bob Andrews
ba5859f724
Update README.md 2022-04-27 14:25:46 +02:00
Bob Andrews
e5b08baf56
Merge pull request #1724 from mrdudz/constexpr
Constexpr
2022-04-27 11:47:41 +02:00
mrdudz
f7a5f6ed73 test some more cases that should not change size 2022-04-26 17:08:19 +02:00
mrdudz
a3ae28a81c added a test that must fail 2022-04-26 17:07:57 +02:00
mrdudz
7c7c5af59f Merge remote-tracking branch 'upstream/master' into constexpr 2022-04-26 16:43:10 +02:00
Bob Andrews
01f151c3ab
Merge pull request #1734 from jedeoric/fix_kbhit
[Telestrat] Kbhit fix
2022-04-26 16:33:18 +02:00
jede
4bfd57153f fix bss 2022-04-26 14:14:27 +02:00
Bob Andrews
c34d6f0ea0
Merge pull request #1731 from rofl0r/paths_as_strings
build: properly quote strings passed as cpp macros
2022-04-26 12:26:12 +02:00
jede
4474ed2668 fix space 2022-04-26 11:10:07 +02:00
jede
1281032f33 FIX space 2022-04-26 10:23:38 +02:00
jede
e9597e8721 cgetc export data now 2022-04-26 00:40:16 +02:00
rofl0r
13081e0989 remove orphaned STRINGIZE macro 2022-04-25 17:12:09 +00: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
Bob Andrews
95b22298ab
Merge pull request #1730 from rofl0r/verbose_build
build: allow the user to specify make V=1 for verbose build
2022-04-25 17:25:40 +02:00
rofl0r
d8482fbd57 build: allow the user to specify make V=1 for verbose build
it's often required to see the full commandline when things go wrong.
the standard way for Makefile-only based buildsystems and autoconf
is to pass V=1 to make.
2022-04-25 14:58:38 +00:00
Bob Andrews
f9ba3b734c
Merge pull request #1715 from karrika/atari7800conio
[atari7800] conio
2022-04-24 17:27:12 +02:00
jede
8f40243315 fix spaces 2022-04-24 15:15:10 +02:00
jede
8c26b837ef fix typo 2022-04-24 00:41:12 +02:00
jede
c48df98145 missing fd_management and cleaning 2022-04-24 00:39:04 +02:00
Karri Kaksonen
f4260ed7bc Speed up the cursor a bit 2022-04-22 06:51:35 +03:00
Karri Kaksonen
c6decc7bb8 Move cursor IRQ processing to when the screen is being drawn 2022-04-21 21:54:33 +03:00
mrdudz
23831f08de const value should never have default size, use 32bit instead 2022-04-21 14:50:48 +02:00
mrdudz
fd02cbed9d fix workdir path 2022-04-20 14:54:44 +02:00
mrdudz
99919d2899 added a testprogram to check for some of the edge cases 2022-04-20 14:50:42 +02:00
Karri Kaksonen
643e88f9cb
Merge branch 'cc65:master' into atari7800conio 2022-04-20 15:31:00 +03:00
Bob Andrews
451acb3423
Update Contributing.md 2022-04-20 14:28:34 +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
polluks2
3ad83f2191
typo 2022-04-20 12:49:30 +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
Karri Kaksonen
c0f23d24ad
Merge branch 'cc65:master' into atari7800conio 2022-04-19 22:07:54 +03:00
Karri Kaksonen
fc244f6b95 Too much time in irq fix 2022-04-19 21:31:16 +03:00
Karri Kaksonen
26787ba380 Fix race condition 2022-04-19 20:01:47 +03:00
mrdudz
e2ad9efe41 Merge remote-tracking branch 'upstream/master' 2022-04-19 14:49:51 +02:00
Karri Kaksonen
f44af28a31 Merge branch 'atari7800conio' of github.com:karrika/cc65 into atari7800conio 2022-04-19 10:34:21 +03:00
Karri Kaksonen
eed8cec726 Add documentation 2022-04-19 10:33:58 +03:00
Karri Kaksonen
890a181ae5 Add color setup 2022-04-19 10:32:22 +03:00
Karri Kaksonen
6a9eeeb5b0 Rename font 2022-04-19 10:31:51 +03:00
Greg King
6ea1f8ee85 Made the style-check scripts send their file lists to stderr.
A complete list will be shown before make shows its error message.  There will be less confusion about which lines are in the list.
2022-04-18 19:47:02 -04:00
Karri Kaksonen
787d5c57ad
Merge branch 'cc65:master' into atari7800conio 2022-04-18 20:22:15 +03:00
Bob Andrews
47366cbbf6
use jmp instead of jsr/rts 2022-04-18 17:49:12 +02:00
mrdudz
ece6f10588 remove dangling spaces
when changing the checker scripts and/or directly comitting to git head, please make sure to also run the checks first so you don't break the autobuilds
2022-04-18 17:43:56 +02:00
Karri Kaksonen
6671a92a8e Not sharing umula0 and fix cursor bug 2022-04-18 13:49:29 +03:00
Karri Kaksonen
6a6aa094fa
Merge branch 'cc65:master' into atari7800conio 2022-04-18 12:40:18 +03:00
Karri Kaksonen
33f12acbc9 Fix typo 2022-04-18 12:26:21 +03:00
Karri Kaksonen
20ce50e8db Use consisten line lenght values 2022-04-18 12:21:12 +03:00
Karri Kaksonen
53337f8171 Fix wrong screen in 2022-04-18 12:12:30 +03:00
Karri Kaksonen
b195c10a4c Fix tabs 2022-04-18 12:09:19 +03:00
Karri Kaksonen
dbd39c63a9 Fix tabs 2022-04-18 12:05:36 +03:00
Karri Kaksonen
45c4f7d46f Add mono conio files 2022-04-18 11:59:54 +03:00
Karri Kaksonen
4fc1270110 Add mono conio files 2022-04-18 11:59:06 +03:00
Bob Andrews
35153a6dca
Merge pull request #1677 from acqn/LongBitField
[cc65] Added support for long-type bit-fields
2022-04-18 10:01:18 +02:00
Greg King
2cdccd5e8a Oops, forgot to check macros. 2022-04-17 19:10:29 -04:00
Greg King
5839298203 Remove work directory paths _before_ checking for style errors. 2022-04-17 16:10:28 -04:00
Greg King
a4e1cf9a0a Moved a constant expression out of a loop. 2022-04-17 15:08:42 -04:00
Greg King
86ca11222a Fixed and tightenned the find commands' expressions. 2022-04-17 15:04:36 -04:00
Greg King
b2319f3578 Made all of the Makefile's rules be phony. 2022-04-17 15:04:16 -04:00
mrdudz
e9fec5e3fe define CHECK_PATH rather than leaving it open 2022-04-17 17:12:52 +02:00
mrdudz
4e3bba0c3f also check spaces at end of lines 2022-04-17 16:08:21 +02:00
mrdudz
92e16432f7 remove dangling spaces 2022-04-17 16:08:04 +02:00
mrdudz
0129622383 remove dangling spaces 2022-04-17 16:07:52 +02:00
mrdudz
1be54d13bc remove dangling spaces 2022-04-17 16:07:20 +02:00
mrdudz
3c1bb85b8e remove dangling spaces 2022-04-17 16:07:09 +02:00
mrdudz
299f967527 remove dangling spaces 2022-04-17 16:06:45 +02:00
mrdudz
f8f901b05e remove dangling spaces 2022-04-17 16:06:22 +02:00
mrdudz
3c1641e3e3 remove dangling spaces 2022-04-17 16:05:19 +02:00
mrdudz
680f0c17f5 remove dangling spaces 2022-04-17 16:05:10 +02:00
mrdudz
bfb8568a5f remove dangling spaces 2022-04-17 16:04:58 +02:00
mrdudz
945291fd69 updated a bit 2022-04-16 22:08:03 +02:00
Karri Kaksonen
9fecf0b2cc Add info 2022-04-16 21:54:52 +03:00
Karri Kaksonen
1486886e13 Add info 2022-04-16 21:48:57 +03:00
Karri Kaksonen
1585a0532a Add x=0 to textcolor 2022-04-16 21:32:22 +03:00
Karri Kaksonen
702045cce1 Fix tabs 2022-04-16 21:22:44 +03:00
Karri Kaksonen
ecd1040e07 Remove obsolete file and fix tabs 2022-04-16 21:21:35 +03:00
Karri Kaksonen
ce4d1e0e54 Remove obsolete file and fix tabs 2022-04-16 21:21:27 +03:00
Karri Kaksonen
422d245cab Split files 2022-04-16 21:13:51 +03:00
mrdudz
eb04ce8190 add more style checks 2022-04-16 20:00:10 +02:00
mrdudz
c977afe0b8 add comment explaining what the empty file is about 2022-04-16 19:59:25 +02:00
mrdudz
8cacfa70d5 add missing newline to a bunch of files 2022-04-16 19:51:48 +02:00
mrdudz
fd6662bb64 add check action also to the snapshot build 2022-04-16 18:32:49 +02:00
mrdudz
4c58757064 run style checks on PR 2022-04-16 18:21:57 +02:00
mrdudz
4b492ed4e5 added TAB checker script, to be added to the PR checker action 2022-04-16 18:18:51 +02:00
mrdudz
2eb20b3e8a remove a bunch of TABs 2022-04-16 18:16:14 +02:00
Karri Kaksonen
cdc6e1c61f Split files 2022-04-16 19:15:19 +03:00
Karri Kaksonen
81e804ed7f Split files 2022-04-16 19:15:06 +03:00
mrdudz
3dd9ed0414 remove literal TABs 2022-04-16 17:36:25 +02:00
Bob Andrews
72e548fa84
Update README.md
link Contributing.md
2022-04-16 16:20:48 +02:00
Bob Andrews
e385ec1b5e
Create Contributing.md
Starting to move info hidden elsewhere into this file
2022-04-16 16:17:50 +02:00
mrdudz
f74ce463b2 add gitignores 2022-04-16 15:24:41 +02:00
Karri Kaksonen
5c648d545d Import conio automatically 2022-04-14 21:52:57 +03:00
Karri Kaksonen
18e27d6162 Change attributes on gotoxy 2022-04-10 19:35:29 +03:00
Karri Kaksonen
d287a0afa1 Change order of gotox gotoy for correct x after newline 2022-04-10 14:43:18 +03:00
Karri Kaksonen
a05f513779 Remove duplicate code 2022-04-09 07:37:07 +03:00
Karri Kaksonen
7ba7c6f69a Add blinking cursor 2022-04-07 08:17:36 +03:00
Karri Kaksonen
2fb0f6b47d Fix screen index bug 2022-04-07 07:46:28 +03:00
Karri Kaksonen
6b5c858b20 Cleanup 2022-04-07 07:22:19 +03:00
Karri Kaksonen
3f8c29d303 Use local multiply for cursorzone calculations 2022-04-06 14:08:03 +03:00
Karri Kaksonen
b6e18e14d5 Add local multiply routine 2022-04-06 13:27:47 +03:00
Karri Kaksonen
9caf7cefd8 Allocate own zp pointer for conio implementation 2022-04-05 11:13:38 +03:00
Karri Kaksonen
d5dcea65b7 Allocate own zp pointer for conio implementation 2022-04-05 11:13:18 +03:00
Karri Kaksonen
97fd42063b Align font to 256 bytes 2022-04-05 10:42:58 +03:00
Karri Kaksonen
6b16b99192 Fix conflicts with some conio routines 2022-04-05 10:35:59 +03:00
Karri Kaksonen
4c7c3d8f2f
Merge branch 'cc65:master' into atari7800conio 2022-04-04 23:27:21 +03:00
Bob Andrews
06d423d503
Merge pull request #1713 from karrika/atari7800stdjoy
[atari7800] Atari7800stdjoy
2022-04-04 22:23:02 +02:00
Karri Kaksonen
222693e3a3
Merge branch 'cc65:master' into atari7800conio 2022-04-04 15:32:40 +03:00
Karri Kaksonen
90fc16ff1c Add cputc method 2022-04-04 15:18:40 +03:00
Karri Kaksonen
43a1c24784 Add setcursor method 2022-04-04 15:18:13 +03:00
Karri Kaksonen
c7cb201070 Remove export 2022-04-04 15:17:26 +03:00
Karri Kaksonen
37456219eb Add space to config 2022-04-04 10:52:04 +03:00
Karri Kaksonen
04a13cf949 Add cursor processing 2022-04-04 10:51:43 +03:00
Karri Kaksonen
0e6b490c8b Remove cursor from conio init 2022-04-04 10:51:13 +03:00
Karri Kaksonen
6017671fd9 Don't set cursor in clrscr 2022-04-04 10:50:38 +03:00
Bob Andrews
ca5462a698
Merge pull request #1717 from Fabrizio-Caruso/GamateConioFix
Fix color 1 and 2 (grey/green levels)
2022-04-03 23:13:37 +02:00
Fabrizio Caruso
412fd70404 Optimize delete cycles 2022-04-03 17:23:36 +02:00
Fabrizio Caruso
b65084b459 Use lsr 2022-04-03 15:28:37 +02:00
Bob Andrews
bfd76b6dd7
Merge pull request #1719 from polluks2/patch-3
Fixed documentation typo
2022-04-03 14:33:53 +02:00
polluks2
91a5eb3770
Fixed documentation typo 2022-04-03 08:21:31 +02:00
polluks2
d0e9ceb2b5
Some clean-up
One exit() too much
file is not optional
2022-04-03 00:06:45 +02:00
Fabrizio Caruso
4121c64295 Ignore executables in util directory 2022-04-03 00:02:00 +02:00
Fabrizio Caruso
b7ba02d76f Remove executables 2022-04-02 23:58:35 +02:00
Fabrizio Caruso
2414a832d7 Make the intermediate gray/green levels available 2022-04-02 23:47:36 +02:00
Fabrizio Caruso
885b360a41 Fix color 1 and 2 (grey/green levels) 2022-04-02 23:09:05 +02:00
Karri Kaksonen
b3d28dd517 Change order to make decoding easier 2022-04-02 22:49:28 +03:00
Karri Kaksonen
5040a4b2a1 Use question mark instead of exclamation mark 2022-04-02 21:28:34 +03:00
Bob Andrews
d5cb3661f3
Merge pull request #1716 from Fabrizio-Caruso/GamateConioFix
[Tentative: please review] Fix Gamate CONIO: non-solid characters bug
2022-04-02 15:15:53 +02:00
Fabrizio Caruso
426e93b4bf Fix Gamate CONIO: non-solid characters bug 2022-04-02 12:44:27 +02:00
Karri Kaksonen
2e33185dcb Remove clrscr from init 2022-04-02 13:01:05 +03:00
Karri Kaksonen
19dab6bbab Change blue to white 2022-04-02 12:09:15 +03:00
Karri Kaksonen
c44557665c Change blue to white 2022-04-02 11:48:05 +03:00
Karri Kaksonen
2388d022aa Add the build tools for the font 2022-04-02 11:47:37 +03:00
Karri Kaksonen
3a21734c68 Fix cursor character 2022-04-02 10:51:45 +03:00
Karri Kaksonen
f8b53e91fa Add the font160.png 2022-04-02 10:04:53 +03:00
Karri Kaksonen
c31c7d2782 Add basic conio buffer 2022-04-02 09:39:55 +03:00
Karri Kaksonen
77b300682a Add basic conio buffer 2022-04-02 09:39:46 +03:00
Karri Kaksonen
26ab64f207 Change polarity for 2600 buttons 2022-03-31 11:04:10 +03:00
Karri Kaksonen
e4193451d4 Add comments 2022-03-31 09:09:11 +03:00
Karri Kaksonen
4e8f62fb96 Add stdjoy driver 2022-03-31 09:08:40 +03:00
Karri Kaksonen
67def0ca0d Fixed logic flaw 2022-03-31 08:05:41 +03:00
Karri Kaksonen
2c00f1e898 Add atari7800-stdjoy 2022-03-31 07:44:26 +03:00
Bob Andrews
84dba7f6ae
Merge pull request #1709 from karrika/atari7800clock
[Atari7800] clock()
2022-03-29 23:13:47 +02:00
Karri Kaksonen
5115a1b50f Export paldetected 2022-03-25 15:08:14 +02:00
Karri Kaksonen
4a71a1fbb2 Use proper mnemonics 2022-03-25 15:02:43 +02:00
Karri Kaksonen
8d0b0e6ffc Separate machine detection from crt0 and put it in get_tv 2022-03-25 14:44:54 +02:00
Karri Kaksonen
4c3120b935 Make STARTUP segment larger 2022-03-22 21:41:12 +02:00
Karri Kaksonen
865be55e66 Split clock file to components 2022-03-22 21:29:06 +02:00
Karri Kaksonen
d0d0941a64 Add get_tv.s 2022-03-22 21:28:35 +02:00
Karri Kaksonen
c577ec1383 Add more space to init segmen 2022-03-22 21:16:56 +02:00
Karri Kaksonen
d6009721d4 Add irq handling, PAL/NTSC detection and clock() 2022-03-22 20:02:54 +02:00
Karri Kaksonen
220171d0da Add irq handling, PAL/NTSC detection and clock() 2022-03-22 20:02:46 +02:00
Bob Andrews
0851474757
Merge pull request #1708 from karrika/lynxbootloader
Fix for #1706. Clear hw palette and set AUDIN low at startup
2022-03-21 15:24:42 +01:00
Karri Kaksonen
79c243ccef Clear hw palette and set AUDIN low at startup 2022-03-21 08:37:49 +02:00
Bob Andrews
4cf7db1ef5
Merge pull request #1692 from karrika/atari7800
#805 Atari7800 target
2022-03-20 20:39:36 +01:00
Bob Andrews
58de94edd4
Merge pull request #1560 from empathicqubit/master
Add --debug-tables <filename> option and output struct fields
2022-03-20 20:27:15 +01:00
Bob Andrews
004a57bdff
Merge pull request #1707 from greg-king5/lynx-samples
Add Atari Lynx versions of three samples programs.
2022-03-19 16:12:04 +01:00
Karri Kaksonen
d12c2d6810 Fix offset for MARIA 2022-03-19 09:09:50 +02:00
Greg King
9f2d27d9c1 Added Atari Lynx versions of three sample programs.
The Lynx target can't build the usual versions because its library doesn't have conio output and stdio.
2022-03-19 01:21:52 -04:00
Greg King
266f35ee37 Made tgidemo draw circles in blue instead of orange.
That change lets it be built on two more platforms (Atmos, Telestrat).
2022-03-18 01:06:48 -04:00
Karri Kaksonen
38b330482d Make start of ROM depend on CARTSIZE 2022-03-13 13:31:11 +02:00
Karri Kaksonen
889f3a7c14 Merge branch 'atari7800' of github.com:karrika/cc65 into atari7800 2022-03-13 12:33:12 +02:00
Karri Kaksonen
52d7991b9b Remove the EXEHDR from the default build 2022-03-13 12:32:13 +02:00
Greg King
b2ae73879b Added a URL to the snapshot's commit history as a comment in the Windows snapshot ZIPs. 2022-03-12 01:35:33 -05:00
Bob Andrews
2f4e2a34c3
Merge pull request #1694 from nyanpasu64/fix-win64-segfault
Fix cc65 segfault on 64-bit LLP64 Windows builds
2022-03-09 16:52:23 +01:00
Karri Kaksonen
dd6c1cfb7d
Merge branch 'cc65:master' into atari7800 2022-03-09 14:45:38 +02:00
mrdudz
6001d3eab9 fix #warning directive so the test could actually compile :) 2022-03-07 14:48:55 +01:00
Karri Kaksonen
25ecaf873b
Merge branch 'cc65:master' into atari7800 2022-03-07 09:03:25 +02:00
Karri Kaksonen
21c093476f Merge branch 'atari7800' of github.com:karrika/cc65 into atari7800 2022-03-07 08:49:29 +02:00
Karri Kaksonen
eb86bc33b9 Add CARTSIZE to cfg file for configuring the a78 header. Add descriptions of usage. 2022-03-07 08:48:59 +02:00
nyanpasu64
9cb81f1410 Replace #include "inttypes.h" with <inttypes.h> 2022-03-06 14:48:51 -08:00
nyanpasu64
3466abc60c Fix format strings to properly format uintptr_t 2022-03-06 14:48:03 -08:00
nyanpasu64
2feba69622 Remove broken inttypes.h
src/common/inttypes.h is a shim to fix building cc65 on
non-C99-compliant compilers missing inttypes.h (like VS2012 and
earlier). The shim is actually incomplete and does not define the PRI...
macros supplied by the actual compiler headers. Since we're planning to
use those macros, delete this header so cc65's source files instead use
host-supplied inttypes.h containing macro definitions.
2022-03-06 14:47:58 -08:00
nyanpasu64
f36b9b544d Fix segfault on 64-bit LLP64 Windows builds
There are many occurrences of unsigned long in codegen.h's function
arguments. Changing g_getimmed and g_defdata makes `make` succeed
without segfaulting. I don't know if it makes cc65 behave correctly in
all cases, or if there are more unsigned long that need to be changed.
2022-03-06 14:47:51 -08:00
Bob Andrews
10c1b050c7
Merge pull request #1699 from WayneParham/master
Added Sym-1 extended memory sample program and documentation
2022-03-06 16:00:36 +01:00
Karri Kaksonen
786b4310d0
Merge branch 'cc65:master' into atari7800 2022-03-05 19:09:05 +02:00
Bob Andrews
2d0bc67c41
Merge pull request #1686 from karrika/lynxtext
Mark index 0 as TRANSPARENT. Let palette start from index 1
2022-03-05 12:54:20 +01:00
Karri Kaksonen
cc9535e82f Update docs 2022-03-04 20:21:20 +02:00
Wayne Parham
3cb85fd5e8 Minor updates 2022-03-04 06:23:06 -06:00
Wayne Parham
7664a2f61e Documentation clarifications 2022-03-03 20:51:16 -06:00
Wayne Parham
dc9c0fe90b unsigned int format specifier 2022-03-03 19:57:43 -06:00
Wayne Parham
81338a61c3 Added Sym-1 extended memory sample program and documentation 2022-03-03 17:47:31 -06:00
Bob Andrews
d368005912
Merge pull request #1698 from WayneParham/master
Corrected size of BASROM definition in Sym1 config files
2022-03-03 20:37:11 +01:00
Wayne Parham
1cb18182ed Corrected size of BASROM definition 2022-03-03 12:06:15 -06:00
Bob Andrews
53b1a18680
Merge pull request #1697 from acqn/LongCmpUnsignedFix
[cc65] Long cmp unsigned fix
2022-03-03 15:41:07 +01:00
acqn
c8956ce19b Fixed signed long comparisons with smaller unsigned types. 2022-03-03 20:24:14 +08:00
Bob Andrews
18412e1cd2
Merge pull request #1695 from acqn/MakefileFix
[Build] Fixed test/asm/listing/Makefile with mingw32-make.exe
2022-03-03 12:50:17 +01:00
Bob Andrews
4379f9cc8f Merge pull request #1695 from acqn/MakefileFix
[Build] Fixed test/asm/listing/Makefile with mingw32-make.exe
2022-03-03 12:50:17 +01:00
acqn
67594cca70 Testcases for long bit-fields. 2022-03-03 16:14:26 +08:00
acqn
1ba39b678c Fixed test/asm/listing/Makefile with mingw32-make.exe that has problems with comments lead with tabulators. 2022-03-03 14:03:01 +08:00
Bob Andrews
0587d9f5d4
Merge pull request #1675 from acqn/ShiftFix
[cc65] Fixed bitwise shift with numeric constant operand(s)
2022-03-01 19:50:21 +01:00
Greg King
bca8fcb947 Added a more general test to test/val/bug1690.c 2022-03-01 12:56:34 -05:00
Bob Andrews
a88704c6b5
Merge pull request #1691 from acqn/OptCmp1_Fix
[cc65] Fixed OptCmp1 with certain code patterns with labels.
2022-03-01 14:28:53 +01:00
Karri Kaksonen
d679faaf22 Add exehdr 2022-03-01 09:28:15 +02:00
Karri Kaksonen
b861f6df8f Add exehdr 2022-03-01 09:28:06 +02:00
Karri Kaksonen
c293b299d8 Add segment ONCE 2022-03-01 07:44:47 +02:00
Karri Kaksonen
d059682692 Add crt0.s and ctype.s 2022-03-01 07:37:07 +02:00
Karri Kaksonen
8c975dfb36 Remove garbage 2022-03-01 07:03:29 +02:00
Karri Kaksonen
3266e70de4 Add target atari7800 2022-03-01 06:44:55 +02:00
Karri Kaksonen
328781bf8a Add target atari7800 2022-03-01 06:44:26 +02:00
acqn
5ef420af5a Fixed OptCmp1 with certain code patterns with labels. 2022-03-01 10:40:01 +08:00
Karri Kaksonen
b74de2319f Fix black index in tgi_colors.s 2022-02-25 16:00:03 +02:00
Karri Kaksonen
4e406b744c Mark index 0 as TRANSPARENT. Let palette start from index 1 2022-02-24 08:50:36 +02:00
Bob Andrews
f8cdb2ab63
Merge pull request #1685 from jefftranter/fix-typos
Fix some commonly made spelling errors in comments.
2022-02-22 13:01:38 +01:00
Greg King
39df6f8f66 Made the c128, not the c64, target build the c128 version of "c64-c128-scpu-test.c".
Its placement in the wrong list caused a parallel race condition that sometimes led to failed test builds.
2022-02-21 16:07:22 -05:00
Greg King
a49bf13b25 Reverted "do not use cl65 to prevent tests from failing randomly because of one process deleting the temp files from another".
This reverted commit 02a46e0237.  That commit didn't fix the real bug (a program name in the wrong list).
2022-02-21 16:00:38 -05:00
Jeff Tranter
5d8cf4ec48 A couple of addtional fixes. 2022-02-21 15:54:47 -05:00
Jeff Tranter
2bf8be5b3b Fix some commonly made spelling errors in comments. 2022-02-21 15:44:31 -05:00
Bob Andrews
fffb4c3b40
Merge pull request #1679 from spiro-trikaliotis/testsuite-ca65
Reorganized test/asm
2022-02-20 19:54:13 +01:00
mrdudz
7f0b4b090c Merge remote-tracking branch 'upstream/master' 2022-02-20 18:07:57 +01:00
mrdudz
02a46e0237 do not use cl65 to prevent tests from failing randomly because of one process deleting the temp files from another 2022-02-20 16:49:01 +01:00
empathicqubit
49b4a57add Documentation 2022-02-20 12:40:32 +01:00
Spiro Trikaliotis
0f6cb5b114 Add proper readmes 2022-02-20 11:20:20 +01:00
Spiro Trikaliotis
0e45976f9b Rename target test to asm 2022-02-19 12:52:02 +01:00
Spiro Trikaliotis
388ae87cb3 Reorganized test/asm 2022-02-19 12:44:20 +01:00
acqn
904a77e03c Testcase for #1675. 2022-02-18 15:20:01 +08:00
acqn
2bda128ef1 Fixed LimitExprValue() for 64-bit long env. 2022-02-26 23:02:51 +08:00
polluks2
246814e63b
smarter manufacturer
some kind of promotion
2022-02-18 00:43:49 +01:00
Greg King
d006317b0e Made the snapshot-on-push Github action run on only the upstream repository. 2022-02-17 00:30:31 -05:00
acqn
14988f5dda Fixed bitwise shift with numeric constant operand(s). 2022-02-16 20:10:54 +08:00
Bob Andrews
bfa9e77523
Merge pull request #1672 from spiro-trikaliotis/pr-1647
ca65: .constructor after .export fails
2022-02-15 22:34:04 +01:00
Bob Andrews
7c417359ec
Merge pull request #1674 from spiro-trikaliotis/obs-link
Add link to DEB and RPM snapshots
2022-02-15 22:25:20 +01:00
Spiro Trikaliotis
1df61b6ec7 Add link to DEB and RPM snapshots 2022-02-15 22:16:06 +01: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
Bob Andrews
9088d66758
Merge pull request #1671 from spiro-trikaliotis/pr-1634
Invalid flagged errors if token is missing
2022-02-15 21:57:00 +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
mrdudz
ad82392428 add hint on VICE -moncommands 2022-02-15 21:25:24 +01:00
Bob Andrews
24c8de87c2
Merge pull request #1662 from acqn/StructFix
[cc65] Fixed ICE on unnamed bit-fields declared with typedef'ed types
2022-02-14 17:31:45 +01:00
acqn
6dbafda53f Testcase for #1662. 2022-02-14 22:28:22 +08: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
mrdudz
30b00ed076 attempt to prevent utils being compiled with cc65 2022-02-11 16:53:34 +01:00
mrdudz
118e73ddf9 build utilities in a seperate step 2022-02-11 16:38:40 +01:00
Greg King
1f51a9f587 Removed geos_apple and geos_cbm from the lists of targets.
They need resource files to go with the program source files.  The top-level samples and targettest programs don't have those resources.
2022-02-09 04:05:35 -05:00
Greg King
5747fa4df3 Added '+' to another SUBDIRS_recipe. 2022-02-09 04:05:35 -05:00
Greg King
9dd13d7047 Moved the platform-test enumerations from Github Actions over to makefiles.
Now, we can run those tests locally, as well as on Github.
2022-02-09 04:05:35 -05:00
Bob Andrews
ee345600b4
Merge pull request #1658 from WayneParham/master
Correction of link typos
2022-02-08 22:42:21 +01:00
Wayne Parham
9cb005c98f Correction of link typos 2022-02-08 14:22:09 -06:00
Bob Andrews
449341f873
Merge pull request #1657 from WayneParham/master
Documentation updates for Sym-1.
2022-02-08 11:50:27 +01:00
Wayne Parham
470b648b9f Added note about return value being function status. 2022-02-07 19:51:03 -06:00
Wayne Parham
84d639e40c Typo correction. 2022-02-07 19:46:16 -06:00
Wayne Parham
e488d7b2a6 Documentation updates for Sym-1. 2022-02-07 19:14:02 -06:00
Wayne Parham
10b8920ecc Merge https://github.com/cc65/cc65 2022-02-07 17:12:43 -06:00
mrdudz
856517a771 Merge remote-tracking branch 'upstream/master' 2022-02-06 18:51:21 +01:00
mrdudz
dfe478b154 upload snapshot to sourceforge 2022-02-06 18:20:09 +01:00
mrdudz
ddfbe932e3 test upload again 2022-02-06 17:29:14 +01:00
mrdudz
e7469212d7 try publishing on sf after snapshot 2022-02-06 16:49:01 +01:00
Bob Andrews
94d1bfc450
Merge pull request #1653 from mrdudz/movesamples
move some things from targettest to samples
2022-02-05 18:18:07 +01:00
mrdudz
0436c6e314 fix this too 2022-02-05 18:09:32 +01:00
mrdudz
1ff68e2894 Merge remote-tracking branch 'upstream/master' into movesamples 2022-02-05 17:57:00 +01:00
mrdudz
e0745204b6 fix again. sigh 2022-02-05 17:56:33 +01:00
mrdudz
766e0e2144 fix 2022-02-05 17:51:48 +01:00
mrdudz
9308f5147d Merge remote-tracking branch 'upstream/master' into movesamples 2022-02-05 17:48:09 +01:00
mrdudz
096c28bb52 remove programs in util dir before making a snapshot. we might later
decide to leave them there anyway.
2022-02-05 17:47:20 +01:00
mrdudz
2ea9cf0449 cleanup 2022-02-05 17:44:54 +01:00
mrdudz
179f2d05aa utils before samples 2022-02-05 17:44:46 +01:00
mrdudz
b3217ccb03 build util dir when testing 2022-02-05 17:44:32 +01:00
mrdudz
d23c9b6aa5 use gamate-fixcart from util dir 2022-02-05 17:34:22 +01:00
mrdudz
61dc15cad0 Merge remote-tracking branch 'upstream/master' into movesamples 2022-02-05 17:31:20 +01:00
mrdudz
afe9d6a2eb also compile the programs in the util directory by default, not only
do we want to test they can be compiled, but also samples may use/require
them. we might want to install them too, perhaps
2022-02-05 17:28:28 +01:00
mrdudz
4e5b521903 move some things from targettest to samples 2022-02-05 16:55:57 +01:00
Greg King
98bc021c5a Added the names of samples and targettest programs that the telestrat library can build now. 2022-02-03 18:23:23 -05:00
Greg King
f64ee3370d Added to the telestrat library the name of the standard dynamic TGI driver. 2022-02-03 18:23:23 -05:00
Greg King
bae2821d5a Added telestrat to <time.h>.
That library has clock().
2022-02-03 18:23:23 -05:00
Bob Andrews
7bbc006014
Merge pull request #1649 from polluks2/typos
Fixed many typos
2022-02-03 14:43:11 +01:00
Bob Andrews
24227482ea
Merge pull request #1648 from polluks2/tco
Added tail call optimization
2022-02-03 14:42:41 +01:00
polluks
f7fa81b244 Fixed many typos 2022-02-03 01:01:10 +01:00
polluks
a26778744a Added tail call optimization 2022-02-02 23:02:01 +01:00
polluks
8e60102e8e Removed the colour purple
This commit may break compatibility.
2022-02-02 00:58:50 +01:00
Oliver Schmidt
e3ca14116d
Disable double hires on exit.
A program being run afterwards might not even know about the existence of double hires. So it's our task to turn double hires off on exit.
2022-01-31 19:32:44 +01:00
Greg King
7118c9236b Fixed the cart directory build code to handle even simple programs.
Carts can be built containing programs that don't link some segments.
2022-01-31 08:14:26 -05:00
Greg King
112e216e53 Removed an obsolete command-line option from the cc65 compiler. 2022-01-30 22:10:06 -05:00
polluks
a29a1b0a59 Added more purple (rain) 2022-01-31 02:18:01 +01:00
Greg King
98f862b8fb Fixed heaptest.c compiler warnings in a way that's better than PR #1621.
This fix adds "unsigned" to one line instead of removing it from several lines.
2022-01-30 20:13:04 -05:00
mrdudz
25363ae00a the forgotten minimal testprog 2022-01-30 23:26:07 +01:00
mrdudz
c50f5c9467 build targettest progrs for all targets 2022-01-30 19:51:05 +01:00
mrdudz
d8366132c7 fix Makefiles for all targets, dive into subdirs like in samples 2022-01-30 19:51:05 +01:00
Bob Andrews
b00cb182d9
Merge pull request #1637 from polluks2/save_a_few_bytes
Save a few bytes
2022-01-30 13:21:41 +01:00
mrdudz
ccb77735d2 samples makefile already goes through the subdirs correctly 2022-01-30 13:18:51 +01:00
mrdudz
a0fc95bb15 actually use all targets for the samples dir 2022-01-30 12:49:33 +01:00
mrdudz
333c31e4ce fix for atari5200 2022-01-30 12:49:02 +01:00
mrdudz
6e5a988f85 build samples for all targets 2022-01-30 12:36:15 +01:00
Bob Andrews
82f55a930a
Merge pull request #1618 from polluks2/master
Fixed many typos
2022-01-30 12:21:07 +01:00
polluks
e327071615 Save a few bytes 2022-01-30 03:26:32 +01:00
polluks
e66a54ac14 Revert commits 2022-01-30 03:15:28 +01:00
polluks2
97c83de37b
Merge branch 'cc65:master' into master 2022-01-30 02:40:27 +01:00
mrdudz
11bcaba99b comment out all the non working targets 2022-01-30 02:29:11 +01:00
mrdudz
908173b663 add sym1 target 2022-01-30 02:14:01 +01:00
mrdudz
91cf347f31 fix pathes 2022-01-30 02:13:54 +01:00
mrdudz
273721e05e fix pathes 2022-01-30 02:07:50 +01:00
mrdudz
43fdc8781d and another 2022-01-30 01:54:06 +01:00
mrdudz
90cc44b410 another try 2022-01-30 01:46:47 +01:00
mrdudz
d1ae098190 iterate through all targettest builds 2022-01-30 01:23:10 +01:00
Bob Andrews
9da9b979f2
Merge pull request #1621 from SvenMichaelKlose/pixel_targettest_fixes
Fix VIC build, remove compiler warnings, add LST files for VICE emulator targets.
2022-01-30 00:10:30 +01:00
Bob Andrews
ad1ebb697f
Merge pull request #1626 from mdsteele/paravirt
Fix Pop() implementation in src/sim65/paravirt.c (fixes #1625)
2022-01-29 22:33:32 +01:00
Bob Andrews
6332f090d9
Merge pull request #1620 from SvenMichaelKlose/pixel_strnlen
Add standard C library function strnlen().
2022-01-29 21:32:27 +01:00
Bob Andrews
4579a7e181
Merge pull request #1629 from DLehenbauer/pet_asm_inc
asminc/pet.inc: Add PIA1 & PIA2 addresses
2022-01-29 21:21:58 +01:00
Christian Groessler
c3e01062ea put Atari 20-column note to where it belongs... 2022-01-24 20:13:49 +01:00
Christian Groessler
fc12b19659
Merge pull request #1633 from sprive/atari8-docs
document special case on sub 40-col modes
2022-01-24 20:00:13 +01:00
Scott Prive
91920f807e document special case on sub 40-col modes 2022-01-23 18:53:14 -05:00
polluks2
3aeaa36a58
Wrong platform
There was no conio for Lynx
````
../bin/ld65   -o mandelbrot -t lynx -m mandelbrot.map mandelbrot.o lynx.lib
mandelbrot.s:516: Error: Unresolved external '_clrscr'
conio/vcprintf.s:85: Error: Unresolved external '_cputc'
conio/cputs.s:25: Error: Unresolved external '_cputc'
conio/cputs.s:15: Error: Unresolved external 'gotoxy'
ld65: Error: 3 unresolved external(s) found - cannot create output file
make: *** [mandelbrot] Error 1
````
2022-01-22 01:04:08 +01:00
Daniel Lehenbauer
12f9a2f1f8 asminc/pet.inc: Add PIA1 & PIA2 2022-01-17 08:22:15 -08:00
Matthew D. Steele
22a3d55e40 Add space after function names 2022-01-08 16:39:30 -05:00
Matthew D. Steele
1f6bc6240f Move local variable declaration to top of block 2022-01-08 16:29:42 -05:00
Matthew D. Steele
92bfbeb8ab Adjust Pop() sequencing in paravirt.c 2022-01-08 16:24:40 -05:00
Matthew D. Steele
cf1bc4fad4 Fix Pop() implementation in src/sim65/paravirt.c (fixes #1625)
The Pop() function was not handling stack pointer wrap around correctly.

Also, change the simulated RTS implementation in ParaVirtHooks() to
explicitly sequence the two Pop() calls in the correct order.
2022-01-07 09:56:46 -05:00
acqn
4f4487cb03 Added supports for long bit-fields. 2022-01-04 18:23:04 +08:00
acqn
6beb090193 Fixed anonymous bit-fields declared with typedef'ed type names. 2022-01-03 23:54:14 +08:00
acqn
38511843e5 Fixed crash with labels in non-function/block scopes. 2022-01-03 23:50:48 +08:00
acqn
21858b52e7 Separated data initializer stuff from declaration stuff. 2022-01-03 13:10:32 +08:00
polluks2
06725c166e
Merge branch 'cc65:master' into master 2021-12-31 17:21:20 +01:00
polluks
1bcf93d010 Merge branch 'master' of http://github.com/polluks2/cc65 2021-12-30 00:42:29 +01:00
polluks
4920ffa23a Save a few bytes 2021-12-30 00:04:57 +01:00
Sven Michael Klose
683739d6fc mostlyclean: Clean up. 2021-12-25 21:25:52 +01:00
Sven Michael Klose
05b8af07aa main(): No return value. 2021-12-25 21:21:01 +01:00
Sven Michael Klose
3bd72b9659 main(): Re-introduce return value. Compiler rejects 'void'. 2021-12-25 20:15:09 +01:00
Sven Michael Klose
0707cdbe2c Remove command line arguments and return value from main(). 2021-12-25 20:12:45 +01:00
Sven Michael Klose
f4702cbc40 Make label file for c610 platform. 2021-12-25 20:11:22 +01:00
Sven Michael Klose
412a30987a Remove -t option for linker only. 2021-12-25 20:10:53 +01:00
Sven Michael Klose
34dd29556f Use -t option alongside -C. 2021-12-25 20:09:18 +01:00
Sven Michael Klose
de158c0847 Use suffix '.lbl' instead of '.lst'. 2021-12-25 20:07:34 +01:00
Sven Michael Klose
d1cbb1deeb More strict printf() format string. 2021-12-25 20:04:10 +01:00
Sven Michael Klose
666f266e90 Move strnlen() to non-ANSI section. 2021-12-25 14:21:47 +01:00
Sven Michael Klose
65564a158c Remove most compiler warnings. 2021-12-25 09:57:18 +01:00
Sven Michael Klose
bdd18d958b cbmdir-test for VICs needs memory expansion. 2021-12-25 09:45:15 +01:00
Sven Michael Klose
58dd28f053 Make VICE monitor command lists for Commodore platforms. 2021-12-25 09:40:32 +01:00
Sven Michael Klose
ba93ab07bc Do not compile petscii test for unsupported platforms.
Only C64 is supported.
2021-12-25 09:19:37 +01:00
Sven Michael Klose
87fe2f5d0e Add test of strnlen(). 2021-12-25 09:13:43 +01:00
Sven Michael Klose
c9ccc82b9f strnlen(): Add comment with POSIX standard. 2021-12-25 09:12:13 +01:00
Sven Michael Klose
0b84465276 Fix strnlen(). 2021-12-25 09:11:58 +01:00
Sven Michael Klose
921e549172 Add standard C library function strnlen(). 2021-12-24 23:44:57 +01:00
Greg King
6ac4aa4e20 Made cbm_open() be more efficient.
The fastcall argument doesn't need to be put on a stack.  SETNAM can be called before SETLFS.
2021-12-24 00:10:04 -05:00
polluks2
7d6b6ef986
Delete c-cpp.yml 2021-12-22 09:50:38 +01:00
polluks2
cff0f71ea8 Merge branch 'master' of github.com:polluks2/cc65 2021-12-21 17:54:32 +01:00
polluks2
7ffbf7aa75
Merge branch 'cc65:master' into master 2021-12-21 17:43:07 +01:00
polluks2
c32846dc6e Merge branch 'master' of http://github.com/cc65/cc65 2021-12-20 13:49:20 +01:00
Greg King
884f72637b Put the alignment decrement code back into posix_memalign().
Without that code, the function returns a very broken pointer.
2021-12-19 21:08:46 -05:00
Oliver Schmidt
2235830e31 Don't rely on (actually changed) unspecified compiler behavior. 2021-12-19 16:55:32 +01:00
polluks2
1cdd4676b2 Fixed many typos 2021-12-14 13:13:16 +01:00
polluks2
89909cd4ed
Merge branch 'cc65:master' into master 2021-12-14 09:19:17 +01:00
Bob Andrews
6a76d6d905
Merge pull request #1611 from polluks2/patch-3
Fixed many typos
2021-12-13 20:05:31 +01:00
Bob Andrews
37d0c4066c
Merge pull request #1610 from polluks2/patch-2
Fixed typo
2021-12-13 18:49:40 +01:00
polluks2
1d3318c247
Fixed many typos 2021-12-13 17:20:56 +01:00
polluks2
9e9b3dbaca
Fixed typo 2021-12-13 17:14:57 +01:00
Greg King
230f4d3807 Install system packages before checking out the repo. 2021-12-12 23:54:17 -05:00
Greg King
325ff9667e Used (size_t), instead of (long) where converting between pointers and integers.
(long) still is 32 bits on 64-bit Windows!
2021-12-12 19:40:43 -05:00
Greg King
366701e066 Added a 64-bit Windows cross-compile.
That compiler catches pointer-integer width mismatches that other compilers ignore.
2021-12-12 19:02:37 -05:00
Greg King
33cf8608b7 Removed unneeded package names.
sshpass isn't needed because the Windows packages are put on Github.
linuxdoc-tools is a dependency of linuxdoc-tools-info.
The binutils package is a dependency of the gcc package.
2021-12-12 19:02:37 -05:00
Greg King
2feadf865c Changed a big script into separate named steps.
It makes the job log easier to navigate.

Also, Pull Requests don't need a Zip file.
2021-12-12 19:02:37 -05:00
Oliver Schmidt
b35a9d97a6 Updated URL and improved consistency. 2021-12-12 23:59:22 +01:00
Bob Andrews
c0c89a81e4
Merge branch 'master' into rremd 2021-12-11 22:36:12 +01:00
Bob Andrews
332742b688
Merge branch 'master' into master 2021-12-11 22:35:50 +01:00
dqh-github
bd94879be2
Re-added build status badge
(Github Actions is now doing a snapshot build and test for updates to the master branch)
2021-12-11 15:28:29 +11:00
dqh-github
308b5b68e9
Merge pull request #1607 from dqh-github/snapshot-builds
Snapshot build on push master.
2021-12-11 15:13:48 +11:00
David Hogan
a39c23f796 Snapshot build on push master.
For now, the snapshot zip can be obtained from the latest successful snapshot build at:
https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml

TODO: Update docs at https://github.com/cc65/doc
TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io
2021-12-11 14:10:19 +11:00
dqh-github
f09f0dd913
Merge pull request #1605 from dqh-github/master
Automated Github pull request build and test
2021-12-11 13:02:05 +11:00
dqh-github
ad009f0ff6
Merge pull request #1 from dqh-github/gha-test
Automated Github pull request build and test
2021-12-11 12:50:43 +11:00
David Hogan
4eaf68d414 Automated Github pull request build and test 2021-12-11 12:43:59 +11:00
polluks2
380f6e7db5
Merge branch 'cc65:master' into master 2021-12-10 15:15:53 +01:00
acqn
970607cde5 Optimized g_testbitfield() and g_extractbitfield() with enhanced support for long bit-fields. 2021-12-05 12:21:01 +08:00
acqn
2d96f79bc7 Added and used new utility type functions for bit-fields.
Fixed GetUnderlyingTypeCode() for bit-fields with widths > 16.
2021-12-01 09:45:17 +08:00
Wayne Parham
1d36f255ec Added Sym-1 link to documentation doc/index.sgml 2021-11-24 22:26:43 +01:00
Wayne Parham
622d2c4e39 Added Sym-1 link to documentation doc/index.sgml 2021-11-24 14:30:19 -06:00
Oliver Schmidt
cb0dca0ca7
No more Travis-CI ! 2021-11-24 14:17:18 +01:00
Oliver Schmidt
37e7e65f43
Merge pull request #1500 from WayneParham/master
Synertek Systems Sym-1 files
2021-11-23 22:59:48 +01:00
Oliver Schmidt
8b0de8a931
Merge branch 'master' into master 2021-11-23 22:56:51 +01:00
Gerhard Gruber
a7e6f9840c VIC-20 and C128 cfg added for ASM programming 2021-11-23 21:51:57 +01:00
gorlik
1918f0ac9b adding missing VIC register definition to c64.inc 2021-11-23 21:34:49 +01:00
Gabriele Gorla
6637e28831 saves 2 bytes in the standard c64 joystick driver
remove redundant code and add jmp to the common sequence
two more bytes could be saved at the expense of longer sequence with interrupts disabled by moving sei/cli
2021-11-23 21:34:49 +01:00
Oliver Schmidt
f796c26091
Added hint on clock().
clock() isn't available on the Apple II - and never will be.
2021-11-21 22:56:02 +01:00
polluks2
ba33c3f57d
Merge branch 'cc65:master' into master 2021-10-29 10:46:59 +02:00
mrdudz
4f87c7cc64 move samples that only work for a specific target into subdirs named the same as the target 2021-10-23 01:18:17 +02:00
Christian Groessler
c3d7a90084 targettest/atari/ostype.c: remove warnings 2021-10-05 19:19:54 +02:00
Christian Groessler
f6636635fa targettest/atari/multi-xex.cfg: fix comments 2021-10-05 19:17:16 +02:00
Oliver Schmidt
c48e821c4b
Don 2021-09-29 14:48:09 +02:00
Oliver Schmidt
674a543909
Parallelize build
Travis CI defaults to 2 core environments.
2021-09-29 12:33:51 +02:00
cc65 Owner
2338e70709
travis-ci.org -> travis-ci.com 2021-09-29 10:37:44 +02:00
empathicqubit
fd8d51497c Add --debug-tables <filename> option and output struct and union fields 2021-09-29 05:20:44 +02:00
mrdudz
94445cd16f remove conio.pce from the default target and print a message instead 2021-09-28 22:37:34 +02:00
mrdudz
cf1c0b6774 move hints on how to run binaries from the target specific pages to the intro page, where they should be. 2021-09-28 22:18:49 +02:00
mrdudz
86f1965202 added test related to issue #1552 fixed in pr #1571 2021-09-28 18:55:23 +02:00
mrdudz
6ba8a385a0 add test related tu issue #1562 2021-09-28 18:11:23 +02:00
acqn
eeaa111835 Fixed crash in Opt_a_toscmpbool caused by wrong order of condition checks. 2021-09-28 17:02:37 +02:00
Oliver Schmidt
28b1687aaf Be explicit about hardware flow control (RTS/CTS) being the only supported option. 2021-09-26 12:09:50 +02:00
polluks2
fb7b880dc0
Create c-cpp.yml 2021-09-09 11:05:39 +02:00
polluks2
bd23ad4d6d
Merge branch 'cc65:master' into master 2021-08-30 13:56:54 +02:00
Greg King
52e4387929 Added a program that tests the Commodore-specific directory functions. 2021-08-12 13:21:24 -04:00
Spiro Trikaliotis
62da869e49 doc: psg_silence: Remove empty notes
The notes section of psg_silence (Creativision funcref) contained an
empty Notes section, consisting of an empty <itemize> only.

Newer sgmltools fail on this, as they insist on having an <item>
element, or they fail compilation:

[  225s] Processing file ../doc/funcref.sgml
[  225s] onsgmls:/tmp/linuxdoc-tools.NfxbjODQbW/sgmltmp.funcref.01.precmdout:5884:9:E:end tag for "ITEMIZE" which is not finished

Fixed this by removing the (empty) Notes section altogether.
2021-06-21 22:10:31 +02:00
Wayne Parham
5f4605c4fc Remove trailing blank lines from read.s, write.s and tapeio.s 2021-06-16 17:28:19 -05:00
Wayne Parham
d6ef8326f9 Remove trailing blank line from libsrc/sym1/display.s 2021-06-16 17:24:18 -05:00
Wayne Parham
85d345088d Remove trailing two blank lines from libsrc/sym1/crt0.s 2021-06-16 17:21:57 -05:00
Wayne Parham
5d90087e66 Add space after every function or statement, before parenthesis 2021-06-16 17:14:44 -05:00
Wayne Parham
82bdc77e41 puts() whitespace style change 2021-06-16 16:47:38 -05:00
Wayne Parham
bed61df837 Removed unnecessary blank line from samples/Makefile 2021-06-16 16:28:17 -05:00
Wayne Parham
a93542e80c Added __fastcall__ to comments 2021-06-16 16:24:26 -05:00
Wayne Parham
f1f700799b All samples use 'int main' and 'return int' 2021-06-16 07:35:18 -05:00
Wayne Parham
f98e5f4feb Stylistic changes 2021-06-15 17:14:27 -05:00
Wayne Parham
11d81b1f43 Stylistic changes 2021-06-15 16:39:28 -05:00
Greg King
fcda94f258 Made a slight improvement in the ld65 expression evaluator. 2021-06-13 20:36:05 -04:00
Wayne Parham
4db50e8e93 Documentation update: Mention where to find sym1 sample programs 2021-06-13 11:29:30 -05:00
Wayne Parham
faf6266cde typo in comment 2021-06-12 06:28:53 -05:00
Wayne Parham
c9bb1483ac Add BEL->beep functionality 2021-06-12 06:17:03 -05:00
Wayne Parham
9e6c1d1303 tapeio and symNotepad updates 2021-06-11 19:55:13 -05:00
Greg King
14d05c61b6 Made Creativision's joystick driver more efficient. 2021-06-11 07:43:25 -04:00
Greg King
af3d4581d3 Moved Creativision's playsound() into a separate file.
It won't waste space in a cartridge if it isn't used.
2021-06-11 07:43:25 -04:00
Greg King
f636d4e634 Fixed the Creativision library's bios_playsound().
It was disabling interrupts permanently.
2021-06-11 07:43:24 -04:00
Wayne Parham
24f5bac899 Added BEL -> beep() functionality 2021-06-10 16:07:39 -05:00
acqn
31128d4809 Added test cases for result types of certain operations. 2021-06-10 21:54:32 +02:00
acqn
25a35d6b59 Fixed result type of certain operations, which was broken with the bit-field fix. 2021-06-10 21:54:32 +02:00
Christian Groessler
f3db74395d fix last change and use stdbool.h 2021-06-10 20:08:58 +02:00
Christian Groessler
7f1f0249f3 enumdevdir.c: allocate path name buffers from the heap. 2021-06-10 20:08:58 +02:00
Christian Groessler
c90c3c9133 stdio.inc,stdio.h: set CBM PATH_MAX/FILENAME_MAX value to 255
Some parts of the runtime library cannot handle larger paths.
2021-06-10 20:08:58 +02:00
Christian Groessler
ae9101961e stdio.inc,stdio.h: increase CBM PATH_MAX/FILENAME_MAX value to 256+1 2021-06-10 20:08:58 +02:00
Christian Groessler
9a523abbfb limits.h: provide PATH_MAX
- stdio.h: define FILENAME_MAX to PATH_MAX
- stdio.h, stdio.inc: increase FILENAME_MAX/PATH_MAX for Atari
  (For DOSes with subdirectory support.)
2021-06-10 20:08:58 +02:00
Wayne Parham
7d6541274d Changes to I/O access 2021-06-09 10:23:42 -05:00
acqn
d69e81cd66 Moved and improved test cases for Issue #1462.
Fixed an old test case for unsigned enum bit-fields that are supposed to be int-promoted.
2021-06-09 08:03:12 +02:00
acqn
5adb29ce31 Made "bit-field-ness" a type property instead of a SymbolEntry or ExprDesc property.
Fixed integer promotion and result type in certain operations.
Fixed bit-fields 'op=' and postfix inc/dec operators.
2021-06-09 08:03:12 +02:00
acqn
1d7bf7355c Better function naming in declare.c.
Scalar initialization routines need only 'const Type*' as parameters.
2021-06-09 08:03:12 +02:00
acqn
004c60de39 Optional flags for the codegen to skip restoring the expression results into the primary registers. 2021-06-09 08:03:12 +02:00
acqn
dcacba472a Moved ArithmeticConvert() from cc65/expr.c to cc65/datatype.c.
Reorganized a few functions in cc65/datatype.c.
Added SignedType() and UnsignedType() for future usage.
Made LimitExprValue() external so that it can be used more often.
2021-06-09 08:03:12 +02:00
Filip Golewski
09862e7ce9 Update src/msbuild.cmd script to optionally include Visual Studio 2019 Community build tools 2021-06-08 21:16:20 +02:00
acqn
2324bd62f6 If __A__,__AX__ or __EAX__ is used, post-inc/dec within the same statement will not modify it.
Moved testcase from src/test/todo to src/test/val plus minor improvement on portability.
2021-06-08 14:16:14 +08:00
Wayne Parham
2a25921515 Sym-1 documentation updates 2021-06-07 20:00:18 -05:00
Wayne Parham
2635655e8c sym1.cfg cosmetic changes 2021-06-07 19:07:36 -05:00
Wayne Parham
89fb731e2e samples/helloworld.c 2021-06-07 19:01:06 -05:00
polluks2
ed9f9ccbab Fix #1536 2021-06-07 23:12:50 +02:00
Wayne Parham
886e9e83b2 Removed stdin->stdout echo from read.s 2021-06-07 12:33:29 -05:00
Wayne Parham
6cf4bd99bb Added Makefile for targettest/sym1 2021-06-07 11:50:47 -05:00
Wayne Parham
79757ee280 Removed 'return' from samples (with void main) 2021-06-07 01:04:55 -05:00
Wayne Parham
732a5fb9a7 Remove bin and hex references from samples/Makefile 2021-06-07 00:56:50 -05:00
Wayne Parham
5eafd8115f Cleanup whitespace in Makefile 2021-06-07 00:53:15 -05:00
Wayne Parham
975e43892f Samples cleanup 2021-06-07 00:48:02 -05:00
Wayne Parham
a3fce656b7 Samples updates 2021-06-07 00:42:13 -05:00
Wayne Parham
88ee45e9ef tapeio.s updates 2021-06-07 00:35:20 -05:00
Wayne Parham
dc9333a3bb tapeio.s updates 2021-06-07 00:18:26 -05:00
Wayne Parham
c961782192 Removed libref.s 2021-06-07 00:07:09 -05:00
Wayne Parham
0bbff54378 return val updates 2021-06-07 00:03:44 -05:00
Wayne Parham
33af3d7997 sym1.h updates 2021-06-06 23:53:53 -05:00
Wayne Parham
9d509735a8 Makefile changes 2021-06-06 21:56:23 -05:00
Wayne Parham
64afb50d5a Makefile changes 2021-06-06 21:45:58 -05:00
Wayne Parham
6c4c959141 Sym-1 lib changes 2021-06-06 21:28:03 -05:00
Wayne Parham
e687f2f048 Clarified 'Limited memory applications' section 2021-06-06 17:55:58 -05:00
Wayne Parham
7d5fc7eb43 Changed kb references to KB 2021-06-06 17:51:24 -05:00
Wayne Parham
69e2313a63 First round of requested code changes 2021-06-06 23:20:54 +01:00
Greg King
1c16e46f23 Improved ld65's error messages about ca65's .BANK() function.
* Split a message into two more specific messages.
2021-06-05 11:31:28 -04:00
Greg King
39ef63cbbc Don't check for circular references of imports that don't have matching exports.
This fix will avoid referring to a struct member through a null pointer.
2021-06-04 13:35:26 -04:00
bbbradsmith
d5d9183ccf conform to prevailing if bracket style 2021-06-04 07:09:58 -04:00
bbbradsmith
6ebe551919 return is sufficient, TooComplex flag is unnecessary to resolve this crash case
suggested by greg-king5 in #1409
2021-06-04 07:09:58 -04:00
bbbradsmith
3584c4c87f fix crash when a NULL ExprNode is checked for circular references 2021-06-04 07:09:58 -04:00
acqn
4d5fe38540 Fixed OptStackOps when the stuff pushed on stack top is accessed before the op. 2021-06-03 12:03:53 +02:00
acqn
79be6dec16 More quick hack for CE_GenRegInfo. 2021-06-03 12:03:53 +02:00
acqn
0bfa13722b More funcinfo on register usage fixes. 2021-06-03 12:03:53 +02:00
IrgendwerA8
fe003eedd4 Fix Atari keyboard code for cursor up key 2021-05-31 11:19:24 +02:00
Greg King
0d3c827d80 Made the C preprocessor #if nesting stack have 256 levels.
Closes #1523.
2021-05-30 03:52:32 -04:00
Greg King
ee5014c595 Simplified the Supervision "hello world" sample program. 2021-05-29 09:04:47 -04:00
Greg King
c0f29993e0 Fixed the descriptions of the Creativision's functions.
Fixed bios_playsound()'s position in the alphabetical list of functions.
2021-05-29 08:53:13 -04:00
Greg King
6bedade593 Fixed the creativision function prototypes.
Added const to a pointer parameter.
2021-05-29 08:37:38 -04:00
polluks2
4973fc2246 Merge branch 'cc65:master' into master 2021-05-25 17:20:49 +02:00
mrdudz
010eea12a2 move test for issue #1211 into misc 2021-05-25 13:38:06 +02:00
Polluks
30830e1348 Added missing Creativision functions 2021-05-25 10:42:21 +02:00
mrdudz
65c640d2cf added missing atari5200 target 2021-05-24 15:15:07 +02:00
mrdudz
022935320c test for issue #897 2021-05-24 14:30:10 +02:00
mrdudz
ae3d3a4b5d make readme a bit more clear (hopefully) 2021-05-24 13:53:44 +02:00
mrdudz
adda9438d2 testcase for issue #1357 2021-05-24 13:53:14 +02:00
Wayne Parham
ae9434e02e seven-segment display update 2021-05-23 15:22:33 -05:00
Wayne Parham
db395e5988 Improved sample program symDisplay.c 2021-05-23 13:31:28 -05:00
mrdudz
0db23a8951 testcase for issue #263 2021-05-23 18:55:06 +02:00
polluks2
4865caa593 Merge branch 'cc65:master' into master 2021-05-22 23:39:34 +02:00
mrdudz
b08dc28cc1 another testcase related to issue #1462 2021-05-22 22:34:52 +02:00
mrdudz
e13f57e86c added another testcase for issue #1462 2021-05-21 16:09:10 +02:00
Greg King
663268dca9 Syncronize the Supervision crt0.s with its ld65 config files.
.segment "VECTOR" -> "VECTORS". Fixes #1506.
2021-05-21 03:32:43 -04:00
Christian Groessler
681c9594cc libsrc/atari5200/crt0.s: fix formatting 2021-05-21 01:45:55 +02:00
Olli Savia
0ae1aad3d3 Fix typo: VIAx_CR -> VIAx_ACR 2021-05-19 20:26:11 +02:00
mrdudz
6d560f4236 change prototype for GraphicsString() to void __fastcall__ GraphicsString(const void *myGfxString); 2021-05-18 15:16:14 +02: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
mrdudz
4a57656f69 add test for issue #1504 2021-05-17 14:40:09 +02:00
mrdudz
d736032675 added a missing comment 2021-05-17 14:25:33 +02:00
mrdudz
c53059468e fix documentation for the driver _init calls 2021-05-17 14:25:18 +02:00
mrdudz
d2da30a7e2 give the "samples" target something to do to supress the "nothing to be done for 'samples'" message 2021-05-16 23:38:17 +02:00
mrdudz
5fc9d3f048 change driver _install calls from taking "void*" to "const void*" 2021-05-16 22:57:28 +02:00
mrdudz
ce487651b0 as suggested by Oliver:
- only output messages if MAKELEVEL is 0
- indent nested ifeq
- use if (,) syntax
2021-05-16 22:24:35 +02:00
acqn
1450f146a5 Fixed '[]', '()' '.' and '->' operators following a postfix increment/decrement. 2021-05-16 20:43:49 +02:00
acqn
43ca887263 Fixed 'case'/'default' labels in non-compound 'switch' body statement. 2021-05-16 20:43:49 +02:00
mrdudz
a9af6aa743 fix warnings 2021-05-16 18:29:45 +02:00
mrdudz
4ba3ff3048 redirect c64 to geos-cbm and apple2enh to geos-apple when given with SYS= on the command line, as suggested by oliver 2021-05-16 18:23:23 +02:00
mrdudz
53f0552fe7 fix warnings 2021-05-16 17:12:50 +02:00
WayneParham
e9fd87d07a
Merge branch 'master' into master 2021-05-16 10:02:37 -05:00
mrdudz
aecb01986a fix list of executables for geos-apple 2021-05-16 15:45:34 +02:00
acqn
f5dacda69b NoCodeConstExpr() fix to avoid exessive error messages. 2021-05-16 19:08:43 +08:00
acqn
6a3b9a9880 E_ADDRESS_OF logic fix. 2021-05-16 19:08:42 +08:00
acqn
aac03eae6f Better future-proof bit-masking. 2021-05-16 19:08:42 +08:00
acqn
2d014383cd Replaced certain usage of "(New-)PointerTo()" with "AddressOf()". 2021-06-08 00:43:26 +08:00
acqn
924fcf5d06 Replaced several occurance of PtrConversion() with StdConversion().
Variadic arguments of functions should be default-promoted.
2021-06-08 09:32:58 +08:00
mrdudz
86bd6b9add Added executable list for all targets and print a message when certain
samples are not available for a target (instead of failing). This makes
"make SYS=<target>" in samples recursively work for all supported targets.
2021-05-15 19:48:19 +02:00
polluks2
930dc7efc2 Merge branch 'cc65:master' into master 2021-05-14 22:14:21 +02:00
acqn
18ae09f682 Less excessive errors with failed array declarations. 2021-05-14 10:48:17 +02:00
acqn
dfba8d77ca Error messages shouldn't raise warnings about unused expressions by themselves. 2021-05-14 10:48:17 +02:00
Wayne Parham
321bac4178 Remove TAB characters 2021-05-13 14:43:16 -05:00
Christian Groessler
09e0e74124 (again) remove TABs 2021-05-13 18:12:12 +02:00
Greg King
e5813cfb1a Removed two duplicate TYPEDEFs from a header.
The first one is replaced by an #include of the header that has its original TYPEDEF.
The second one is replaced by its base type.

That change allows pedantic C90-compliant compilers to accept the header.
2021-05-13 00:24:32 -04:00
Greg King
af4c4f6aaf Removed a "return" keyword from an inline function that must return (void). 2021-05-12 19:43:32 -04:00
Greg King
5d198d6842 Fixed some URL links in a couple of documents. 2021-05-12 05:05:39 -04:00
Wayne Parham
f09ffb2a45 symNotepad.c 2021-05-12 01:08:13 +01:00
polluks2
3d541d0d10 Merge branch 'cc65:master' into master 2021-05-11 18:28:07 +02:00
Andrea Odetti
05f545e189 More line number related changes. 2021-05-11 17:41:59 +02:00
Andrea Odetti
93762a2117 ld65: move 2 more cases to the notation file:line. 2021-05-11 17:41:59 +02:00
Andrea Odetti
feccc68c54 ld65: avoid redundant error message information. 2021-05-11 17:41:59 +02:00
Andrea Odetti
467844963a Update failing test due to error format changes. 2021-05-11 17:41:59 +02: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
Oliver Schmidt
bda5bf70ce
Merge pull request #1487 from mrdudz/wrapped-call
Extend #pragma wrapped-call to support "bank" argument
2021-05-11 14:32:28 +02:00
Bob Andrews
82ee502f57
Merge branch 'master' into wrapped-call 2021-05-11 14:16:25 +02:00
mrdudz
07dd1e3849 fix formatting 2021-05-11 14:14:44 +02:00
mrdudz
18f94d1fe0 rework to use a magic value instead of a flag, as suggested by Oliver 2021-05-11 14:00:49 +02:00
mrdudz
ef74226993 improve error message 2021-05-11 13:37:53 +02:00
mrdudz
ef8c70c7af use url instead of htmlurl, add note on least significant 8bits of the bank value 2021-05-11 13:36:30 +02:00
Oliver Schmidt
b7856ddd4f Just some source formatting adjustments. 2021-05-11 10:40:44 +02:00
Wayne Parham
a2def19de5 Added TGT_SYM1 2021-05-10 15:20:49 +01:00
Wayne Parham
27e04b36b0 Makefile updates 2021-05-09 17:24:15 -05:00
Wayne Parham
f81aefe8bd Synertek Systems Sym-1 config files 2021-05-09 17:13:24 -05:00
Wayne Parham
aea5db48cb fix typo in README.md 2021-05-09 16:55:17 -05:00
Wayne Parham
044a0838a3 Changes to existing cc65 source to support Synertek Systems Sym-1 2021-05-09 16:52:48 -05:00
Wayne Parham
6e79379405 Synertek Systems Sym-1 machine-specific files 2021-05-09 16:34:53 -05:00
polluks2
ab9db5b503 Merge branch 'cc65:master' into master 2021-05-09 21:01:33 +02:00
Oliver Schmidt
07bd5089ec Define CLOCKS_PER_SEC as _clocks_per_sec() if _clocks_per_sec() is actually available.
There are programs checking for the existence of CLOCKS_PER_SEC before usage. We don't want to mislead them.
2021-05-09 19:27:33 +02:00
polluks2
9dffc8ab0f Merge branch 'cc65:master' into master 2021-05-08 20:01:45 +02:00
polluks2
b1f81d5e21 Optimised code 2021-05-08 19:48:31 +02:00
Polluks
4c37f12a4d Optimised strlen 2021-05-08 19:36:37 +02:00
polluks2
80877a600a Merge branch 'cc65:master' into master 2021-05-08 17:56:22 +02:00
mrdudz
3ea330f15f update docs 2021-05-08 01:03:43 +02:00
mrdudz
0fbf2af09d Fix the warning that is produced for unused functions 2021-05-08 01:03:43 +02:00
mrdudz
729690e9e9 document the wrapped-call extension 2021-05-05 16:07:47 +02:00
mrdudz
c9f242e566 Extend #pragma wrapped-call to support "bank" argument 2021-05-05 14:42:29 +02:00
Greg King
216bb22b20 Added a special version of a function which uses an absolute addressing mode to access the zero page.
The PCEngine needs such operands to be redirected to RAM page $20 explicitly.  Fixes #1482; fixes #1483.
2021-05-04 12:10:43 -04: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
mrdudz
f3663b8d2e added test for issue #1461 2021-04-28 14:21:48 +02:00
acqn
71bd6415d6 No more unnecessary jump-over labels generated for logical OR false cases. 2021-04-24 23:53:26 +02:00
Greg King
1f4ce41846 Fixed the alphabetic sorting of the "Pseudo functions" section. 2021-04-24 13:48:42 -04:00
Greg King
4866ee53e6 Moved some Assembly function descriptions out of the "Control commands" section, and into the "Pseudo functions" section. 2021-04-24 13:20:10 -04:00
mrdudz
080cb1bac9 added testcase for issue #1462 2021-04-23 21:52:36 +02: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
acqn
f901adba22 Predefined type strings for inlined std function parameters. 2021-04-19 15:36:55 +02:00
acqn
9cea9ce5e2 Made the code more constness-correct with 'Type' usage. 2021-04-19 15:36:55 +02:00
acqn
cb64aaf20c Made the code more constness-correct with 'Type' usage for inlined std functions. 2021-04-19 15:36:55 +02:00
acqn
328345b9c3 Removed a helper function that is no longer used. 2021-04-19 15:36:55 +02:00
acqn
24d36854d2 Minor cleanups with array element qualifiers. 2021-04-19 15:36:55 +02:00
acqn
896f463a23 Used more specific pointers instead of the "arbitary attribute pointer" used in type strings. 2021-04-19 15:36:55 +02:00
acqn
bfb7c936aa Preparation for constness-correction. 2021-04-19 15:36:55 +02:00
Oliver Schmidt
a982f6a668 Removed obsolete file.
c658acbf85 made this file unnecessary.
2021-04-18 21:14:49 +02:00
Evgeny Vrublevsky
ac08482fa3 Allow editing cc65.props from Property Manager. 2021-04-18 21:12:51 +02:00
Evgeny Vrublevsky
ee8c7b47bc Add new lines at the end of the project files. 2021-04-18 21:12:51 +02:00
Evgeny Vrublevsky
7be3b53f72 cc65.props uses spaces instead of tabs. 2021-04-18 21:12:51 +02:00
Evgeny Vrublevsky
2120dd662c Move all common project settings into cc65.props. 2021-04-18 21:12:51 +02:00
Marco Aurelio da Costa
9941855dc6 mc: Removed original version comment, not relevant for assembler 2021-04-18 20:39:05 +02:00
Marco Aurelio da Costa
f7613b529c mc: Added default charmap include files for assembler 2021-04-18 20:39:05 +02:00
Marco Aurelio da Costa
1993d5c091 mc: Documentation for .PUSHCHARMAP/.POPCHARMAP 2021-04-18 20:39:05 +02:00
Marco Aurelio da Costa
83ee928fb1 mc: Formatting, remove stray lines 2021-04-18 20:39:05 +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
Greg King
ffc30c0c6e Added RAM_BANK and ROM_BANK macro definitions to cx16.h header. 2021-04-18 01:39:44 -04:00
acqn
6e61093e79 Fixed pointer subtraction in certain very rare cases. 2021-04-17 11:14:37 +02:00
Greg King
6bb1b6953f Documented the options to control cc65's warnings about induced pointer type changes. 2021-04-17 01:59:09 -04:00
acqn
e9545d68ee Minor clean-ups and typo fixes. 2021-04-17 11:43:03 +08:00
Dirk Lehmann
eb1cf750f2 -W-unreachable-code option added, alphabetic order of --list-warnings 2021-04-13 09:37:55 +02:00
acqn
5f8d163045 Moved one test case for #1209. 2021-04-06 22:20:39 +02:00
acqn
e435da6234 Interim fix for Issue #897. 2021-04-06 22:20:39 +02:00
Oliver Schmidt
0ed41db478 Some minor clarifications. 2021-04-06 01:45:41 +02:00
acqn
39700c77ee Added test case for Issue #1451. 2021-04-05 15:49:54 +02:00
acqn
bd8eae67f1 Fixed local struct field access via the address of the struct. 2021-04-05 15:49:54 +02:00
polluks2
f5365c7ffd Update README.md
Commander X16
2021-04-03 21:29:18 -04:00
polluks2
2583dfb71a
Update README.md
Commander X16
2021-04-04 03:13:45 +02:00
polluks2
4c0ee3e0d8
Merge pull request #3 from cc65/master
Update
2021-04-04 02:34:41 +02:00
acqn
5d05451ab2 Fixed test case for Issue #1263. 2021-04-03 17:50:46 +02:00
acqn
1a3628df1a Fixed the term 'argument' vs 'parameter' in function parser. 2021-04-03 17:50:46 +02:00
acqn
2864b3ef8a Fixed composition of prototypes and old-style function definitions with default promotions.
Fixed function parameter list comparison with empty ones.
2021-04-03 17:50:46 +02:00
acqn
91fd30611a Fixed ICE on error cases such as '&func + int a'. 2021-04-03 17:45:52 +02:00
Christian Groessler
200b420562 Export LMARGN_save to C. People might want to preserve this setting in their program.
In turn rearrange startup code in order that LMARGN can be set by a 'constructor' (Do
"initlib" later.)
2021-04-01 15:19:06 +02:00
acqn
4a38965384 Warnings on discarding pointer qualifiers always.
Added new -W options to turn on/off warnings on certain pointer conversion cases:
- pointer-sign: to a pointer type differing in pointee signedness. Default on.
- pointer-types: to a pointer type incompatible. Default on.
2021-03-30 19:41:20 +02:00
acqn
b802efde54 Fixed ternary result type detection with pointer types.
Fixed pointer type comparison and conversion, especially regarding qualifiers.
Improved diagnostics about type comparison and conversion.
Reorganized some type-comparison/conversion functions.
2021-03-30 19:41:20 +02:00
acqn
31c1172a3a zlib: Use correct (un)signedness of char in prototypes and functions.
Also ensure we are using the same constness qualifiers.
2021-03-30 19:41:20 +02:00
acqn
f9812930c1 More detailed diagnostic info about conflicted function types. 2021-03-30 16:47:57 +08:00
acqn
cb8fbf4772 Removed the non-existing-in-C "struct/union scope" for structs/unions.
Fixed handling of struct/union field declarations without identifiers, which do nothing.
2021-03-29 19:28:22 +02:00
Greg King
edecbc86b8 Reverted "Second address" back to "Secondary address". 2021-03-27 13:34:39 -04:00
mrdudz
bf1bb7a032 ooopsie :) 2021-03-27 15:13:32 +01:00
mrdudz
54920193e5 added test for issue #1438 2021-03-27 15:11:47 +01:00
Oliver Schmidt
1bd04e8462
Merge pull request #1439 from acqn/CConvFix
[cc65] Issue #1438 fix
2021-03-27 01:33:07 +01:00
mrdudz
d2bc449598 Merge branch 'master' of https://github.com/cc65/cc65 2021-03-26 22:18:31 +01:00
mrdudz
02392d6220 added test related to issue #1437 2021-03-26 22:18:05 +01:00
acqn
f273b1ebcb Fixed crash with non-inlined __fastcall__ function invocation with no arguments. 2021-03-26 11:02:46 +08:00
Greg King
710c6c6f2f Fixed cbm_k_readst() to work around a VIC-20 Kernal bug.
It properly returns the RS-232 device's status.
2021-03-25 15:22:18 -04:00
Greg King
0f1386ff4c Added documentation about the slightly different behavior of cpeekcolor() on the cx16 platform. 2021-03-25 08:28:15 -04:00
acqn
3755e4a863 Replaced checking for __fastcall__ aginst AutoCDecl etc. with IsFastcallFunc(). 2021-03-24 14:35:44 +08:00
mrdudz
d3cd668585 also test (some of) the cases with an external function 2021-03-22 23:37:33 +01:00
mrdudz
55e89416cd test related to issue #1196 and pr #1424 respectively 2021-03-22 19:12:44 +01:00
Christian Groessler
531a31722e fix typo 2021-03-22 14:06:40 +01:00
Oliver Schmidt
203c4da15b
Merge pull request #1434 from mrdudz/test1423
Test for pr #1423
2021-03-20 02:01:46 +01:00
acqn
3c2e7ce41c More reliable test for true/false with addresses for AND, OR and ternary operators.
Minor comment typo fix.
2021-03-20 01:39:32 +01:00
acqn
f8835d2867 Fixed codegen with addresses as boolean test conditions.
Fixed warning on unreachable code of if body.
2021-03-20 01:39:32 +01:00
mrdudz
82fb9aa418 testcase related to pr #1423 2021-03-20 00:55:55 +01:00
mrdudz
bbfc24770e test related to pr #1425 2021-03-20 00:23:12 +01:00
acqn
325b7b4ab3 Enabled 'a ? b, c : d'. 2021-03-20 00:09:47 +01:00
acqn
a51d6d40de Ternary fix for some obscure cases. 2021-03-20 00:09:47 +01:00
mrdudz
cc040ca04a remove, fucking git 2021-03-19 23:39:56 +01:00
mrdudz
57e69d9647 test related to pr #1425 2021-03-19 23:35:34 +01:00
mrdudz
7d528d9eb0 fix typo 2021-03-19 22:26:49 +01:00
mrdudz
9ec9d1e20c test for issue #1431 / pr #1424 2021-03-19 20:53:52 +01:00
acqn
6974c1ff12 Fixed and cleaned up codegen logic with arithmetic conversion in addition and subtraction. 2021-03-19 16:35:03 +01:00
Christian Groessler
cd116e5ba0 src/ar65/library.c: style fix 2021-03-18 22:27:42 +01:00
Christian Groessler
9b05fe9982 src/ar65/library.c: fix compilation on Windows 2021-03-18 22:27:42 +01:00
Christian Groessler
358d750b3e ar65: fix parallel builds by using a per-process temp file 2021-03-18 22:27:42 +01:00
Christian Groessler
64449f0f54 ar65: better version of last change 2021-03-18 22:27:42 +01:00
Christian Groessler
d3c495e8b9 ar65: fix parallel builds by using a per-process temp file 2021-03-18 22:27:42 +01:00
acqn
b02838439c Changed g_addaddr_local() codegen to reduce code size. 2021-03-16 22:29:20 +01:00
acqn
8eeaaa3f36 Made certain types of comparison between addresses in constant expressions work. 2021-03-16 22:29:20 +01:00
acqn
99c7fe0ada Reusing code from parseadd() for ArrayRef().
Now index[ptr] works in constant expressions.
Fixed codegen for cast type in constant expressions.
Calls on swapstk in 'i[ptr]' is avoided when possible.
2021-03-16 22:29:20 +01:00
acqn
f5972dfd08 Made int+pointer work in constant expressions.
Fixed codegen for cast type addition in constant expressions.
Calls on swapstk in 'i+ptr' is avoided when possible.
2021-03-16 22:29:20 +01:00
acqn
aa6fdf58b8 Addresses in constant subtraction expressions now work.
Fixed codegen for cast type subtraction in constant expressions.
2021-03-16 22:29:20 +01:00
acqn
c4a2620e29 Added an utility function to check for quasi-constant addresses (of stack variables). 2021-03-16 22:29:20 +01:00
acqn
0a8ca3041a Changd all Find*Last*InOpenRange() to return the beginning of the open range.
Fixed FindArgLastUsageInOpenRange().
2021-03-16 22:24:19 +01:00
acqn
4376b83390 Fixed LoadAAt(). 2021-03-16 22:24:19 +01:00
acqn
bd5d5b7385 Removed the prototype of evalexpr() that no longer exists. 2021-03-16 22:24:19 +01:00
jede
41f796bbe1 left and right mask are inverted : fix in telestrat.h 2021-03-15 21:10:29 -04:00
jede
b9fd318985 fix space/column 2021-03-13 00:15:05 +01:00
jede
c0d638a26d add clock for Telestrat target and add some Telemon primitives 2021-03-13 00:15:05 +01:00
jedeoric
4f26650228
[Telestrat] chdir management (#1419)
* add syschdir

* revert read.s

* remove extra line

* Now we update __cwd

* Fix tab

* Fix another tab

* Fix tab

* Fix tab and jmp

* fix xgetcwd

* Fix comments
2021-03-11 09:42:14 +01:00
greg-king5
23fba6cc37
Merge pull request #1412 from jedeoric/master
[Telestrat] Fix many bugs in conio Telestrat target
2021-03-09 18:44:20 -05:00
jede
a05dddd0d6 Fix next column 2021-03-09 22:02:26 +01:00
jede
facc1b4914 Fix cputdirect 2021-03-08 21:16:44 +01:00
jede
df64fd859c Fix cvline bug 2021-03-07 23:00:15 +01:00
jede
48badc0816 Fix import return0 2021-03-06 21:40:26 +01:00
Oliver Schmidt
bc8cca9fc4 Revert "Now getchar works"
This reverts commit 1fc16cb9ed.
2021-03-06 12:03:05 +01:00
Oliver Schmidt
f122837955 Revert "add syschdir"
This reverts commit d83e8a3f0e.
2021-03-06 12:03:05 +01:00
Oliver Schmidt
d6f2fda575 Revert "revert read.s"
This reverts commit 65d5786da5.
2021-03-06 12:03:05 +01:00
Oliver Schmidt
8ae5a4a134 Revert "remove extra line"
This reverts commit 973a5337ac.
2021-03-06 12:03:05 +01:00
Oliver Schmidt
ab4ca51848 Revert "Now we update __cwd"
This reverts commit d417baf826.
2021-03-06 12:03:05 +01:00
Oliver Schmidt
558dfa285e Revert "Fix tab"
This reverts commit 17ca09ba9a.
2021-03-06 12:03:05 +01:00
Oliver Schmidt
24d63a96b1 Revert "Fix another tab"
This reverts commit 9b36565485.
2021-03-06 12:03:05 +01:00
Oliver Schmidt
f9ca091bd0 Revert "Fix tab"
This reverts commit 2ae41e0a55.
2021-03-06 12:03:05 +01:00
Oliver Schmidt
1d8479b411 Revert "Fix tab and jmp"
This reverts commit bf9d4ac3bb.
2021-03-06 12:03:05 +01:00
jede
bf9d4ac3bb Fix tab and jmp 2021-03-04 18:02:26 +01:00
jede
2ae41e0a55 Fix tab 2021-03-04 18:02:26 +01:00
jede
9b36565485 Fix another tab 2021-03-04 18:02:26 +01:00
jede
17ca09ba9a Fix tab 2021-03-04 18:02:26 +01:00
jede
d417baf826 Now we update __cwd 2021-03-04 18:02:26 +01:00
jede
973a5337ac remove extra line 2021-03-04 18:02:26 +01:00
jede
65d5786da5 revert read.s 2021-03-04 18:02:26 +01:00
jede
d83e8a3f0e add syschdir 2021-03-04 18:02:26 +01:00
jede
1fc16cb9ed Now getchar works 2021-03-04 18:02:26 +01:00
polluks2
1dcb21eaa7
Merge pull request #2 from cc65/master
Update
2021-03-04 09:09:46 +01:00
Greg King
5f145542b0 Exported the Commodore CHRIN and CHROUT Kernal functions, in the CBM libraries.
This commit complements commit 98f8064b83.
2021-03-03 17:39:53 -05:00
jede
872739b5f4 Fix comments, return line and bordercolor return 2021-03-03 22:14:29 +01:00
acqn
047d0f479b Comments format fix. 2021-03-03 10:07:24 +01:00
acqn
2aad72af90 Removed trailing whitespaces. 2021-03-03 10:07:24 +01:00
jede
cdbe23c351 Fix missing new line in bordercolr 2021-03-01 23:21:58 +01:00
jede
3adddf5825 Merge branch 'master' of https://github.com/jedeoric/cc65 2021-03-01 23:20:37 +01:00
jede
185c451000 Fix cputdirect 2021-03-01 23:19:30 +01:00
jedeoric
ba4310f589
Merge branch 'master' into master 2021-03-01 23:03:34 +01:00
jede
abef6566e7 Add revers.s 2021-03-01 22:45:05 +01:00
jede
8ec6d28f92 Revert read.s 2021-03-01 22:44:06 +01:00
jede
256b22f1c7 Add bordercolor and cvline 2021-03-01 22:36:09 +01:00
jede
02e52fe24d Fix many bugs 2021-03-01 22:33:12 +01:00
acqn
8b6d78a075 Added Opt_a_tosbitwise for 8-bit bitwise operations. 2021-03-01 22:11:22 +08:00
acqn
3caceb8174 Fixed result type in certain contant expression addition cases. 2021-02-26 19:45:46 +01:00
acqn
f2eed38fc8 Fixed expression type of the result of numeric constant comparison. 2021-02-26 19:45:46 +01:00
acqn
ea0c634e12 Improved codegen for unsigned char type comparison with numeric constants. 2021-02-23 22:06:21 +01:00
acqn
6f5ad51816 Added testcase for Issue #1408. 2021-02-23 22:06:21 +01:00
acqn
d628772cd1 Fixed signed char type comparison with unsigned numeric constants. 2021-02-23 22:06:21 +01:00
acqn
f1c715c455 Fixed a bug that pointer subtraction results from two absolute addresses are calculated as unsigned long. 2021-02-22 14:14:59 -05:00
acqn
da4cc08b78 Moved and improved test case for Issue #1310. 2021-02-22 14:14:59 -05:00
acqn
81d6321cd7 Fixed internal representation of calculated constant results.
Minor clean-up.
2021-02-22 14:14:59 -05:00
acqn
24985f1b33 Added testcase for the "deferred ops in unevaluated context" bug. 2021-02-22 11:02:47 +01:00
acqn
eadaf2fef8 Fixed deferred post-inc and post-dec in unevaluated context such as 'sizeof(i++)'. 2021-02-22 11:02:47 +01:00
acqn
40b26f4060 Now the compiler removes code that has no observable effect. 2021-02-22 13:47:32 +08:00
Greg King
bb3a2db5a0 Fixed an ambiguous statement about CONDES segments. 2021-02-21 15:44:59 -05:00
Greg King
acb5af539f Fixed the ld65 configure files for the cx16 platform.
* Added ONCE and INIT segments to the Assembly configuration.
* Made more segments optional in the standard and the banked configurations.  That will make them a little easier to use with Assembly-source programs.
2021-02-21 14:02:49 -05:00
acqn
7f05bd797f Now the compiler tracks code that has no observable effect. 2021-02-21 16:36:29 +08:00
acqn
131f96eb1e Moved testcase for issue #1397. 2021-02-17 07:03:11 -05:00
acqn
55ae350fed Fixed 'Opt_staxspidx' for the invariant of 'staxspidx'. 2021-02-17 07:03:11 -05:00
Oliver Schmidt
3a7282544e Moved convert.system from geos-apple to apple2[enh].
The target util convert.system is to be used in conjunction with GEOS on the Apple II but has to be built as an "ordinary" Apple II program. The way the cc65 library build system is designed there's no way to define dependencies between targets. The solution used so far was to explicitly trigger a build of the target 'apple2enh' from the target 'geos-apple'. However, that approach tends to break parallel builds which may be in the middle of building 'appple2enh' at the time it is triggered by 'geos-apple'.

There might be ways to get this fixed - but the the cc65 library build systrem is already (more than) complex enough, so I really don't want to add anything special to it.

On the other hand there are easier ways (outside the scope of cc65) to archive what convert.system does so I don't presume convert.system to be actually used - it's more a reference type of thing.

Putting all facts together the decision was easy: Just move convert.system from the target it is used with to the target(s) it is built with.
2021-02-17 10:50:22 +01:00
Christian Groessler
b12758fe53 include/atari.h: fix typo in _setcolor() prototype 2021-02-16 14:07:47 +01:00
Greg King
98f8064b83 Made the directory functions compatible with the Commander X16's DOS.
It's directory listing's last line says, "mb free."
2021-02-15 08:56:31 -05:00
Christian Groessler
43881afca2 doc/atari5200.sgml: document splash screen user changeable settings 2021-02-11 21:02:24 +01:00
Christian Groessler
9cd1ffa6a6 doc/ld65.sgml: document the INIT segment
- re-arrange the segments in the "Special segments" section alphabetically
- some small changes in section 5.8 (FILE) regarding Atari XEX format
2021-02-11 20:58:17 +01:00
mrdudz
ab8bb26868 added testcase for issue #1937 2021-02-09 19:50:08 +01:00
Christian Groessler
6c90f3e2d2 atarixl configs: RAM memory area was renamed to MAIN in d8c31cf1d3
adjust comments accordingly
2021-02-09 11:22:58 +01:00
Oliver Schmidt
8551431233 Optimized based on https://github.com/cc65/cc65/pull/1393. 2021-02-05 11:54:07 +01:00
acqn
6617a017fa Added Opt_a_tossub for 8-bit subtraction. 2021-02-05 17:29:49 +08:00
jede
a9dac3b1ef Fix X register for kbhit 2021-02-02 14:09:57 +01:00
jede
b52ee25385 Rollback read.s 2021-02-02 14:09:57 +01:00
jede
f622783ae1 kbhit added for telestrat target 2021-02-02 14:09:57 +01:00
jede
6c59a6254f Now getchar works 2021-02-02 14:09:57 +01:00
acqn
95830cce29 Fixed test/misc/bug1265.c with its output. 2021-01-30 14:31:51 +01:00
acqn
bfc7a51a44 Fixed Issue #1265 according to C89/C99 standards. 2021-01-30 14:31:51 +01:00
acqn
c9ac515286 Functions with no prototypes might use EAX registers. 2021-01-30 14:31:51 +01:00
acqn
a1992702f8 Declarations of 'extern' object and function should be visible in the file scope. 2021-01-30 14:31:51 +01:00
acqn
a040c28cc4 Moved test for #1374. 2021-01-19 14:33:27 +01:00
acqn
b99455cc47 Fixed Issue #1374. 2021-01-19 14:33:27 +01:00
mrdudz
0846219672 added testprogram for issue #1374 2021-01-16 16:40:58 +01:00
polluks2
0636c4bc30
Merge pull request #1 from cc65/master
Update
2021-01-13 12:26:00 +01:00
Oliver Schmidt
a861d84011
Fixed recent addition of __A__. 2021-01-06 16:09:55 +01:00
Piotr Kaczorowski
0884278ae3 Correction in documentation regarding __A__ pseudo variable 2021-01-06 16:05:04 +01:00
Piotr Kaczorowski
e3fa247012 Yet another fix typo in cc65.sgml 2021-01-06 16:05:04 +01:00
Piotr Kaczorowski
601e628343 Another fix typo in cc65.sgml 2021-01-06 16:05:04 +01:00
Piotr Kaczorowski
68e1faa2c8 Fix typo in cc65.sgml 2021-01-06 16:05:04 +01:00
Piotr Kaczorowski
9662469957 Return-type warning and pseudo variable __A__ documentation added. 2021-01-06 16:05:04 +01:00
Rocky
a9b71b6207 return-type - new warning suppression type added 2021-01-06 16:05:04 +01:00
Greg King
d90cd11212 Fixed outdated comments. 2020-12-27 18:22:12 -05:00
Sven Michael Klose
9800555bbb Remove stale comments. 2020-12-27 17:54:49 -05:00
Sven Michael Klose
9d62abb7ac Fix comment. 2020-12-27 17:54:49 -05:00
Sven Michael Klose
db31204950 Remove stale comment. 2020-12-27 17:54:49 -05:00
Sven Michael Klose
6201300816 Fold constant calculation. 2020-12-27 17:54:49 -05:00
Sven Michael Klose
f59cb9af06 Use more compact loops. 2020-12-27 17:54:49 -05:00
Sven Michael Klose
99c0815cdb Clear up comments a bit. 2020-12-27 17:54:49 -05:00
Sven Michael Klose
3957310950 Knock off two bytes from getcwd(), cbm_read() and cbm_write(). 2020-12-27 17:54:49 -05:00
Jesse Rosenstock
e0c12c90cd g_asr, g_asl: Use ROL/ROR for char shifts by >= 6
Instead of `val` right (left) shifts, we can also do `9 - val` left (right)
rotates and a mask.  This saves 3 bytes and 8 cycles for `val == 7` and
1 byte and 4 cycles for `val == 6`.
2020-12-27 14:22:40 -05:00
Christian Groessler
ef258bdc19 remove TABs which again slipped in.... 2020-12-25 07:16:26 +01:00
michael
d67b955e52 Fixed example of the OS struct usage for Atari 5200 2020-12-25 01:35:38 +01:00
baktrasf
2e9bada1f2 Atari 5200 OS header refinements 2020-12-25 01:35:38 +01:00
baktrasf
1c72da4904 Add operating system symbols for the Atari 5200 target 2020-12-25 01:35:38 +01:00
Jesse Rosenstock
dfd047ce6a g_typeadjust: Use CF_CHAR for char args
If lhs and rhs are either both signed char or both unsigned char,
return flags for that type instead of (unsigned) int.  The flags
are used only for codegen.  Currently, this does nothing, since
codegen treats chars as ints unless CF_FORCECHAR is set, but it
allows more efficient char x char -> int codegen to be added in
the future.
2020-12-24 14:40:39 -05:00
Greg King
b2c1a77bb3 Fixed the cc65 code that optimizes 16-bit compares when the high bytes are known to be equal.
Only the low bytes are compared.  Originally, signed 16-bit compares were optimized into signed 8-bit compares.  But, the sign bits are in the high bytes; and, they're equal.  Therefore, the low bytes always must be compared as unsigned numbers.
Fixes #1348.
2020-12-24 12:27:09 -05:00
Oliver Schmidt
0f4cb443b4 Improved device I/O under DOS 3.3
Certain scenarios (e.g. not running any Applesoft program at all since booting DOS 3.3) can make DOS 3.3 consider cc65 device input (e.g. getchar()) that reads a CR interpreting the command in the keyboard buffer. Setting the hibyte of the Applesoft currently executed line number to some value <> $FF (beside setting the input prompt to some value <> ']') makes DOS 3.3 understand that we're not in intermediate mode and that therefore I/O not preceded with ctrl-d mustn't be fiddled with (see DOS 3.3 routine at $A65E).
2020-12-19 19:54:12 +01:00
Greg King
59c58acbe3 Documented the address size argument of the bss-name, code-name, data-name, and rodata-name pragmas. 2020-12-05 23:04:48 -05:00
Olli Savia
b22d8c7441 Added STATUS (0) definition 2020-12-03 12:13:23 +01:00
Polluks
9563541870 crt0 clean-up 2020-11-29 18:08:33 +01:00
Polluks
5fa7b90e05 crt0 clean-up 2020-11-29 17:10:34 +01:00
Tim Gates
2646c06f61 docs: fix simple typo, paramater -> parameter
There is a small typo in src/cc65/pragma.c.

Should read `parameter` rather than `paramater`.
2020-11-29 10:26:08 +01:00
Polluks
c663f64542 Added features; changed FFF0 segments 2020-11-28 20:56:12 +01:00
Polluks
a538188d90 Fixed some config mistakes 2020-11-28 20:56:12 +01:00
Polluks
9538ca29b2 Unified #1345 2020-11-28 20:56:12 +01:00
Greg King
a0d986faf8 Fixed the horizontal movement of the mouse pointer on platforms with the VIC-II display chip.
ca65's logical (Boolean) NOT operator was used where bitwise NOT should be used.  The effect was that all sprites were shifted to the left side of a screen when the mouse sprite was put on the left side.
2020-11-27 21:22:22 -05:00
Greg King
8b42f570e9 Fixed code that caused a seg-fault after parsing a (deferred) post-count argument followed by a (nested) function-call argument.
The old broken code defers the count until the end of the (parent function's) argument list.  But, a nested function call clears the pointer to the deferred type.  That leads to an access violation.
The new code defers only until the end of each argument.  Fixes #1320.
2020-11-20 17:45:14 -05:00
Oliver Schmidt
79bdc2d51f Set correct prerequisite.
See https://github.com/cc65/cc65/issues/1318
2020-11-20 19:19:55 +01:00
Oliver Schmidt
cffcbce60f Bumped version.
I placed the Git tag V2.19 in hindsight at 555282497c. But I certainly don't want to rewrite the Git history just for the reported version, so I simply set the reported version at today's HEAD to 2.19.
2020-11-20 19:11:20 +01:00
mrdudz
c11e389a94 move testcase for issue #1320 into test/misc 2020-11-20 17:25:10 +01:00
mrdudz
48710af55a make plasma sample work again despite issue #1348 2020-11-19 23:21:06 +01:00
mrdudz
0d46af2e9c Merge branch 'master' of https://github.com/cc65/cc65 2020-11-19 23:12:46 +01:00
mrdudz
23273584a0 testcase for issue #1348 2020-11-19 23:12:16 +01:00
Zsolt Branyiczky
032b4e3979 Fixed typo 2020-11-19 22:02:07 +01:00
Zsolt Branyiczky
63543dee07 Revert transient modification of EATab Table 0 comment 2020-11-19 22:02:07 +01:00
Zsolt Branyiczky
adad3d2e87 Revert "adding c64dtv device to the supported ones"
This reverts commit 1d9e378fe3.
2020-11-19 22:02:07 +01:00
Zsolt Branyiczky
b2c55c3338 adding c64dtv device to the supported ones 2020-11-19 22:02:07 +01:00
Zsolt Branyiczky
36f5dcbb6e added 6502dtv opdoces testcases and corrected cpudetect 2020-11-19 22:02:07 +01:00
Zsolt Branyiczky
527500cedc instruction table contained wrong parameters at SIR opcode 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
1c5c07406c cpudetect.s needs this file to run its test for 6502dtv cpu 2020-11-19 22:02:07 +01:00
Zsolt Branyiczky
843b94388a added asm test for 6502DTV cpu 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
4205a04a34 6502DTV is not a superset of 6502X more 2020-11-19 22:02:07 +01:00
Polluks
c59e8277ae Added prototype 2020-11-18 10:28:19 +01:00
Polluks
a0596eae6e Added waitvsync for PET 2020-11-18 10:28:19 +01:00
Polluks
bd6e5927c4 Fixed #1341 2020-11-18 10:28:19 +01:00
Greg King
5ba16654a3 Refined the hints about making new test reference files. 2020-11-17 15:06:05 -05:00
Greg King
b0497f40b2 'test/isequal.c' doesn't change. Don't rebuild it for each test subdirectory. 2020-11-17 13:40:36 -05:00
Greg King
47bceb0eab Streamlined some makefiles.
foreach isn't needed because make automatically iterates through lists of words when substituting patterns.
2020-11-17 13:34:22 -05:00
Greg King
2ffb6af5d9 Simplified a bug test. Gave it an appropriate description, 2020-11-17 08:15:34 -05:00
Jesse Rosenstock
68cb15d0f9 Add test case for #1320
From https://github.com/cc65/cc65/issues/1320#issuecomment-726866015
2020-11-17 09:45:02 +01:00
Oliver Schmidt
0cd8d37613
Fixed comment. 2020-11-17 08:53:48 +01:00
Oliver Schmidt
69c0363c7e Fixed CPU bitmask constants to match the CPU instruction set bitmasks computed in src/common/cpu.h. 2020-11-16 18:50:15 +01:00
Oliver Schmidt
116682c190 Avoid C99 idioms. 2020-11-16 18:08:00 +01:00
Jesse Rosenstock
c2c73e7d06 Move #1332 test from todo/ to val/
This bug was fixed by 2915464.
2020-11-16 03:23:52 -05:00
Jesse Rosenstock
060417b0dc Adjust type of int constants that fit in char
When there is an integral constant like `3` in an expression, it has
type `int` according to the C spec, even though it can be represented
as an `unsigned char`.  Change codegen (`hie_internal` and `typeadjust`)
to treat it as `unsigned char` instead of `int` so that faster,
unsigned operations can be used.

For the test case in #1298, reduces the cycles per iteration from
4311 to 1884.  This is a great improvement, but still much worse than
the 1053 cycles/iter from `c4698df~`, so more work remains to be done.

Further partial fix for #1298 and #1308.
2020-11-16 00:56:19 +01:00
Jesse Rosenstock
83ac2755fe Add test case for #1332 2020-11-15 21:32:45 +01:00
Greg King
2915464667 Fixed cc65's generation of char-type bit-shift code.
Fixed CHAR-to-INT type conversions in the right-shift code generator.  Also fixed some printf-style format specifiers.
2020-11-15 15:22:23 -05:00
Greg King
5f65252fa6 Added the cputdirect entry point to the cputc() functions in the two Oric libraries.
It now is available in all libraries that have cputc().
2020-11-15 11:44:12 -05:00
Zsolt Branyiczky
2d7777b604 Instruction table is synchronized with the c65's one 2020-11-15 16:35:55 +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
dd44dc4d77 Fix typo 2020-11-15 16:35:55 +01:00
Zsolt Branyiczky
06dfef81a1 Added 6502dtv description to cpu option 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
Christian Groessler
77da8d5490 vic20.cfg: add missing comma 2020-11-11 17:20:25 +01:00
Sven Michael Klose
53f055fb1d Reduce stack size to 256B for unexpanded VICs. 2020-11-11 12:42:35 +01:00
Jesse Rosenstock
93145246fd Add tests for u8 op s16_const
Test expressions like `unsigned char x = ...; ... = x / 2;`
These use `int` constants with values representable by
`unsigned int` / `unsigned char`, so using unsigned codegen should
be possible.

Additional tests for #1308.  These are things we want to generate better
code for, so add tests that the behavior doesn't change.
2020-11-09 21:20:16 +01:00
Jesse Rosenstock
5db74b4b19 Use u16 codegen for u8 x u8 ops
In g_typeadjust, before we apply the integral promotions, we check if
both types are unsigned char.  If so, we promote to unsigned int, rather
than int, which would be chosen by the standard rules.  This is only a
performance optimization and does not affect correctness, as the flags
returned by g_typeadjust are only used for code generation, and not to
determine types of other expressions containing this one.  All unsigned
char bit-patterns are valid as both int and unsigned int and represent
the same value, so either signed or unsigned int operations can be used.
This special case part is not duplicated by ArithmeticConvert.

Partial fix for #1308.
2020-11-09 21:19:22 +01:00
Greg King
81edc3f582 Updated a comment about Kernal's STATUS variable. 2020-11-08 17:45:54 -05:00
Jesse Rosenstock
b5f0c0468d Add stdint.h types for C89 compilers
Add `intN_t` and `uintN_t` for N = 8, 16, 32.
2020-11-03 21:24:52 +01:00
Jesse Rosenstock
65193c6aaf Add stdint.h constants INT32_MIN and UINT32_MAX
These were missing before
2020-11-03 09:26:26 +01:00
Jesse Rosenstock
0e482c7f92 Add test for issue #1310 2020-11-01 19:09:20 +01:00
Christian Groessler
39c0abed54 atarixl: fix compilation problem when CHARGEN_RELOC is defined 2020-10-30 15:01:47 +01:00
Greg King
aad17a6f05 Made two GEOS directory functions return NULL if they can't give a valid entry. 2020-10-29 18:06:01 -04:00
Oliver Schmidt
d8e6fa61bb Return NULL on error (or end of directory). 2020-10-29 17:44:19 +01:00
Christian Groessler
944ebbc23c atarixl configs: make size of CHARGEN configurable
If text mode is not used, its space can be reclaimed by setting __CHARGENSIZE__
to 0.
Following a suggestion from issue #1314.
2020-10-29 17:43:49 +01:00
Jesse Rosenstock
a686988d0e Add test cases for integral promotion of chars
Both signed and unsigned chars are promoted to int by C's evaluation
rules.  It is more efficient to use unsigned operations when possible,
however.  These tests will help test the correctness of optimizations
doing that.  See #1308.
2020-10-29 13:54:37 +01:00
Christian Groessler
262631039d atari.h, atari5200.h: style fixes 2020-10-28 21:12:32 +01:00
Christian Groessler
3537210674 add waitvsync() for atari and atari5200 2020-10-28 21:12:32 +01:00
Oliver Schmidt
79cf1e13a7
Adjusted to recent change in time.h 2020-10-25 21:33:08 +01:00
Oliver Schmidt
f723147f04 Streamlined clock rate handling.
* Docs say that CLK_TCK is an obsolete alias of CLOCKS_PER_SEC so there's no point in individual definitions.
* All targets determining the clock rate at runtime can use a common handling.
2020-10-25 14:06:44 +01:00
acqn
07cc6a3d20 Made optimization steps aware of long branches better. 2020-10-24 21:25:24 +02:00
Oliver Schmidt
2fcd8b934a Made HGR segment obligatory.
Requiring the HGR segment makes the configs a little less flexible, but for the intended use case the HGR segment actually is necessary. And as we learned now, making the HGR segment obligatory helps users to not shoot themselves in the foot.
2020-10-24 13:57:35 +02:00
jede
b8889bf37e Now getchar works 2020-10-23 23:47:30 +02:00
Oliver Schmidt
8e685a0071
Mention recursion. 2020-10-23 18:35:14 +02:00
Oliver Schmidt
947dd9aca0
Adjusted ChkDkGEOS. 2020-10-22 08:54:07 +02:00
acqn
5c43d1e04f Changed codegen for postfix inc/dec operations by deferring them till sequence points.
This usually allows faster & smaller code.
Note that deferred operations must still be called at sequence points even if the whole expressions containing them had constant values.
2020-10-20 22:01:55 +02:00
acqn
bb7b69f513 Added OptShiftBack for shifting the C flag into register A and back. 2020-10-20 21:55:39 +02:00
acqn
0354322413 Added OptSignExtened for testing signness right after sign extention. 2020-10-20 21:55:39 +02:00
acqn
9c776a24e5 Use bcc instead of bne in OptNegAX2 to ease optimizations. 2020-10-20 21:55:39 +02:00
acqn
4f3a96a535 Added new opt OptPushPop2.
Also renamed OptPushPop to OptPushPop1.
2020-10-20 21:55:39 +02:00
Greg King
0f66f7569e Updated the cx16 library to the upstream project's prerelease 38. 2020-10-17 14:48:01 -04:00
mrdudz
77bfd163cd makefile cleanup 2020-10-16 15:50:18 +02:00
Greg King
a25b28a972 Added files to the pet library that support the overlay demo sample program.
cbm_load() is needed because the Pet/CBM Kernals don't have a LOAD function that can be used by machine code programs.
2020-10-15 21:22:04 -04:00
Greg King
e682f7c8c3 Protect the C stack from overlays on the c64 target. 2020-10-15 14:00:25 -04:00
mrdudz
b773bb9ded some more $(RM) vs $(DEL) fixing 2020-10-15 19:34:40 +02:00
mrdudz
6920b8be78 $(RM) abc -> @$(DEL) abc 2>$(NULLDEV) 2020-10-15 18:53:56 +02:00
mrdudz
a0dc7cd9e4 fix grc example, fix makefiles to compile grc example correctly 2020-10-15 18:41:17 +02:00
mrdudz
f60af0301a fix non working Makefiles 2020-10-15 18:35:54 +02:00
Oliver Schmidt
095de4ea52 Write o65 files as SEQ files. 2020-10-15 12:54:01 +02:00
Greg King
e72e44d14f Shortenned the VIC-20's cputc() by 17 bytes.
Changed to a modified table look-up method to convert PetSCII to screen-codes.
2020-10-13 07:55:20 -04:00
Greg King
4905329ff6 Fixed the misspelling of "height" in a GEOS header. 2020-10-12 08:33:45 -04:00
acqn
262c4235df Symbols in ZP segments will use '.exportzp' instead of '.export' if exported. 2020-10-11 23:05:20 +02:00
acqn
e58c84acf7 Support for optionally specifying address size for segments with:
#pragma ***-name([push,] "name"[, "addrsize"])
where "addrsize" is any addressing size supported in ca65.
2020-10-11 23:05:20 +02:00
acqn
f8c9dde989 The instruction parser can now recognize ZP locations and set the addressing mode for them. 2020-10-11 23:05:20 +02:00
Jesse Rosenstock
81550ca1ee CS_MergeLabels: Keep labels referenced by data
Partial fix for ICE in #1211.  This may fix enough to allow #1049 to be
fixed.

When merging labels, keep the first label with a ref that has no JumpTo;
this is a data segment label, used by computed gotos.

The real fix is to track and rewrite labels in data, but this is more
involved.
2020-10-08 12:11:03 +02:00
mrdudz
037a806036 also rename README to readme.txt in the Makefile :) 2020-10-04 17:20:40 +02:00
acqn
dbba5f3fc9 Fixed handling of %v in inline asm parser. 2020-10-04 12:25:24 +02:00
acqn
a85d5330fa Fixed StrBuf initialization in PreparseArg(). 2020-10-04 12:17:14 +02:00
Oliver Schmidt
fd208fdf0b - Added support for calling subdir Makefiles for the make targets 'samples' and 'clean'.
- Adjusted the 'tutorial' Makefile to actually work as expected.

Note: The 'disasm' and 'geos' Makefiles don't seem to work so they are not called as of now.
2020-10-03 19:35:23 +02:00
Jesse Rosenstock
b931e65811 Fix ICE for bit-fields with typedef
Fixes #1267

Avoid ICE, but treat plain int bit-fields declared via typedef as
signed rather than unsigned.  It is more efficient to treat them
as unsigned, but this requires distinguishing int from signed int,
and this is curently not done.
2020-10-03 15:04:31 +02:00
Oliver Schmidt
4acdc9ced9 Fixed paramcount build. 2020-10-03 14:55:30 +02:00
Greg King
c05a750f47 Fixed some copy-&-paste typo mistakes about HuC6280's TMA mnemonic. 2020-10-01 07:25:08 -04:00
mrdudz
4777e98f57 rename testcode/ to targettest/ 2020-09-29 19:14:46 +02:00
mrdudz
dcee493e94 move remaining stuff from testcode/lib/ one level up to testcode/ 2020-09-29 19:12:34 +02:00
mrdudz
3d8e787e66 move testcode/grc to samples/geos 2020-09-29 19:08:40 +02:00
mrdudz
bbece736f5 move testcode/disasm into samples/ instead 2020-09-29 19:06:05 +02:00
mrdudz
b549e83fb2 move program from testcode/assembler to test/asm and remove testcode/assembler 2020-09-29 19:03:42 +02:00
mrdudz
eb87c6d373 rename README to readme.txt 2020-09-29 18:54:30 +02:00
acqn
b525554bfe Added support for parsing asm byte size expressions with a pair of parentheses. 2020-09-27 12:22:05 +02:00
acqn
688342e194 Now every code entry has its argument parsed to tell some info.
It fixes the compiling performance regression as well.
Built-in ZPs are recognized.
2020-09-27 12:22:05 +02:00
acqn
cc0f8422f2 More fixes and new utils to check if opcode arguments can be used elsewhere.
Fixed tracking with LI_RELOAD_Y and LI_DIRECT.
Fixed tracking with LI_CHECK_Y and LI_RELOAD_Y.
2020-09-27 12:22:05 +02:00
acqn
f3771a465d Fixed various issues in the usage-tracking code.
Added some utility functions.
2020-09-27 12:22:05 +02:00
acqn
d379affc4b Moved some reusable code from cc65/coptstop.c into new files. 2020-09-27 12:22:05 +02:00
acqn
28c7aa2bc8 Replaced direct CEF_NUMARG flag checks on code entries with CE_HasNumArg(). 2020-09-27 12:22:05 +02:00
acqn
c45a6b3685 Utility function ParseOpcArgStr(). 2020-09-27 12:22:05 +02:00
Jesse Rosenstock
d0089aef95 Fix bit-field truncation warning message
Fix copy & paste bug with warning message.

struct X {
      signed int a : 3;
};
struct X g = { 5 };

Before:
s.c(4): Warning: Implicit truncation from 'int' to 'int : 3' in bit-field
initializer changes value from 5 to 5

After:
s.c(4): Warning: Implicit truncation from 'int' to 'int : 3' in bit-field
initializer changes value from 5 to -3

Fixes #1268
2020-09-26 17:41:45 -04:00
mrdudz
34177d9edd test related to issue #1094 2020-09-25 20:08:32 +02:00
mrdudz
7ff08c85cf Merge branch 'master' of https://github.com/cc65/cc65 2020-09-25 16:25:53 +02:00
mrdudz
61d934fd7b test related to issue #1265 2020-09-25 16:25:32 +02:00
Greg King
47ee179273 Fixed a copy & paste error in the test/misc/ makefile.
Fixed a warning that's changed to an error in Travis CI tests.
2020-09-25 00:31:07 -04:00
Fabrizio Caruso
61ebe2c34b Indentation in vga.s for gamate 2020-09-24 19:42:34 +02:00
Fabrizio Caruso
6fdb356db7 Simplify Gamate tile redefinition (as already done for PCE) 2020-09-24 19:42:34 +02:00
mrdudz
5ba9d28488 test related to pr #1189 2020-09-24 16:16:16 +02:00
mrdudz
97a1093ee0 test related to issue #1222 2020-09-24 12:23:18 +02:00
mrdudz
fb8b45e479 added note on how to manage the sample programs 2020-09-24 00:18:28 +02:00
mrdudz
a86644eff1 test related to issue #1221 2020-09-24 00:08:36 +02:00
mrdudz
b3491e3d9a test related to issue #1244 2020-09-23 23:57:36 +02:00
mrdudz
46ebb15c76 test related to issue #1245 2020-09-23 23:57:25 +02:00
mrdudz
6fdd90fa63 fix typo 2020-09-23 23:51:37 +02:00
mrdudz
99121688f8 added test related to issue #1263 2020-09-23 23:51:24 +02:00
Greg King
81ac28ff71 Used TAY/TYA instead of PHA/PLA when extracting a bit-field.
Without optimization, it saves a few CPU cycles.  With optimization, it saves more cycles and a few bytes.
2020-09-22 12:47:09 -04:00
Greg King
ea95728330 Avoided an avalanche of messages from bad bit-field declarations.
Made cc65 replace a bad bit-field type with a good one, and always parse the field width.

Shortenned a parameter name to a spelling that's consistent with other function headers.
2020-09-22 12:47:09 -04:00
Greg King
07ea5259ac Changed a cc65 error message to say that the sizes of bit-field types (not bit-fields) are limited. 2020-09-22 12:47:08 -04:00
Greg King
d906204e84 Allowed UPDCRAMPTR to be exported as a constuctor in the VIC-20 library. 2020-09-22 12:31:27 -04:00
Greg King
dc14751954 Exported the direct Kernal entries that were moved from target headers to "cbm_kernal.inc". 2020-09-22 00:04:24 -04:00
Greg King
41bd8d909b Added ld65's bank attribute to the cx16 library's bank (overlay) configuration file.
That attribute makes it easier for Assembly code to know which bank holds a label.
2020-09-20 19:55:25 -04:00
Greg King
0b64ca0d7d Fixed the ld65 cx16 Assembly configuration file.
The CODE segment immediately follows the EXEHDR segment.  Added a segment for the zero-page area that's free when the BASIC ROM isn't used.
2020-09-20 16:09:58 -04:00
Greg King
bf4b195016 Added some comments that explain where the g_branch() code generator can and can't be used. 2020-09-18 15:50:26 -04:00
acqn
de630a1245 Fixed quick hack for known registers after calling certain runtime functions,
and new quick hack for tosshrax.
2020-09-18 09:04:15 +02:00
acqn
079f4a99dd Added processor state info to the OPCDesc table. However, since some opcodes are affected by the addressing mode, this info is unused in codegen/optimizer but just as quick in-code documentation/hints. 2020-09-18 09:04:15 +02:00
acqn
a7d6eb9190 Added processor flag usage/change-tracking for non-JSR/RTS code entries.
Some existing optimizations are impacted and need fixes in order to work correctly again.
Fixed and improved OptPrecalc. Now it respects the C/V/Z/N flags.
Fixed optimizations impacted by added support of tracking processor flags.
2020-09-18 09:04:15 +02:00
acqn
d02b12fa6c Made local code/data labels really local to the functions where they live in. 2020-09-18 09:02:16 +02:00
acqn
86ced2bd4c Avoided unnecessarily boosting the code label numbers with boolean AND. 2020-09-18 08:59:56 +02:00
Jesse Rosenstock
0482e4d6e4 Fix CRLFs introduced by fe3f267 2020-09-18 08:57:28 +02:00
acqn
b8ae5c28fe Added debug output support for processor flags. 2020-09-13 13:50:35 +02:00
acqn
810e17edfe Fixed processor states tracking for the BIT/TRB/TSB opcode.
Added new opcode descriptions about whether and how the opcode accesses memory.
2020-09-13 13:50:35 +02:00
acqn
66c5faeb9a Added processor flags usage tracking.
Added ZNRegs for tracking what register(s) Z/N flags currently reflect.
Added utility functions to check if the specified processor state is known to be a certain value.
2020-09-13 13:50:35 +02:00
acqn
fe3f267233 Added new runtime sub bcasta/bcastax/bcasteax opposing to bnega/bnegax/bnegeax. 2020-09-11 13:33:54 +02:00
acqn
142b0bf9b3 Added utility functions to get names of comparison function/transformer subroutines. 2020-09-11 13:33:54 +02:00
Greg King
ae6696fcb9 Removed some ambiguity from a statement.
A limited number of bit-field types are required by the C standard, not by cc65.
2020-09-08 10:55:07 -04:00
acqn
ab7e9f8424 Hotfix for Issue #1250. 2020-09-08 16:28:21 +02:00
Jesse Rosenstock
4e4e4c2d21 Allow char bit-fields
These are not required to be supported (only int, signed int, and
unsigned int are required), but most compilers support it.

https://port70.net/~nsz/c/c89/c89-draft.html#3.5.2.1
https://port70.net/~nsz/c/c89/c89-draft.html#A.6.5.8

For consistency with other integral types, plain `char` bit-fields
are unsigned, regardless of the `--signed-chars` option.

Fixes #1047
2020-09-08 14:24:04 +02:00
acqn
41cee0eb44 Extended support for more addressing modes in tos* optimizations. 2020-09-08 14:19:48 +02:00
acqn
7553b60ef0 Improved OptStackOps for optimizating further when operands have equal hi-bytes. 2020-09-08 14:19:48 +02:00
acqn
57117fa687 Utility functions about compare conditions. 2020-09-08 14:19:48 +02:00
acqn
64ef562fa7 Moved all optimization steps from codeopt.c and some optimization steps from coptind.c into new separate files. 2020-09-08 14:18:22 +02:00
Jesse Rosenstock
9a0e4a35e1 Fix enum bit-field ICE #1244
This previously resulted in an ICE:
cc65: Check failed: (Entry->Type->C & T_MASK_SIGN) == T_SIGN_SIGNED,
file 'cc65/symtab.c', line 874

This CHECK is in the code that deals with changing `int` bitfields to
`unsigned int`.

Work around this by treating enum bit-fields as having their signedness
specified, so this type change code does not get called.

Fixes #1244.
2020-09-07 11:21:23 +02:00
Tevo
1e7a9e44af Update comment to reflect addition of integer boundary constants 2020-09-06 23:32:00 +02:00
Tevo
23a8b2c303 Define integer size macros for lacking systems
Define integer size macros for lacking systems
2020-09-06 23:32:00 +02:00
acqn
6bb2d1d5d1 Fixed a comment on struct/union types in DoCompare(). 2020-09-06 22:47:11 +02:00
acqn
1cde952cf5 Fixed comparing an enum type with a non-enum type in DoCompare(). 2020-09-06 22:47:11 +02:00
acqn
6e0fb630d7 Fixed check for processor flags usage in case of PHP. 2020-09-06 13:32:38 +02:00
acqn
e2f950b15e Avoided referencing string literals with sizeof so that they are not output if unused elsewhere. 2020-09-05 13:21:21 +02:00
acqn
903e84c24c Std-functions are no longer inlined if they are unevaluated. 2020-09-05 13:21:21 +02:00
acqn
df07e23f2c Fixed bnegeax funcinfo on register usage. 2020-09-05 02:25:56 -04:00
acqn
f849de6769 Object addresses as non-NULL for comparison with NULL. 2020-09-04 19:50:32 +02:00
acqn
8e0b2f0833 Object addresses as non-NULL in boolean context. 2020-09-04 19:50:32 +02:00
acqn
bc5570b708 Fixed logical-NOT in constant context. 2020-09-04 19:50:32 +02:00
Jesse Rosenstock
44b719d957 Change line endings from CRLF to LF
test/ref/pr1220.c was somehow added with CRLFs.
Other files use just LF.
2020-09-04 14:01:21 +02:00
acqn
676b14429d Better opt chance for certain optimization steps e.g. OptPtrStore1 etc. 2020-09-04 12:00:10 +02:00
acqn
29d1999947 Rearranged the OptFunc's in alphabetic order. 2020-09-04 12:00:10 +02:00
acqn
761d00b7dc Ignore running removed old optimization steps. Neither list them in help info. 2020-09-04 12:00:10 +02:00
acqn
ae340703f2 OptDupLoads shouldn't silently do optimizations. 2020-09-04 11:58:25 +02:00
acqn
f45d2515eb Fixed OptPush1 in case later code would rely on that pushax zeroes register Y. 2020-09-04 11:58:25 +02:00
acqn
2a3d996077 Improved test case for PR #1220. 2020-09-02 21:36:59 +02:00
acqn
fb6bc275bc Fixed evaluation flags propagation to subexpressions in assignments and function calls. 2020-09-02 21:36:59 +02:00
acqn
2379504449 Fixed AND/OR in certain cases where the 'E_NEED_TEST' flag set for usage only in subexpressions should be cleared. 2020-09-02 21:36:59 +02:00
acqn
28de3423eb Merged some switch cases in code generation subroutines. 2020-08-31 09:12:03 +02:00
acqn
6b64b43395 Made local static data use a separated label pool from the code label pool. 2020-08-31 09:12:03 +02:00
acqn
9398e1cd33 Use a dedicated label pool for literals. 2020-08-31 09:12:03 +02:00
Oliver Schmidt
bee559d5f4
Merge pull request #1220 from acqn/StaticConst
[cc65] Fixed constant boolean expressions
2020-08-31 08:59:25 +02:00
acqn
74def4608a The 'E_NEED_TEST' flag shouldn't be overwritten when loading the expression result. 2020-08-31 02:30:12 +08:00
acqn
c0a873e0c8 Reduced exess errors on wrong initializations with curly braces. 2020-08-30 17:35:48 +02:00
acqn
8b580e1191 Disabled struct/union fields of 'void' type. 2020-08-30 17:33:36 +02:00
acqn
f1161daee9 Recursively checking for incomplete/unknown-sized types. 2020-08-30 17:33:36 +02:00
acqn
8541f18340 Improved diagnostic info on assignment to void types. 2020-08-30 17:33:36 +02:00
acqn
abcc2a8f1a Disallowed void arrays of elements of variant sizes. 2020-08-30 17:33:36 +02:00
acqn
d87846e1e1 Improved comments according to PR reviews. 2020-08-30 22:12:30 +08:00
acqn
60c59f59a3 Renamed StaticConstExpr() and StaticConstAbsIntExpr() with clearer comments. 2020-08-30 00:26:52 +08:00
acqn
492ee7fc45 Improved test/ref/pr1220.c. 2020-08-30 03:10:24 +08:00
acqn
df755df44d Warning about ESU types declared inside parameter list as they are invisble outside. 2020-08-29 16:37:16 +02:00
acqn
33a75e0a73 Optimized parameter list checking.
Fixed function type comparison between ANSI and K&R styles.
2020-08-29 16:37:16 +02:00
acqn
0a96ffc878 Fixed function parameter checking.
Fixed function return type checking.
2020-08-29 16:37:16 +02:00
acqn
4e61ae5b36 Fixed function parameter type conversion. 2020-08-29 16:37:16 +02:00
acqn
632da3f4ee Fixed tracking and checking flexible array members. 2020-08-29 16:35:42 +02:00
IrgendwerA8
f54e01781b Tiny optimizations for multiplication. 2020-08-29 16:34:20 +02:00
mrdudz
5158ee2092 preliminary makefile to build all programs in the testcode directory 2020-08-27 14:50:00 +02:00
mrdudz
5e2d2a54f6 added makefile for the GEOS samples. geosconio.c and rmvprot.c do not compile right now, someone with more GEOS knowledge should look at them 2020-08-27 14:25:33 +02:00
mrdudz
4008ab556c added a Makefile 2020-08-27 01:34:18 +02:00
mrdudz
f34644186f build a bogus "ROM image" that can be disassembled, fix the makefile, remove generated files 2020-08-27 01:19:33 +02:00
acqn
504aee3835
Merge branch 'master' into StaticConst 2020-08-27 06:27:23 +08:00
mrdudz
7a453d1f90 add a "disk" target to build the disk images as suggested by Oliver 2020-08-27 00:08:22 +02:00
mrdudz
41dbd31b02 fix makefile, remove the unneeded .cfg again. oops :) 2020-08-27 00:04:34 +02:00
mrdudz
c1a514c0f8 added test related to issue #1201 2020-08-26 23:20:28 +02:00
mrdudz
39a3de3119 made geoslib testcode compile again, added the required linker config and a Makefile 2020-08-26 22:47:47 +02:00
mrdudz
bf5384a712 some more refactoring of Makefiles, preparing for CI 2020-08-26 22:46:45 +02:00
acqn
bb9c203222 Fixed integer promotion of unary operations. 2020-08-26 22:17:16 +02:00
acqn
8d225c32b1 Fixed checks on assignment to incomplete types. 2020-08-26 22:14:51 +02:00
acqn
43cb092a68 Fixed CHECK failures on certain usage of incomplete enums. 2020-08-26 22:14:51 +02:00
acqn
1957dc7a5c Disallowed arrays of incomplete types.
Fixed diagnostics on incomplete local arrays.
2020-08-26 22:14:51 +02:00
acqn
f5b1b69376 Forbid struct/union fields of incomplete types. 2020-08-26 22:14:51 +02:00
mrdudz
bee11ec11b Merge branch 'master' of https://github.com/cc65/cc65 2020-08-26 21:28:32 +02:00
mrdudz
8649859bc5 added/updated Makefiles, preparing for CI (later) 2020-08-26 21:28:19 +02:00
Oliver Schmidt
b0d3b19a6a The bug1209 test fails at link stage. 2020-08-26 21:01:02 +02:00
mrdudz
ad1579140b Merge branch 'master' of https://github.com/cc65/cc65 2020-08-26 20:54:13 +02:00
mrdudz
c6adf4364f make atari testcode compile again, added makefile 2020-08-26 20:53:45 +02:00
Oliver Schmidt
c658acbf85 Avoid cl65 in tests.
cl65 creates intermediate files based on the source file name in the source file directory. Calling cl65 in parallel with the same source file causes those intermediate files to get overwritten.

Fixes #1080
2020-08-26 20:39:34 +02:00
mrdudz
4c912a0fbe make gamate testcode compile again 2020-08-26 15:59:52 +02:00
mrdudz
83cc115112 re-add define for pad bits hw address, which was accidently removed in some refactor commit 2020-08-26 15:51:20 +02:00
mrdudz
e5a1755133 added some ifdefs to make testcode compile for apple2 and atari targets 2020-08-26 15:08:17 +02:00
mrdudz
d21fbed1bb Merge branch 'master' of https://github.com/cc65/cc65 2020-08-26 13:37:07 +02:00
mrdudz
c216b3534b fix compilation, fixes issue #1184 2020-08-26 13:36:43 +02:00
Bob Andrews
4cd19711f2
Merge pull request #1219 from acqn/Test
Bug #1113 was fixed "long" ago
2020-08-26 11:09:11 +02:00
acqn
b6a4715a38 Added test/ref/pr1220 for testing constant AND/OR code generation. 2020-08-26 08:45:01 +08:00
acqn
d68925c6a8 Bug #1113 was fixed long ago. 2020-08-25 22:34:25 +08:00
Jesse Rosenstock
344aea0669 Add additional test cases for #1209
These test cases don't use dynamic labels.
https://github.com/cc65/cc65/issues/1209#issuecomment-678738971

Also update the original test case for consistency:
* Change failure message to just "FAIL", as there is only one failure
* Outdent label definitions
* Clarify description
2020-08-24 19:15:06 +02:00
Jesse Rosenstock
d38e5858f0 Add tests for #1211
CL_MoveRefs: Add CHECK (E->JumpTo != NULL) to make failure clearer.
2020-08-24 18:10:22 +02:00
Jesse Rosenstock
4b7cd491e3 Move #1209 test from err/ to misc/
misc/ is the correct place for tests that should compile
but do not.

Revert err/Makefile changes from #1210.
2020-08-24 18:07:31 +02:00
acqn
c3a6b39945 Made struct assignment less hackish. 2020-08-24 18:02:29 +02:00
acqn
d1995fc81a Fixed rvalue-ness of cast results. 2020-08-24 17:16:37 +02:00
acqn
63fa9a5a42 Fixed usage of "lvalue-cast" in _scanf implementation. 2020-08-24 17:16:37 +02:00
acqn
911a79796d Fixed checks and diagnostics on type-casting. 2020-08-24 17:16:37 +02:00
Jesse Rosenstock
23621f3299 Add test case for #1209
Change err/ tests to use cl65 and .prg instead of cc65 and .s
since this test only fails at the link stage.
2020-08-22 15:27:49 +02:00
acqn
0486d28abc Fixed Issue #327. 2020-08-22 13:44:18 +02:00
acqn
f289ea6c14 Avoided generating unnecessary true-case labels in logic AND/OR. 2020-08-22 11:10:17 +08:00
acqn
0536f4f9bd Minor fixes on constant expression checking and comments. 2020-08-21 23:27:41 +02:00
acqn
63256fd15d Changed negation of signed long stored in unsigned long to unsigned subtraction. 2020-08-21 23:16:17 +02:00
acqn
f59c2a08d9 Added support for changing multiplications with certain negative multipliers into bit-shifts. Only enable certain kinds of signed mul replacements with shift according to the code size factor settings. 2020-08-21 23:16:17 +02:00
acqn
ea7336591c Removed special-casing code for scaling up. Now it uses the normal multiplying code. 2020-08-21 23:16:17 +02:00
Greg King
75dc234988 Guarded the static_assert macro with a C standards test. 2020-08-21 15:15:19 -04:00
acqn
85ea06687b Fixed logical AND and logical OR. 2020-08-20 07:52:15 +08:00
acqn
725511131a Fixed constant expression checks with no-code requirement.
Used return-by-value initialization for ExprDesc.
2020-08-20 07:52:11 +08:00
acqn
1abb9da2b2 Moved bug250.c to test/val as it is fixed. 2020-08-26 09:40:32 +08:00
acqn
3ea3887c77 Fixed warnings on const comparison.
Warnings on expressions with no effects.
Fixed const ternary.
Fixed ternary with struct/union types as the true/false-branch expressions.
2020-08-20 07:52:06 +08:00
acqn
b15ab348ba Moved bug250.c from test/misc as it is to be fixed. 2020-08-26 08:23:05 +08:00
acqn
17bbba7327 Added integer boolean type string.
No longer set the "expression tested" flag with constant results in comparison.
2020-08-20 07:52:03 +08:00
mrdudz
794adcc512 remove unneeded rule 2020-08-19 22:33:10 +02:00
mrdudz
e6b8f4d715 move/fix bug264.c as suggested in issue #1122 2020-08-19 22:25:18 +02:00
mrdudz
1a92368aed rename bdiff.c to isequal.c, make it handle different line-endings as equal 2020-08-19 14:50:12 +02:00
Jesse Rosenstock
85e8a6cb9f Clarify docs that bss is zero-initialized
Addresses comment raised in #1202.
2020-08-19 13:24:15 +02:00
acqn
9fcde120aa Made function signatures in asm output use the parameter lists from original definitions instead of the composites. 2020-08-19 08:40:19 +02:00
Greg King
36dd82f0e6 Added g_branch() to cc65's code generator.
It uses BRA if the platform's CPU has BRA.  Else, it generates a JMP.

(Used it in the bitfield sign-extending code.)
2020-08-18 19:11:18 -04:00
mrdudz
0690a12ad2 change "the cc65 authors" to "The cc65 Authors" as per jmrs request 2020-08-18 22:41:42 +02:00
mrdudz
0c22d5011e added test related to pr #1190 2020-08-18 17:58:29 +02:00
mrdudz
ab89c168de replace "Copyright 2020 Google LLC" by "Copyright 2020 the cc65 authors" 2020-08-18 17:47:35 +02:00
Jesse Rosenstock
ff535b8e1a Treat signed int bit-fields as signed
Prior to this PR, `int`, `signed int`, and `unsigned int`
bitfields are all treated as `unsigned int`.

With this PR, `signed int` will be treated as `signed int`,
and the others remain unsigned.

Since `Type` does not distinguish between `int` and `signed int`,
add an extra `int* SignenessSpecified` param to `ParseTypeSpec`
so we can tell these apart for bit-fields and treat plain `int : N`
as `unsigned int : N` since it is more efficient to zero-extend
than sign-extend.

Fixes #1095
2020-08-18 12:23:20 +02:00
Jesse Rosenstock
55cebc7b9e Move bit-field adjustment to codegen.c
Extract functions g_testbitfield and g_extractbitfield from LoadExpr.

This helps prepare for #1192, since g_extractbitfield will get much
longer and call AddCodeLine.
2020-08-18 10:55:31 +02:00
acqn
56b659c0be Made char type a distinct type. 2020-08-18 10:48:38 +02:00
acqn
87889df9e9 Fixed type checking in relation operations. 2020-08-18 09:39:43 +02:00
mrdudz
2663561c62 added test related to pr #1135 2020-08-18 00:41:35 +02:00
mrdudz
6d8860b9de added test related to issue #1145 2020-08-18 00:41:07 +02:00
mrdudz
cf41fccc0a added test related to issue #1143 2020-08-18 00:40:29 +02:00
acqn
f206833a20 Alternative fix for Issue #1167. 2020-08-17 20:31:02 +02:00
acqn
0afa1a9a95 Fixed function signatures in asm output.
Improved full type name production.
2020-08-17 20:30:32 +02:00
acqn
ebae994dc9 Fixed CHECK failure when calling functions defined with repeated parameter names.
Clarified the terms "parameter" vs "argument" in FunctionParamList().
2020-08-17 20:27:57 +02:00
Bob Andrews
531de44c95
Merge pull request #1193 from jmr/bitfield-union-bug
Add test of union of bit-field from mailing list
2020-08-17 14:33:51 +02:00
Jesse Rosenstock
6db93d58cf Add test of union of bit-field from mailing list
https://sourceforge.net/p/cc65/mailman/message/36152700/

This currently works, but add a test to prevent future regressions.
2020-08-17 09:54:31 +02:00
acqn
15f28c3a8c Fixed getting the basic raw type names. 2020-08-17 00:00:03 +02:00
acqn
11cd3e5cbd Utility for checking general datatype categories, incomplete ESU types and arrays of unknown sizes. 2020-08-17 00:00:03 +02:00
Jesse Rosenstock
7e61b11f23 Add _Static_assert docs to cc65 extensions
Fixes #1149.
2020-08-16 21:57:04 +02:00
Jesse Rosenstock
1cf9404c19 Support C2X _Static_assert(expr) syntax
This makes the message in _Static_assert(expr, message) optional.

Fixes #1188.
2020-08-16 11:38:20 +02:00
Jesse Rosenstock
c4698dfd07 Use C89 semantics for integer conversions
Previously, the following rules were used for binary operators:
* If one of the values is a long, the result is long.
* If one of the values is unsigned, the result is also unsigned.
* Otherwise the result is an int.

C89 specifies the "usual arithmetic conversions" as:
* The integral promotions are performed on both operands.
* Then the following rules are applied:
  * If either operand has type unsigned long int, the other operand is
    converted to unsigned long int.
  * Otherwise, if one operand has type long int and the other has type
    unsigned int, if a long int can represent all values of an unsigned int,
    the operand of type unsigned int is converted to long int; if a long int
    cannot represent all the values of an unsigned int, both operands are
    converted to unsigned long int.
  * Otherwise, if either operand has type long int, the other operand is
    converted to long int.
  * Otherwise, if either operand has type unsigned int, the other operand is
    converted to unsigned int.
  * Otherwise, both operands have type int.
https://port70.net/~nsz/c/c89/c89-draft.html#3.2.1.5

As one example, these rules give a different result for an operator
with one long operand and one unsigned int operand.  Previously,
the result type was unsigned long.  With C89 semantics, it is just long,
since long can represent all unsigned ints.

Integral promotions convert types shorter than int to int (or unsigned int).
Both char and unsigned char are promoted to int since int can represent
all unsigned chars.
https://port70.net/~nsz/c/c89/c89-draft.html#3.2.1.1

Rename promoteint to ArithmeticConvert, since this is more accurate.

Fixes #170
2020-08-15 19:14:31 +02:00
acqn
fdded33097 Made it easier to support 0-size structs in the future. 2020-08-15 06:27:11 +08:00
mrdudz
8197e3c7cd make it actually compile again :) 2020-08-14 21:07:39 +02:00
mrdudz
f0e4053a0d added test related to issue #1178 2020-08-14 19:58:58 +02:00
acqn
1d28e8e3de Improved test case for Issue #191. 2020-08-14 18:33:54 +02:00
acqn
b19bb14348 Fixed checking conflitcing declarations with external vs other linkage. 2020-08-14 18:33:54 +02:00
acqn
13ed557b92 Fixed compatibility checking of function declarations by using the composite types of them. 2020-08-14 18:33:54 +02:00
acqn
44d52935da Utility for getting the composite types of functions. 2020-08-14 18:33:54 +02:00
acqn
8a417ff039 Improved ESU declaration failure handling. 2020-08-14 18:15:31 +02:00
mrdudz
dc83eb15af added test related to issue #1181 2020-08-14 16:12:17 +02:00
Bob Andrews
83452ae6b3
Merge pull request #1182 from acqn/StructPtrField
[cc65] Fixed testing 'struct->field'
2020-08-14 14:13:39 +02:00
acqn
0dfe9ff5fe Fixed testing 'struct->field'. 2020-08-14 08:32:22 +08:00
acqn
0fa18886c0 Fixed copying structs/unions > 4 bytes. 2020-08-13 08:59:05 +02:00
acqn
03b37cf712 Fixed type comparisons of typedefs and arrays. 2020-08-12 15:04:26 +02:00
acqn
eb4464e828 Fixed type comparisons of ESU types with stricter rules. 2020-08-12 15:04:26 +02:00
acqn
8b8561161c Moved #1098 bug tests from test/misc to test/err as they are fixed now. 2020-08-12 15:02:43 +02:00
acqn
fe44fe963f Disallowed empty enums. 2020-08-12 15:02:43 +02:00
acqn
97065faf1a Disallowed struct/union types of 0 size as cc65 is not ready to support them. 2020-08-12 15:02:43 +02:00
acqn
4dfc1a5ded Using a dedicated SC_FICTITIOUS flag in case of parsing errors. 2020-08-12 15:01:31 +02:00
acqn
bde5be6793 Improved error message on initializing extern variables inside functions. 2020-08-12 15:01:31 +02:00
acqn
b62b1650f5 Improved error messages on struct/union type multiple definitions. 2020-08-12 15:01:31 +02:00
acqn
fe3f726fd6 Improved incomplete enum typed diagnostics. 2020-08-12 15:01:31 +02:00
acqn
0d53806490 Avoided excess errors in incomplete struct assignment. 2020-08-12 15:01:31 +02:00
acqn
9317db6642 Slightly improved type error messages of 'op='. 2020-08-12 15:01:31 +02:00
acqn
9fcfa3fc49 Fixed full type names of functions with "empty" parameter list. 2020-08-12 15:01:31 +02:00
acqn
68d63b089d Reduced error flood raised by misplaced variable declarations. 2020-08-12 15:01:31 +02:00
acqn
0f1a5e0520 Set enum tag definition flags. 2020-08-09 22:12:36 +02:00
acqn
1dd899c7c9 Fixed non-file-scope multiple definition checking. 2020-08-09 22:12:36 +02:00
acqn
d68cd90e47 Function declaration in functions cannot have storage classes other than 'extern'. 2020-08-07 10:16:33 +02:00
acqn
43efc256f1 Changed error/warning messages not using the term 'tentative' according to PR reviews. 2020-08-07 10:16:33 +02:00
acqn
b2d3b8379c Warning about forward declaration of enum types in non-cc65 modes. 2020-08-07 10:16:33 +02:00
acqn
8cdffc1944 No storage for unsuccessfully parsed variables. 2020-08-07 10:16:33 +02:00
acqn
fdef067629 Fixed tentative definition of variables of incomplete types that may be completed later.
Tenative arrays that never get completed are now assumed each to have one element.
2020-08-07 10:16:33 +02:00
acqn
fdd120db49 Enabled to output errors and warnings about tentative definitions. 2020-08-07 10:16:33 +02:00
acqn
f59d6b8f6a Redefining enums/structs/unions of 0 size is no longer treated as declarations and thus forbidden. 2020-08-07 10:16:33 +02:00
Jesse Rosenstock
cdfc1afd89 Fix vacuous comparison warning from 0df45fe
cc65/symentry.c:306:60: warning: address of array 'Sym->Name' will always evaluate to 'true' [-Wpointer-bool-conversion]
    sprintf (TypeName, "%s %s", GetBasicTypeName (T), Sym->Name ? Sym->Name : "<unknown>");
                                                      ~~~~~^~~~ ~
2020-08-05 17:48:13 +02:00
Jesse Rosenstock
d8f9201ecd LoadExpr: Optimize <= 8-bit bit-field loads
Set CF_FORCECHAR to do as many operations as char ops as possible.
Clear high byte at the end.
2020-08-05 12:49:46 +02:00
Jesse Rosenstock
0c72647edd Remove extra ED_TestDone call
Accidentally added in #1141.
2020-08-03 12:40:58 +02:00
acqn
bae431eab0 Fixed error message of CheckedPSizeOf(). 2020-08-03 06:18:28 +02:00
acqn
e3d913b81a Fixed the reference output of test/misc/goto.c (test/misc/goto.ref). 2020-08-02 23:51:11 +02:00
acqn
d6aa446b54 Error info for loading expressions of incomplete enum types.
No more "Illegal type 0016".
2020-08-02 23:51:11 +02:00
acqn
6df4f1996b Improved diagnostics with more detailed type names. 2020-08-02 23:51:11 +02:00
acqn
11a5f0edf1 No "Statement has no effect" warnings on statements with errors. 2020-08-02 23:51:11 +02:00
acqn
7e68a24625 Clearer warning messages on unused symbols. 2020-08-02 23:51:11 +02:00
acqn
e8c2886455 Improved error messages on redefinitions of constants and bit-fields. 2020-08-02 23:51:11 +02:00
acqn
ef5a4db12e Improved warning messages on UB shifts. 2020-08-02 23:51:11 +02:00
acqn
2ab7272673 Improved warning on comparison of unsigned type < 0. 2020-08-02 23:51:11 +02:00
acqn
99ac1c46da Made errors/warnings statistic message visible when there are errors. 2020-08-02 23:51:11 +02:00
acqn
44e3080ea9 Increased upper limit of allowed errors before aborting. 2020-08-02 23:51:11 +02:00
acqn
00c16d34a4 Minor fixes for HandleSymRedefinition(). 2020-08-02 23:51:11 +02:00
acqn
80b0e57543 Changed parameter constness of TypeConversion(). 2020-08-02 18:55:46 +02:00
acqn
003d47cc8b Improved type conversion diagnostic messages.
Allowed incompatible pointer assignments with warnings.
Fixed Issue #1089.
2020-08-02 18:55:46 +02:00
acqn
d841bbe498 Utility to check for castability. 2020-08-02 18:55:46 +02:00
acqn
52051f444e Using tracked individual string buffers instead of a shared static string buffer for full type names. 2020-08-02 18:55:46 +02:00
acqn
4ccf10f3fa Utility to get full type names. 2020-08-02 18:55:46 +02:00
acqn
0df45fe2f2 Utility for getting ESU tag type symbols. 2020-08-02 18:55:46 +02:00
Oliver Schmidt
c831f40e9b Unfortunately there's no other way than using the absolute path to init the correct MSVC 2017 environment. 2020-08-02 18:44:13 +02:00
Oliver Schmidt
35d6a75b37 Fixed Windows path notation. 2020-08-02 17:49:18 +02:00
Oliver Schmidt
992596c981 Initialize MSVC 2017 environment before build. 2020-08-02 17:32:36 +02:00
Oliver Schmidt
ce19d7b84f Made use of Travis CI's Windows support.
At least for now there seems to be no point in trying to build the libraries (and run the tests) on Windows. Rather we only want to check that the MSVC solution is still valid.
2020-08-02 15:50:31 +02:00
Jesse Rosenstock
adda28f5c5 LoadExpr: Set CF_FORCECHAR if test is required
If we are testing, we do not need to load the high byte(s).
2020-08-02 12:31:57 +02:00
acqn
2a555d198c Changed 'switch' to 'if' according PR review comments. 2020-08-02 12:28:11 +02:00
acqn
30fd8592ae Avoid internal errors when using function-type objects in expressions. 2020-08-02 12:28:11 +02:00
acqn
e526cbbff6 Fixed handling multiple storage specifiers in one declaration. 2020-08-02 02:20:25 +02:00
Jesse Rosenstock
633cd17a3e Add enum size test case for #1050 2020-08-02 01:18:28 +02:00
Oliver Schmidt
e1043fac12 Adjusted to https://github.com/cc65/cc65/pull/1124. 2020-08-01 10:56:05 +02:00
Jesse Rosenstock
9c70bd44a6 Clarify comment about large shift
This is to avoid overflow on host platform.
2020-07-31 19:33:28 +02:00
Jesse Rosenstock
847982c6bf Handle bit-field test after shift/mask
Previously, bit-field tests were incorrectly combined with load in
`if (x.bitfield)`.  Delay the test until after the shift/mask
is done.  Still combine tests with load if no shift/mask is required.

Fixes #1139
2020-07-31 19:33:28 +02:00
Jesse Rosenstock
d0c7108dcf Change copyright notice to "The cc65 Authors" 2020-07-30 19:17:11 +02:00
Jesse Rosenstock
3df6c383c0 Add support for static_assert
Add C11's _Static_assert and static_assert macro.

This is like #error, but is handled at a later stage
of translation, so it is possible to check sizes of
types, values of enums, etc.

https://en.cppreference.com/w/c/language/_Static_assert
https://port70.net/~nsz/c/c11/n1570.html#6.7.10
2020-07-30 19:17:11 +02:00
Jesse Rosenstock
c72fa735b9 Add test for #1139 2020-07-30 19:13:19 +02:00
Jesse Rosenstock
2d5fd0fc63 Use char ops if possible for bit-field loads
Set CF_FORCECHAR and change type to char once we have
shifted into a char.

This saves some unnecessary ldx #0 instructions.
2020-07-30 14:59:23 +02:00
acqn
e38f601fcc Fixed padding at the ends of structs with bit-fields. 2020-07-30 08:38:24 +02:00
acqn
8a511bb63d Fixed nested array initializers. 2020-07-30 08:38:24 +02:00
acqn
9075a853dc Allows one trailing comma before the closing curly of a struct/union initializer. 2020-07-30 08:38:24 +02:00
acqn
25d10d9d9a Fixed nested struct/union initialization.
Fixed bit-fields offsets in anonymous structs.
2020-07-30 08:38:24 +02:00
acqn
d6d667a688 Improved error handling with symbol redefinitions. 2020-07-30 08:22:29 +02:00
acqn
92de4fa0d0 Enabled to recognize labels when parsing local variable declarations. 2020-07-30 08:22:29 +02:00
acqn
19c81ed866 Fixed type mask usage. 2020-07-30 08:13:23 +02:00
Jesse Rosenstock
fb9b50ff9c Move type checks before bit-field width parsing 2020-07-30 08:10:38 +02:00
Jesse Rosenstock
aaa0cf5448 Add err tests for bitfield width errors
! ../../bin/cc65 -o ../../testwrk/err/bitfield-named-zero-width.s bitfield-named-zero-width.c
bitfield-named-zero-width.c(27): Error: Zero width for named bit-field
! ../../bin/cc65 -o ../../testwrk/err/bitfield-negative-width.s bitfield-negative-width.c
bitfield-negative-width.c(26): Error: Negative width in bit-field
! ../../bin/cc65 -o ../../testwrk/err/bitfield-too-wide.s bitfield-too-wide.c
bitfield-too-wide.c(26): Error: Width of bit-field exceeds its type
2020-07-30 08:10:38 +02:00
Jesse Rosenstock
a2561d07f3 Remove special-case bit-field width code
cbb33f8 restricted allowed bit-field types to int,
so this is equivalent for now, but forward-compatible.

Fixes FIXME

Also move the int type check before parsing the colon.
2020-07-30 08:10:38 +02:00
Jesse Rosenstock
74dda01919 Add test that plain int bitfields are unsigned
We want to make sure this doesn't change when #1095 is fixed;
unsigned is much more efficient.
2020-07-29 16:43:17 +02:00
Oliver Schmidt
8eab28012a
Adjusted project name. 2020-07-28 23:29:16 +02:00
acqn
cbb33f86e8 Disabled using non-int-size types to declare bit-fields. 2020-07-28 23:26:25 +02:00
acqn
c37f9f1a41 Check if the integer size is known in GetIntegerTypeMin/Max() to prevent potential misuse. 2020-07-28 23:26:25 +02:00
acqn
0f412b6beb Small fixes according to PR review. 2020-07-28 23:26:25 +02:00
acqn
35e1efc7f2 Moved misc/bug1048 as it is already correctly rejected by the compiler. 2020-07-28 23:26:25 +02:00
acqn
7e243e0f2c Allowed using all integer types including enum and char types to define bit-fields,
but kept the currently behavior that all of them are treated as unsigned int.
2020-07-28 23:26:25 +02:00
acqn
d8184fbe54 No longer insert all enums in the global symbol table. 2020-07-28 23:26:25 +02:00
acqn
daa65199b3 Fixed underlying types of enums.
Made enumerator diagnostics more sensible.
Fixed Issue #1048 as a natural result.
2020-07-28 23:26:25 +02:00
Jesse Rosenstock
c272c73686 Add err test for char bit-fields #1047 2020-07-28 22:03:01 +02:00
Jesse Rosenstock
c0f2b69bef Add test case for sign extending < 1 byte 2020-07-28 22:01:22 +02:00
Jesse Rosenstock
04d16b3740 Make $WORKDIR for tests/err
Without this, if there is a test that can compile,
it will still fail because the WORKDIR does not exist:

```
pass.c(1): Fatal: Cannot open output file '../../testwrk/err/pass.s': No such file or directory
```
2020-07-28 21:59:12 +02:00
Oliver Schmidt
cdd23edd37 Added building of samples. 2020-07-27 17:59:24 +02:00
Oliver Schmidt
4316242d7e Adjusted to 5df2de0629 (and slightly simplified). 2020-07-27 17:47:14 +02:00
mrdudz
ed3f281b9e fix wording 2020-07-27 14:40:27 +02:00
compyx
81d3dedb41 Move comment block as requested 2020-07-24 15:24:28 -04:00
compyx
294b5d1cf1 C64 soft80 conio: shave off a few bytes and cycles 2020-07-24 15:24:28 -04:00
Oliver Schmidt
5df2de0629 Added test target. 2020-07-22 23:27:04 +02:00
mrdudz
ffaae965d4 Merge branch 'master' of https://github.com/cc65/cc65 2020-07-22 15:56:23 +02:00
mrdudz
afe455238c added test related to issue #1113 2020-07-22 15:55:55 +02:00
mrdudz
98b2d43c2b added tests related to pr #1110 2020-07-22 15:52:04 +02:00
mrdudz
ce06b20c6c add some details to the readme 2020-07-22 15:31:39 +02:00
mrdudz
844f5a9d33 hook up test/todo in the toplevel test makefile 2020-07-22 15:12:29 +02:00
mrdudz
6abf24e25e move test for issue #1077 to test/val 2020-07-22 15:12:02 +02:00
mrdudz
e22e9c403c added testcase for issue #1098 2020-07-22 14:57:40 +02:00
Greg King
44c82eb1c3 Made da65 disassemble branch instructions with relative address expression operands if there's no label. 2020-07-21 18:43:32 -04:00
mrdudz
eb094ecf6a remove ifdef magic 2020-07-22 00:21:23 +02:00
mrdudz
4a9c5ff63b use uint16_t instead of magic ifdefs, leaving support for bit type in there incase we support it some day 2020-07-22 00:09:48 +02:00
mrdudz
6d518a61a5 Merge branch 'master' of https://github.com/cc65/cc65 2020-07-21 23:52:24 +02:00
mrdudz
df900e30b8 removed references to macros from common.h 2020-07-21 23:50:23 +02:00
Oliver Schmidt
77674352f6
Minor style change. 2020-07-21 23:44:36 +02:00
Brad Smith
041f981960
rand() use XOR to break up unwanted pair correlation (#1107)
* rand() use XOR to break up unwanted pair correlation

This form of rand() cannot return the same value twice in a row.
Two additonal EOR instructions produce a more even distribution of successive pairs.
see comments on #951

* rand.s document purpose of XOR

* suggested srand() optimization: zero fill unnecessary

* test to validate implementation of rand()

* srand() improving behaviour and adding startup test

* srand() with a tail call to rand() for better initial shuffle

* srand() can fall through to rand() instead of tail call
2020-07-21 23:38:18 +02:00
mrdudz
7e1f4760e7 remove common.h from test/misc, its no more used 2020-07-21 23:31:58 +02:00
mrdudz
2bbea6779a properly configure sitest so it could work, if we had the respective features :) 2020-07-21 23:04:03 +02:00
mrdudz
9e43c0a569 added a test related to pr#1102 - we can now return structs by value when they are max. 4 bytes 2020-07-21 21:04:41 +02:00
mrdudz
145084c41c move test for issue #1075 to test/var 2020-07-21 20:02:51 +02:00
mrdudz
42c162c15e rework test for issue #1075 to return an exit code 2020-07-21 19:58:36 +02:00
mrdudz
a0c80a8c72 move (now working) tests to test/val 2020-07-21 19:24:39 +02:00
mrdudz
b2d7998241 update makefile to use $(NOT) as discussed with Oliver 2020-07-21 19:15:41 +02:00
acqn
07e18774f7 Added spaces around '|' with regex replacement. 2020-07-21 18:23:52 +02:00
acqn
c66d0881b9 Made the enum/enumerator types clearer and improved DumpSymEntry() output. 2020-07-21 18:23:52 +02:00
acqn
18bd76bb90 Minor fixes and improvements. 2020-07-21 18:23:52 +02:00
acqn
65081aebed Made able to recognize global declarations of static arrays. Fixed Issue #975. 2020-07-21 18:23:52 +02:00
acqn
0250c87ac6 Fixed SC_* type masks by making them all bitwise-exclusive. 2020-07-21 18:23:52 +02:00
mrdudz
e4fc7a0fec reworked pptest3 into an exectutable test and moved to test/val 2020-07-21 15:30:35 +02:00
mrdudz
010ed6d729 reworked pptest1/4/5 into executable tests and moved to test/val 2020-07-21 14:58:15 +02:00
mrdudz
638e254668 rework pptest2 into a runable test and move to test/misc (since it does not compile with cc65) 2020-07-21 14:48:49 +02:00
Greg King
b60b303c5d Added a missing asterisk to a "hardware" struct definition. 2020-07-20 21:40:44 -04:00
Greg King
517df130cc Made a regression test increment a variable after, instead of before, using it.
That change allows the initial value of zero to be tested.
2020-07-20 17:16:11 -04:00
mrdudz
5a9d76ad52 added test for issue #1108 2020-07-20 15:50:11 +02:00
acqn
78342fa82c Fix for "auto" variables made "static" with the "-Cl" options. 2020-07-20 15:01:47 +02:00
acqn
71c2d27705 Removed an ED_IsBitField() test according to PR review. 2020-07-20 14:54:32 +02:00
acqn
2245783345 Fixed ability to do actual type conversion from bit-fields to integers. Note this doesn't try to fix the signedness issues. 2020-07-20 14:54:32 +02:00
acqn
b67b8ddd38 Disabled applying 'sizeof' to bit-fields. 2020-07-20 14:54:32 +02:00
acqn
62a6e37487 Made the code handling '&expression' slightly tidier. 2020-07-20 14:54:32 +02:00
acqn
3c52ad1d9e New utility ED_DisBitField() to make an expression no longer a bit-field. 2020-07-20 14:54:32 +02:00
Greg King
fd0a6955da Changed "IsTypeStruct() || IsTypeUnion()" expressions into shorter "IsClassStruct()" expressions.
Type-classes are groups of types that can be handled in the same way (similar syntax).
2020-07-19 14:30:22 -04:00
Oliver Schmidt
ee208aecd6 Removed unnecessary tool.
It's not the domain of cc65 to provide tools already available elsewhere.
2020-07-19 13:16:29 +02:00
acqn
29c50ab25f Corrected the error message about struct/union members not found. 2020-07-19 12:57:59 +02:00
Jesse Rosenstock
bbcb39978c Add test of signed bitfields for #1095 2020-07-19 11:05:27 +02:00
acqn
768e03a474 Small fixes and tidy-up based on PR review.
Renamed GetReplacementType() to GetStructReplacementType().
Clarified in comments that most *Struct* facilities work for unions as well.
Made it clear in some error messages with regards to structs/unions.
2020-07-19 10:58:33 +02:00
acqn
0c3e1b491f Disabled -Wstruct-param by default. 2020-07-19 10:58:33 +02:00
acqn
b45d373fd6 Fixed passing by value structs/unions <= 4 bytes in size to functions. Larger ones are forbidden for now. 2020-07-19 10:58:33 +02:00
acqn
9f67b45ea0 Fixed returning by value structs/unions <= 4 bytes in size from functions. Larger ones are forbidden for now. 2020-07-19 10:58:33 +02:00
acqn
66ecc0e52c New utility to get the proper replacement type for passing structs/unions by value.
New utility to get basic type names such as 'struct', 'union' and so on.
2020-07-19 10:58:33 +02:00
acqn
333fa97326 Whitespaces/newlines fixes. 2020-07-18 12:54:29 +02:00
acqn
9198b3be00 Fixed '&function' and '&array'. 2020-07-18 12:54:29 +02:00
acqn
d23b577331 More compiler flags on address types to match the location types of expressions. 2020-07-18 12:54:29 +02:00
acqn
2108489523 Fix for Issue #1075 and #1077. 2020-07-18 12:54:29 +02:00
Greg King
ba48dfe65d Fixed a typo in the CX16 document. 2020-07-16 14:06:23 -04:00
Spiro Trikaliotis
0e55d33cc3 Fix info page building for newer linuxdoc
In ca65.sgml, the following pattern was used in tables in order to
create an empty row:

||~@

That is, the first two columns are empty, the last one has an &nbsp;

Unfortunately, with newer linuxdoc, this fails, as the empty columns
create two @item directly after each other, which is not allowed.

Changing this to

~|~|~@

fixes it by adding an "&nbsp;" into each column.

Furthermore, the last line had a "newrow" (@) separator, which created
an artifact. Removed that one.
2020-07-16 19:25:40 +02:00
Greg King
4296cbaf82 Added a 320x200x256 TGI driver to the Commander X16 library.
Made the mandelbrot sample program handle the X16's 256 colors.
2020-07-15 17:30:58 -04:00
Christian Groessler
72fff0cfbc atari.h: fix definition of KEY_UP
noticed by Stefan Wessels
2020-07-15 23:00:12 +02:00
Greg King
ba0ef5938d Moved the font into a separate module in the library.
The font can be replaced, at link-time, by a custom file.
2020-07-15 04:58:32 -04:00
Olli Savia
a02bec11e9 Another code style fix 2020-07-14 22:54:03 -04:00
Olli Savia
b3703de983 Code style fixes 2020-07-14 22:54:03 -04:00
Olli Savia
de5678af5d Added optimizations by dmsc 2020-07-14 22:54:03 -04:00
Olli Savia
e2ec517aae Save another 3 bytes 2020-07-14 22:54:03 -04:00
mrdudz
306f421aa9 Merge branch 'master' of https://github.com/cc65/cc65 2020-07-15 00:17:41 +02:00
mrdudz
6035f1cb75 added missing gotox/gotoy functions 2020-07-15 00:17:11 +02:00
Greg King
9023e975df Stopped the C128 mouse drivers from blocking certain keys such as '1', '2', and 'Q'.
This extra fix is needed because the C128 keyboard scanner works a little differently than the C64 scanner works.
Fixes #696. Fixes #853.
2020-07-14 16:06:21 -04:00
mrdudz
3558c0796d added a second test that checks all available characters (including inverse) 2020-07-14 15:00:43 +02:00
mrdudz
f99a44d8e1 added rudimentary testing for the peek functions 2020-07-14 14:24:19 +02:00
mrdudz
1f2fdbd9b1 implemented conio peek functions for PCE target 2020-07-14 14:23:58 +02:00
mrdudz
a4f1e37f0c increase the maximum amount of cycles, else the shift test will fail 2020-07-13 21:26:31 +02:00
mrdudz
5ad365c5df some tweaks to the moved tests to make them more suitable for automatic testing 2020-07-13 21:26:07 +02:00
mrdudz
882194c221 move a bunch of tests from testcode/lib to test/val (and a failing one to test/todo) 2020-07-13 21:25:13 +02:00
mrdudz
d940c9aa85 added a bit more precise description 2020-07-13 17:04:22 +02:00
mrdudz
e758110f61 added testcode to check petscii char mapping, related to issue #988 2020-07-13 17:00:17 +02:00
mrdudz
390f972014 updated Makefile with exception rules for the added tests 2020-07-13 15:16:26 +02:00
mrdudz
5597b83d04 added testcase for issue #975 2020-07-13 15:13:38 +02:00
mrdudz
36ff372149 added testcase for issue #760 2020-07-13 15:13:22 +02:00
mrdudz
bec140143b added testcase for issue #760 2020-07-13 15:13:06 +02:00
mrdudz
f8873c2508 added testcase for issue #250 2020-07-13 15:12:47 +02:00
mrdudz
f5d99106e6 added testcase for issue #1075 2020-07-13 15:12:30 +02:00
mrdudz
693e3a7109 added testcase for issue #1048 2020-07-13 15:12:04 +02:00
Olli Savia
a43cac580e Tiny optimization 2020-07-13 10:14:21 +02:00
Oliver Schmidt
bcb8b49907 Removed executable bit. 2020-07-12 23:11:43 +02:00
Oliver Schmidt
04cc463452 Implemented some CONIO peek functions.
Please refer to https://github.com/cc65/cc65/pull/532 for background info.

I wrote in https://sourceforge.net/p/cc65/mailman/message/35873183/

===
cputs() wraps to the next line if the strings is too long to fit in the current line. I don't know if it's worth the effort to allow cpeeks() to continue reading from the next line. I'd like to discuss this aspect with the actual implementers.
===

This is still as unclear today as it was when I wrote the above. Therefore this change just doesn't add cpeeks() at all.

Since f8c6c58373 the Apple II CONIO implementation doesn't "need" revers() anymore - meaning that (nearly) every possible value can be placed in VRAM with a straight cputc() (without the need for a previous revers(1)).

The implementation of cpeekc() leverages that cputc() ability by always returning the value that can be fed into cputc() without a previous revers(1). Accordingly, cpeekrevers() always returns 0.

So after the sequence revers(1); cputc(x); a cpeekc() will return a value different from x! However, I don't see this behavior braking the cpeekc() contract. I see the cpeekc() contract being defined by the sequence textcolor(cpeekcolor()); revers(cpeekrevers()); cputc(cpeekc()); placing the very same value in VRAM that there was before. And that contract is fulfilled.
2020-07-12 22:19:55 +02:00
acqn
727040d1ac Comment fix. 2020-07-12 12:35:42 +02:00
acqn
7d652d42dc Added a warning on promoting a decimal constant without a 'u'/'U' suffix to unsigned long. 2020-07-12 12:35:42 +02:00
compyx
381a32d9aa C64 soft80-conio cgetc: save 14 cycles in invertcursor
By 'inverting' the loop, we can save 16 cycles by removing the `cpy #8`,
saving 16 cycles. But we need an extra `ldy #7` at the start of the
loop, so the total cycles saved is 14. Code size doesn't increase due to
the addition of the `ldy #7` negating the removal of the `cpy #xx`.
2020-07-11 17:46:29 +02:00
compyx
2c4dd5decf Shorten comment as requested 2020-07-11 11:59:45 +02:00
compyx
e45e57d7ce C64 soft80 conio: save 4 bytes in firstinit
Also save 6 cycles as a very small bonus.
2020-07-11 11:59:45 +02:00
compyx
fb7996b0ce Revert "C64 soft80 conio: save 6 bytes in firstinit"
This reverts commit 943e68be6a.
2020-07-11 11:59:45 +02:00
compyx
695b1b01d8 C64 soft80 conio: save 6 bytes in firstinit
As a bonus, save 6 cycles.
2020-07-11 11:59:45 +02:00
Jesse Rosenstock
df97570471 Set .NOTPARALLEL in test/misc and test/val
The cl65 intermediate files stomp each other in
these directories.
2020-07-10 13:08:19 +02:00
Jesse Rosenstock
3999f2ad75 Move .NOTPARALLEL closer to rule that needs it 2020-07-10 13:08:19 +02:00
Jesse Rosenstock
878e4a57c8 Make Makefiles more -j friendly
Add .$1.$2 to outputs missing them.
2020-07-10 13:08:19 +02:00
Jesse Rosenstock
f5afc75cbd ar65/LibClose: Include filename in error messages
```
ar65: Error: Problem deleting temporary library file '../lib/apple2enh.lib.temp': No such file or directory
```
is the error I'm getting with `make -j 19` when trying
to debug #1080.
2020-07-09 21:56:02 +02:00
mrdudz
579b50f0c5 test for issue #927 2020-07-09 16:18:08 +02:00
mrdudz
2428285694 test for issue #327 2020-07-09 16:17:31 +02:00
mrdudz
ff18218b0a test for issue #170 2020-07-09 16:17:16 +02:00
mrdudz
5925a7f8ee test for issue #1077 2020-07-09 16:16:46 +02:00
mrdudz
4b8b15a07a tests for issue #169 2020-07-09 16:05:57 +02:00
mrdudz
93f0df58e5 test related to issue #1071 2020-07-09 15:57:51 +02:00
acqn
85e73e91f8 Only enable signed div replacements with shift according to the code size factor settings.
Also with better comments.
2020-07-09 10:00:50 +02:00
acqn
09bcff0862 Added support for changing divisions by negative power-of-2 denominators into bit shifts,
and fixed #169 including the case of -2147483648 which is negative but appears positive.
2020-07-09 10:00:50 +02:00
acqn
30835e3d9d More optimized codegen for the correct cases of the Issue #169 fix. 2020-07-09 10:00:50 +02:00
acqn
e98fe04cc2 Almost fixed Issue #169. The only denominator not working right now is -2147483648. 2020-07-09 10:00:50 +02:00
Jesse Rosenstock
82c8bd6e2b Replace unary negation with subtraction
Remove MSVC pragma.
2020-07-09 09:49:24 +02:00
Jesse Rosenstock
2c16453a9f Guard MSVC pragma with ifdef _MSC_VER
Fix broken travis-ci with gcc -Werror [-Werror=unknown-pragmas].
2020-07-09 09:49:24 +02:00
Jesse Rosenstock
9e5b8d99a3 Fix MSVC build broken by #1058
MSVC complains about unary negation of unsigned, but it's
intended.  Suppress the warning.

https://github.com/cc65/cc65/pull/1058#discussion_r451757967

"Tested" with godbolt.org.
2020-07-09 09:49:24 +02:00
Jesse Rosenstock
359da1ae76 Update bit-field tests after #1058 merge 2020-07-08 17:20:15 +02:00
Jesse Rosenstock
8449c9eaa0 Add zlib license text 2020-07-08 17:20:15 +02:00
Jesse Rosenstock
532e6b2554 Add copyright notice 2020-07-08 17:20:15 +02:00
Jesse Rosenstock
6f85ee9d95 Add another test for bit-field unit overlap
Test when there is another field after bit-fields with
allocation unit overlap.
2020-07-08 17:20:15 +02:00
Jesse Rosenstock
2f456ce4e2 Add comment explaining four_bits_with_int 2020-07-08 17:20:15 +02:00
Jesse Rosenstock
8a331ee7ec Print to stdout instead of stderr
Print number of failures.

This makes it consistent with the other val/ tests.
2020-07-08 17:20:15 +02:00
Jesse Rosenstock
a70ac6be30 Add test of bit-field packing for #1054 and #1055 2020-07-08 17:20:15 +02:00
Jesse Rosenstock
6dc2bf1226 Rename PaddingBitWidth to PaddingBits 2020-07-08 16:46:34 +02:00
Jesse Rosenstock
9858e47dfd Pad bit-fields only to the next byte
Fixes #1054.

Previously, bit-fields followed by another field were aligned
to two bytes.  Bit-fields ending the struct were (and continue
to be) aligned only to a single byte.

```
struct s {
  unsigned int x : 4;
};

struct t {
  unsigned int x : 4;
  unsigned int y;
};
```

Before: `sizeof(struct s) == 1`, sizeof(struct t) == 4`
After: `sizeof(struct s) == 1` sizeof(struct t) == 3`
2020-07-08 16:46:34 +02:00
Jesse Rosenstock
9e881a497e Fix formatting 2020-07-08 16:45:00 +02:00
Jesse Rosenstock
c273c90bf2 Fix formatting 2020-07-08 16:45:00 +02:00
Jesse Rosenstock
527df094ca Use xrealloc in cl65
Previously, xmalloc and xfree were used.
2020-07-08 16:45:00 +02:00
Jesse Rosenstock
416adbce82 Add blank line 2020-07-08 16:44:06 +02:00
Jesse Rosenstock
021362fb75 cl65: Remove temporary .o files 2020-07-08 16:44:06 +02:00
Greg King
410e4502ee Added a 160x192x2 TGI (graphics) driver to the VIC-20 library.
The driver requires a special linker configuration: "vic20-tgi.cfg".
The VIC-20 computer needs at least 8K of expansion RAM!

"tgidemo.c" needed to be adjusted because the VIC-20's vertical (y) range is greater than its horizontal (x) range -- the opposite of most other platforms.  Also, the circle demo would jam on the VIC-20.
2020-07-08 05:55:30 -04:00
mrdudz
d1833cc441 Fix handling of charcodes 254 and 255, fixes issue #988 2020-07-08 00:48:39 +02:00
acqn
539924249b More complete fix for Issue #1071. 2020-07-07 18:28:56 +02:00
acqn
286da30a26 Quick fix for Issue #1071. 2020-07-07 18:28:56 +02:00
Daniel Serpell
17c5504129 In Atari XEX output format, join memory areas if possible.
This makes executables shorter if two memory areas are consecutive.
2020-07-04 23:28:10 +02:00
Oliver Schmidt
0f8b587bc2 Added directory for currently failing regression tests. 2020-07-01 00:13:55 +02:00
Jesse Rosenstock
8891a896b5 test/ref: Use separate .out files
Use different .out files for different options / targets.
This allows make -j N to work.

Previously all test.*.*.prgs would use the same test.out file.
Now test.*.*.out is also used.
2020-06-29 22:34:44 +02:00
Jesse Rosenstock
d31171164e Fix formatting 2020-06-29 14:49:36 -04:00
Jesse Rosenstock
fae25bc459 CHECK we have at most a partial byte 2020-06-29 14:49:36 -04:00
Jesse Rosenstock
f4a6d08847 Fix full bytes vs full word in comment 2020-06-29 14:49:36 -04:00
Jesse Rosenstock
a00611798d Output bit-field data as chars instead of ints
This prepares for #1058, which will pad bit-fields only to
the next byte, instead of the next sizeof(int) (two bytes).

OutputBitFieldData now outputs chars instead of ints, and
calls to this function loop until there is less than one byte
to output.  A final partial byte is written out with zero padding
as a final partial int was previously.
2020-06-29 14:49:36 -04:00
Jesse Rosenstock
90d1c89bff
Allow overlap of bit-field storage units (#1055)
* Allow overlap of bit-field storage units

Previously,
struct s {
    unsigned int x : 10;
    unsigned int y : 10;
};
had sizeof(struct s) == 4.

With this change, allow the storage units of x and y to overlap,
so sizeof(struct s) == 3, with y stored immediately after x,
with no padding between them.

An int bit-field (the only type currently supported) will still
never occupy more than two bytes.

* ParseStructInit: Fix typo and expand comment

Explain why there are at most 30, not 32 bits.

* ParseStructDecl: Rewrite AddBitFieldCall

No behavior change.

Co-authored-by: Jesse Rosenstock <jmr@users.noreply.github.com>
2020-06-27 15:02:11 +02:00
Oliver Schmidt
5277ea0b73 Add test license description. 2020-06-27 02:23:40 +02:00
Jesse Rosenstock
18246278c5 switch2.c: Remove use of REFCC and UNSIGNED_CHARS
Explicitly use `signed char` or `unsigned char`, rather than
```

signed char k;
char k;

signed char k;
char k;
```
This should have resulted in the same thing; however, note that
`REFCC` was never defined, and `common.h` was not included, so
the old code in fact tested `char` then `unsigned char`,
which are the same.

The only difference is that a switch using plain `char` is not
tested, but since this is the same as either `signed char` or
`unsigned char`, the lack of test coverage seems relatively safe.
2020-06-25 13:18:08 +02:00
Jesse Rosenstock
8fe317e7fa Remove REFCC_UNSIGNED_CHARS from test/ref/
Explicitly use signed char or unsigned char for REFCC.
2020-06-25 13:18:08 +02:00
Jesse Rosenstock
86ba877a99 Define REFCC and REFCC_UNSIGNED_CHARS in reference
switch2.c uses these macros.  With them unset, signed chars
are not tested.
2020-06-25 13:18:08 +02:00
mrdudz
6e6ce4e5ee added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
Dirk Jagdmann
aaecf3cfec replace JMP with BEQ to save 1 byte. 2020-06-22 23:55:45 +02:00
Dirk Jagdmann
3cbe485b94 fix description of Kerberos memory 2020-06-22 23:55:45 +02:00
Dirk Jagdmann
6465c3b687 change order of declarations. 2020-06-22 23:55:45 +02:00
Dirk Jagdmann
9227b0ccaf sort items 2020-06-22 23:55:45 +02:00
Dirk Jagdmann
def27ed4e2 change whitespace 2020-06-22 23:55:45 +02:00
Dirk Jagdmann
070264acc4 remove tab characters. 2020-06-22 23:55:45 +02:00
Dirk Jagdmann
ba79b2db9b add kerberos em driver variable. 2020-06-22 23:55:45 +02:00
Dirk Jagdmann
cb26766651 add C64 documentation 2020-06-22 23:55:45 +02:00
Dirk Jagdmann
76091b96d4 C64 Kerberos extended memory driver 2020-06-22 23:55:45 +02:00
acqn
e9307ce58e Moved test/ref/cc65141011.c to test/val/cc65141011.c. 2020-06-22 23:23:39 +02:00
acqn
8a166ac82f Fixed register usage tracking interfered by CE_SetArg. 2020-06-22 23:23:39 +02:00
acqn
2220c58f51 If the previous insn may be skipped, we cannot simply predict the output values of the registers. 2020-06-22 23:23:39 +02:00
acqn
53eb6a948d No more duplicated stores by Opt_tosshift which could result in worse optimizations. 2020-06-22 23:23:39 +02:00
acqn
49c5cfd65b Improved fix for Issues #167 and #784 and somehow #781. 2020-06-22 23:23:39 +02:00
acqn
48d3578c24 Fixed Issue #784. 2020-06-22 23:23:39 +02:00
acqn
b2268765bf The ref test cc65141011.c now passes. 2020-06-22 23:23:39 +02:00
acqn
a7a8426a90 Just keep Lhs loads in OptStackOps and leave them to OptUnusedLoads,
whilst Rhs loads must be removed for OptStackOps to work right.
Fixed Issue #167 as well as similar issues with tosshift.
2020-06-22 23:23:39 +02:00
Jesse Rosenstock
1c2edc5434 AddBitField: Rename Width arg to BitWidth
This makes the arg consistent with the SymEntry field name.
2020-06-21 01:08:44 +02:00
Jesse Rosenstock
4afc552e17 ParseStructDecl: Make BitOffs unsigned
This makes it consistent with SymEntry and removes the need for
some casts that were added to avoid warnings about signed vs
unsigned comparison.
2020-06-21 01:07:45 +02:00
Oliver Schmidt
37107174c6 Added waitvsync() for the Enhanced Apple //e.
The implementation is a bit tricky as it requires to take different code paths for the //e, the //c and the IIgs. Additionally the //c only provides a VBL IRQ flag supposed to be used by an IRQ handler to determine what triggered the IRQ. However, masking IRQs on the CPU, activating the VBL IRQ, clearing any pending VBL IRQs and then polling for the IRQ flag does the trick.
2020-06-18 21:44:57 +02:00
mrdudz
baa5d051e4 use same description as in the docs 2020-06-16 00:11:07 +02:00
mrdudz
349a84d972 remove superfluous TAB 2020-06-16 00:08:55 +02:00
mrdudz
98c7186221 Add description for --debug-opt-output to the --help output 2020-06-15 23:39:50 +02:00
Oliver Schmidt
e0a0b2dc25 Streamlined machine detection. 2020-06-15 19:31:18 +02:00
Oliver Schmidt
6adf175691 Optimized get_ostype() return values for asm usage.
Making sure that all but //c machines have bit 6 clear allows to use BIT/BVS to detect the //c machines.
2020-06-15 19:31:18 +02:00
Greg King
2acb3b153b Added some "See also" links to the TGI color-count descriptions. 2020-06-08 20:09:45 -04:00
Greg King
87144a15dd Fixed the "verbatim" tags in the TGI document. 2020-06-08 17:22:02 -04:00
Greg King
bc1e884988 Documented how the TGI API shows when a palette has 256 colors. 2020-06-08 16:39:11 -04:00
Oliver Schmidt
20a9c0c336 Replaced call to paddle read ROM routine with custom code.
As described e.g. in the Apple IIe Technote #6: 'The Apple II Paddle Circuits' it doesn't work to call PREAD several times in immediate succession. However, so far the Apple II joystick driver did just that in order to read the two joystick axis.

Therefore the driver now uses a custom routine that reads both paddles _at_the_same_time_. The code doing so requires nearly twice the cycles meaning that the overall time for a joy_read() stays roughly the same. However, twice the cycles in the read loop means half the resolution. But for the cc65 joystick driver use case that doesn't hurt at all as the driver is supposed to only detect neutral vs. left/right and up/down.

CPU accelerators are supposed to detect access to $C070 and slow down for some time automatically. However, the IIgs rather comes with a modified ROM routine. Therefore it is necessary to manually slow down the IIgs when replacing the ROM routine.
2020-06-06 15:15:13 +02:00
Greg King
8b5ae001e5 Refactored the TGI demo.
Cleared the screen at the beginning of each demo instead of at the end.  Setting the colors before clearing makes it more reliable and consistent across platforms.
2020-06-05 13:37:20 -04:00
Oliver Schmidt
7b2e4d0c7f Reflect that the Apple //c supports only one joystick. 2020-06-04 23:24:24 +02:00
Oliver Schmidt
15e2afcdf3 Split libref.s into multiple files to prevent inclusion of unnecessary code. 2020-06-04 23:24:24 +02:00
Greg King
14c62f1368 Allowed the TGI API to support 256 colors. 2020-06-04 12:58:05 -04:00
acqn
f9204e5b6f Fixed g_addlocal codegen with long types. 2020-06-01 22:37:40 +02:00
acqn
8066cd9ace Fixed wrong case in PreDec codegen, which never seems to be in use though. 2020-06-01 22:37:40 +02:00
acqn
07a5324a81 Fixed Issue #1028 by outputing local literals when exiting the function scope. 2020-06-01 22:37:40 +02:00
acqn
68f53e69f1 Fixed Issues #420 and #919 by always outputing the code segment before the three data segments for functions. 2020-06-01 22:37:40 +02:00
acqn
33e103fdc6 Fixed Issue #1040: non-byte pointer +=/-= byte codegen bug. 2020-06-01 22:37:40 +02:00
mrdudz
1d877494bf initial commit from c64-rrr-1.0 2016-02-28 23:37:04 +01:00
1960 changed files with 174840 additions and 21463 deletions

15
.editorconfig Normal file
View File

@ -0,0 +1,15 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
guidelines = 80, 120
[*.{c,h}]
cpp_new_line_before_open_brace_block=same_line
cpp_new_line_before_open_brace_function=new_line
cpp_space_before_function_open_parenthesis=insert
cpp_new_line_before_else=false

34
.github/checks/Makefile vendored Normal file
View File

@ -0,0 +1,34 @@
ifneq ($(shell echo),)
CMD_EXE = 1
endif
ifdef CMD_EXE
.PHONY: checkstyle
checkstyle:
$(info INFO: style checks require bash.)
else
.PHONY: checkstyle lineendings tabs lastline spaces noexec
checkstyle: lineendings tabs lastline spaces noexec
lineendings: lineendings.sh
@./lineendings.sh
tabs: tabs.sh
@./tabs.sh
lastline: lastline.sh
@./lastline.sh
spaces: spaces.sh
@./spaces.sh
noexec: noexec.sh
@./noexec.sh
endif

25
.github/checks/lastline.sh vendored Executable file
View File

@ -0,0 +1,25 @@
#! /bin/bash
OLDCWD=`pwd`
SCRIPT_PATH=`dirname $0`
CHECK_PATH=.
cd $SCRIPT_PATH/../../
nl='
'
nl=$'\n'
r1="${nl}$"
FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print | while read f; do
t=$(tail -c2 $f; printf x)
[[ ${t%x} =~ $r1 ]] || echo "$f"
done`
cd $OLDCWD
if [ x"$FILES"x != xx ]; then
echo "error: found following files that have no newline at the end:" >&2
for n in $FILES; do
echo $n >&2
done
exit -1
fi

18
.github/checks/lineendings.sh vendored Executable file
View File

@ -0,0 +1,18 @@
#! /bin/bash
OLDCWD=`pwd`
SCRIPT_PATH=`dirname $0`
CHECK_PATH=.
cd $SCRIPT_PATH/../../
FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print | grep -v "libwrk/" | grep -v "testwrk/" | xargs grep -IUl $'\r'`
cd $OLDCWD
if [ x"$FILES"x != xx ]; then
echo "error: found CR in the following files:" >&2
for n in $FILES; do
echo $n >&2
done
exit -1
fi

18
.github/checks/noexec.sh vendored Executable file
View File

@ -0,0 +1,18 @@
#! /bin/bash
OLDCWD=`pwd`
SCRIPT_PATH=`dirname $0`
CHECK_PATH=.
cd $SCRIPT_PATH/../../
FILES=`find $CHECK_PATH -executable -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print`
cd $OLDCWD
if [ x"$FILES"x != xx ]; then
echo "error: executable flag is set for the following files:" >&2
for n in $FILES; do
echo $n >&2
done
exit -1
fi

18
.github/checks/spaces.sh vendored Executable file
View File

@ -0,0 +1,18 @@
#! /bin/bash
OLDCWD=`pwd`
SCRIPT_PATH=`dirname $0`
CHECK_PATH=.
cd $SCRIPT_PATH/../../
FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print | grep -v "test/" | grep -v "libwrk/" | grep -v "testwrk/" | xargs grep -l ' $'`
cd $OLDCWD
if [ x"$FILES"x != xx ]; then
echo "error: found dangling spaces in the following files:" >&2
for n in $FILES; do
echo $n >&2
done
exit -1
fi

18
.github/checks/tabs.sh vendored Executable file
View File

@ -0,0 +1,18 @@
#! /bin/bash
OLDCWD=`pwd`
SCRIPT_PATH=`dirname $0`
CHECK_PATH=.
cd $SCRIPT_PATH/../../
FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print | grep -v "test/" | grep -v "libwrk/" | grep -v "testwrk/" | xargs grep -l $'\t'`
cd $OLDCWD
if [ x"$FILES"x != xx ]; then
echo "error: found TABs in the following files:" >&2
for n in $FILES; do
echo $n >&2
done
exit -1
fi

View File

@ -0,0 +1,92 @@
name: Build Pull Request
on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_linux:
name: Build and Test (Linux)
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-x86-64
- shell: bash
run: git config --global core.autocrlf input
- name: Checkout Source
uses: actions/checkout@v4
- name: Do some simple style checks
shell: bash
run: make -j2 checkstyle
- name: Build the tools.
shell: bash
run: make -j2 bin USER_CFLAGS=-Werror
- name: Build the utilities.
shell: bash
run: make -j2 util
- name: Build the platform libraries.
shell: bash
run: make -j2 lib QUIET=1
- name: Run the regression tests.
shell: bash
run: make -j2 test QUIET=1
- name: Test that the samples can be built.
run: make -C samples platforms
- name: Test that the targettest programs can be built.
run: make -C targettest platforms
- name: Build the document files.
shell: bash
run: make -j2 doc
- name: Upload a documents snapshot.
uses: actions/upload-artifact@v4
with:
name: docs
path: ./html
- name: Build 64-bit Windows versions of the tools.
run: |
make -C src clean
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
build_windows:
name: Build and Test (Windows)
runs-on: windows-latest
steps:
- shell: bash
run: git config --global core.autocrlf input
- name: Checkout Source
uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build app (x86 debug)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug -property:Platform=Win32
- name: Build app (x86 release)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release -property:Platform=Win32
- name: Build app (x64 release)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug -property:Platform=x64
- name: Build app (x64 release)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release -property:Platform=x64
- name: Build utils (MinGW)
shell: cmd
run: make -j2 util SHELL=cmd
- name: Build the platform libraries (make lib)
shell: cmd
run: make -j2 lib QUIET=1 SHELL=cmd
- name: Run the regression tests (make test)
shell: cmd
run: make -j2 test QUIET=1 SHELL=cmd

View File

@ -0,0 +1,157 @@
name: Snapshot Build
on:
push:
branches:
master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_windows:
name: Build (Windows)
if: github.repository == 'cc65/cc65'
runs-on: windows-latest
steps:
- shell: bash
run: git config --global core.autocrlf input
- name: Checkout Source
uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build app (debug)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
- name: Build app (release)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release
build_linux:
name: Build, Test, and Snapshot (Linux)
if: github.repository == 'cc65/cc65'
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-x86-64 gcc-mingw-w64-i686
- shell: bash
run: git config --global core.autocrlf input
- name: Checkout Source
uses: actions/checkout@v4
- name: Do some simple style checks
shell: bash
run: make -j2 checkstyle
- name: Build the tools.
shell: bash
run: |
make -j2 bin USER_CFLAGS=-Werror
make -j2 util
- name: Build the platform libraries.
shell: bash
run: make -j2 lib QUIET=1
- name: Run the regression tests.
shell: bash
run: make -j2 test QUIET=1
- name: Test that the samples can be built.
shell: bash
run: make -j2 samples
- name: Remove the output from the samples tests.
shell: bash
run: make -C samples clean
- name: Remove programs in util directory
shell: bash
run: make -C util clean
- name: Build the document files.
shell: bash
run: make -j2 doc
- name: Build and package 64-bit Windows versions of the tools.
run: |
make -C src clean
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
make zip
mv cc65.zip cc65-snapshot-win64.zip
- name: Build and package 32-bit Windows versions of the tools.
run: |
make -C src clean
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
make zip
mv cc65.zip cc65-snapshot-win32.zip
- name: Upload a 32-bit Snapshot Zip
uses: actions/upload-artifact@v4
with:
name: cc65-snapshot-win32
path: cc65-snapshot-win32.zip
- name: Upload a 64-bit Snapshot Zip
uses: actions/upload-artifact@v4
with:
name: cc65-snapshot-win64
path: cc65-snapshot-win64.zip
- name: Get the online documents repo.
uses: actions/checkout@v4
with:
repository: cc65/doc
# this token will expire, if it does, generate a new one as decribed in https://github.com/cc65/cc65/issues/2065
# - apparently only a "classic" token works here
# - the token must exist in the cc65/cc65 repo
token: ${{ secrets.DOC_PAT }} # use secret token instead of default
path: doc.git
- name: Update the online documents.
run: |
cd doc.git
rm *.*
cp ../html/*.* .
git config user.name "cc65-github"
git config user.email "cc65.nomail@github.com"
git config push.default simple
git add -A
# prevent failure when there is nothing to commit
git diff-index --quiet HEAD || git commit -m "Updated from https://github.com/cc65/cc65/commit/${GITHUB_SHA}"
git push
- name: Package offline documents.
run: 7z a cc65-snapshot-docs.zip ./html/*.*
- name: Upload a Documents Snapshot Zip
uses: actions/upload-artifact@v4
with:
name: cc65-snapshot-docs
path: cc65-snapshot-docs.zip
# enter secrets under "repository secrets"
- name: Upload 32-bit Windows snapshot to sourceforge
uses: nogsantos/scp-deploy@master
with:
src: cc65-snapshot-win32.zip
host: ${{ secrets.SSH_HOST }}
remote: ${{ secrets.SSH_DIR }}
port: ${{ secrets.SSH_PORT }}
user: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
- name: Upload 64-bit Windows snapshot to sourceforge
uses: nogsantos/scp-deploy@master
with:
src: cc65-snapshot-win64.zip
host: ${{ secrets.SSH_HOST }}
remote: ${{ secrets.SSH_DIR }}
port: ${{ secrets.SSH_PORT }}
user: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
- name: Upload documents snapshot to sourceforge
uses: nogsantos/scp-deploy@master
with:
src: cc65-snapshot-docs.zip
host: ${{ secrets.SSH_HOST }}
remote: ${{ secrets.SSH_DIR }}
port: ${{ secrets.SSH_PORT }}
user: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
# TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io

View File

@ -0,0 +1,78 @@
name: Windows Test Scheduled
# Scheduled or manually dispatched because it's slower than the Linux test.
on:
schedule:
- cron: '0 0 */1 * *'
# every 1 days
workflow_dispatch:
# allow manual dispatch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# don't run more than once at a time
jobs:
build_windows:
name: Build, Test (Windows MSVC)
runs-on: windows-latest
steps:
# This cache is used to remember the last build.
# If there are no changes and the last build was successful,
# the build and test steps will be omitted.
# If the last build failed, the full attempt will be repeated.
# Github Actions will retain the last build cache for up to 7 days.
- name: Create Cache
shell: bash
run: mkdir ~/.cache-sha
- name: Cache SHA
uses: actions/cache@v4
id: check-sha
with:
path: ~/.cache-sha
key: cache-sha-wintest-${{ github.sha }}
- name: Git Setup
if: steps.check-sha.outputs.cache-hit != 'true'
shell: bash
run: git config --global core.autocrlf input
- name: Checkout source
if: steps.check-sha.outputs.cache-hit != 'true'
uses: actions/checkout@v4
- name: Add msbuild to PATH
if: steps.check-sha.outputs.cache-hit != 'true'
uses: microsoft/setup-msbuild@v2
- name: Build app (MSVC debug)
if: steps.check-sha.outputs.cache-hit != 'true'
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
- name: Build app (MSVC release)
if: steps.check-sha.outputs.cache-hit != 'true'
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release
- name: Build utils (MinGW)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd
run: make -j2 util SHELL=cmd
- name: Build the platform libraries (make lib)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd
run: make -j2 lib QUIET=1 SHELL=cmd
- name: Run the regression tests (make test)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd
run: make -j2 test QUIET=1 SHELL=cmd
- name: Test that the samples can be built (make samples)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd
run: make -j2 samples SHELL=cmd

3
.gitignore vendored
View File

@ -7,3 +7,6 @@
/testwrk/
/wrk/
/cc65.zip
/util/atari/*.exe
/util/gamate/*.exe

View File

@ -1,14 +1,26 @@
language:
- c
install:
- sudo apt-get update
- sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass
script:
- make bin USER_CFLAGS=-Werror
- make lib QUIET=1
- make -C test QUIET=1
- make -C src clean
- make bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
- make doc zip
after_success:
- make -f Makefile.travis
language: c
jobs:
include:
- os: linux
name: Linux
install:
- sudo apt-get update
- sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass
script:
- make -j2 bin USER_CFLAGS=-Werror
- make -j2 lib QUIET=1
- make test QUIET=1
- make -j2 samples
- make -C src clean
- make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
- make -C samples clean
- make -j2 doc zip
after_success:
- make -f Makefile.travis
- os: windows
name: Windows
script:
- src/msbuild.cmd src\\cc65.sln

298
Contributing.md Normal file
View File

@ -0,0 +1,298 @@
This document contains all kinds of information that you should know if you want to contribute to the cc65 project. Before you start, please read all of it. If something is not clear to you, please ask - this document is an ongoing effort and may well be incomplete.
Also, before you put a lot of work into implementing something you want to contribute, please get in touch with one of the developers and ask if what you are going to do is actually wanted and has a chance of being merged. Perhaps someone else is already working on it, or perhaps what you have in mind is not how we'd expect it to be - talking to us before you start might save you a lot of work in those cases.
(''Note:'' The word "must" indicates a requirement. The word "should" indicates a recomendation.)
*this is work in progress and is constantly updated - if in doubt, please ask*
# generally
* You must obey these rules when contributing new code or documentation to cc65. We are well aware that not all existing code may respect all rules outlined here - but this is no reason for you not to respect them.
* One commit/patch/PR per issue. Do not mix several things unless they are very closely related.
* Sometimes when you make a PR, it may break completely unrelated tests. However, any PR is expected to merge cleanly with no failures. That means in practise that you are expected to fix/update the failing tests if required - for example this might be needed if you make changes to the compiler that changes the format of error- or warning messages. In that case you might have to update some reference files in the testbench. Obviously still check if that is actually the right thing to do ;)
# Codestyle rules
## All Sources
### Line endings
All files must only contain Unix style 'LF' line endings. Please configure your editors accordingly.
### TABs and spaces
This is an ongoing controversial topic - everyone knows that. However, the following is how we do it :)
* TAB characters must be expanded to spaces.
* 4 spaces per indention level (rather than 8) are preferred, especially if there are many different levels.
* No extra spaces at the end of lines.
* All text files must end with new-line characters. Don't leave the last line "dangling".
The (bash) scripts used to check the above rules can be found in ```.github/check```. You can also run all checks using ```make check```.
### Identifiers and Symbol names
The C Standard defines certain identifiers and symbol names, which we can not use
in our code. Since it is not always obvious which parts of the library code will
actually end up in a linked program, the following applies to ALL of the library.
Any non standard identifier/symbol/function that is exported from source files,
or appears in header files:
* must not be in the "_symbol" form in C, or "__symbol" form in assembly.
* must start with (at least) two (C Code) or three (assembly code) underscores, unless the symbol appears in a non standard header file.
This is likely more than the standard dictates us to do - but it is certainly
standard compliant - and easy to remember.
Also see the discussion in https://github.com/cc65/cc65/issues/1796
### misc
* 80 characters is the desired maximum width of files. But, it isn't a "strong" rule; sometimes, you will want to type longer lines, in order to keep the parts of expressions or comments together on the same line.
* You should avoid typing non-ASCII characters.
* If you change "normal" source code into comments, then you must add a comment about why that code is a comment.
* When you want to create a comment from several lines of code, you should use preprocessor lines, instead of ```/* */``` or "```;```". Example:
<pre>
#if 0
one ();
two ();
three = two () + one ();
#endif
</pre>
* You should type upper case characters for hex values.
* When you type zero-page addresses in hexadecimal, you should type two hex characters (after the hex prefix). When you type non-zero-page addresses in hex, you should type four hex characters.
* When you type lists of addresses, it is a good idea to sort them in ascending numerical order. That makes it easier for readers to build mental pictures of where things are in an address space. And, it is easier to see how big the variables and buffers are. Example:
<pre>
xCoord := $0703
yCoord := $0705 ; (this address implies that xCoord is 16 bits)
cmdbuf := $0706 ; (this address implies that yCoord is 8 bits)
cmdlen := $0786 ; (this address implies that cmdbuf is 128 bytes)
color := $0787
</pre>
## C Sources
The following is still very incomplete - if in doubt please look at existing sourcefiles and adapt to the existing style
* Your files should generally obey the C89 standard, with a few C99 things (this is a bit similar to what cc65 itself supports). The exceptions are:
* use stdint.h for variables that require a certain bit size
* In printf-style functions use the PRIX64 (and similar) macros to deal with 64bit values (from inttypes.h)
This list is not necessarily complete - if in doubt, please ask.
* We generally have a "no warnings" policy
* Warnings must not be hidden by using typecasts - fix the code instead
* The normal indentation width should be four spaces.
* You must use ANSI C comments (```/* */```); you must not use C++ comments (```//```).
* When you add functions to an existing file, you should separate them by the same number of blank lines that separate the functions that already are in that file.
* All function declarations must be followed by a comment block that tells at least briefly what the function does, what the parameters are, and what is returned. This comment must sit between the declaration and the function body, like this:
<pre>
int foo(int bar)
/* Add 1 to bar, takes bar and returns the result */
{
return bar + 1;
}
</pre>
* When a function's argument list wraps around to a next line, you should indent that next line by either the normal width or enough spaces to align it with the arguments on the previous line.
* All declarations in a block must be at the beginning of that block.
* You should put a blank line between a list of local variable declarations and the first line of code.
* Always use curly braces even for single statements after ```if```, and the single statement should go into a new line.
* Use "cuddling" braces, ie the opening brace goes in the same line as the ```if```:
<pre>
if (foo > 42) {
bar = 23;
}
</pre>
* Should the ```if``` statement be followed by an empty conditional block, there should be a comment telling why this is the case
<pre>
if (check()) {
/* nothing happened, do nothing */
}
</pre>
* You must separate function names and parameter/argument lists by one space.
* When declaring/defining pointers, you must put the asterisk (```*```) next to the data type, with a space between it and the variable's name. Examples:
<pre>
int* namedPtr[5];
char* nextLine (FILE* f);
</pre>
### Header files
Headers that belong to the standard library (libc) must conform with the C standard. That means:
* all non standard functions, or functions that only exist in a certain standard, should be in #ifdefs
* the same is true for macros or typedefs
<pre>
#if __CC65_STD__ == __CC65_STD_C99__
/* stuff that only exists in C99 here */
#endif
#if __CC65_STD__ == __CC65_STD_CC65__
/* non standard stuff here */
#endif
</pre>
You can refer to Annex B of the ISO C99 standard ([here](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf) is the draft).
## Assembly Sources
* Op-code mnemonics must have lower-case letters. The names of instruction macroes may have upper-case letters.
* Op-codes must use their official and commonly used mnemonics, ie bcc and bcs and not bgt and blt
* Hexadecimal number constants should be used except where decimal or binary numbers make much more sense in that constant's context.
* Hexadecimal letters should be upper-case.
* When you set two registers or two memory locations to an immediate 16-bit zero, you should use the expressions ```#<$0000``` and ```#>$0000``` (they make it obvious where you are putting the lower and upper bytes).
* If a function is declared to return a char-sized value, it actually must return an integer-sized value. (When cc65 promotes a returned value, it sometimes assumes that the value already is an integer.) This must be done in one of the following ways:
<pre>
lda #RETURN_VALUE
ldx #0 ; Promote char return value
</pre>
or, if the value is 0, you can use:
<pre>
lda #RETURN_VALUE
.assert RETURN_VALUE = 0
tax
</pre>
sometimes jumping to return0 could save a byte:
<pre>
.assert RETURN_VALUE = 0
jmp return 0
</pre>
* Functions, that are intended for a platform's system library, should be optimized as much as possible.
* Sometimes, there must be a trade-off between size and speed. If you think that a library function won't be used often, then you should make it small. Otherwise, you should make it fast.
* Comments that are put on the right side of instructions must be aligned (start in the same character columns).
* Assembly source fields (label, operation, operand, comment) should start ''after'' character columns that are multiples of eight (such as 1, 9, 17, 33, and 41).
## LinuxDoc Sources
* TAB characters must be expanded to spaces.
* All text files must end with new-line characters. Don't leave the last line "dangling".
* 80 characters is the desired maximum width of files.
* You should avoid typing non-ASCII characters.
* You should put blank lines between LinuxDoc sections:
* Three blank lines between ```<sect>``` sections.
* Two blank lines between ```<sect1>``` sections.
* One blank line between other sections.
# Library implementation rules
* By default the toolchain must output a "standard" binary for the platform, no emulator formats, no extra headers used by tools. If the resulting binaries can not be run as is on emulators or eg flash cartridges, the process of converting them to something that can be used with these should be documented in the user manual.
* Generally every function should live in a seperate source file - unless the functions are so closely related that splitting makes no sense.
* Source files should not contain commented out code - if they do, there should be a comment that explains why that commented out code exists.
# Makefile rules
* Makefiles must generally work on both *nix (ba)sh and windows cmd.exe.
* Makefiles must not use external tools that are not provided by the cc65 toolchain itself.
The only exception to the above are actions that are exclusive to the github actions - those may rely on bash and/or linux tools.
# Documentation rules
## User manual (LinuxDoc)
* This is the primary documentation.
## Wiki
* The Wiki is strictly for additional information that does not fit into the regular user manual (LinuxDoc). The wiki must not duplicate any information that is present in the user manual
# Roadmap / TODOs / open Ends
## Documentation
* the printf family of function does not completely implement all printf modifiers and does not behave as expected in some cases - all this should be documented in detail
## Compiler
* We need a way that makes it possible to feed arbitrary assembler code into the optimzer, so we can have proper tests for it
### Floating point support
The first step is implementing the datatype "float" as IEEE 754 floats. Help welcomed!
* WIP compiler/library changes are here: https://github.com/cc65/cc65/pull/1777
## Library
### name clashes in the library
see "Identifiers and Symbol names" above - not all identifiers have been checked
and renamed yet. The following is a list of those that still might need to be
fixed:
```
common
__argc libsrc/runtime/callmain.s libsrc/cbm610/mainargs.s libsrc/cx16/mainargs.s libsrc/plus4/mainargs.s libsrc/lynx/mainargs.s libsrc/c16/mainargs.s libsrc/geos-common/system/mainargs.s libsrc/sim6502/mainargs.s libsrc/c128/mainargs.s libsrc/vic20/mainargs.s libsrc/nes/mainargs.s libsrc/atari/getargs.s libsrc/apple2/mainargs.s libsrc/cbm510/mainargs.s libsrc/telestrat/mainargs.s libsrc/c64/mainargs.s libsrc/pet/mainargs.s libsrc/atmos/mainargs.s
__argv libsrc/runtime/callmain.s libsrc/cbm610/mainargs.s libsrc/cx16/mainargs.s libsrc/plus4/mainargs.s libsrc/lynx/mainargs.s libsrc/c16/mainargs.s libsrc/geos-common/system/mainargs.s libsrc/sim6502/mainargs.s libsrc/c128/mainargs.s libsrc/vic20/mainargs.s libsrc/nes/mainargs.s libsrc/atari/getargs.s libsrc/apple2/mainargs.s libsrc/cbm510/mainargs.s libsrc/telestrat/mainargs.s libsrc/c64/mainargs.s libsrc/pet/mainargs.s libsrc/atmos/mainargs.s
__cos libsrc/common/sincos.s
__ctypeidx libsrc/common/ctype.s libsrc/common/ctypemask.s libsrc/geos-common/system/ctype.s libsrc/atari/ctype.s libsrc/cbm/ctype.s libsrc/atmos/ctype.s asminc/ctype_common.inc
__cwd libsrc/common/getcwd.s libsrc/common/_cwd.s libsrc/atari/initcwd.s libsrc/apple2/initcwd.s libsrc/apple2/initcwd.s libsrc/telestrat/initcwd.s libsrc/cbm/initcwd.s
__cwd_buf_size libsrc/common/_cwd.s
__envcount libsrc/common/searchenv.s libsrc/common/_environ.s libsrc/common/putenv.s libsrc/common/getenv.s
__environ libsrc/common/searchenv.s libsrc/common/_environ.s libsrc/common/putenv.s libsrc/common/getenv.s
__envsize libsrc/common/_environ.s libsrc/common/putenv.s
__fdesc libsrc/common/_fdesc.s libsrc/common/fopen.s
__filetab libsrc/common/_fdesc.s libsrc/common/_file.s asminc/_file.inc
__fopen libsrc/common/fopen.s libsrc/common/_fopen.s
__printf libsrc/common/vsnprintf.s libsrc/common/_printf.s libsrc/common/vfprintf.s libsrc/conio/vcprintf.s libsrc/pce/_printf.s
__scanf libsrc/common/_scanf.inc libsrc/common/vsscanf.s libsrc/conio/vcscanf.s
__sin libsrc/common/sincos.s
__sys libsrc/common/_sys.s libsrc/apple2/_sys.s
__sys_oserrlist libsrc/common/stroserr.s libsrc/geos-common/system/oserrlist.s libsrc/atari/oserrlist.s libsrc/apple2/oserrlist.s libsrc/cbm/oserrlist.s libsrc/atmos/oserrlist.s
__syschdir libsrc/common/chdir.s libsrc/atari/syschdir.s libsrc/apple2/syschdir.s libsrc/telestrat/syschdir.s libsrc/cbm/syschdir.s
__sysmkdir libsrc/common/mkdir.s libsrc/atari/sysmkdir.s libsrc/apple2/sysmkdir.s libsrc/telestrat/sysmkdir.s
__sysremove libsrc/common/remove.s libsrc/geos-common/file/sysremove.s libsrc/atari/sysremove.s libsrc/atari/sysrmdir.s libsrc/apple2/sysremove.s libsrc/apple2/sysrmdir.s libsrc/telestrat/sysremove.s libsrc/cbm/sysremove.s
__sysrename libsrc/common/rename.s libsrc/geos-common/file/sysrename.s libsrc/atari/sysrename.s libsrc/apple2/sysrename.s libsrc/cbm/sysrename.s
__sysrmdir libsrc/common/rmdir.s libsrc/atari/sysrmdir.s libsrc/apple2/sysrmdir.s
__sysuname libsrc/common/uname.s libsrc/cbm610/sysuname.s libsrc/cx16/sysuname.s libsrc/plus4/sysuname.s libsrc/lynx/sysuname.s libsrc/c16/sysuname.s libsrc/geos-common/system/sysuname.s libsrc/c128/sysuname.s libsrc/creativision/sysuname.s libsrc/vic20/sysuname.s libsrc/nes/sysuname.s libsrc/atari/sysuname.s libsrc/apple2/sysuname.s libsrc/cbm510/sysuname.s libsrc/telestrat/sysuname.s libsrc/c64/sysuname.s libsrc/pet/sysuname.s libsrc/atari5200/sysuname.s libsrc/atmos/sysuname.s
apple2
__auxtype libsrc/apple2/open.s
__datetime libsrc/apple2/open.s
__dos_type libsrc/apple2/dioopen.s libsrc/apple2/curdevice.s libsrc/apple2/mainargs.s libsrc/apple2/settime.s libsrc/apple2/getdevice.s libsrc/apple2/dosdetect.s libsrc/apple2/irq.s libsrc/apple2/open.s libsrc/apple2/mli.s libsrc/apple2/getres.s
__filetype libsrc/apple2/open.s libsrc/apple2/exehdr.s
atari
__defdev libsrc/atari/posixdirent.s libsrc/atari/ucase_fn.s libsrc/atari/getdefdev.s
__dos_type libsrc/atari/getargs.s libsrc/atari/exec.s libsrc/atari/settime.s libsrc/atari/syschdir.s libsrc/atari/dosdetect.s libsrc/atari/is_cmdline_dos.s libsrc/atari/sysrmdir.s libsrc/atari/gettime.s libsrc/atari/lseek.s libsrc/atari/getres.s libsrc/atari/getdefdev.s
__do_oserror libsrc/atari/posixdirent.s libsrc/atari/do_oserr.s libsrc/atari/serref.s libsrc/atari/read.s libsrc/atari/write.s libsrc/atari/close.s
__getcolor libsrc/atari/setcolor.s
__getdefdev libsrc/atari/getdefdev.s
__graphics libsrc/atari/graphics.s
__inviocb libsrc/atari/serref.s libsrc/atari/ser/atrrdev.s libsrc/atari/inviocb.s libsrc/atari/read.s libsrc/atari/write.s libsrc/atari/lseek.s libsrc/atari/close.s
__is_cmdline_dos libsrc/atari/is_cmdline_dos.s libsrc/atari/doesclrscr.s
__rest_vecs libsrc/atari/savevec.s
__rwsetup libsrc/atari/rwcommon.s libsrc/atari/read.s libsrc/atari/write.s
__save_vecs libsrc/atari/savevec.s
__scroll libsrc/atari/scroll.s
__setcolor libsrc/atari/setcolor.s
__setcolor_low libsrc/atari/setcolor.s
__sio_call libsrc/atari/diowritev.s libsrc/atari/diopncls.s libsrc/atari/siocall.s libsrc/atari/diowrite.s libsrc/atari/dioread.s
cbm
__cbm_filetype libsrc/cbm/cbm_filetype.s asminc/cbm_filetype.in
__dirread libsrc/cbm/dir.inc libsrc/cbm/dir.s
__dirread1 libsrc/cbm/dir.inc libsrc/cbm/dir.s
lynx
__iodat libsrc/lynx/lynx-cart.s libsrc/lynx/bootldr.s libsrc/lynx/extzp.s libsrc/lynx/crt0.s libsrc/lynx/extzp.inc
__iodir libsrc/lynx/extzp.s libsrc/lynx/crt0.s libsrc/lynx/extzp.inc
__sprsys libsrc/lynx/tgi/lynx-160-102-16.s libsrc/lynx/extzp.s libsrc/lynx/crt0.s libsrc/lynx/extzp.inc
__viddma libsrc/lynx/tgi/lynx-160-102-16.s libsrc/lynx/extzp.s libsrc/lynx/crt0.s libsrc/lynx/extzp.inc
pce
__nmi libsrc/pce/irq.s libsrc/pce/crt0.s
```
## Test suite
* specific tests to check the optimizer (rather than the codegenerator) are needed.
* we need more specific tests to check standard conformance of the library headers

View File

@ -1,17 +1,27 @@
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples test util checkstyle check
.SUFFIXES:
all mostlyclean clean install zip:
all install zip:
@$(MAKE) -C src --no-print-directory $@
@$(MAKE) -C libsrc --no-print-directory $@
@$(MAKE) -C doc --no-print-directory $@
@$(MAKE) -C util --no-print-directory $@
@$(MAKE) -C samples --no-print-directory $@
mostlyclean clean:
@$(MAKE) -C src --no-print-directory $@
@$(MAKE) -C libsrc --no-print-directory $@
@$(MAKE) -C doc --no-print-directory $@
@$(MAKE) -C util --no-print-directory $@
@$(MAKE) -C samples --no-print-directory $@
@$(MAKE) -C test --no-print-directory $@
@$(MAKE) -C targettest --no-print-directory $@
avail unavail bin:
@$(MAKE) -C src --no-print-directory $@
lib:
lib libtest:
@$(MAKE) -C libsrc --no-print-directory $@
doc html info:
@ -20,8 +30,26 @@ doc html info:
samples:
@$(MAKE) -C samples --no-print-directory $@
util:
@$(MAKE) -C util --no-print-directory $@
%65:
@$(MAKE) -C src --no-print-directory $@
%:
@$(MAKE) -C libsrc --no-print-directory $@
# check the code style
checkstyle:
@$(MAKE) -C .github/checks --no-print-directory $@
# runs regression tests, requires libtest target libraries
test:
@$(MAKE) -C test --no-print-directory $@
# GNU "check" target, which runs all tests
check:
@$(MAKE) -C .github/checks checkstyle --no-print-directory
@$(MAKE) test
@$(MAKE) -C targettest platforms --no-print-directory
@$(MAKE) -C samples platforms --no-print-directory

View File

@ -1,40 +1,63 @@
[Windows Snapshot](https://sourceforge.net/projects/cc65/files/cc65-snapshot-win32.zip)
[Documentation](https://cc65.github.io/doc)
[Wiki](https://github.com/cc65/wiki/wiki)
[![Build Status](https://api.travis-ci.org/cc65/cc65.svg?branch=master)](https://travis-ci.org/cc65/cc65/builds)
# About cc65
cc65 is a complete cross development package for 65(C)02 systems, including
a powerful macro assembler, a C compiler, linker, librarian and several
other tools.
a powerful macro assembler, a C compiler, linker, archiver and several
other tools. cc65 has C and runtime library support for many of the old 6502 machines.
For details look at the [Website](https://cc65.github.io).
cc65 has C and runtime library support for many of the old 6502 machines,
including
## People
- the following Commodore machines:
- VIC20
- C16/C116 and Plus/4
- C64
- C128
- CBM 510 (aka P500)
- the 600/700 family
- newer PET machines (not 2001).
- the Apple ]\[+ and successors.
- the Atari 8-bit machines.
- the Atari 2600 console.
- the Atari 5200 console.
- GEOS for the C64, C128 and Apple //e.
- the Bit Corporation Gamate console.
- the NEC PC-Engine (aka TurboGrafx-16) console.
- the Nintendo Entertainment System (NES) console.
- the Watara Supervision console.
- the VTech Creativision console.
- the Oric Atmos.
- the Oric Telestrat.
- the Lynx console.
- the Ohio Scientific Challenger 1P.
Project founders:
The libraries are fairly portable, so creating a version for other 6502s
shouldn't be too much work.
* John R. Dunning: [original implementation](https://public.websites.umich.edu/~archive/atari/8bit/Languages/Cc65/) of the C compiler and runtime library, Atari hosted
* Ullrich von Bassewitz:
* move the code to modern systems
* rewrite most parts of the compiler
* complete rewrite of the runtime library
Core team members:
* [Christian Groessler](https://github.com/groessler): Atari, Atari5200, and CreatiVision library Maintainer
* [dqh](https://github.com/dqh-au): GHA help
* [Greg King](https://github.com/greg-king5): all around hackery
* [groepaz](https://github.com/mrdudz): CBM library, Project Maintainer
* [Oliver Schmidt](https://github.com/oliverschmidt): Apple II library Maintainer
External contributors:
* [acqn](https://github.com/acqn): various compiler fixes
* [jedeoric](https://github.com/jedeoric): Telestrat target
* [jmr](https://github.com/jmr): compiler fixes
* [karrika](https://github.com/karrika): Atari 7800 target
* [Stephan Mühlstrasser](https://github.com/smuehlst): osic1p target
* [Wayne Parham](https://github.com/WayneParham): Sym-1 target
* [Dave Plummer](https://github.com/davepl): KIM-1 target
* [rumbledethumps](https://github.com/rumbledethumps): Picocomputer target
*(The above list is incomplete, if you feel left out - please speak up or add yourself in a PR)*
For a complete list look at the [full team list](https://github.com/orgs/cc65/teams) or the list of [all contributors](https://github.com/cc65/cc65/graphs/contributors)
# Contact
For general discussion, questions, etc subscribe to the [mailing list](https://cc65.github.io/mailing-lists.html) or use the [github discussions](https://github.com/cc65/cc65/discussions).
Some of us may also be around on IRC [#cc65](https://web.libera.chat/#cc65) on libera.chat
# Documentation
* The main [Documentation](https://cc65.github.io/doc) for users and developers
* Info on [Contributing](Contributing.md) to the CC65 project. Please read this before working on something you want to contribute, and before reporting bugs.
* The [Wiki](https://github.com/cc65/wiki/wiki) contains some extra info that does not fit into the regular documentation.
# Downloads
* [Windows 64bit Snapshot](https://sourceforge.net/projects/cc65/files/cc65-snapshot-win64.zip)
* [Windows 32bit Snapshot](https://sourceforge.net/projects/cc65/files/cc65-snapshot-win32.zip)
* [Linux Snapshot DEB and RPM](https://software.opensuse.org/download.html?project=home%3Astrik&package=cc65)
[![Snapshot Build](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml/badge.svg?branch=master)](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml)

View File

@ -28,8 +28,8 @@ HEAP_MIN_BLOCKSIZE = .sizeof (freeblock) ; Minimum size of an allocated block
HEAP_ADMIN_SPACE = .sizeof (usedblock) ; Additional space for used bock
; Variables
.global __heaporg
.global __heapptr
.global __heapend
.global __heapfirst
.global __heaplast
.global ___heaporg
.global ___heapptr
.global ___heapend
.global ___heapfirst
.global ___heaplast

View File

@ -1,6 +1,6 @@
;-----------------------------------------------------------------------------
; Zero page stuff
; Zero page
WNDLFT := $20 ; Text window left
WNDWDTH := $21 ; Text window width
@ -15,6 +15,7 @@ PROMPT := $33 ; Used by GETLN
RNDL := $4E ; Random counter low
RNDH := $4F ; Random counter high
HIMEM := $73 ; Highest available memory address+1
CURLIN := $75 ; Current line number being executed
;-----------------------------------------------------------------------------
; Vectors
@ -31,40 +32,56 @@ PWREDUP := $03F4 ; This must be = EOR #$A5 of SOFTEV+1
KBD := $C000 ; Read keyboard
KBDSTRB := $C010 ; Clear keyboard strobe
; 80 column video switches
; 80 column video
CLR80COL:= $C000 ; Disable 80 column store
SET80COL:= $C001 ; Enable 80 column store
RD80COL := $C018 ; >127 if 80 column store enabled
RD80VID := $C01F ; >127 if 80 column video enabled
; Character set switches
; Character set
CLRALTCHAR := $C00E ; Normal Apple II char set
SETALTCHAR := $C00F ; Norm/inv LC, no flash
ALTCHARSET := $C01E ; >127 if alt charset switched in
; Language card switches
; Language card
RDLCBNK2:= $C011 ; >127 if LC bank 2 in use
RDLCRAM := $C012 ; >127 if LC is read enabled
ROMIN := $C081 ; Swap in D000-FFFF ROM
LCBANK2 := $C083 ; Swap in LC bank 2
LCBANK1 := $C08B ; Swap in LC bank 1
; Video mode switches
TXTCLR := $C050 ; Display graphics
TXTSET := $C051 ; Display text
MIXCLR := $C052 ; Disable 4 lines of text
MIXSET := $C053 ; Enable 4 lines of text
LOWSCR := $C054 ; Page 1
HISCR := $C055 ; Page 2
LORES := $C056 ; Lores graphics
HIRES := $C057 ; Hires graphics
DHIRESON := $C05E ; Enable double-width graphics
DHIRESOFF := $C05F ; Disable double-width graphics
; Vertical blanking
RDVBLBAR := $C019 ; >127 if not vertical blanking
RDVBLMSK := $C041 ; >127 if VBL interrupts enabled
DISVBL := $C05A ; Disable VBL interrupts
ENVBL := $C05B ; Enable VBL interrupts
; Video mode
TXTCLR := $C050 ; Display graphics
TXTSET := $C051 ; Display text
MIXCLR := $C052 ; Disable 4 lines of text
MIXSET := $C053 ; Enable 4 lines of text
LOWSCR := $C054 ; Page 1
HISCR := $C055 ; Page 2
LORES := $C056 ; Lores graphics
HIRES := $C057 ; Hires graphics
DHIRESON := $C05E ; Enable double-width graphics
DHIRESOFF := $C05F ; Disable double-width graphics
; Game controller
BUTN0 := $C061 ; Open-Apple Key
BUTN1 := $C062 ; Closed-Apple Key
TAPEIN := $C060 ; Read casette input / Switch input 3
BUTN0 := $C061 ; Switch input 0 / Open-Apple key
BUTN1 := $C062 ; Switch input 1 / Closed-Apple key
BUTN2 := $C063 ; Switch input 2 / Shift key
PADDL0 := $C064 ; Analog input 0
PADDL1 := $C065 ; Analog input 1
PADDL2 := $C066 ; Analog input 2
PADDL3 := $C067 ; Analog input 3
PTRIG := $C070 ; Analog input reset
; IOU
IOUDISON := $C07E ; Disable IOU
IOUDISOFF := $C07F ; Enable IOU
; Input/Output Unit
IOUDISON := $C07E ; Disable IOU
IOUDISOFF := $C07F ; Enable IOU
; Control Your Apple
CYAREG := $C036 ; Bits 0-3=disk detect 4=shadow all banks 7=fast

287
asminc/ascii_charmap.inc Normal file
View File

@ -0,0 +1,287 @@
;/*****************************************************************************/
;/* */
;/* ascii_charmap.inc */
;/* */
;/* No translations, encodings are stored as they were typed in the host. */
;/* */
;/* */
;/* 2019-09-07, Greg King */
;/* */
;/* This software is provided "as-is", without any expressed or implied */
;/* warranty. In no event will the authors be held liable for any damages */
;/* arising from the use of this software. */
;/* */
;/* Permission is granted to anyone to use this software for any purpose, */
;/* including commercial applications, and to alter it and redistribute it */
;/* freely, subject to the following restrictions: */
;/* */
;/* 1. The origin of this software must not be misrepresented; you must not */
;/* claim that you wrote the original software. If you use this software */
;/* in a product, an acknowledgment in the product documentation would be */
;/* appreciated, but is not required. */
;/* 2. Altered source versions must be plainly marked as such, and must not */
;/* be misrepresented as being the original software. */
;/* 3. This notice must not be removed or altered from any source */
;/* distribution. */
;/* */
;/*****************************************************************************/
;/* ASCII */
.charmap $00, $00
.charmap $01, $01
.charmap $02, $02
.charmap $03, $03
.charmap $04, $04
.charmap $05, $05
.charmap $06, $06
.charmap $07, $07
.charmap $08, $08
.charmap $09, $09
.charmap $0A, $0A
.charmap $0B, $0B
.charmap $0C, $0C
.charmap $0D, $0D
.charmap $0E, $0E
.charmap $0F, $0F
.charmap $10, $10
.charmap $11, $11
.charmap $12, $12
.charmap $13, $13
.charmap $14, $14
.charmap $15, $15
.charmap $16, $16
.charmap $17, $17
.charmap $18, $18
.charmap $19, $19
.charmap $1A, $1A
.charmap $1B, $1B
.charmap $1C, $1C
.charmap $1D, $1D
.charmap $1E, $1E
.charmap $1F, $1F
.charmap $20, $20
.charmap $21, $21
.charmap $22, $22
.charmap $23, $23
.charmap $24, $24
.charmap $25, $25
.charmap $26, $26
.charmap $27, $27
.charmap $28, $28
.charmap $29, $29
.charmap $2A, $2A
.charmap $2B, $2B
.charmap $2C, $2C
.charmap $2D, $2D
.charmap $2E, $2E
.charmap $2F, $2F
.charmap $30, $30
.charmap $31, $31
.charmap $32, $32
.charmap $33, $33
.charmap $34, $34
.charmap $35, $35
.charmap $36, $36
.charmap $37, $37
.charmap $38, $38
.charmap $39, $39
.charmap $3A, $3A
.charmap $3B, $3B
.charmap $3C, $3C
.charmap $3D, $3D
.charmap $3E, $3E
.charmap $3F, $3F
.charmap $40, $40
.charmap $41, $41
.charmap $42, $42
.charmap $43, $43
.charmap $44, $44
.charmap $45, $45
.charmap $46, $46
.charmap $47, $47
.charmap $48, $48
.charmap $49, $49
.charmap $4A, $4A
.charmap $4B, $4B
.charmap $4C, $4C
.charmap $4D, $4D
.charmap $4E, $4E
.charmap $4F, $4F
.charmap $50, $50
.charmap $51, $51
.charmap $52, $52
.charmap $53, $53
.charmap $54, $54
.charmap $55, $55
.charmap $56, $56
.charmap $57, $57
.charmap $58, $58
.charmap $59, $59
.charmap $5A, $5A
.charmap $5B, $5B
.charmap $5C, $5C
.charmap $5D, $5D
.charmap $5E, $5E
.charmap $5F, $5F
.charmap $60, $60
.charmap $61, $61
.charmap $62, $62
.charmap $63, $63
.charmap $64, $64
.charmap $65, $65
.charmap $66, $66
.charmap $67, $67
.charmap $68, $68
.charmap $69, $69
.charmap $6A, $6A
.charmap $6B, $6B
.charmap $6C, $6C
.charmap $6D, $6D
.charmap $6E, $6E
.charmap $6F, $6F
.charmap $70, $70
.charmap $71, $71
.charmap $72, $72
.charmap $73, $73
.charmap $74, $74
.charmap $75, $75
.charmap $76, $76
.charmap $77, $77
.charmap $78, $78
.charmap $79, $79
.charmap $7A, $7A
.charmap $7B, $7B
.charmap $7C, $7C
.charmap $7D, $7D
.charmap $7E, $7E
.charmap $7F, $7F
;/* beyond ASCII */
.charmap $80, $80
.charmap $81, $81
.charmap $82, $82
.charmap $83, $83
.charmap $84, $84
.charmap $85, $85
.charmap $86, $86
.charmap $87, $87
.charmap $88, $88
.charmap $89, $89
.charmap $8A, $8A
.charmap $8B, $8B
.charmap $8C, $8C
.charmap $8D, $8D
.charmap $8E, $8E
.charmap $8F, $8F
.charmap $90, $90
.charmap $91, $91
.charmap $92, $92
.charmap $93, $93
.charmap $94, $94
.charmap $95, $95
.charmap $96, $96
.charmap $97, $97
.charmap $98, $98
.charmap $99, $99
.charmap $9A, $9A
.charmap $9B, $9B
.charmap $9C, $9C
.charmap $9D, $9D
.charmap $9E, $9E
.charmap $9F, $9F
.charmap $A0, $A0
.charmap $A1, $A1
.charmap $A2, $A2
.charmap $A3, $A3
.charmap $A4, $A4
.charmap $A5, $A5
.charmap $A6, $A6
.charmap $A7, $A7
.charmap $A8, $A8
.charmap $A9, $A9
.charmap $AA, $AA
.charmap $AB, $AB
.charmap $AC, $AC
.charmap $AD, $AD
.charmap $AE, $AE
.charmap $AF, $AF
.charmap $B0, $B0
.charmap $B1, $B1
.charmap $B2, $B2
.charmap $B3, $B3
.charmap $B4, $B4
.charmap $B5, $B5
.charmap $B6, $B6
.charmap $B7, $B7
.charmap $B8, $B8
.charmap $B9, $B9
.charmap $BA, $BA
.charmap $BB, $BB
.charmap $BC, $BC
.charmap $BD, $BD
.charmap $BE, $BE
.charmap $BF, $BF
.charmap $C0, $C0
.charmap $C1, $C1
.charmap $C2, $C2
.charmap $C3, $C3
.charmap $C4, $C4
.charmap $C5, $C5
.charmap $C6, $C6
.charmap $C7, $C7
.charmap $C8, $C8
.charmap $C9, $C9
.charmap $CA, $CA
.charmap $CB, $CB
.charmap $CC, $CC
.charmap $CD, $CD
.charmap $CE, $CE
.charmap $CF, $CF
.charmap $D0, $D0
.charmap $D1, $D1
.charmap $D2, $D2
.charmap $D3, $D3
.charmap $D4, $D4
.charmap $D5, $D5
.charmap $D6, $D6
.charmap $D7, $D7
.charmap $D8, $D8
.charmap $D9, $D9
.charmap $DA, $DA
.charmap $DB, $DB
.charmap $DC, $DC
.charmap $DD, $DD
.charmap $DE, $DE
.charmap $DF, $DF
.charmap $E0, $E0
.charmap $E1, $E1
.charmap $E2, $E2
.charmap $E3, $E3
.charmap $E4, $E4
.charmap $E5, $E5
.charmap $E6, $E6
.charmap $E7, $E7
.charmap $E8, $E8
.charmap $E9, $E9
.charmap $EA, $EA
.charmap $EB, $EB
.charmap $EC, $EC
.charmap $ED, $ED
.charmap $EE, $EE
.charmap $EF, $EF
.charmap $F0, $F0
.charmap $F1, $F1
.charmap $F2, $F2
.charmap $F3, $F3
.charmap $F4, $F4
.charmap $F5, $F5
.charmap $F6, $F6
.charmap $F7, $F7
.charmap $F8, $F8
.charmap $F9, $F9
.charmap $FA, $FA
.charmap $FB, $FB
.charmap $FC, $FC
.charmap $FD, $FD
.charmap $FE, $FE
.charmap $FF, $FF

View File

@ -924,7 +924,7 @@ KEY_QUESTIONMARK = KEY_SLASH | KEY_SHIFT
KEY_CLEAR = KEY_LESSTHAN | KEY_SHIFT
KEY_INSERT = KEY_GREATERTHAN | KEY_SHIFT
KEY_UP = KEY_UNDERLINE | KEY_CTRL
KEY_UP = KEY_DASH | KEY_CTRL
KEY_DOWN = KEY_EQUALS | KEY_CTRL
KEY_LEFT = KEY_PLUS | KEY_CTRL
KEY_RIGHT = KEY_ASTERISK | KEY_CTRL

14
asminc/atari7800.inc Normal file
View File

@ -0,0 +1,14 @@
; Atari 7800 TIA & RIOT read / write registers
;
; Karri Kaksonen (karri@sipo.fi), 2022
; TIA, RIOT & MARIA registers mapping
.include "atari7800_tia.inc"
.include "atari7800_riot.inc"
.include "atari7800_maria.inc"
; constants for the conio implementation
mono_charsperline = 40
charsperline = 20
screenrows = 28

View File

@ -0,0 +1,39 @@
; Atari 7800 MARIA read / write registers
;
; Read registers
BKGRND := $20
P0C1 := $21
P0C2 := $22
P0C3 := $23
MWSYNC := $24
P1C1 := $25
P1C2 := $26
P1C3 := $27
MSTAT := $28
P2C1 := $29
P2C2 := $2A
P2C3 := $2B
DPPH := $2C
P3C1 := $2D
P3C2 := $2E
P3C3 := $2F
DPPL := $30
P4C1 := $31
P4C2 := $32
P4C3 := $33
CHBASE := $34
P5C1 := $35
P5C2 := $36
P5C3 := $37
OFFSET := $38
P6C1 := $39
P6C2 := $3A
P6C3 := $3B
CTRL := $3C
P7C1 := $3D
P7C2 := $3E
P7C3 := $3F
; Write registers

20
asminc/atari7800_riot.inc Normal file
View File

@ -0,0 +1,20 @@
; Atari 7800 RIOT read / write registers
;
; Source: DASM - vcs.h
; Details available in: Stella Programmer's Guide by Steve Wright
;
; Florent Flament (contact@florentflament.com), 2017
; Read registers
SWCHA := $0280
CTLSWA := $0281
SWCHB := $0282
CTLSWB := $0283
INTIM := $0284
TIMINT := $0285
; Write registers
TIM1T := $0294
TIM8T := $0295
TIM64T := $0296
T1024T := $0297

69
asminc/atari7800_tia.inc Normal file
View File

@ -0,0 +1,69 @@
; Atari 7800 TIA read / write registers
;
; Source: DASM - vcs.h
; Details available in: Stella Programmer's Guide by Steve Wright
;
; Florent Flament (contact@florentflament.com), 2017
; Read registers
VSYNC := $00
VBLANK := $01
WSYNC := $02
RSYNC := $03
NUSIZ0 := $04
NUSIZ1 := $05
COLUP0 := $06
COLUP1 := $07
COLUPF := $08
COLUBK := $09
CTRLPF := $0A
REFP0 := $0B
REFP1 := $0C
PF0 := $0D
PF1 := $0E
PF2 := $0F
RESP0 := $10
RESP1 := $11
RESM0 := $12
RESM1 := $13
RESBL := $14
AUDC0 := $15
AUDC1 := $16
AUDF0 := $17
AUDF1 := $18
AUDV0 := $19
AUDV1 := $1A
GRP0 := $1B
GRP1 := $1C
ENAM0 := $1D
ENAM1 := $1E
ENABL := $1F
HMP0 := $20
HMP1 := $21
HMM0 := $22
HMM1 := $23
HMBL := $24
VDELP0 := $25
VDELP1 := $26
VDELBL := $27
RESMP0 := $28
RESMP1 := $29
HMOVE := $2A
HMCLR := $2B
CXCLR := $2C
; Write registers
CXM0P := $00
CXM1P := $01
CXP0FB := $02
CXP1FB := $03
CXM0FB := $04
CXM1FB := $05
CXBLPF := $06
CXPPMM := $07
INPT0 := $08
INPT1 := $09
INPT2 := $0A
INPT3 := $0B
INPT4 := $0C
INPT5 := $0D

View File

@ -0,0 +1,301 @@
;/*****************************************************************************/
;/* */
;/* atari_atascii_charmap.inc */
;/* */
;/* Atari system standard string mapping ISO-8859-1 -> AtASCII */
;/* */
;/* */
;/* */
;/* C 2016 Christian Krueger */
;/* */
;/* */
;/* This software is provided 'as-is', without any expressed or implied */
;/* warranty. In no event will the authors be held liable for any damages */
;/* arising from the use of this software. */
;/* */
;/* Permission is granted to anyone to use this software for any purpose, */
;/* including commercial applications, and to alter it and redistribute it */
;/* freely, subject to the following restrictions: */
;/* */
;/* 1. The origin of this software must not be misrepresented; you must not */
;/* claim that you wrote the original software. If you use this software */
;/* in a product, an acknowledgment in the product documentation would be */
;/* appreciated but is not required. */
;/* 2. Altered source versions must be plainly marked as such, and must not */
;/* be misrepresented as being the original software. */
;/* 3. This notice may not be removed or altered from any source */
;/* distribution. */
;/* */
;/*****************************************************************************/
.charmap $00, $00
.charmap $01, $01
.charmap $02, $02
.charmap $03, $03
.charmap $04, $04
.charmap $05, $05
.charmap $06, $06
.charmap $07, $FD
.charmap $08, $08
.charmap $09, $7F
.charmap $0A, $9B
.charmap $0B, $0B
.charmap $0C, $7D
.charmap $0D, $0D
.charmap $0E, $0E
.charmap $0F, $0F
.charmap $10, $10
.charmap $11, $11
.charmap $12, $12
.charmap $13, $13
.charmap $14, $14
.charmap $15, $15
.charmap $16, $16
.charmap $17, $17
.charmap $18, $18
.charmap $19, $19
.charmap $1A, $1A
.charmap $1B, $1B
.charmap $1C, $1C
.charmap $1D, $1D
.charmap $1E, $1E
.charmap $1F, $1F
.charmap $20, $20
.charmap $21, $21
.charmap $22, $22
.charmap $23, $23
.charmap $24, $24
.charmap $25, $25
.charmap $26, $26
.charmap $27, $27
.charmap $28, $28
.charmap $29, $29
.charmap $2A, $2A
.charmap $2B, $2B
.charmap $2C, $2C
.charmap $2D, $2D
.charmap $2E, $2E
.charmap $2F, $2F
.charmap $30, $30
.charmap $31, $31
.charmap $32, $32
.charmap $33, $33
.charmap $34, $34
.charmap $35, $35
.charmap $36, $36
.charmap $37, $37
.charmap $38, $38
.charmap $39, $39
.charmap $3A, $3A
.charmap $3B, $3B
.charmap $3C, $3C
.charmap $3D, $3D
.charmap $3E, $3E
.charmap $3F, $3F
.charmap $40, $40
.charmap $41, $41
.charmap $42, $42
.charmap $43, $43
.charmap $44, $44
.charmap $45, $45
.charmap $46, $46
.charmap $47, $47
.charmap $48, $48
.charmap $49, $49
.charmap $4A, $4A
.charmap $4B, $4B
.charmap $4C, $4C
.charmap $4D, $4D
.charmap $4E, $4E
.charmap $4F, $4F
.charmap $50, $50
.charmap $51, $51
.charmap $52, $52
.charmap $53, $53
.charmap $54, $54
.charmap $55, $55
.charmap $56, $56
.charmap $57, $57
.charmap $58, $58
.charmap $59, $59
.charmap $5A, $5A
.charmap $5B, $5B
.charmap $5C, $5C
.charmap $5D, $5D
.charmap $5E, $5E
.charmap $5F, $5F
.charmap $60, $60
.charmap $61, $61
.charmap $62, $62
.charmap $63, $63
.charmap $64, $64
.charmap $65, $65
.charmap $66, $66
.charmap $67, $67
.charmap $68, $68
.charmap $69, $69
.charmap $6A, $6A
.charmap $6B, $6B
.charmap $6C, $6C
.charmap $6D, $6D
.charmap $6E, $6E
.charmap $6F, $6F
.charmap $70, $70
.charmap $71, $71
.charmap $72, $72
.charmap $73, $73
.charmap $74, $74
.charmap $75, $75
.charmap $76, $76
.charmap $77, $77
.charmap $78, $78
.charmap $79, $79
.charmap $7A, $7A
.charmap $7B, $7B
.charmap $7C, $7C
.charmap $7D, $7D
.charmap $7E, $7E
.charmap $7F, $7F
.charmap $80, $80
.charmap $81, $81
.charmap $82, $82
.charmap $83, $83
.charmap $84, $84
.charmap $85, $85
.charmap $86, $86
.charmap $87, $87
.charmap $88, $88
.charmap $89, $89
.charmap $8A, $8A
.charmap $8B, $8B
.charmap $8C, $8C
.charmap $8D, $8D
.charmap $8E, $8E
.charmap $8F, $8F
.charmap $90, $90
.charmap $91, $91
.charmap $92, $92
.charmap $93, $93
.charmap $94, $94
.charmap $95, $95
.charmap $96, $96
.charmap $97, $97
.charmap $98, $98
.charmap $99, $99
.charmap $9A, $9A
.charmap $9B, $9B
.charmap $9C, $9C
.charmap $9D, $9D
.charmap $9E, $9E
.charmap $9F, $9F
.charmap $A0, $A0
.charmap $A1, $A1
.charmap $A2, $A2
.charmap $A3, $A3
.charmap $A4, $A4
.charmap $A5, $A5
.charmap $A6, $A6
.charmap $A7, $A7
.charmap $A8, $A8
.charmap $A9, $A9
.charmap $AA, $AA
.charmap $AB, $AB
.charmap $AC, $AC
.charmap $AD, $AD
.charmap $AE, $AE
.charmap $AF, $AF
.charmap $B0, $B0
.charmap $B1, $B1
.charmap $B2, $B2
.charmap $B3, $B3
.charmap $B4, $B4
.charmap $B5, $B5
.charmap $B6, $B6
.charmap $B7, $B7
.charmap $B8, $B8
.charmap $B9, $B9
.charmap $BA, $BA
.charmap $BB, $BB
.charmap $BC, $BC
.charmap $BD, $BD
.charmap $BE, $BE
.charmap $BF, $BF
.charmap $C0, $C0
.charmap $C1, $C1
.charmap $C2, $C2
.charmap $C3, $C3
.charmap $C4, $C4
.charmap $C5, $C5
.charmap $C6, $C6
.charmap $C7, $C7
.charmap $C8, $C8
.charmap $C9, $C9
.charmap $CA, $CA
.charmap $CB, $CB
.charmap $CC, $CC
.charmap $CD, $CD
.charmap $CE, $CE
.charmap $CF, $CF
.charmap $D0, $D0
.charmap $D1, $D1
.charmap $D2, $D2
.charmap $D3, $D3
.charmap $D4, $D4
.charmap $D5, $D5
.charmap $D6, $D6
.charmap $D7, $D7
.charmap $D8, $D8
.charmap $D9, $D9
.charmap $DA, $DA
.charmap $DB, $DB
.charmap $DC, $DC
.charmap $DD, $DD
.charmap $DE, $DE
.charmap $DF, $DF
.charmap $E0, $E0
.charmap $E1, $E1
.charmap $E2, $E2
.charmap $E3, $E3
.charmap $E4, $E4
.charmap $E5, $E5
.charmap $E6, $E6
.charmap $E7, $E7
.charmap $E8, $E8
.charmap $E9, $E9
.charmap $EA, $EA
.charmap $EB, $EB
.charmap $EC, $EC
.charmap $ED, $ED
.charmap $EE, $EE
.charmap $EF, $EF
.charmap $F0, $F0
.charmap $F1, $F1
.charmap $F2, $F2
.charmap $F3, $F3
.charmap $F4, $F4
.charmap $F5, $F5
.charmap $F6, $F6
.charmap $F7, $F7
.charmap $F8, $F8
.charmap $F9, $F9
.charmap $FA, $FA
.charmap $FB, $FB
.charmap $FC, $FC
.charmap $FD, $FD
.charmap $FE, $FE
.charmap $FF, $FF

View File

@ -0,0 +1,303 @@
;/*****************************************************************************/
;/* */
;/* atari_screen_charmap.inc */
;/* */
;/* Atari system internal string mapping ISO-8859-1 -> Internal/Screen-Code */
;/* */
;/* */
;/* */
;/* C 2016 Christian Krueger */
;/* */
;/* */
;/* This software is provided 'as-is', without any expressed or implied */
;/* warranty. In no event will the authors be held liable for any damages */
;/* arising from the use of this software. */
;/* */
;/* Permission is granted to anyone to use this software for any purpose, */
;/* including commercial applications, and to alter it and redistribute it */
;/* freely, subject to the following restrictions: */
;/* */
;/* 1. The origin of this software must not be misrepresented; you must not */
;/* claim that you wrote the original software. If you use this software */
;/* in a product, an acknowledgment in the product documentation would be */
;/* appreciated but is not required. */
;/* 2. Altered source versions must be plainly marked as such, and must not */
;/* be misrepresented as being the original software. */
;/* 3. This notice may not be removed or altered from any source */
;/* distribution. */
;/* */
;/*****************************************************************************/
.charmap $00, $40
.charmap $01, $41
.charmap $02, $42
.charmap $03, $43
.charmap $04, $44
.charmap $05, $45
.charmap $06, $46
.charmap $07, $FD
.charmap $08, $48
.charmap $09, $7F
.charmap $0A, $DB
.charmap $0B, $4B
.charmap $0C, $7D
.charmap $0D, $4D
.charmap $0E, $4E
.charmap $0F, $4F
.charmap $10, $50
.charmap $11, $51
.charmap $12, $52
.charmap $13, $53
.charmap $14, $54
.charmap $15, $55
.charmap $16, $56
.charmap $17, $57
.charmap $18, $58
.charmap $19, $59
.charmap $1A, $5A
.charmap $1B, $5B
.charmap $1C, $5C
.charmap $1D, $5D
.charmap $1E, $5E
.charmap $1F, $5F
.charmap $20, $00
.charmap $21, $01
.charmap $22, $02
.charmap $23, $03
.charmap $24, $04
.charmap $25, $05
.charmap $26, $06
.charmap $27, $07
.charmap $28, $08
.charmap $29, $09
.charmap $2A, $0A
.charmap $2B, $0B
.charmap $2C, $0C
.charmap $2D, $0D
.charmap $2E, $0E
.charmap $2F, $0F
.charmap $30, $10
.charmap $31, $11
.charmap $32, $12
.charmap $33, $13
.charmap $34, $14
.charmap $35, $15
.charmap $36, $16
.charmap $37, $17
.charmap $38, $18
.charmap $39, $19
.charmap $3A, $1A
.charmap $3B, $1B
.charmap $3C, $1C
.charmap $3D, $1D
.charmap $3E, $1E
.charmap $3F, $1F
.charmap $40, $20
.charmap $41, $21
.charmap $42, $22
.charmap $43, $23
.charmap $44, $24
.charmap $45, $25
.charmap $46, $26
.charmap $47, $27
.charmap $48, $28
.charmap $49, $29
.charmap $4A, $2A
.charmap $4B, $2B
.charmap $4C, $2C
.charmap $4D, $2D
.charmap $4E, $2E
.charmap $4F, $2F
.charmap $50, $30
.charmap $51, $31
.charmap $52, $32
.charmap $53, $33
.charmap $54, $34
.charmap $55, $35
.charmap $56, $36
.charmap $57, $37
.charmap $58, $38
.charmap $59, $39
.charmap $5A, $3A
.charmap $5B, $3B
.charmap $5C, $3C
.charmap $5D, $3D
.charmap $5E, $3E
.charmap $5F, $3F
.charmap $60, $60
.charmap $61, $61
.charmap $62, $62
.charmap $63, $63
.charmap $64, $64
.charmap $65, $65
.charmap $66, $66
.charmap $67, $67
.charmap $68, $68
.charmap $69, $69
.charmap $6A, $6A
.charmap $6B, $6B
.charmap $6C, $6C
.charmap $6D, $6D
.charmap $6E, $6E
.charmap $6F, $6F
.charmap $70, $70
.charmap $71, $71
.charmap $72, $72
.charmap $73, $73
.charmap $74, $74
.charmap $75, $75
.charmap $76, $76
.charmap $77, $77
.charmap $78, $78
.charmap $79, $79
.charmap $7A, $7A
.charmap $7B, $7B
.charmap $7C, $7C
.charmap $7D, $7D
.charmap $7E, $7E
.charmap $7F, $7F
.charmap $80, $C0
.charmap $81, $C1
.charmap $82, $C2
.charmap $83, $C3
.charmap $84, $C4
.charmap $85, $C5
.charmap $86, $C6
.charmap $87, $C7
.charmap $88, $C8
.charmap $89, $C9
.charmap $8A, $CA
.charmap $8B, $CB
.charmap $8C, $CC
.charmap $8D, $CD
.charmap $8E, $CE
.charmap $8F, $CF
.charmap $90, $D0
.charmap $91, $D1
.charmap $92, $D2
.charmap $93, $D3
.charmap $94, $D4
.charmap $95, $D5
.charmap $96, $D6
.charmap $97, $D7
.charmap $98, $D8
.charmap $99, $D9
.charmap $9A, $DA
.charmap $9B, $DB
.charmap $9C, $DC
.charmap $9D, $DD
.charmap $9E, $DE
.charmap $9F, $DF
.charmap $A0, $80
.charmap $A1, $81
.charmap $A2, $82
.charmap $A3, $83
.charmap $A4, $84
.charmap $A5, $85
.charmap $A6, $86
.charmap $A7, $87
.charmap $A8, $88
.charmap $A9, $89
.charmap $AA, $8A
.charmap $AB, $8B
.charmap $AC, $8C
.charmap $AD, $8D
.charmap $AE, $8E
.charmap $AF, $8F
.charmap $B0, $90
.charmap $B1, $91
.charmap $B2, $92
.charmap $B3, $93
.charmap $B4, $94
.charmap $B5, $95
.charmap $B6, $96
.charmap $B7, $97
.charmap $B8, $98
.charmap $B9, $99
.charmap $BA, $9A
.charmap $BB, $9B
.charmap $BC, $9C
.charmap $BD, $9D
.charmap $BE, $9E
.charmap $BF, $9F
.charmap $C0, $A0
.charmap $C1, $A1
.charmap $C2, $A2
.charmap $C3, $A3
.charmap $C4, $A4
.charmap $C5, $A5
.charmap $C6, $A6
.charmap $C7, $A7
.charmap $C8, $A8
.charmap $C9, $A9
.charmap $CA, $AA
.charmap $CB, $AB
.charmap $CC, $AC
.charmap $CD, $AD
.charmap $CE, $AE
.charmap $CF, $AF
.charmap $D0, $B0
.charmap $D1, $B1
.charmap $D2, $B2
.charmap $D3, $B3
.charmap $D4, $B4
.charmap $D5, $B5
.charmap $D6, $B6
.charmap $D7, $B7
.charmap $D8, $B8
.charmap $D9, $B9
.charmap $DA, $BA
.charmap $DB, $BB
.charmap $DC, $BC
.charmap $DD, $BD
.charmap $DE, $BE
.charmap $DF, $BF
.charmap $E0, $E0
.charmap $E1, $E1
.charmap $E2, $E2
.charmap $E3, $E3
.charmap $E4, $E4
.charmap $E5, $E5
.charmap $E6, $E6
.charmap $E7, $E7
.charmap $E8, $E8
.charmap $E9, $E9
.charmap $EA, $EA
.charmap $EB, $EB
.charmap $EC, $EC
.charmap $ED, $ED
.charmap $EE, $EE
.charmap $EF, $EF
.charmap $F0, $F0
.charmap $F1, $F1
.charmap $F2, $F2
.charmap $F3, $F3
.charmap $F4, $F4
.charmap $F5, $F5
.charmap $F6, $F6
.charmap $F7, $F7
.charmap $F8, $F8
.charmap $F9, $F9
.charmap $FA, $FA
.charmap $FB, $FB
.charmap $FC, $FC
.charmap $FD, $FD
.charmap $FE, $FE
.charmap $FF, $FF

View File

@ -7,6 +7,7 @@
; Zero page, Commodore stuff
TXTPTR := $3D ; Pointer into BASIC source code
STATUS := $90 ; Kernal I/O completion status
TIME := $A0 ; 60HZ clock
FNAM_LEN := $B7 ; Length of filename
SECADR := $B9 ; Secondary address

View File

@ -9,6 +9,7 @@
VARTAB := $2D ; Pointer to start of BASIC variables
MEMSIZE := $37 ; Pointer to highest BASIC RAM location (+1)
TXTPTR := $7A ; Pointer into BASIC source code
STATUS := $90 ; Kernal I/O completion status
TIME := $A0 ; 60 HZ clock
FNAM_LEN := $B7 ; Length of filename
SECADR := $B9 ; Secondary address
@ -76,6 +77,8 @@ VIC_SPR_EXP_Y := $D017
VIC_SPR_EXP_X := $D01D
VIC_SPR_MCOLOR := $D01C
VIC_SPR_BG_PRIO := $D01B
VIC_SPR_COLL := $D01E
VIC_SPR_BG_COLL := $D01F
VIC_SPR_MCOLOR0 := $D025
VIC_SPR_MCOLOR1 := $D026

View File

@ -7,8 +7,13 @@
.if .def(__CX16__)
; CX16 extended jump table
KBDBUF_PEEK := $FEBD
KBDBUF_GET_MODIFIERS := $FEC0
KBDBUF_PUT := $FEC3
I2C_READ_BYTE := $FEC6
I2C_WRITE_BYTE := $FEC9
CX_MONITOR := $FECC
ENTROPY_GET := $FECF
KEYBRD_BUF_PUT := $FED2
CONSOLE_SET_PAGE_MSG := $FED5
CONSOLE_PUT_IMAGE := $FED8
CONSOLE_INIT := $FEDB
@ -46,12 +51,13 @@
GRAPH_SET_FONT := $FF3B
GRAPH_GET_CHAR_SIZE := $FF3E
GRAPH_PUT_CHAR := $FF41
MULTI_ACPTR := $FF44
RESTORE_BASIC := $FF47
CLOCK_SET_DATE_TIME := $FF4D
CLOCK_GET_DATE_TIME := $FF50
JOYSTICK_SCAN := $FF53
JOYSTICK_GET := $FF56
SCREEN_SET_MODE := $FF5F
SCREEN_MODE := $FF5F
SCREEN_SET_CHARSET := $FF62
MOUSE_CONFIG := $FF68
MOUSE_GET := $FF6B

View File

@ -0,0 +1,291 @@
;/*****************************************************************************/
;/* */
;/* cbm_petscii_charmap.inc */
;/* */
;/* CBM system standard string mapping ISO-8859-1 -> PetSCII */
;/* */
;/* */
;/* 2019-03-10, Greg King */
;/* */
;/* This software is provided "as-is", without any expressed or implied */
;/* warranty. In no event will the authors be held liable for any damages */
;/* arising from the use of this software. */
;/* */
;/* Permission is granted to anyone to use this software for any purpose, */
;/* including commercial applications, and to alter it and redistribute it */
;/* freely, subject to the following restrictions: */
;/* */
;/* 1. The origin of this software must not be misrepresented; you must not */
;/* claim that you wrote the original software. If you use this software */
;/* in a product, an acknowledgment in the product documentation would be */
;/* appreciated, but is not required. */
;/* 2. Altered source versions must be plainly marked as such, and must not */
;/* be misrepresented as being the original software. */
;/* 3. This notice must not be removed or altered from any source */
;/* distribution. */
;/* */
;/*****************************************************************************/
.charmap $00, $00
.charmap $01, $01
.charmap $02, $02
.charmap $03, $03
.charmap $04, $04
.charmap $05, $05
.charmap $06, $06
.charmap $07, $07
.charmap $08, $14
.charmap $09, $09
.charmap $0A, $0D
.charmap $0B, $11
.charmap $0C, $93
.charmap $0D, $0A
.charmap $0E, $0E
.charmap $0F, $0F
.charmap $10, $10
.charmap $11, $0B
.charmap $12, $12
.charmap $13, $13
.charmap $14, $08
.charmap $15, $15
.charmap $16, $16
.charmap $17, $17
.charmap $18, $18
.charmap $19, $19
.charmap $1A, $1A
.charmap $1B, $1B
.charmap $1C, $1C
.charmap $1D, $1D
.charmap $1E, $1E
.charmap $1F, $1F
.charmap $20, $20
.charmap $21, $21
.charmap $22, $22
.charmap $23, $23
.charmap $24, $24
.charmap $25, $25
.charmap $26, $26
.charmap $27, $27
.charmap $28, $28
.charmap $29, $29
.charmap $2A, $2A
.charmap $2B, $2B
.charmap $2C, $2C
.charmap $2D, $2D
.charmap $2E, $2E
.charmap $2F, $2F
.charmap $30, $30
.charmap $31, $31
.charmap $32, $32
.charmap $33, $33
.charmap $34, $34
.charmap $35, $35
.charmap $36, $36
.charmap $37, $37
.charmap $38, $38
.charmap $39, $39
.charmap $3A, $3A
.charmap $3B, $3B
.charmap $3C, $3C
.charmap $3D, $3D
.charmap $3E, $3E
.charmap $3F, $3F
.charmap $40, $40
.charmap $41, $C1
.charmap $42, $C2
.charmap $43, $C3
.charmap $44, $C4
.charmap $45, $C5
.charmap $46, $C6
.charmap $47, $C7
.charmap $48, $C8
.charmap $49, $C9
.charmap $4A, $CA
.charmap $4B, $CB
.charmap $4C, $CC
.charmap $4D, $CD
.charmap $4E, $CE
.charmap $4F, $CF
.charmap $50, $D0
.charmap $51, $D1
.charmap $52, $D2
.charmap $53, $D3
.charmap $54, $D4
.charmap $55, $D5
.charmap $56, $D6
.charmap $57, $D7
.charmap $58, $D8
.charmap $59, $D9
.charmap $5A, $DA
.charmap $5B, $5B
.charmap $5C, $BF
.charmap $5D, $5D
.charmap $5E, $5E
.charmap $5F, $A4
.charmap $60, $AD
.charmap $61, $41
.charmap $62, $42
.charmap $63, $43
.charmap $64, $44
.charmap $65, $45
.charmap $66, $46
.charmap $67, $47
.charmap $68, $48
.charmap $69, $49
.charmap $6A, $4A
.charmap $6B, $4B
.charmap $6C, $4C
.charmap $6D, $4D
.charmap $6E, $4E
.charmap $6F, $4F
.charmap $70, $50
.charmap $71, $51
.charmap $72, $52
.charmap $73, $53
.charmap $74, $54
.charmap $75, $55
.charmap $76, $56
.charmap $77, $57
.charmap $78, $58
.charmap $79, $59
.charmap $7A, $5A
.charmap $7B, $B3
.charmap $7C, $DD
.charmap $7D, $AB
.charmap $7E, $B1
.charmap $7F, $DF
.charmap $80, $80
.charmap $81, $81
.charmap $82, $82
.charmap $83, $83
.charmap $84, $84
.charmap $85, $85
.charmap $86, $86
.charmap $87, $87
.charmap $88, $88
.charmap $89, $89
.charmap $8A, $8A
.charmap $8B, $8B
.charmap $8C, $8C
.charmap $8D, $8D
.charmap $8E, $8E
.charmap $8F, $8F
.charmap $90, $90
.charmap $91, $91
.charmap $92, $92
.charmap $93, $0C
.charmap $94, $94
.charmap $95, $95
.charmap $96, $96
.charmap $97, $97
.charmap $98, $98
.charmap $99, $99
.charmap $9A, $9A
.charmap $9B, $9B
.charmap $9C, $9C
.charmap $9D, $9D
.charmap $9E, $9E
.charmap $9F, $9F
.charmap $A0, $A0
.charmap $A1, $A1
.charmap $A2, $A2
.charmap $A3, $A3
.charmap $A4, $A4
.charmap $A5, $A5
.charmap $A6, $A6
.charmap $A7, $A7
.charmap $A8, $A8
.charmap $A9, $A9
.charmap $AA, $AA
.charmap $AB, $AB
.charmap $AC, $AC
.charmap $AD, $AD
.charmap $AE, $AE
.charmap $AF, $AF
.charmap $B0, $B0
.charmap $B1, $B1
.charmap $B2, $B2
.charmap $B3, $B3
.charmap $B4, $B4
.charmap $B5, $B5
.charmap $B6, $B6
.charmap $B7, $B7
.charmap $B8, $B8
.charmap $B9, $B9
.charmap $BA, $BA
.charmap $BB, $BB
.charmap $BC, $BC
.charmap $BD, $BD
.charmap $BE, $BE
.charmap $BF, $BF
.charmap $C0, $60
.charmap $C1, $61
.charmap $C2, $62
.charmap $C3, $63
.charmap $C4, $64
.charmap $C5, $65
.charmap $C6, $66
.charmap $C7, $67
.charmap $C8, $68
.charmap $C9, $69
.charmap $CA, $6A
.charmap $CB, $6B
.charmap $CC, $6C
.charmap $CD, $6D
.charmap $CE, $6E
.charmap $CF, $6F
.charmap $D0, $70
.charmap $D1, $71
.charmap $D2, $72
.charmap $D3, $73
.charmap $D4, $74
.charmap $D5, $75
.charmap $D6, $76
.charmap $D7, $77
.charmap $D8, $78
.charmap $D9, $79
.charmap $DA, $7A
.charmap $DB, $7B
.charmap $DC, $7C
.charmap $DD, $7D
.charmap $DE, $7E
.charmap $DF, $7F
.charmap $E0, $E0
.charmap $E1, $E1
.charmap $E2, $E2
.charmap $E3, $E3
.charmap $E4, $E4
.charmap $E5, $E5
.charmap $E6, $E6
.charmap $E7, $E7
.charmap $E8, $E8
.charmap $E9, $E9
.charmap $EA, $EA
.charmap $EB, $EB
.charmap $EC, $EC
.charmap $ED, $ED
.charmap $EE, $EE
.charmap $EF, $EF
.charmap $F0, $F0
.charmap $F1, $F1
.charmap $F2, $F2
.charmap $F3, $F3
.charmap $F4, $F4
.charmap $F5, $F5
.charmap $F6, $F6
.charmap $F7, $F7
.charmap $F8, $F8
.charmap $F9, $F9
.charmap $FA, $FA
.charmap $FB, $FB
.charmap $FC, $FC
.charmap $FD, $FD
.charmap $FE, $FE
.charmap $FF, $FF

View File

@ -0,0 +1,305 @@
;/*****************************************************************************/
;/* */
;/* cbm_screen_charmap.inc */
;/* */
;/* c Copyright 2019, Gerhard W. Gruber (sparhawk@gmx.at) */
;/* */
;/* When using CBM mode, this include converts character literals */
;/* from ASCII to screen-code mapping, so you can write directly */
;/* to the screen memory. */
;/* */
;/* If this include is used, no additional macros are needed. */
;/* */
;/*****************************************************************************/
; Char $00 -> c + 128
.charmap $00, $80
; Char $01 ... $1A -> c + 128 + 64 control alphabet
.charmap $01, $C1
.charmap $02, $C2
.charmap $03, $C3
.charmap $04, $C4
.charmap $05, $C5
.charmap $06, $C6
.charmap $07, $C7
.charmap $08, $C8
.charmap $09, $C9
.charmap $0A, $CA
.charmap $0B, $CB
.charmap $0C, $CC
.charmap $0D, $CD
.charmap $0E, $CE
.charmap $0F, $CF
.charmap $10, $D0
.charmap $11, $D1
.charmap $12, $D2
.charmap $13, $D3
.charmap $14, $D4
.charmap $15, $D5
.charmap $16, $D6
.charmap $17, $D7
.charmap $18, $D8
.charmap $19, $D9
.charmap $1A, $DA
; Char $1B ... $1F -> c + 128
.charmap $1B, $9B
.charmap $1C, $9C
.charmap $1D, $9D
.charmap $1E, $9E
.charmap $1F, $9F
; Char $20 ... $3F -> c
.charmap $20, $20
.charmap $21, $21
.charmap $22, $22
.charmap $23, $23
.charmap $24, $24
.charmap $25, $25
.charmap $26, $26
.charmap $27, $27
.charmap $28, $28
.charmap $29, $29
.charmap $2A, $2A
.charmap $2B, $2B
.charmap $2C, $2C
.charmap $2D, $2D
.charmap $2E, $2E
.charmap $2F, $2F
.charmap $30, $30
.charmap $31, $31
.charmap $32, $32
.charmap $33, $33
.charmap $34, $34
.charmap $35, $35
.charmap $36, $36
.charmap $37, $37
.charmap $38, $38
.charmap $39, $39
.charmap $3A, $3A
.charmap $3B, $3B
.charmap $3C, $3C
.charmap $3D, $3D
.charmap $3E, $3E
.charmap $3F, $3F
; Char $40 -> c - 64
.charmap $40, $00
; Char $41 ... $5A -> c upper-case alphabet
.charmap $41, $41
.charmap $42, $42
.charmap $43, $43
.charmap $44, $44
.charmap $45, $45
.charmap $46, $46
.charmap $47, $47
.charmap $48, $48
.charmap $49, $49
.charmap $4A, $4A
.charmap $4B, $4B
.charmap $4C, $4C
.charmap $4D, $4D
.charmap $4E, $4E
.charmap $4F, $4F
.charmap $50, $50
.charmap $51, $51
.charmap $52, $52
.charmap $53, $53
.charmap $54, $54
.charmap $55, $55
.charmap $56, $56
.charmap $57, $57
.charmap $58, $58
.charmap $59, $59
.charmap $5A, $5A
; Char $5B ... $5F -> c - 64
.charmap $5B, $1B
.charmap $5C, $1C
.charmap $5D, $1D
.charmap $5E, $1E
.charmap $5F, $1F
; Char $60 -> c - 32
.charmap $60, $40
; Char $61 ... $7A -> c - 32 - 64 lower-case alphabet
.charmap $61, $01
.charmap $62, $02
.charmap $63, $03
.charmap $64, $04
.charmap $65, $05
.charmap $66, $06
.charmap $67, $07
.charmap $68, $08
.charmap $69, $09
.charmap $6A, $0A
.charmap $6B, $0B
.charmap $6C, $0C
.charmap $6D, $0D
.charmap $6E, $0E
.charmap $6F, $0F
.charmap $70, $10
.charmap $71, $11
.charmap $72, $12
.charmap $73, $13
.charmap $74, $14
.charmap $75, $15
.charmap $76, $16
.charmap $77, $17
.charmap $78, $18
.charmap $79, $19
.charmap $7A, $1A
; Char $7B ... $7F -> c - 32
.charmap $7B, $5B
.charmap $7C, $5C
.charmap $7D, $5D
.charmap $7E, $5E
.charmap $7F, $5F
; Char $80 -> c + 64
.charmap $80, $C0
; Char $81 ... $9A -> c control alphabet
.charmap $81, $81
.charmap $82, $82
.charmap $83, $83
.charmap $84, $84
.charmap $85, $85
.charmap $86, $86
.charmap $87, $87
.charmap $88, $88
.charmap $89, $89
.charmap $8A, $8A
.charmap $8B, $8B
.charmap $8C, $8C
.charmap $8D, $8D
.charmap $8E, $8E
.charmap $8F, $8F
.charmap $90, $90
.charmap $91, $91
.charmap $92, $92
.charmap $93, $93
.charmap $94, $94
.charmap $95, $95
.charmap $96, $96
.charmap $97, $97
.charmap $98, $98
.charmap $99, $99
.charmap $9A, $9A
; Char $9B ... $9F -> c + 64
.charmap $9B, $DB
.charmap $9C, $DC
.charmap $9D, $DD
.charmap $9E, $DE
.charmap $9F, $DF
; Char $A0 ... $BF -> c - 64
.charmap $A0, $60
.charmap $A1, $61
.charmap $A2, $62
.charmap $A3, $63
.charmap $A4, $64
.charmap $A5, $65
.charmap $A6, $66
.charmap $A7, $67
.charmap $A8, $68
.charmap $A9, $69
.charmap $AA, $6A
.charmap $AB, $6B
.charmap $AC, $6C
.charmap $AD, $6D
.charmap $AE, $6E
.charmap $AF, $6F
.charmap $B0, $70
.charmap $B1, $71
.charmap $B2, $72
.charmap $B3, $73
.charmap $B4, $74
.charmap $B5, $75
.charmap $B6, $76
.charmap $B7, $77
.charmap $B8, $78
.charmap $B9, $79
.charmap $BA, $7A
.charmap $BB, $7B
.charmap $BC, $7C
.charmap $BD, $7D
.charmap $BE, $7E
.charmap $BF, $7F
; Char $C0 ... $DF -> c - 128
.charmap $C0, $40
; Char $C1 ... $DA -> c - 128 - 64 lower-case alphabet
.charmap $C1, $01
.charmap $C2, $02
.charmap $C3, $03
.charmap $C4, $04
.charmap $C5, $05
.charmap $C6, $06
.charmap $C7, $07
.charmap $C8, $08
.charmap $C9, $09
.charmap $CA, $0A
.charmap $CB, $0B
.charmap $CC, $0C
.charmap $CD, $0D
.charmap $CE, $0E
.charmap $CF, $0F
.charmap $D0, $10
.charmap $D1, $11
.charmap $D2, $12
.charmap $D3, $13
.charmap $D4, $14
.charmap $D5, $15
.charmap $D6, $16
.charmap $D7, $17
.charmap $D8, $18
.charmap $D9, $19
.charmap $DA, $1A
; Char $DB ... $DF -> c - 128
.charmap $DB, $5B
.charmap $DC, $5C
.charmap $DD, $5D
.charmap $DE, $5E
.charmap $DF, $5F
; Char $E0 ... $FF -> c - 128
.charmap $E0, $60
.charmap $E1, $61
.charmap $E2, $62
.charmap $E3, $63
.charmap $E4, $64
.charmap $E5, $65
.charmap $E6, $66
.charmap $E7, $67
.charmap $E8, $68
.charmap $E9, $69
.charmap $EA, $6A
.charmap $EB, $6B
.charmap $EC, $6C
.charmap $ED, $6D
.charmap $EE, $6E
.charmap $EF, $6F
.charmap $F0, $70
.charmap $F1, $71
.charmap $F2, $72
.charmap $F3, $73
.charmap $F4, $74
.charmap $F5, $75
.charmap $F6, $76
.charmap $F7, $77
.charmap $F8, $78
.charmap $F9, $79
.charmap $FA, $7A
.charmap $FB, $7B
.charmap $FC, $7C
.charmap $FD, $7D
.charmap $FE, $7E
.charmap $FF, $7F

View File

@ -2,18 +2,20 @@
CPU_ISET_NONE = $0001
CPU_ISET_6502 = $0002
CPU_ISET_6502X = $0004
CPU_ISET_65SC02 = $0008
CPU_ISET_65C02 = $0010
CPU_ISET_65816 = $0020
CPU_ISET_SWEET16 = $0040
CPU_ISET_HUC6280 = $0080
;CPU_ISET_M740 = $0100 not actually implemented
CPU_ISET_4510 = $0200
CPU_ISET_6502DTV = $0008
CPU_ISET_65SC02 = $0010
CPU_ISET_65C02 = $0020
CPU_ISET_65816 = $0040
CPU_ISET_SWEET16 = $0080
CPU_ISET_HUC6280 = $0100
;CPU_ISET_M740 = $0200 not actually implemented
CPU_ISET_4510 = $0400
; CPU capabilities
CPU_NONE = CPU_ISET_NONE
CPU_6502 = CPU_ISET_6502
CPU_6502X = CPU_ISET_6502|CPU_ISET_6502X
CPU_6502DTV = CPU_ISET_6502|CPU_ISET_6502DTV
CPU_65SC02 = CPU_ISET_6502|CPU_ISET_65SC02
CPU_65C02 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02
CPU_65816 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65816

View File

@ -5,21 +5,21 @@
;** Screen
SCREEN_ROWS = 24
SCREEN_COLS = 32
SCREEN_PTR = $3A
CURSOR_X = $3C
CURSOR_Y = $3D
SCREEN_PTR := $3A
CURSOR_X := $3C
CURSOR_Y := $3D
;** VDP
VDP_DATA_R = $2000
VDP_STATUS_R = $2001
VDP_DATA_W = $3000
VDP_CONTROL_W = $3001
VDP_DATA_R := $2000
VDP_STATUS_R := $2001
VDP_DATA_W := $3000
VDP_CONTROL_W := $3001
;** PIA
PIA0_DATA = $1000
PIA0_STATUS = $1001
PIA1_DATA = $1002
PIA1_STATUS = $1003
PIA0_DATA := $1000
PIA0_STATUS := $1001
PIA1_DATA := $1002
PIA1_STATUS := $1003
;** General
CH_VLINE = 33
@ -30,11 +30,11 @@ CH_LLCORNER = 37
CH_LRCORNER = 38
;** I/O (Zero-page variables)
ZP_KEYBOARD = $10
ZP_JOY0_DIR = $11
ZP_JOY1_DIR = $13
ZP_JOY0_BUTTONS = $16
ZP_JOY1_BUTTONS = $17
ZP_KEYBOARD := $10
ZP_JOY0_DIR := $11
ZP_JOY1_DIR := $13
ZP_JOY0_BUTTONS := $16
ZP_JOY1_BUTTONS := $17
;** Joystick direction values (ZP_JOY0_DIR/ZP_JOY1_DIR)
JOY_N = $49
@ -54,8 +54,13 @@ JOY_WNW = $4C
JOY_NW = $4B
JOY_NNW = $4A
;** BIOS
BIOS_IRQ1_ADDR = $FF3F
BIOS_IRQ2_ADDR = $FF52
BIOS_NMI_RESET_ADDR = $F808
BIOS_WRITE_VDP_REG = $FE1F
;** BIOS routines
BIOS_NMI_RESET_ADDR := $F808
BIOS_PLAY_TUNE1 := $FBD6
BIOS_PLAY_SONG := $FBED
BIOS_PLAY_TUNE2 := $FCE6
BIOS_WRITE_VDP_REG := $FE1F
BIOS_QUIET_PSG := $FE54
BIOS_POKE_PSG := $FE77
BIOS_IRQ1_ADDR := $FF3F
BIOS_IRQ2_ADDR := $FF52

View File

@ -1,5 +1,5 @@
;
; CX16 r37 definitions
; CX16 r39 definitions
;
; ---------------------------------------------------------------------------
@ -10,8 +10,7 @@
WHITE
RED
CYAN
VIOLET
PURPLE = VIOLET
PURPLE
GREEN
BLUE
YELLOW
@ -84,7 +83,6 @@ LIGHTGREEN
LIGHTBLUE
GRAY3
PURPLE
VIOLET = PURPLE
CURS_LEFT
YELLOW
CYAN
@ -106,6 +104,10 @@ PI
; ---------------------------------------------------------------------------
; Zero page
; Banking registers
RAM_BANK := $00
ROM_BANK := $01
; GEOS and graphics pseudo-registers
.struct gREG
.org $02
@ -226,7 +228,7 @@ PI
; Kernal
KTEMP2 := $80 ; 2 bytes for temporary storage
IMPARM := $82 ; Pointer for PRIMM function
FNAM := $8C ; Pointer to filename
FNAM := $8A ; Pointer to filename
; BASIC
TXTPTR := $EE ; Pointer into BASIC source code
@ -236,14 +238,13 @@ TXTPTR := $EE ; Pointer into BASIC source code
BASIC_BUF := $0200 ; Location of command-line
BASIC_BUF_LEN = 81 ; Maximum length of command-line
SCREEN_MODE := $0261 ; Current screen mode (set by SCREEN_SET_MODE)
SCREEN_PTR := $0262 ; Pointer to current row on text screen (16 bits)
STATUS := $0286 ; Status from previous I/O operation
IN_DEV := $028A ; Current input device number
OUT_DEV := $028B ; Current output device number
FNAM_LEN := $028E ; Length of filename
SECADR := $0290 ; Secondary address
DEVNUM := $0291 ; Device number
STATUS := $0287 ; Status from previous I/O operation
IN_DEV := $028B ; Current input device number
OUT_DEV := $028C ; Current output device number
FNAM_LEN := $028F ; Length of filename
SECADR := $0291 ; Secondary address
DEVNUM := $0292 ; Device number
CURS_COLOR := $0373 ; Color under the cursor
CHARCOLOR := $0376 ; Cursor's color nybbles (high: background, low: foreground)
RVS := $0377 ; Reverse flag
@ -257,8 +258,8 @@ LLEN := $0386 ; Line length
NLINES := $0387 ; Number of screen lines
; BASIC
VARTAB := $03E2 ; Pointer to start of BASIC variables
MEMSIZE := $03EA ; Pointer to highest BASIC RAM location (+1)
VARTAB := $03E1 ; Pointer to start of BASIC variables
MEMSIZE := $0259 ; Pointer to highest BASIC RAM location (+1)
; ---------------------------------------------------------------------------
; Vector and other locations
@ -270,6 +271,42 @@ NMIVec := $0318
; ---------------------------------------------------------------------------
; I/O locations
; 65C22 Versatile Interface Adapter
.struct VIA1 ; Versatile Interface Adapter
.org $9F00
PRB .byte ; mouse, LED, VIC bus (Port Register B)
PRA .byte ; keyboard, controllers (Port Register A)
DDRB .byte ; (Data Direction Register B)
DDRA .byte ; (Data Direction Register A)
T1 .word ; (Timer 1)
T1L .word ; (Timer 1 Latch)
T2 .word ; (Timer 2)
SR .byte ; (Shift Register)
ACR .byte ; (Auxiliary Control Register)
PCR .byte ; (Peripheral Control Register)
IFR .byte ; (Interrupt Flags Register)
IER .byte ; (Interrupt Enable Register)
PRA2 .byte ; keyboard, controllers (PRA without handshake)
.endstruct
; 65C22 Versatile Interface Adapter
.struct VIA2
.org $9F10
PRB .byte
PRA .byte
DDRB .byte
DDRA .byte
T1 .word
T1L .word
T2 .word
SR .byte
ACR .byte
PCR .byte
IFR .byte
IER .byte
PRA2 .byte
.endstruct
; Video Enhanced Retro Adapter
; Has audio and SPI.
.scope VERA
@ -439,7 +476,7 @@ NMIVec := $0318
.scope PSG ; Programmable Sound Generator
.struct
PITCH .word
VOL .byte ; Left, right channels; volume
VOL .byte ; Right, left sides; volume
WAVEFORM .byte ; Wave shape, pulse width
.endstruct
LEFT = %01 << 6
@ -498,44 +535,16 @@ NMIVec := $0318
.endstruct
.endscope
; 65C22
.struct VIA1 ; Versatile Interface Adapter
.org $9F60
PRB .byte ; ROM bank, IEC (Port Register B)
PRA .byte ; RAM bank (Port Register A)
DDRB .byte ; (Data Direction Register B)
DDRA .byte ; (Data Direction Register A)
T1 .word ; (Timer 1)
T1L .word ; (Timer 1 Latch)
T2 .word ; (Timer 2)
SR .byte ; (Shift Register)
ACR .byte ; (Auxiliary Control Register)
PCR .byte ; (Peripheral Control Register)
IFR .byte ; (Interrupt Flags Register)
IER .byte ; (Interrupt Enable Register)
PRA2 .byte ; RAM bank (Port Register A without handshaking)
; YM2151 audio chip
.struct YM2151
.org $9F40
ADDR .byte
.union
DATA .byte
STATUS .byte
.endunion
.endstruct
; 65C22
.struct VIA2
.org $9F70
PRB .byte ; Mouse communication ?
PRA .byte ; NES controller communication
DDRB .byte
DDRA .byte
T1 .word
T1L .word
T2 .word
SR .byte
ACR .byte
PCR .byte
IFR .byte
IER .byte
PRA2 .byte
.endstruct
; Real-Time Clock
; X16 Emulator device
; This device doesn't exist on the real machine.
.struct EMULATOR
@ -544,9 +553,11 @@ NMIVec := $0318
VERALOG .byte ; Boolean: log VERA activity
KEYBOARDLOG .byte ; Boolean: log keyboard data
ECHO .byte ; Type of echo that's enabled
SAVEXIT .byte ; Boolean: save on exit
SAVEXIT .byte ; Boolean: save machine state on exit
GIFREC .byte ; Method of recording GIF movie
.org $9FBD
.res 2
CYCLECOUNT .dword ; Running count of CPU cycles (Read-Only)
.res 1
KEYMAP .byte ; Current keyboard layout number (Read-Only)
DETECT .byte 2 ; If is "16" string, then running on emulator (RO)
.endstruct
@ -554,8 +565,7 @@ NMIVec := $0318
; ---------------------------------------------------------------------------
; Banked RAM and ROM
KEY_COUNT := $A00A ; (bank 0) Number of keys in input buffer
TIMER := $A037 ; (bank 0) 60 Hz. timer (3 bytes, big-endian)
TIMER := $A03B ; (bank 0) 60 Hz. timer (3 bytes, big-endian)
.struct BANK
.org $A000

View File

@ -7,7 +7,7 @@
;/* */
;/* */
;/* (C) 2002-2003 Ullrich von Bassewitz */
;/* Römerstrasse 52 */
;/* Roemerstrasse 52 */
;/* D-70794 Filderstadt */
;/* EMail: uz@cc65.org */
;/* */

View File

@ -4,10 +4,10 @@
; Variables and functions
.global __errno, __oserror
.global __osmaperrno
.global __seterrno
.global __directerrno, __mappederrno
.global ___errno, ___oserror
.global ___osmaperrno
.global ___seterrno
.global ___directerrno, ___mappederrno
; Error codes, must match the values in the C headers
.enum

View File

@ -31,10 +31,8 @@
; bgt - jump if unsigned greater
.macro bgt Arg
.local L
beq L
beq *+4
bcs Arg
L:
.endmacro
; ble - jump if unsigned less or equal

View File

@ -7,7 +7,7 @@
;/* */
;/* */
;/* (C) 2002-2006, Ullrich von Bassewitz */
;/* Römerstraße 52 */
;/* Roemerstrasse 52 */
;/* D-70794 Filderstadt */
;/* EMail: uz@cc65.org */
;/* */

31
asminc/kim1.inc Normal file
View File

@ -0,0 +1,31 @@
; ---------------------------------------------------------------------------
;
; KIM-1 definitions
;
; ---------------------------------------------------------------------------
RAMSTART := $0200 ; Entry point
; ---------------------------------------------------------------------------
; Monitor Functions
; ---------------------------------------------------------------------------
OUTCHR := $1EA0 ; Output character
INTCHR := $1E5A ; Input character without case conversion
DUMPT := $1800 ; Dump memory to tape
LOADT := $1873 ; Load memory from tape
START := $1C4F ; Enter KIM-1 monitor
SCANDS := $1F1F ; Scan 7-segment display
KEYIN := $1F40 ; Open up keyboard channel
GETKEY := $1F6A ; Return key from keyboard
; ---------------------------------------------------------------------------
; System Memory
; ---------------------------------------------------------------------------
SAL := $17F5 ; Tape load address low
SAH := $17F6 ; Tape load address high
EAL := $17F7 ; Tape address end low
EAH := $17F8 ; Tape address end high
ID := $17F9 ; Tape Identification number

View File

@ -81,8 +81,42 @@ MATHJ = $FC6F
; Suzy Misc
SPRCTL0 = $FC80
SPRCTL0 = $FC80
; Sprite bits-per-pixel definitions
BPP_MASK = %11000000 ; Mask for settings bits per pixel
BPP_1 = %00000000
BPP_2 = %01000000
BPP_3 = %10000000
BPP_4 = %11000000
; More sprite control 0 bit definitions
HFLIP = %00100000
VFLIP = %00010000
; Sprite types - redefined to reflect the reality caused by the shadow error
TYPE_SHADOW = %00000111
TYPE_XOR = %00000110
TYPE_NONCOLL = %00000101 ; Non-colliding
TYPE_NORMAL = %00000100
TYPE_BOUNDARY = %00000011
TYPE_BSHADOW = %00000010 ; Background shadow
TYPE_BACKNONCOLL = %00000001 ; Background non-colliding
TYPE_BACKGROUND = %00000000
SPRCTL1 = $FC81
LITERAL = %10000000
PACKED = %00000000
ALGO3 = %01000000 ; Broken, do not set this bit!
; Sprite reload mask definitions
RELOAD_MASK = %00110000
RENONE = %00000000 ; Reload nothing
REHV = %00010000 ; Reload hsize, vsize
REHVS = %00100000 ; Reload hsize, vsize, stretch
REHVST = %00110000 ; Reload hsize, vsize, stretch, tilt
; More sprite control 1 bit definitions
REUSEPAL = %00001000
SKIP = %00000100
DRAWUP = %00000010
DRAWLEFT = %00000001
SPRCOLL = $FC82
SPRINIT = $FC83
SUZYHREV = $FC88
@ -225,30 +259,44 @@ SND_INTERRUPT = TIMER7_INTERRUPT
INTRST = $FD80
INTSET = $FD81
MAGRDY0 = $FD84
MAGRDY1 = $FD85
AUDIN = $FD86
SYSCTL1 = $FD87
MIKEYHREV = $FD88
MIKEYSREV = $FD89
IODIR = $FD8A
IODAT = $FD8B
TxIntEnable = %10000000
RxIntEnable = %01000000
TxParEnable = %00010000
ResetErr = %00001000
TxOpenColl = %00000100
TxBreak = %00000010
ParEven = %00000001
TxReady = %10000000
RxReady = %01000000
TxEmpty = %00100000
RxParityErr = %00010000
RxOverrun = %00001000
RxFrameErr = %00000100
RxBreak = %00000010
ParityBit = %00000001
SERCTL = $FD8C
IODIR = $FD8A
IODAT = $FD8B
; IODIR and IODAT bit definitions
AUDIN_BIT = $10 ; Note that there is also the address AUDIN
READ_ENABLE = $10 ; Same bit for AUDIN_BIT
RESTLESS = $08
NOEXP = $04 ; If set, redeye is not connected
CART_ADDR_DATA = $02
CART_POWER_OFF = $02 ; Same bit for CART_ADDR_DATA
EXTERNAL_POWER = $01
SERCTL = $FD8C
; SERCTL bit definitions for write operations
TXINTEN = $80
RXINTEN = $40
PAREN = $10
RESETERR = $08
TXOPEN = $04
TXBRK = $02
PAREVEN = $01
; SERCTL bit definitions for read operations
TXRDY = $80
RXRDY = $40
TXEMPTY = $20
PARERR = $10
OVERRUN = $08
FRAMERR = $04
RXBRK = $02
PARBIT = $01
SERDAT = $FD8D
SDONEACK = $FD90
CPUSLEEP = $FD91

View File

@ -505,4 +505,12 @@ OPC_ISC_aby = $FB
OPC_NOP_abx = $FC
OPC_ISC_abx = $FF
.if (.cpu .bitand ::CPU_ISET_6502DTV)
OPC_BRA = $12
OPC_SAC_imm = $32
OPC_SIR_imm = $42
.endif
.endif

View File

@ -50,7 +50,6 @@ PET_2000 = $CA
PET_3000 = $FC
PET_4000 = $FD
;----------------------------------------------------------------------------
; Vector and other locations
@ -59,7 +58,25 @@ BRKVec := $0092
NMIVec := $0094
; ---------------------------------------------------------------------------
; I/O: 6522 VIA2
; I/O: 6520 PIA1
PIA1 := $E810 ; PIA1 base address
PIA1_PORTA := PIA1+$0 ; Port A (PA) and data direction register A (DDRA)
PIA1_PACTL := PIA1+$1 ; Port A control register (CRA)
PIA1_PORTB := PIA1+$2 ; Port B (PB) and data direction register B (DDRB)
PIA1_PBCTL := PIA1+$3 ; Port B control register (CRB)
; ---------------------------------------------------------------------------
; I/O: 6520 PIA2
PIA2 := $E820 ; PIA2 base address
PIA2_PORTA := PIA2+$0 ; Port A (PA) and data direction register A (DDRA)
PIA2_PACTL := PIA2+$1 ; Port A control register (CRA)
PIA2_PORTB := PIA2+$2 ; Port B (PB) and data direction register B (DDRB)
PIA2_PBCTL := PIA2+$3 ; Port B control register (CRB)
; ---------------------------------------------------------------------------
; I/O: 6522 VIA
VIA := $E840 ; VIA base address
VIA_PB := VIA+$0 ; Port register B

View File

@ -10,6 +10,7 @@ TMPPTR := $22 ; Temporary ptr used by BASIC
VARTAB := $2D ; Pointer to start of BASIC variables
MEMSIZE := $37 ; Pointer to highest BASIC RAM location (+1)
TXTPTR := $3B ; Pointer into BASIC source code
STATUS := $90 ; Kernal I/O completion status
TIME := $A3 ; 60HZ clock
FNAM_LEN := $AB ; Length of filename
LFN := $AC ; Logical file number

97
asminc/rp6502.inc Normal file
View File

@ -0,0 +1,97 @@
; Picocomputer 6502 general defines
; RIA UART
RIA_READY := $FFE0 ; TX=$80 RX=$40
RIA_TX := $FFE1
RIA_RX := $FFE2
; VSYNC from PIX VGA
RIA_VSYNC := $FFE3
; RIA XRAM portal 0
RIA_RW0 := $FFE4
RIA_STEP0 := $FFE5
RIA_ADDR0 := $FFE6
; RIA XRAM portal 1
RIA_RW1 := $FFE8
RIA_STEP1 := $FFE9
RIA_ADDR1 := $FFEA
; RIA OS fastcall
RIA_XSTACK := $FFEC
RIA_ERRNO := $FFED
RIA_OP := $FFEF
RIA_IRQ := $FFF0
RIA_SPIN := $FFF1
RIA_BUSY := $FFF2 ; Bit $80
RIA_A := $FFF4
RIA_X := $FFF6
RIA_SREG := $FFF8
; RIA OS operation numbers
RIA_OP_EXIT := $FF
RIA_OP_ZXSTACK := $00
RIA_OP_XREG := $01
RIA_OP_PHI2 := $02
RIA_OP_CODEPAGE := $03
RIA_OP_LRAND := $04
RIA_OP_STDIN_OPT := $05
RIA_OP_CLOCK_GETRES := $10
RIA_OP_CLOCK_GETTIME := $11
RIA_OP_CLOCK_SETTIME := $12
RIA_OP_CLOCK_GETTIMEZONE := $13
RIA_OP_OPEN := $14
RIA_OP_CLOSE := $15
RIA_OP_READ_XSTACK := $16
RIA_OP_READ_XRAM := $17
RIA_OP_WRITE_XSTACK := $18
RIA_OP_WRITE_XRAM := $19
RIA_OP_LSEEK := $1A
RIA_OP_UNLINK := $1B
RIA_OP_RENAME := $1C
; 6522 VIA
VIA := $FFD0 ; VIA base address
VIA_PB := VIA+$0 ; Port register B
VIA_PA1 := VIA+$1 ; Port register A
VIA_PRB := VIA+$0 ; *** Deprecated ***
VIA_PRA := VIA+$1 ; *** Deprecated ***
VIA_DDRB := VIA+$2 ; Data direction register B
VIA_DDRA := VIA+$3 ; Data direction register A
VIA_T1CL := VIA+$4 ; Timer 1, low byte
VIA_T1CH := VIA+$5 ; Timer 1, high byte
VIA_T1LL := VIA+$6 ; Timer 1 latch, low byte
VIA_T1LH := VIA+$7 ; Timer 1 latch, high byte
VIA_T2CL := VIA+$8 ; Timer 2, low byte
VIA_T2CH := VIA+$9 ; Timer 2, high byte
VIA_SR := VIA+$A ; Shift register
VIA_CR := VIA+$B ; Auxiliary control register
VIA_PCR := VIA+$C ; Peripheral control register
VIA_IFR := VIA+$D ; Interrupt flag register
VIA_IER := VIA+$E ; Interrupt enable register
VIA_PA2 := VIA+$F ; Port register A w/o handshake
; Values in ___oserror are the union of these FatFs errors and errno.inc
.enum
FR_OK = 32 ; Succeeded
FR_DISK_ERR ; A hard error occurred in the low level disk I/O layer
FR_INT_ERR ; Assertion failed
FR_NOT_READY ; The physical drive cannot work
FR_NO_FILE ; Could not find the file
FR_NO_PATH ; Could not find the path
FR_INVALID_NAME ; The path name format is invalid
FR_DENIED ; Access denied due to prohibited access or directory full
FR_EXIST ; Access denied due to prohibited access
FR_INVALID_OBJECT ; The file/directory object is invalid
FR_WRITE_PROTECTED ; The physical drive is write protected
FR_INVALID_DRIVE ; The logical drive number is invalid
FR_NOT_ENABLED ; The volume has no work area
FR_NO_FILESYSTEM ; There is no valid FAT volume
FR_MKFS_ABORTED ; The f_mkfs() aborted due to any problem
FR_TIMEOUT ; Could not get a grant to access the volume within defined period
FR_LOCKED ; The operation is rejected according to the file sharing policy
FR_NOT_ENOUGH_CORE ; LFN working buffer could not be allocated
FR_TOO_MANY_OPEN_FILES ; Number of open files > FF_FS_LOCK
FR_INVALID_PARAMETER ; Given parameter is invalid
.endenum

View File

@ -7,7 +7,7 @@
;* *
;* *
;*(C) 2003-2006, Ullrich von Bassewitz *
;* Römerstrasse 52 *
;* Roemerstrasse 52 *
;* D-70794 Filderstadt *
;*EMail: uz@cc65.org *
;* *

View File

@ -49,8 +49,8 @@ SIGCOUNT = 6 ; Number of signals
.global sigtable
; Function declarations
.global __sig_ign
.global __sig_dfl
.global ___sig_ign
.global ___sig_dfl
.global _signal
.global _raise

64
asminc/stat.inc Normal file
View File

@ -0,0 +1,64 @@
;****************************************************************************
;* *
;* stat.inc *
;* *
;* Stat struct *
;* *
;* *
;* *
;*(C) 2023 Colin Leroy-Mira <colin@colino.net> *
;* *
;* *
;*This software is provided 'as-is', without any expressed or implied *
;*warranty. In no event will the authors be held liable for any damages *
;*arising from the use of this software. *
;* *
;*Permission is granted to anyone to use this software for any purpose, *
;*including commercial applications, and to alter it and redistribute it *
;*freely, subject to the following restrictions: *
;* *
;*1. The origin of this software must not be misrepresented; you must not *
;* claim that you wrote the original software. If you use this software *
;* in a product, an acknowledgment in the product documentation would be *
;* appreciated but is not required. *
;*2. Altered source versions must be plainly marked as such, and must not *
;* be misrepresented as being the original software. *
;*3. This notice may not be removed or altered from any source *
;* distribution. *
;* *
;****************************************************************************
.include "time.inc"
;------------------------------------------------------------------------------
; st_mode values
S_IFDIR = $01
S_IFREG = $02
;------------------------------------------------------------------------------
; struct stat
.struct stat
st_dev .dword
st_ino .dword
st_mode .byte
st_nlink .dword
st_uid .byte
st_gid .byte
st_size .dword
st_atim .tag timespec
st_ctim .tag timespec
st_mtim .tag timespec
.ifdef __APPLE2__
st_access .byte
st_type .byte
st_auxtype .word
st_storagetype .byte
st_blocks .word
st_mod_date .word
st_mod_time .word
st_create_date .word
st_create_time .word
.endif
.endstruct

46
asminc/statvfs.inc Normal file
View File

@ -0,0 +1,46 @@
;****************************************************************************
;* *
;* statvfs.inc *
;* *
;* Statvfs struct *
;* *
;* *
;* *
;*(C) 2023 Colin Leroy-Mira <colin@colino.net> *
;* *
;* *
;*This software is provided 'as-is', without any expressed or implied *
;*warranty. In no event will the authors be held liable for any damages *
;*arising from the use of this software. *
;* *
;*Permission is granted to anyone to use this software for any purpose, *
;*including commercial applications, and to alter it and redistribute it *
;*freely, subject to the following restrictions: *
;* *
;*1. The origin of this software must not be misrepresented; you must not *
;* claim that you wrote the original software. If you use this software *
;* in a product, an acknowledgment in the product documentation would be *
;* appreciated but is not required. *
;*2. Altered source versions must be plainly marked as such, and must not *
;* be misrepresented as being the original software. *
;*3. This notice may not be removed or altered from any source *
;* distribution. *
;* *
;****************************************************************************
;------------------------------------------------------------------------------
; struct statvfs
.struct statvfs
f_bsize .dword
f_frsize .dword
f_blocks .dword
f_bfree .dword
f_bavail .dword
f_files .dword
f_ffree .dword
f_favail .dword
f_fsid .dword
f_flag .dword
f_namemax .dword
.endstruct

View File

@ -7,7 +7,7 @@
;* */
;* */
;* (C) 2003-2005, Ullrich von Bassewitz */
;* Römerstrasse 52 */
;* Roemerstrasse 52 */
;* D-70794 Filderstadt */
;* EMail: uz@cc65.org */
;* */
@ -44,7 +44,9 @@ EOF = -1
.if .defined(__APPLE2__)
FILENAME_MAX = 64+1
.elseif .defined(__ATARI__)
FILENAME_MAX = 12+1
FILENAME_MAX = 63+1
.elseif .defined(__CBM__)
FILENAME_MAX = 255
.elseif .defined(__LUNIX__)
FILENAME_MAX = 80+1
.elseif .defined(__TELESTRAT__)

186
asminc/sym1.inc Normal file
View File

@ -0,0 +1,186 @@
; ---------------------------------------------------------------------------
;
; SYM-1 definitions
;
; ---------------------------------------------------------------------------
RAMSTART := $0200 ; Entry point
; ---------------------------------------------------------------------------
; Monitor Functions
; ---------------------------------------------------------------------------
WARM := $8003 ; Monitor entry
SVNMI := $809B ; Save NMI entry
INBYTE := $81D9 ; Get two HEX characters and pack
ASCNIB := $8275 ; Test for carriage-return
INCCMP := $82B2 ; Increment pointer
CHKSAD := $82DD ; Compute checksum
OUTPC := $82EE ; Display program counter
OUTBYT := $82FA ; Print byte as two ASCII characters
OUTS2 := $8319 ; Print pointer
INSTAT := $8386 ; Determine if key is pressed
GETKEY := $88AF ; Get key (disregarding monitor login)
SCAND := $8906 ; Flash LED display (once)
KEYQ := $8923 ; Test for keypress
BEEP := $8972 ; Make a beep
CONFIG := $89A5 ; Configure I/O
OUTDSP := $89C1 ; Output to on-board LED display
INCHR := $8A1B ; Input character and convert to uppercase
OUTCHR := $8A47 ; Output character
INTCHR := $8A58 ; Input character without case conversion
DLYF := $8AE6 ; Delay 1 bit time
DLYH := $8AE9 ; Delay 1/2 bit time
RESET := $8B4A ; Hard reset
ACCESS := $8B86 ; Unlock lowest 4K memory
NACCES := $8B9C ; Lock lowest 4K memory
L8C78 := $8C78 ; Link to tape
DUMPT := $8E87 ; Dump memory to tape
LOADT := $8C78 ; Load memory from tape
TAPEMODE := $00FD ; Top bit on for high-speed
; ---------------------------------------------------------------------------
; System Memory
; ---------------------------------------------------------------------------
DISBUF := $A640 ; On-Board Display Buffer
DISBUF0 := $A640 ; Left-Most digit
DISBUF1 := $A641 ; Second digit
DISBUF2 := $A642 ; Third
DISBUF3 := $A643 ; Fourth
DISBUF4 := $A644 ; Fifth
DISBUF5 := $A645 ; Sixth and right-most digit
DISBUF6 := $A646 ; Not-used / right of display (shift buffer)
RDIG := $A645 ; Right-most digit (same as DISBUF5)
P3L := $A64A ; Parameter 3 (low-byte)
P3H := $A64B ; (high-byte)
P2L := $A64C ; Parameter 2
P2H := $A64D ;
P1L := $A64E ; Parameter 1
P1H := $A64F
PARNR := $A649 ; Number of Parameters Entered
PADBIT := $A650 ; Pad Bits for Carriage Return
SDBYT := $A651 ; Baud Rate for RS232 (01-4800,06-2400,10-1200,24-600,4C-300,D5-110)
ERCNT := $A652 ; Error Count (Max FF)
TECHO := $A653 ; Terminal Echo (bit-7=ECHO/NO, 6=CTL-O TOGGLE)
TOUTFL := $A654 ; Output Flags (bit-7=CRT IN, 6=TTY IN, 5=TTY OUT, 4=CRT OUT)
KSHFL := $A655 ; Keyboard Shift Flag
TV := $A656 ; Trace Velocity (0=Single Step)
LSTCOM := $A657 ; Last Monitor Command
MAXRC := $A658 ; Maximum Record Length for Memory Dump
; ---------------------------------------------------------------------------
; Register Followers
; ---------------------------------------------------------------------------
PCLR := $A659 ; Program Counter (low-byte)
PCHR := $A65A ; (high-byte)
SR := $A65B ; Stack Pointer
FR := $A65C ; Status Register Flags
AR := $A65D ; A Register
XR := $A65E ; X Register
YR := $A65F ; Y Register
; ---------------------------------------------------------------------------
; I/O Vectors (3 bytes each)
; ---------------------------------------------------------------------------
INVEC := $A660 ; Input Character
OUTVEC := $A663 ; Output Character
INSVEC := $A666 ; Input Status
URSVEC := $A669 ; Unrecognized Syntax
URCVEC := $A66C ; Unrecognized Command / Error
SCNVEC := $A66F ; Scan On-board Display
; ---------------------------------------------------------------------------
; Trace and Interrupt Vectors (2 bytes each)
; ---------------------------------------------------------------------------
EXEVEC := $A672 ; Exec and Alternate InVec
TRCVEC := $A674 ; Trace
UBRKVC := $A676 ; User Break after Monitor
UIRQVC := $A678 ; User non-break IRQ after Monitor
NMIVEC := $A67A ; Non-Maskable Interrupt
RSTVEC := $A67C ; Reset
IRQVEC := $A67E ; Interrupt Request
; ---------------------------------------------------------------------------
; I/O Registers
; ---------------------------------------------------------------------------
;
; 6532 (U27)
;
PADA := $A400 ; Keyboard / Display
P3DA := $A402 ; Serial I/O
DDPADA := $A401 ; Data-Direction Register for PADA
DDP3DA := $A403 ; Data-Direction Register for P3DA
WEDRTA := $A404 ; Write-Edge Detect Read Timer A
WEDRFA := $A405 ; Write-Edge Detect Read-Int Flags A
WEDRTB := $A406 ; Write-Edge Detect Read Timer B
WEDRFB := $A407 ; Write-Edge Detect Read-Int Flags B
TIM0001 := $A41C ; Timer / 1
TIM0008 := $A41D ; Timer / 8
TIM0064 := $A41E ; Timer / 64
TIM1024 := $A41F ; Timer / 1024
;
; 6522 (U25)
;
OR1A := $A001 ; Input / Output Register for 1A
DDR1A := $A003 ; Data-Direction Register for 1A
OR1B := $A000 ; Input / Output Register for 1B
DDR1B := $A002 ; Data-Direction Register for 1B
TIC1L := $A004 ;
TIC1H := $A005 ;
TIL1L := $A006 ;
TIL1H := $A007 ;
T2L1L := $A008 ;
T2C1L := $A008 ;
T2C1H := $A009 ;
SR1 := $A00A ;
ACR1 := $A00B ;
PCR1 := $A00C ;
IFR1 := $A00D ;
IER1 := $A00E ;
DR1A := $A00F ;
;
; 6522 (U28)
;
OR2A := $A801 ; Input / Output Register for 2A
DDR2A := $A803 ; Data-Direction Register for 2A
OR2B := $A800 ; Input / Output Register for 2B
DDR2B := $A802 ; Data-Direction Register for 2B
TIC2L := $A804 ;
TIC2H := $A805 ;
TIL2L := $A806 ;
TIL2H := $A807 ;
T2L2L := $A808 ;
T2C2L := $A808 ;
T2C2H := $A809 ;
SR2 := $A80A ;
ACR2 := $A80B ;
PCR2 := $A80C ;
IFR2 := $A80D ;
IER2 := $A80E ;
DR2A := $A80F ;
;
; 6522 (U29)
;
OR3A := $AC01 ; Write-Protect RAM, Debug On/Off, I/O-3A
DDR3A := $AC03 ; Data-Direction Register for 3A
OR3B := $AC00 ; Input / Output Register for 3B
DDR3B := $AC02 ; Data-Direction Register for 3B
TIC3L := $AC04 ;
TIC3H := $AC05 ;
TIL3L := $AC06 ;
TIL3H := $AC07 ;
T2L3L := $AC08 ;
T2C3L := $AC08 ;
T2C3H := $AC09 ;
SR3 := $AC0A ;
ACR3 := $AC0B ;
PCR3 := $AC0C ;
IFR3 := $AC0D ;
IER3 := $AC0E ;
DR3A := $AC0F ;

View File

@ -1,7 +1,7 @@
;
; Oric TELEMON definition
; TELEMON 2.4 & TELEMON 3.x
; For TELEMON 3.x check http://orix.oric.org
; TELEMON 2.4 & Orix
; For Orix check http://orix.oric.org
;
; ---------------------------------------------------------------------------
@ -48,33 +48,33 @@ TR7 := $13
DEFAFF := $14
IRQSVA := $21 ; Used to save A when a BRK call occurs
IRQSVX := $22 ; Used to save X when a BRK call occurs
IRQSVY := $23 ; Used to save Y when a BRK call occurs
IRQSVP := $24 ; Used to save P when a BRK call occurs
IRQSVA := $21 ; Used to save A when a BRK call occurs
IRQSVX := $22 ; Used to save X when a BRK call occurs
IRQSVY := $23 ; Used to save Y when a BRK call occurs
IRQSVP := $24 ; Used to save P when a BRK call occurs
ADSCR := $26
SCRNB := $28 ; Id of the current window
SCRNB := $28 ; Id of the current window
ADKBD := $2A ; Address ASCII conversion table
ADKBD := $2A ; Address ASCII conversion table
PTR_READ_DEST := $2C ; Used for XFREAD and XWRITE only in TELEMON 3.x
PTR_READ_DEST := $2C ; Used for XFREAD and XWRITE only in Orix
ADCLK := $40 ; Address for clock display
ADCLK := $40 ; Address for clock display
TIMEUS := $42
TIMEUD := $44
TIMEUD := $44 ; Counter clock (1/10 of a second)
HRSX := $46
HRSY := $47
XLPRBI := $48 ; Printer flag (b7)
XLPRBI := $48 ; Printer flag (b7)
HRSX40 := $49
HRSX6 := $4A
ADHRS := $4B ; Hires screen address (word)
ADHRS := $4B ; Hires screen address (word)
HRS1 := $4D
HRS2 := $4F
@ -249,19 +249,22 @@ XHIRES = $1A
XEFFHI = $1B ; Clear hires screen
XFILLM = $1C
XMINMA = $1F
XVARS = $24 ; Only in TELEMON 3.x, in TELEMON 2.4, it's XNOMFI ($24)
XVARS = $24 ; Only in Orix, in TELEMON 2.4, it's XNOMFI ($24)
XCRLF = $25 ; Jump a line and return to the beginning of the line
XDECAY = $26
XFREAD = $27 ; Only in TELEMON 3.x (bank 7 of Orix)
XFREAD = $27 ; Only in Orix
XBINDX = $28 ; Convert a number into hex and displays on channel 0
XDECIM = $29
XHEXA = $2A ; Convert a number into hex
XMAINARGS = $2C ; Only available for Orix
XEDT = $2D ; Launch editor
XINSER = $2E
XGETARGV = $2E ; Only available for Orix
XSCELG = $2F ; Search a line in editor mode
XOPEN = $30 ; Only in TELEMON 3.x (bank 7 of Orix)
XOPEN = $30 ; Only in Orix
XECRPR = $33 ; Displays prompt
XCOSCR = $34 ; Switch off cursor
XCSSCR = $35 ; Switch on cursor
@ -269,14 +272,17 @@ XSCRSE = $36
XSCROH = $37 ; Scroll up text screen
XSCROB = $38 ; Scroll down text screen
XSCRNE = $39 ; Load charset from rom to ram
XCLOSE = $3A ; Only in TELEMON 3.x close file (bank 7 of Orix)
XFWRITE = $3B ; Only in TELEMON 3.x write file (bank 7 of Orix)
XCLOSE = $3A ; Only in Orix close file
XFWRITE = $3B ; Only in Orix write file
; Clock primitive
XRECLK = $3C ; Reset clock
XCLCL = $3D ; Close clock
XWRCLK = $3E ; Displays clock in the adress in A & Y registers
XWRCLK = $3E ; Displays clock in the address in A & Y registers
XFSEEK = $3F ; Only in Orix
; Sound primitives
XSONPS = $40 ; Send data to PSG register (14 values)
XOUPS = $42 ; Send Oups sound into PSG
XPLAY = $43 ; Play a sound
@ -284,10 +290,25 @@ XSOUND = $44
XMUSIC = $45
XZAP = $46 ; Send Zap sound to PSG
XSHOOT = $47
XMKDIR = $4B ; Create a folder. Only available in TELEMON 3.x (bank 7 of Orix)
XRM = $4D ; Remove a folder or a file. Only available in TELEMON 3.x (bank 7 of Orix)
XFWR = $4E ; Put a char on the first screen. Only available in TELEMON 3.x (bank 7 of Orix)
XGOKBD = $52
; Path Management
XGETCWD = $48 ; Get current CWD
XPUTCWD = $49 ; Chdir
; File management
XMKDIR = $4B ; Create a folder. Only available in Orix
XHCHRS = $4C ; Hard copy hires
; File management
XRM = $4D ; Remove a folder or a file. Only available in Orix
XFWR = $4E ; Put a char on the first screen. Only available in Orix
; Keyboard primitives
XALLKB = $50 ; Read Keyboard, and populate KBDCOL
XKBDAS = $51 ; Ascii conversion
XGOKBD = $52 ; Swap keyboard type (Qwerty, French ...)
; Buffer management
XECRBU = $54 ; Write A or AY in the buffer
@ -298,9 +319,30 @@ XINIBU = $58 ; Initialize the buffer X
XDEFBU = $59 ; Reset all value of the buffer
XBUSY = $5A ; Test if the buffer is empty
XMALLOC = $5B ; Only in TELEMON 3.x (bank 7 of Orix)
XFREE = $62 ; Only in TELEMON 3.x (bank 7 of Orix)
XSOUT = $67 ; Send accumulator value (A) to RS232, available in TELEMON 2.4 & 3.x : if RS232 buffer is full, the Oric Telestrat freezes
XMALLOC = $5B ; Only in Orix
; RS232 primitives
XSDUMP = $5C ; RS232 input dump
XCONSO = $5D ; Swap screen into RS232 terminal
XSLOAD = $5E ; Read a file from RS232
XSSAVE = $5F ; Write a file to RS232
; Minitel primitives
XMLOAD = $60 ; Read a file from Minitel
XMSAVE = $61 ; Write a file to Minitel
XFREE = $62 ; Only in Orix
XEXEC = $63 ; Only in Orix
; Next Minitel primitives
XWCXFI = $63 ; Wait connection
XLIGNE = $64 ;
XDECON = $65 ; Minitel disconnection
XMOUT = $66 ; Send a byte to minitel (from A)
XSOUT = $67 ; Send accumulator value (A) to RS232, available in TELEMON 2.4 : if RS232 buffer is full, the Oric Telestrat freezes
XHRSSE = $8C ; Set hires position cursor
XDRAWA = $8D ; Draw a line absolute
XDRAWR = $8E ; Draw a line (relative)
@ -324,7 +366,7 @@ PWD_PTR = $00
; ---------------------------------------------------------------------------
;
BUFTRV := $100
BUFTRV := $100
; ---------------------------------------------------------------------------
@ -337,7 +379,7 @@ FLGTEL := $20D
KOROM := $20E ; Used to compute the size of all rom bank. The result is store here. The value is in KB
KORAM := $20F ; Used to compute the size of all ram bank. The result is store here. The value is in KB
; Time management
TIMED := $210
TIMED := $210 ; Clock (1/10 of seconds)
TIMES := $211
TIMEM := $212
TIMEH := $213

View File

@ -7,7 +7,7 @@
;/* */
;/* */
;/* (C) 2003 Ullrich von Bassewitz */
;/* Römerstrasse 52 */
;/* Roemerstrasse 52 */
;/* D-70794 Filderstadt */
;/* EMail: uz@cc65.org */
;/* */

View File

@ -1,14 +1,14 @@
;
; Vic20 generic definitions. Stolen mostly from c64.inc - Steve Schmidtke
; VIC-20 generic definitions. Stolen mostly from c64.inc -- Steve Schmidtke
;
; ---------------------------------------------------------------------------
; Zero page, Commodore stuff
VARTAB := $2D ; Pointer to start of BASIC variables
MEMSIZE := $37 ; Pointer to highest BASIC RAM location (+1)
TXTPTR := $7A ; Pointer into BASIC source code
STATUS := $90 ; Kernal I/O completion status
TIME := $A0 ; 60HZ clock
FNAM_LEN := $B7 ; Length of filename
SECADR := $B9 ; Secondary address
@ -35,6 +35,8 @@ KBDREPEAT := $28a
KBDREPEATRATE := $28b
KBDREPEATDELAY := $28c
RSSTAT := $297 ; RS-232 device driver status
; ---------------------------------------------------------------------------
; Screen size
@ -88,7 +90,7 @@ VIA1_T1LH := VIA1+$7 ; Timer 1 latch, high byte
VIA1_T2CL := VIA1+$8 ; Timer 2, low byte
VIA1_T2CH := VIA1+$9 ; Timer 2, high byte
VIA1_SR := VIA1+$A ; Shift register
VIA1_CR := VIA1+$B ; Auxiliary control register
VIA1_ACR := VIA1+$B ; Auxiliary control register
VIA1_PCR := VIA1+$C ; Peripheral control register
VIA1_IFR := VIA1+$D ; Interrupt flag register
VIA1_IER := VIA1+$E ; Interrupt enable register
@ -110,7 +112,7 @@ VIA2_T1LH := VIA2+$7 ; Timer 1 latch, high byte
VIA2_T2CL := VIA2+$8 ; Timer 2, low byte
VIA2_T2CH := VIA2+$9 ; Timer 2, high byte
VIA2_SR := VIA2+$A ; Shift register
VIA2_CR := VIA2+$B ; Auxiliary control register
VIA2_ACR := VIA2+$B ; Auxiliary control register
VIA2_PCR := VIA2+$C ; Peripheral control register
VIA2_IFR := VIA2+$D ; Interrupt flag register
VIA2_IER := VIA2+$E ; Interrupt enable register

View File

@ -23,11 +23,11 @@ SEGMENTS {
EXEHDR: load = HEADER, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
HGR: load = MAIN, type = rw, optional = yes, start = $2000;
CODE: load = MAIN, type = ro start = $4000;
HGR: load = MAIN, type = rw, start = $2000;
CODE: load = MAIN, type = ro start = $4000;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;

View File

@ -43,7 +43,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;

View File

@ -22,7 +22,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;

View File

@ -26,7 +26,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;

View File

@ -23,11 +23,11 @@ SEGMENTS {
EXEHDR: load = HEADER, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
HGR: load = MAIN, type = rw, optional = yes, start = $2000;
CODE: load = MAIN, type = ro start = $4000;
HGR: load = MAIN, type = rw, start = $2000;
CODE: load = MAIN, type = ro start = $4000;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;

View File

@ -43,7 +43,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;

View File

@ -22,7 +22,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;

View File

@ -26,7 +26,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;

View File

@ -52,7 +52,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;

View File

@ -36,7 +36,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {

View File

@ -40,7 +40,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro;
}

68
cfg/atari7800.cfg Normal file
View File

@ -0,0 +1,68 @@
# Atari VCS 7800 linker configuration file for cc65
# In order to add the a78 header to the build you can add
# "--force-import __EXEHDR__" to the command line
SYMBOLS {
__STACKSIZE__: type = weak, value = $0600; # C stack
__CARTSIZE__: type = weak, value = $8000;
__VEC_BOTTOM__: value = $fffa, type = export;
__VEC_SIZE__: value = $6, type = export;
__ENCRYPT_BOTTOM__: value = $ff7a, type = export;
__ENCRYPT_SIZE__: value = $80, type = export;
__MEMORY_TOP__: value = __ENCRYPT_BOTTOM__, type = export;
__INIT_SIZE__: value = 156, type = export;
__MEMORY_INIT__: value = __MEMORY_TOP__ - __INIT_SIZE__, type = export;
__MEMORY_BOTTOM__: value = $10000 - __CARTSIZE__, type = weak;
__FREE_ROM_SIZE__: value = __MEMORY_INIT__ - __MEMORY_BOTTOM__, type = export;
}
MEMORY {
ZP: file = "", define = yes, start = $0040, size = $00C0, type = rw;
SP: file = "", define = yes, start = $0140, size = $00C0, type = rw;
RAM1: file = "", define = yes, start = $1800, size = $0840, type = rw;
RAM2: file = "", define = yes, start = $2100, size = $0040, type = rw;
RAM3: file = "", define = yes, start = $2200, size = $0600, type = rw;
# For emulators you also need a header file
HEADER: file = %O, start = $0000, size = 128;
# "Normal" cartridge rom. Multiple banks arent supported
# by this script. You may change the rom size, but keep
# two things in mind:
# - start must be a multiple of $1000
# - ROM must end at $ff79
ROM: file = %O, define = yes, start = __MEMORY_BOTTOM__, size = __FREE_ROM_SIZE__, type = ro, fill = yes, fillval = $ff;
ROMS: file = %O, define = yes, start = __MEMORY_INIT__, size = __INIT_SIZE__, type = ro, fill = yes, fillval = $ff;
# Encryption stuff
ROME: file = %O, start = __ENCRYPT_BOTTOM__, size = __ENCRYPT_SIZE__, type = ro, fill = yes, fillval = $ff;
# Interrupt vectors
ROMV: file = %O, start = __VEC_BOTTOM__, size = __VEC_SIZE__, type = ro, fill = yes, fillval = $ff;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro, optional = yes;
STARTUP: load = ROMS, type = ro, define = yes;
ONCE: load = ROMS, type = ro, define = yes;
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define = yes, align = 256;
DATA: load = ROM, run = RAM1, type = rw, define = yes;
BSS: load = RAM1, type = bss, define = yes;
VECTORS: load = ROMV, type = ro, define = yes;
ENCRYPTION: load = ROME, type = ro define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

View File

@ -8,39 +8,40 @@ FEATURES {
}
SYMBOLS {
__EXEHDR__: type = import;
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__CHARGENSIZE__: type = weak, value = $0400;
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
ZP: file = "", define = yes, start = $0082, size = $007E;
# just $FFFF
HEADER: file = %O, start = $0000, size = $0002;
HEADER: file = %O, start = $0000, size = $0002;
# "system check" load chunk
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
# "shadow RAM preparation" load chunk
SRPREPHDR: file = %O, start = $0000, size = $0004;
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPTRL: file = %O, start = $0000, size = $0006;
SRPREPHDR: file = %O, start = $0000, size = $0004;
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPTRL: file = %O, start = $0000, size = $0006;
# "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004;
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
MAINHDR: file = %O, start = $0000, size = $0004;
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
# defines entry point into program
TRAILER: file = %O, start = $0000, size = $0006;
TRAILER: file = %O, start = $0000, size = $0006;
# address of relocated character generator
CHARGEN: file = "", define = yes, start = $D800, size = $0400;
CHARGEN: file = "", define = yes, start = $D800, size = __CHARGENSIZE__;
# memory beneath the ROM
HIDDEN_RAM: file = "", define = yes, start = $DC00, size = $FFFA - $DC00;
HIDDEN_RAM: file = "", define = yes, start = $D800 + __CHARGENSIZE__, size = $FFFA - $D800 - __CHARGENSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
@ -53,7 +54,7 @@ SEGMENTS {
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
SRPREPHDR: load = SRPREPHDR, type = ro;
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, not zero initialized
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and MAIN, not zero initialized
SRPREP: load = SRPREPCHNK, type = rw, define = yes;
SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
@ -66,7 +67,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro;
}

View File

@ -3,44 +3,45 @@ FEATURES {
}
SYMBOLS {
__EXEHDR__: type = import;
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__CHARGENSIZE__: type = weak, value = $0400;
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
ZP: file = "", define = yes, start = $0082, size = $007E;
# just $FFFF
HEADER: file = %O, start = $0000, size = $0002;
HEADER: file = %O, start = $0000, size = $0002;
# "system check" load chunk
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
# "shadow RAM preparation" load chunk
SRPREPHDR: file = %O, start = $0000, size = $0004;
SRPREPCHNK: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = $7C20 - %S - __OVERLAYSIZE__ - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPTRL: file = %O, start = $0000, size = $0006;
SRPREPHDR: file = %O, start = $0000, size = $0004;
SRPREPCHNK: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = $7C20 - %S - __OVERLAYSIZE__ - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPTRL: file = %O, start = $0000, size = $0006;
# "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004;
MAINHDR: file = %O, start = $0000, size = $0004;
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__ +
__LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __OVERLAYSIZE__ - __LOWBSS_SIZE__;
__LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __OVERLAYSIZE__ - __LOWBSS_SIZE__;
# defines entry point into program
TRAILER: file = %O, start = $0000, size = $0006;
TRAILER: file = %O, start = $0000, size = $0006;
# memory beneath the ROM preceeding the character generator
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
# address of relocated character generator (same addess as ROM version)
CHARGEN: file = "", define = yes, start = $E000, size = $0400;
CHARGEN: file = "", define = yes, start = $E000, size = __CHARGENSIZE__;
# memory beneath the ROM
HIDDEN_RAM: file = "", define = yes, start = $E400, size = $FFFA - $E400;
HIDDEN_RAM: file = "", define = yes, start = $E000 + __CHARGENSIZE__, size = $FFFA - $E000 - __CHARGENSIZE__;
# overlays
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
@ -64,7 +65,7 @@ SEGMENTS {
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
SRPREPHDR: load = SRPREPHDR, type = ro;
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, not zero initialized
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and MAIN, not zero initialized
SRPREP: load = SRPREPCHNK, type = rw, define = yes;
SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM2, type = rw, define = yes, optional = yes;
@ -77,7 +78,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro;

View File

@ -4,35 +4,36 @@ FEATURES {
STARTADDRESS: default = $2400;
}
SYMBOLS {
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STARTADDRESS__: type = export, value = %S;
__CHARGENSIZE__: type = weak, value = $0400;
__SYSCHKHDR__: type = export, value = 0; # Disable system check header
__SYSCHKTRL__: type = export, value = 0; # Disable system check trailer
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
ZP: file = "", define = yes, start = $0082, size = $007E;
# "system check" load chunk
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
# "shadow RAM preparation" load chunk
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
# "main program" load chunk
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
# memory beneath the ROM preceeding the character generator
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
# address of relocated character generator (same addess as ROM version)
CHARGEN: file = "", define = yes, start = $E000, size = $0400;
CHARGEN: file = "", define = yes, start = $E000, size = __CHARGENSIZE__;
# memory beneath the ROM
HIDDEN_RAM: file = "", define = yes, start = $E400, size = $FFFA - $E400;
HIDDEN_RAM: file = "", define = yes, start = $E000 + __CHARGENSIZE__, size = $FFFA - $E000 - __CHARGENSIZE__;
# UNUSED - hide
UNUSED: file = "", start = $0, size = $10;
UNUSED: file = "", start = $0, size = $10;
}
FILES {
%O: format = atari;
@ -47,7 +48,7 @@ SEGMENTS {
EXTZP: load = ZP, type = zp, optional = yes;
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, not zero initialized
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and MAIN, not zero initialized
SRPREP: load = SRPREPCHNK, type = rw, define = yes;
SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM2, type = rw, define = yes, optional = yes;
@ -57,7 +58,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
SRPREPHDR: load = UNUSED, type = ro;
SRPREPTRL: load = UNUSED, type = ro;

View File

@ -6,39 +6,40 @@ SYMBOLS {
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__CHARGENSIZE__: type = weak, value = $0400;
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
ZP: file = "", define = yes, start = $0082, size = $007E;
# just $FFFF
HEADER: file = %O, start = $0000, size = $0002;
HEADER: file = %O, start = $0000, size = $0002;
# "system check" load chunk
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
# "shadow RAM preparation" load chunk
SRPREPHDR: file = %O, start = $0000, size = $0004;
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPTRL: file = %O, start = $0000, size = $0006;
SRPREPHDR: file = %O, start = $0000, size = $0004;
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPTRL: file = %O, start = $0000, size = $0006;
# "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004;
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
MAINHDR: file = %O, start = $0000, size = $0004;
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
# defines entry point into program
TRAILER: file = %O, start = $0000, size = $0006;
TRAILER: file = %O, start = $0000, size = $0006;
# memory beneath the ROM preceeding the character generator
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
# address of relocated character generator (same addess as ROM version)
CHARGEN: file = "", define = yes, start = $E000, size = $0400;
CHARGEN: file = "", define = yes, start = $E000, size = __CHARGENSIZE__;
# memory beneath the ROM
HIDDEN_RAM: file = "", define = yes, start = $E400, size = $FFFA - $E400;
HIDDEN_RAM: file = "", define = yes, start = $E000 + __CHARGENSIZE__, size = $FFFA - $E000 - __CHARGENSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
@ -51,7 +52,7 @@ SEGMENTS {
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
SRPREPHDR: load = SRPREPHDR, type = ro;
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, not zero initialized
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and MAIN, not zero initialized
SRPREP: load = SRPREPCHNK, type = rw, define = yes;
SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM2, type = rw, define = yes, optional = yes;
@ -64,7 +65,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro;
}

View File

@ -23,7 +23,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
BASTAIL: load = MAIN, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;

20
cfg/c128-asm.cfg Normal file
View File

@ -0,0 +1,20 @@
FEATURES {
STARTADDRESS: default = $1c01;
}
SYMBOLS {
__LOADADDR__: type = import;
}
MEMORY {
ZP: file = "", start = $0002, size = $00FE, define = yes;
LOADADDR: file = %O, start = %S - 2, size = $0002;
MAIN: file = %O, start = %S, size = $D000 - %S;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, optional = yes, define = yes;
}

View File

@ -14,7 +14,7 @@ MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = %S - 2, size = $0002;
HEADER: file = %O, define = yes, start = %S, size = $000D;
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __HIMEM__ - __HEADER_LAST__;
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __OVERLAYSTART__ - __HEADER_LAST__;
BSS: file = "", start = __ONCE_RUN__, size = __OVERLAYSTART__ - __STACKSIZE__ - __ONCE_RUN__;
OVL1ADDR: file = "%O.1", start = __OVERLAYSTART__ - 2, size = $0002;
OVL1: file = "%O.1", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
@ -44,7 +44,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
BSS: load = BSS, type = bss, define = yes;
OVL1ADDR: load = OVL1ADDR, type = ro;

View File

@ -23,7 +23,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
BSS: load = BSS, type = bss, define = yes;
}

View File

@ -11,10 +11,10 @@ SEGMENTS {
ZP: load = ZP, type = zp, optional = yes;
VECTORS: load = ROM, run = RAM, type = rw, define = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes, start = $0204;
INIT: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes;
ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro;
INIT: load = ROM, type = ro;
RODATA: load = ROM, type = ro;
AUDIO: load = ROM, type = ro, optional = yes, start = $BF00;
SETUP: load = ROM, type = ro, start = $BFE8;

View File

@ -3,23 +3,28 @@ FEATURES {
}
SYMBOLS {
__LOADADDR__: type = import;
# Putting "-u __EXEHDR__" on cl65's command line will add a BASIC RUN stub to your program.
# __EXEHDR__: type = import;
__HIMEM__: type = weak, value = $9F00;
}
MEMORY {
ZP: file = "", start = $0022, size = $0080 - $0022, define = yes;
ZP2: file = "", start = $00A9, size = $0100 - $00A9;
LOADADDR: file = %O, start = %S - 2, size = $0002;
MAIN: file = %O, start = %S, size = __HIMEM__ - %S;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP2, type = zp, optional = yes; # OK if BASIC functions not used
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, define = yes;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -16,84 +16,80 @@ MEMORY {
HEADER: file = %O, define = yes, start = %S, size = $000D;
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __HIMEM__ - __HEADER_LAST__;
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __ONCE_RUN__ - __STACKSIZE__;
# BRAM00ADDR: file = "%O.00", start = __BANKRAMSTART__ - 2, size = $0002;
# BRAM00: file = "%O.00", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM01ADDR: file = "%O.01", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM01: file = "%O.01", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM01: file = "%O.01", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $01;
BRAM02ADDR: file = "%O.02", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM02: file = "%O.02", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM02: file = "%O.02", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $02;
BRAM03ADDR: file = "%O.03", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM03: file = "%O.03", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM03: file = "%O.03", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $03;
BRAM04ADDR: file = "%O.04", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM04: file = "%O.04", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM04: file = "%O.04", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $04;
BRAM05ADDR: file = "%O.05", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM05: file = "%O.05", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM05: file = "%O.05", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $05;
BRAM06ADDR: file = "%O.06", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM06: file = "%O.06", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM06: file = "%O.06", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $06;
BRAM07ADDR: file = "%O.07", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM07: file = "%O.07", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM07: file = "%O.07", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $07;
BRAM08ADDR: file = "%O.08", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM08: file = "%O.08", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM08: file = "%O.08", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $08;
BRAM09ADDR: file = "%O.09", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM09: file = "%O.09", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM0AADDR: file = "%O.0a", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0A: file = "%O.0a", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM0BADDR: file = "%O.0b", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0B: file = "%O.0b", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM0CADDR: file = "%O.0c", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0C: file = "%O.0c", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM0DADDR: file = "%O.0d", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0D: file = "%O.0d", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM0EADDR: file = "%O.0e", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0E: file = "%O.0e", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM0FADDR: file = "%O.0f", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0F: file = "%O.0f", start = __BANKRAMSTART__, size = __BANKRAMSIZE__;
BRAM09: file = "%O.09", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $09;
BRAM0AADDR: file = "%O.0A", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0A: file = "%O.0A", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $0A;
BRAM0BADDR: file = "%O.0B", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0B: file = "%O.0B", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $0B;
BRAM0CADDR: file = "%O.0C", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0C: file = "%O.0C", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $0C;
BRAM0DADDR: file = "%O.0D", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0D: file = "%O.0D", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $0D;
BRAM0EADDR: file = "%O.0E", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0E: file = "%O.0E", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $0E;
BRAM0FADDR: file = "%O.0F", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0F: file = "%O.0F", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $0F;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
BSS: load = BSS, type = bss, define = yes;
# BRAM00ADDR: load = BRAM00ADDR, type = ro, optional = yes;
# BANKRAM00: load = BRAM00, type = rw, define = yes, optional = yes;
BRAM01ADDR: load = BRAM01ADDR, type = ro, optional = yes;
BANKRAM01: load = BRAM01, type = rw, define = yes, optional = yes;
BRAM02ADDR: load = BRAM02ADDR, type = ro, optional = yes;
BANKRAM02: load = BRAM02, type = rw, define = yes, optional = yes;
BRAM03ADDR: load = BRAM03ADDR, type = ro, optional = yes;
BANKRAM03: load = BRAM03, type = rw, define = yes, optional = yes;
BRAM04ADDR: load = BRAM04ADDR, type = ro, optional = yes;
BANKRAM04: load = BRAM04, type = rw, define = yes, optional = yes;
BRAM05ADDR: load = BRAM05ADDR, type = ro, optional = yes;
BANKRAM05: load = BRAM05, type = rw, define = yes, optional = yes;
BRAM06ADDR: load = BRAM06ADDR, type = ro, optional = yes;
BANKRAM06: load = BRAM06, type = rw, define = yes, optional = yes;
BRAM07ADDR: load = BRAM07ADDR, type = ro, optional = yes;
BANKRAM07: load = BRAM07, type = rw, define = yes, optional = yes;
BRAM08ADDR: load = BRAM08ADDR, type = ro, optional = yes;
BANKRAM08: load = BRAM08, type = rw, define = yes, optional = yes;
BRAM09ADDR: load = BRAM09ADDR, type = ro, optional = yes;
BANKRAM09: load = BRAM09, type = rw, define = yes, optional = yes;
BRAM0AADDR: load = BRAM0AADDR, type = ro, optional = yes;
BANKRAM0A: load = BRAM0A, type = rw, define = yes, optional = yes;
BRAM0BADDR: load = BRAM0BADDR, type = ro, optional = yes;
BANKRAM0B: load = BRAM0B, type = rw, define = yes, optional = yes;
BRAM0CADDR: load = BRAM0CADDR, type = ro, optional = yes;
BANKRAM0C: load = BRAM0C, type = rw, define = yes, optional = yes;
BRAM0DADDR: load = BRAM0DADDR, type = ro, optional = yes;
BANKRAM0D: load = BRAM0D, type = rw, define = yes, optional = yes;
BRAM0EADDR: load = BRAM0EADDR, type = ro, optional = yes;
BANKRAM0E: load = BRAM0E, type = rw, define = yes, optional = yes;
BRAM0FADDR: load = BRAM0FADDR, type = ro, optional = yes;
BANKRAM0F: load = BRAM0F, type = rw, define = yes, optional = yes;
INIT: load = MAIN, type = rw, optional = yes; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
BSS: load = BSS, type = bss, define = yes;
BRAM01ADDR: load = BRAM01ADDR, type = ro, optional = yes;
BANKRAM01: load = BRAM01, type = rw, optional = yes, define = yes;
BRAM02ADDR: load = BRAM02ADDR, type = ro, optional = yes;
BANKRAM02: load = BRAM02, type = rw, optional = yes, define = yes;
BRAM03ADDR: load = BRAM03ADDR, type = ro, optional = yes;
BANKRAM03: load = BRAM03, type = rw, optional = yes, define = yes;
BRAM04ADDR: load = BRAM04ADDR, type = ro, optional = yes;
BANKRAM04: load = BRAM04, type = rw, optional = yes, define = yes;
BRAM05ADDR: load = BRAM05ADDR, type = ro, optional = yes;
BANKRAM05: load = BRAM05, type = rw, optional = yes, define = yes;
BRAM06ADDR: load = BRAM06ADDR, type = ro, optional = yes;
BANKRAM06: load = BRAM06, type = rw, optional = yes, define = yes;
BRAM07ADDR: load = BRAM07ADDR, type = ro, optional = yes;
BANKRAM07: load = BRAM07, type = rw, optional = yes, define = yes;
BRAM08ADDR: load = BRAM08ADDR, type = ro, optional = yes;
BANKRAM08: load = BRAM08, type = rw, optional = yes, define = yes;
BRAM09ADDR: load = BRAM09ADDR, type = ro, optional = yes;
BANKRAM09: load = BRAM09, type = rw, optional = yes, define = yes;
BRAM0AADDR: load = BRAM0AADDR, type = ro, optional = yes;
BANKRAM0A: load = BRAM0A, type = rw, optional = yes, define = yes;
BRAM0BADDR: load = BRAM0BADDR, type = ro, optional = yes;
BANKRAM0B: load = BRAM0B, type = rw, optional = yes, define = yes;
BRAM0CADDR: load = BRAM0CADDR, type = ro, optional = yes;
BANKRAM0C: load = BRAM0C, type = rw, optional = yes, define = yes;
BRAM0DADDR: load = BRAM0DADDR, type = ro, optional = yes;
BANKRAM0D: load = BRAM0D, type = rw, optional = yes, define = yes;
BRAM0EADDR: load = BRAM0EADDR, type = ro, optional = yes;
BANKRAM0E: load = BRAM0E, type = rw, optional = yes, define = yes;
BRAM0FADDR: load = BRAM0FADDR, type = ro, optional = yes;
BANKRAM0F: load = BRAM0F, type = rw, optional = yes, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -16,17 +16,17 @@ MEMORY {
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
BSS: load = BSS, type = bss, define = yes;
INIT: load = MAIN, type = rw, optional = yes; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

41
cfg/kim1-60k.cfg Normal file
View File

@ -0,0 +1,41 @@
# kim1-60k.cfg (4k)
#
# for expanded KIM-1
#
# ld65 --config kim1-60k.cfg -o <prog>.bin <prog>.o
FEATURES {
STARTADDRESS: default = $2000;
CONDES: segment = STARTUP,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = STARTUP,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__: type = weak, value = $0080; # 128 byte program stack
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = %O, define = yes, start = $0000, size = $00EE;
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
RAM: file = %O, define = yes, start = %S, size = $E000 - %S - __STACKSIZE__;
MAINROM: file = "", define = yes, start = $E000, size = $1000;
TOP: file = "", define = yes, start = $F000, size = $1000;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
STARTUP: load = RAM, type = ro, define = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes;
ONCE: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
}

41
cfg/kim1-mtu60k.cfg Normal file
View File

@ -0,0 +1,41 @@
# kim1-mtu60k.cfg (4k)
#
# for expanded KIM-1 w/ K-1008 Graphics and 60K RAM
#
# ld65 --config kim1-mtu60k.cfg -o <prog>.bin <prog>.o
FEATURES {
STARTADDRESS: default = $2000;
CONDES: segment = STARTUP,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = STARTUP,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__: type = weak, value = $0080; # 128 byte program stack
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = %O, define = yes, start = $0000, size = $00EE;
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
RAM: file = %O, define = yes, start = %S, size = $E000 - %S - __STACKSIZE__;
MAINROM: file = "", define = yes, start = $E000, size = $1000;
TOP: file = "", define = yes, start = $F000, size = $1000;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
STARTUP: load = RAM, type = ro, define = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes;
ONCE: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
}

41
cfg/kim1-mtuE000.cfg Normal file
View File

@ -0,0 +1,41 @@
# kim1-mtu60k.cfg (4k)
#
# for expanded KIM-1 w/ K-1008 Graphics and 60K RAM
#
# ld65 --config kim1-mtu60k.cfg -o <prog>.bin <prog>.o
FEATURES {
STARTADDRESS: default = $E000;
CONDES: segment = STARTUP,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = STARTUP,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__: type = weak, value = $0080; # 128 byte program stack
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = %O, define = yes, start = $0000, size = $00EE;
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
RAM: file = %O, define = yes, start = $2000, size = $E000 - $2000 - __STACKSIZE__;
MAINROM: file = "", define = yes, start = $E000, size = $1000;
TOP: file = "", define = yes, start = $F000, size = $1000;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
STARTUP: load = RAM, type = ro, define = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes;
ONCE: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
}

41
cfg/kim1.cfg Normal file
View File

@ -0,0 +1,41 @@
# kim1.cfg (4k)
#
# for unexpanded KIM-1
#
# ld65 --config kim1.cfg -o <prog>.bin <prog>.o
FEATURES {
STARTADDRESS: default = $0200;
CONDES: segment = STARTUP,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = STARTUP,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__: type = weak, value = $0080; # 128 byte program stack
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = %O, define = yes, start = $0000, size = $00EE;
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
RAM: file = %O, define = yes, start = %S, size = $1000 - %S - __STACKSIZE__;
MAINROM: file = "", define = yes, start = $E000, size = $1000;
TOP: file = "", define = yes, start = $F000, size = $1000;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
STARTUP: load = RAM, type = ro, define = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes;
ONCE: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
}

View File

@ -5,16 +5,17 @@ SYMBOLS {
__BANK1BLOCKSIZE__: type = weak, value = $0000; # bank 1 block size
__EXEHDR__: type = import;
__BOOTLDR__: type = import;
__DEFDIR__: type = import;
__UPLOADER__: type = import;
__UPLOADERSIZE__: type = export, value = $61;
__HEADERSIZE__: type = export, value = 64;
}
MEMORY {
ZP: file = "", define = yes, start = $0000, size = $0100;
HEADER: file = %O, start = $0000, size = $0040;
HEADER: file = %O, start = $0000, size = __HEADERSIZE__;
BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__;
DIR: file = %O, start = $0000, size = 8;
MAIN: file = %O, define = yes, start = $0200, size = $BD38 - __STACKSIZE__;
UPLDR: file = %O, define = yes, start = $BFDC, size = $005C;
DIR: file = %O, start = $0000, size = 16;
MAIN: file = %O, define = yes, start = $0200, size = $C038 - __UPLOADERSIZE__ - $200 - __STACKSIZE__;
UPLOAD: file = %O, define = yes, start = $C038 - __UPLOADERSIZE__, size = $0061;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
@ -30,8 +31,8 @@ SEGMENTS {
RODATA: load = MAIN, type = ro, define = yes;
DATA: load = MAIN, type = rw, define = yes;
BSS: load = MAIN, type = bss, define = yes;
UPCODE: load = UPLDR, type = ro, define = yes;
UPDATA: load = UPLDR, type = rw, define = yes;
UPCODE: load = UPLOAD, type = ro, define = yes;
UPDATA: load = UPLOAD, type = rw, define = yes;
}
FEATURES {
CONDES: type = constructor,

82
cfg/pet-overlay.cfg Normal file
View File

@ -0,0 +1,82 @@
FEATURES {
STARTADDRESS: default = $0401;
}
SYMBOLS {
__LOADADDR__: type = import;
__EXEHDR__: type = import;
__OVERLAYADDR__: type = import;
__STACKSIZE__: type = weak, value = $0800; # 2K stack
__OVERLAYSIZE__: type = weak, value = $0800; # 2K overlay
__HIMEM__: type = weak, value = $8000;
__OVERLAYSTART__: type = export, value = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__;
}
MEMORY {
ZP: file = "", define = yes, start = $0055, size = $001A;
LOADADDR: file = %O, start = %S - 2, size = $0002;
HEADER: file = %O, define = yes, start = %S, size = $000D;
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __OVERLAYSTART__ - __HEADER_LAST__;
OVL1ADDR: file = "%O.1", start = __OVERLAYSTART__ - 2, size = $0002;
OVL1: file = "%O.1", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
OVL2ADDR: file = "%O.2", start = __OVERLAYSTART__ - 2, size = $0002;
OVL2: file = "%O.2", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
OVL3ADDR: file = "%O.3", start = __OVERLAYSTART__ - 2, size = $0002;
OVL3: file = "%O.3", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
OVL4ADDR: file = "%O.4", start = __OVERLAYSTART__ - 2, size = $0002;
OVL4: file = "%O.4", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
OVL5ADDR: file = "%O.5", start = __OVERLAYSTART__ - 2, size = $0002;
OVL5: file = "%O.5", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
OVL6ADDR: file = "%O.6", start = __OVERLAYSTART__ - 2, size = $0002;
OVL6: file = "%O.6", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
OVL7ADDR: file = "%O.7", start = __OVERLAYSTART__ - 2, size = $0002;
OVL7: file = "%O.7", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
OVL8ADDR: file = "%O.8", start = __OVERLAYSTART__ - 2, size = $0002;
OVL8: file = "%O.8", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
OVL9ADDR: file = "%O.9", start = __OVERLAYSTART__ - 2, size = $0002;
OVL9: file = "%O.9", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
ONCE: load = MAIN, type = ro, optional = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss;
BSS: load = MAIN, type = bss, define = yes;
OVL1ADDR: load = OVL1ADDR, type = ro;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVL2ADDR: load = OVL2ADDR, type = ro;
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
OVL3ADDR: load = OVL3ADDR, type = ro;
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
OVL4ADDR: load = OVL4ADDR, type = ro;
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
OVL5ADDR: load = OVL5ADDR, type = ro;
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
OVL6ADDR: load = OVL6ADDR, type = ro;
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
OVL7ADDR: load = OVL7ADDR, type = ro;
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
OVL8ADDR: load = OVL8ADDR, type = ro;
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
OVL9ADDR: load = OVL9ADDR, type = ro;
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

34
cfg/rp6502.cfg Normal file
View File

@ -0,0 +1,34 @@
SYMBOLS {
__STARTUP__: type = import;
__STACKSIZE__: type = weak, value = $0800;
}
MEMORY {
ZP: file = "", define = yes, start = $0000, size = $0100;
CPUSTACK: file = "", start = $0100, size = $0100;
RAM: file = %O, define = yes, start = $0200, size = $FD00 - __STACKSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
STARTUP: load = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes;
ONCE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

View File

@ -1,4 +1,4 @@
# supervision 1284kbyte cartridge with bankswitching
# supervision 128kbyte cartridge with bankswitching
# for assembler
# ld65 config file
@ -30,8 +30,23 @@ SEGMENTS {
BANK5: load = BANKROM5, type = ro;
BANK6: load = BANKROM6, type = ro;
BANK7: load = BANKROM7, type = ro;
ZEROPAGE: load = RAM, type = bss, define = yes;
DATA: load = RAM, type = bss, define = yes, offset = $0200;
ZEROPAGE: load = RAM, type = zp, define = yes;
DATA: load = RAM, type = rw, define = yes, offset = $0200;
BSS: load = RAM, type = bss, define = yes;
VECTOR: load = ROM, type = ro, offset = $3FFA;
VECTORS: load = ROM, type = ro, start = $FFFA;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

View File

@ -20,8 +20,8 @@ SEGMENTS {
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes;
FFF0: load = ROM, type = ro, offset = $3FF0;
VECTOR: load = ROM, type = ro, offset = $3FFA;
FFF0: load = ROM, type = ro, start = $FFF0;
VECTORS: load = ROM, type = ro, start = $FFFA;
BSS: load = RAM, type = bss, define = yes;
}
FEATURES {

View File

@ -23,8 +23,23 @@ SEGMENTS {
BANK1: load = BANKROM1, type = ro;
BANK2: load = BANKROM2, type = ro;
BANK3: load = BANKROM3, type = ro;
ZEROPAGE: load = RAM, type = bss, define = yes;
DATA: load = RAM, type = bss, define = yes, offset = $0200;
ZEROPAGE: load = RAM, type = zp, define = yes;
DATA: load = RAM, type = rw, define = yes, offset = $0200;
BSS: load = RAM, type = bss, define = yes;
VECTOR: load = ROM, type = ro, offset = $3FFA;
VECTORS: load = ROM, type = ro, start = $FFFA;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

View File

@ -19,8 +19,8 @@ SEGMENTS {
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes;
FFF0: load = ROM, type = ro, offset = $7FF0;
VECTOR: load = ROM, type = ro, offset = $7FFA;
FFF0: load = ROM, type = ro, start = $FFF0;
VECTORS: load = ROM, type = ro, start = $FFFA;
BSS: load = RAM, type = bss, define = yes;
}
FEATURES {

46
cfg/sym1-32k.cfg Normal file
View File

@ -0,0 +1,46 @@
# sym1-32k.cfg (32k)
#
# for Sym-1 with 32kb RAM
#
# ld65 --config sym1-32k.cfg -o <prog>.bin <prog>.o
FEATURES {
STARTADDRESS: default = $0200;
CONDES: segment = STARTUP,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = STARTUP,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__: type = weak, value = $0200; # 512 byte program stack
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = %O, define = yes, start = $0000, size = $00F7;
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
RAM: file = %O, define = yes, start = %S, size = $8000 - %S - __STACKSIZE__;
MONROM: file = "", define = yes, start = $8000, size = $1000;
EXT: file = "", define = yes, start = $9000, size = $1000;
IO: file = "", define = yes, start = $A000, size = $1000;
RAE1: file = "", define = yes, start = $B000, size = $1000;
BASROM: file = "", define = yes, start = $C000, size = $2000;
RAE2: file = "", define = yes, start = $E000, size = $1000;
TOP: file = "", define = yes, start = $F000, size = $1000;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
STARTUP: load = RAM, type = ro, define = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes;
ONCE: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
}

46
cfg/sym1-4k.cfg Normal file
View File

@ -0,0 +1,46 @@
# sym1-4k.cfg (4k)
#
# for Sym-1 with 4kb RAM
#
# ld65 --config sym1-4k.cfg -o <prog>.bin <prog>.o
FEATURES {
STARTADDRESS: default = $0200;
CONDES: segment = STARTUP,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = STARTUP,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__: type = weak, value = $0080; # 128 byte program stack
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = %O, define = yes, start = $0000, size = $00F7;
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
RAM: file = %O, define = yes, start = %S, size = $1000 - %S - __STACKSIZE__;
MONROM: file = "", define = yes, start = $8000, size = $1000;
EXT: file = "", define = yes, start = $9000, size = $1000;
IO: file = "", define = yes, start = $A000, size = $1000;
RAE1: file = "", define = yes, start = $B000, size = $1000;
BASROM: file = "", define = yes, start = $C000, size = $2000;
RAE2: file = "", define = yes, start = $E000, size = $1000;
TOP: file = "", define = yes, start = $F000, size = $1000;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
STARTUP: load = RAM, type = ro, define = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes;
ONCE: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
}

46
cfg/sym1.cfg Normal file
View File

@ -0,0 +1,46 @@
# sym1-4k.cfg (4k)
#
# for Sym-1 with 4kb RAM
#
# ld65 --config sym1-4k.cfg -o <prog>.bin <prog>.o
FEATURES {
STARTADDRESS: default = $0200;
CONDES: segment = STARTUP,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = STARTUP,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__: type = weak, value = $0080; # 128 byte program stack
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = %O, define = yes, start = $0000, size = $00F7;
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
RAM: file = %O, define = yes, start = %S, size = $1000 - %S - __STACKSIZE__;
MONROM: file = "", define = yes, start = $8000, size = $1000;
EXT: file = "", define = yes, start = $9000, size = $1000;
IO: file = "", define = yes, start = $A000, size = $1000;
RAE1: file = "", define = yes, start = $B000, size = $1000;
BASROM: file = "", define = yes, start = $C000, size = $2000;
RAE2: file = "", define = yes, start = $E000, size = $1000;
TOP: file = "", define = yes, start = $F000, size = $1000;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
STARTUP: load = RAM, type = ro, define = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes;
ONCE: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
}

View File

@ -1,3 +1,7 @@
FEATURES {
STARTADDRESS: default = $1000;
}
SYMBOLS {
__ORIXHDR__: type = import;
__STACKSIZE__: type = weak, value = $0800; # 2K stack
@ -7,7 +11,7 @@ SYMBOLS {
MEMORY {
ZP: file = "", define = yes, start = $00B0, size = $003A;
ORIXHDR: file = %O, type = ro, start = $0000, size = $001F;
MAIN: file = %O, define = yes, start = $0800, size = __RAMEND__ - __MAIN_START__;
MAIN: file = %O, define = yes, start = %S, size = __RAMEND__ - __MAIN_START__;
BSS: file = "", start = __ONCE_RUN__, size = __RAMEND__ - __STACKSIZE__ - __ONCE_RUN__;
}
SEGMENTS {
@ -18,7 +22,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
ONCE: load = MAIN, type = ro, define = yes;
BASTAIL: load = MAIN, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;

22
cfg/vic20-asm-32k.cfg Normal file
View File

@ -0,0 +1,22 @@
# Assembly program configuration for expanded VICs (>= +8K).
FEATURES {
STARTADDRESS: default = $1201;
}
SYMBOLS {
__LOADADDR__: type = import;
}
MEMORY {
ZP: file = "", start = $0002, size = $001A, define = yes;
LOADADDR: file = %O, start = %S - 2, size = $0002;
MAIN: file = %O, start = %S, size = $8000 - %S;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, optional = yes, define = yes;
}

22
cfg/vic20-asm-3k.cfg Normal file
View File

@ -0,0 +1,22 @@
# Assembly program configuration for expanded VICs (+3K only).
FEATURES {
STARTADDRESS: default = $0401;
}
SYMBOLS {
__LOADADDR__: type = import;
}
MEMORY {
ZP: file = "", start = $0002, size = $001A, define = yes;
LOADADDR: file = %O, start = %S - 2, size = $0002;
MAIN: file = %O, start = %S, size = $1E00 - %S;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, optional = yes, define = yes;
}

22
cfg/vic20-asm.cfg Normal file
View File

@ -0,0 +1,22 @@
# Assembly program configuration for unexpanded VICs.
FEATURES {
STARTADDRESS: default = $1001;
}
SYMBOLS {
__LOADADDR__: type = import;
}
MEMORY {
ZP: file = "", start = $0002, size = $001A, define = yes;
LOADADDR: file = %O, start = %S - 2, size = $0002;
MAIN: file = %O, start = %S, size = $1E00 - %S;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, optional = yes, define = yes;
}

50
cfg/vic20-tgi.cfg Normal file
View File

@ -0,0 +1,50 @@
# Memory configuration which supports the "vic20-hi.tgi" driver.
# Memory configuration for a VIC-20 with, at least, 8K expansion RAM.
FEATURES {
STARTADDRESS: default = $1201;
}
SYMBOLS {
__LOADADDR__: type = import;
__EXEHDR__: type = import;
__TGIHDR__: type = import;
__STACKSIZE__: type = weak, value = $0200; # 512-byte stack
__HIMEM__: type = weak, value = $4000;
}
MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = %S - 2, size = $0002;
HEADER: file = %O, define = yes, start = %S, size = $003E;
MAIN: file = %O, define = yes, start = $2000, size = __HIMEM__ - __MAIN_START__ - __STACKSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro;
# The start-up code needs EXEHDR, TGI1HDR, TGI2HDR,
# and STARTUP to be next to each other, in that order.
EXEHDR: load = HEADER, type = ro;
TGI1HDR: load = HEADER, type = ro;
TGI2HDR: load = MAIN, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, optional = yes, define = yes;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

View File

@ -1,7 +1,7 @@
SYMBOLS {
__LOADADDR__: type = import;
__EXEHDR__: type = import;
__STACKSIZE__: type = weak, value = $0400; # 1k stack
__STACKSIZE__: type = weak, value = $0100;
}
MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A;

View File

@ -46,7 +46,6 @@ clean:
$(RM) -r ../html ../info
install:
$(if $(PREFIX),,$(error variable "PREFIX" must be set))
ifeq ($(wildcard ../html),../html)
$(INSTALL) -d $(DESTDIR)$(htmldir)
$(INSTALL) -m0644 ../html/*.* $(DESTDIR)$(htmldir)

View File

@ -33,7 +33,7 @@ more information.
The standard binary file format generated by the linker for the
Apple&nbsp;&rsqb;&lsqb; target is an <url name="AppleSingle"
url="http://kaiser-edv.de/documents/AppleSingle_AppleDouble.pdf"> file.
url="https://nulib.com/library/AppleSingle_AppleDouble.pdf"> file.
The default load address is &dollar;803.
<bf/AppleCommander 1.4.0/ or later (available at <url
@ -62,7 +62,7 @@ Special locations:
</descrip><p>
While running <tt/main()/ the Language Card bank 2 is enabled for read access.
However while running module constructors/destructors the Language Card is disabled.
However while running module constructors the Language Card is disabled.
Enabling the Language Card allows to use it as additional memory for cc65
generated code. However code is never automatically placed there. Rather code
@ -73,7 +73,7 @@ system takes care of actually moving the code into the Language Card.
The amount of memory available in the Language Card for generated code depends
on the <ref id="link-configs" name="linker configuration"> parameters. There are
several usefull settings:
several useful settings:
<descrip>
@ -281,7 +281,7 @@ AppleCommander option to put LOADER.SYSTEM on a ProDOS 8 disk image is <tt/-p/.
If the cc65 program can be successfully linked as system program using the linker
configuration <ref id="apple-sys-cfg" name="apple2-system.cfg">, but
uses the heap either explicitly or implicitly (i.e. by loading a driver) then
the memory from &dollar;800 to &dollar;2000 can be added to the heap by calling
the memory from &dollar;800 to &dollar;1FFF can be added to the heap by calling
<tt/_heapadd ((void *) 0x0800, 0x1800);/ at the beginning of <tt/main()/.
@ -321,21 +321,39 @@ Programs containing Apple&nbsp;&rsqb;&lsqb; specific code may use the
<sect1>Apple&nbsp;&rsqb;&lsqb; specific functions<p>
The functions listed below are special for the Apple&nbsp;&rsqb;&lsqb;. See
the <url url="funcref.html" name="function reference"> for declaration and
The functions and variables listed below are special for the Apple&nbsp;&rsqb;&lsqb;.
See the <url url="funcref.html" name="function reference"> for declaration and
usage.
<itemize>
<item>_auxtype
<item>_dos_type
<item>_filetype
<item>_datetime
<item>beep
<item>get_ostype
<item>gmtime_dt
<item>mktime_dt
<item>rebootafterexit
<item>ser_apple2_slot
<item>tgi_apple2_mix
</itemize>
<sect1>Apple IIgs specific functions in accelerator.h<p>
In addition to those, the <tt/accelerator.h/ header file contains three functions
to help determine whether the program is running on a IIgs, and change the IIgs
CPU speed. See the <url url="funcref.html" name="function reference"> for declaration and
usage.
<itemize>
<item>detect_iigs
<item>get_iigs_speed
<item>set_iigs_speed
</itemize>
<sect1>Hardware access<p>
There's currently no support for direct hardware access. This does not mean
@ -370,7 +388,7 @@ The names in the parentheses denote the symbols to be used for static linking of
In memory constrained situations the memory from &dollar;803 to &dollar;1FFF
can be made available to a program by calling <tt/_heapadd ((void *) 0x0803, 0x17FD);/
at the beginning of <tt/main()/. Doing so is beneficial even if the program
doesn't use the the heap explicitly because loading the driver (and in fact
doesn't use the heap explicitly because loading the driver (and in fact
already opening the driver file) uses the heap implicitly.
</descrip><p>
@ -427,17 +445,47 @@ The names in the parentheses denote the symbols to be used for static linking of
<descrip>
<tag><tt/a2.ssc.ser (a2_ssc_ser)/</tag>
Driver for the Apple&nbsp;II Super Serial Card. Supports up to 19200 baud,
hardware flow control (RTS/CTS) and interrupt driven receives. Note
that because of the peculiarities of the 6551 chip transmits are not
Driver for the Apple&nbsp;II Super Serial Card.
The SSC is an extension card for the II, II+, IIe; the Apple //c and //c+ have
the same hardware and firmware integrated.
It supports up to 9600 baud, supports no flow control and hardware flow control
(RTS/CTS) and does interrupt driven receives. Speeds faster than 9600 baud
aren't reachable because the ROM and ProDOS IRQ handlers are too slow.
Software flow control (XON/XOFF) is not supported.
Note that because of the peculiarities of the 6551 chip transmits are not
interrupt driven, and the transceiver blocks if the receiver asserts
flow control because of a full buffer.
Note that using the driver at SER_BAUD_115200 will disable IRQs. It will be up
to the users to use the serial port, either by re-enabling IRQs themselves,
or by directly poll-reading the ACIA DATA register without the help of ser_get().
The driver defaults to slot 2. Call <tt/ser_apple2_slot()/ prior to
<tt/ser_open()/ in order to select a different slot. <tt/ser_apple2_slot()/
succeeds for all Apple&nbsp;II slots, but <tt/ser_open()/ fails with
<tt/SER_ERR_NO_DEVICE/ if there's no SSC firmware found in the selected slot.
In the Apple //c and //c+, slot 1 is the printer port, and slot 2 is the modem
port.
Never call <tt/ser_apple2_slot()/ after <tt/ser_open()/.
<tag><tt/a2.gs.ser (a2_gs_ser)/</tag>
Driver for the Apple&nbsp;IIgs serial ports (printer and modem).
It supports up to 9600 baud, supports no flow control and hardware flow control
(RTS/CTS) and does interrupt driven receives. Speeds faster than 9600 baud
aren't reachable because the ROM and ProDOS IRQ handlers are too slow.
Software flow control (XON/XOFF) is not supported.
Note that transmits are not interrupt driven, and the transceiver blocks if
the receiver asserts flow control because of a full buffer.
The driver defaults to opening the modem port. Calling <tt/ser_apple2_slot()/
prior to <tt/ser_open()/ allows to select the printer port (1) or the modem
port (0).
Never call <tt/ser_apple2_slot()/ after <tt/ser_open()/.
</descrip><p>
@ -544,6 +592,28 @@ program. See the discussion of the <tt/.CONDES/ feature in the <url
url="ca65.html" name="assembler manual">.
<sect1>ProDOS date/time manipulation<p>
<descrip>
The readdir and stat function return ProDOS timestamps in their file
creation/modification time attributes. You can convert them to more portable
time representations using either:
<tag/struct tm/
<tt/struct tm* __fastcall__ gmtime_dt (const struct datetime* dt);/
Converts a <tt/struct datetime/ into a <tt/struct tm/. Returns NULL in case
of error and sets errno.
<tag/time_t/
<tt/time_t __fastcall__ mktime_dt (const struct datetime* dt);/
Parses a <tt/struct datetime/ and returns a UNIX timestamp. Returns 0 on error and
sets errno.
</descrip>
<sect1>DIO<p>
<descrip>
@ -575,15 +645,13 @@ url="ca65.html" name="assembler manual">.
<tag>Explanation of File Types</tag>
ProDOS associates a file type and an auxiliary type with each file.
ProDOS 8 associates a file type and an auxiliary type with each file.
These type specifications are separate from the file's name, unlike
Windows which uses the file name's suffix (a.k.a.
extension) to specify the file type. For example, <tt/.exe/,
<tt/.doc/, or <tt/.bat/.
The ProDOS low-level
Machine-Language Interface (MLI) functions for creating and opening
files require these types to be specified. And if they don't match
with the file being opened, the operation may fail.
The ProDOS 8 Machine-Language Interface (MLI) function for creating a
file require these types to be specified.
In contrast, the ISO C function <tt/fopen()/ and the POSIX function
<tt/open()/ have no parameter to specify either a file type or an
@ -605,9 +673,17 @@ url="ca65.html" name="assembler manual">.
The header file <tt/apple2_filetype.h/ also defines many values
that can be used to set these variables. It is included in
<tt/apple2.h/, which is in turn included in <tt/apple2enh.h/.
So it isn't necessary to include it directly. Just
include one of <tt/apple2.h/ or <tt/apple2enh.h/.
<tt/apple2.h/.
The global variable <tt/_datetime/ allows the file creation date/time
to be set before a call to <tt/fopen()/
or <tt/open()/ that creates the file. It is defined in <tt/apple2.h/:
<tscreen>
<verb>
extern struct datetime _datetime;
</verb>
</tscreen>
<tag>Example</tag>
@ -624,8 +700,8 @@ url="ca65.html" name="assembler manual">.
carriage return instead of a line-feed (Linux/BSD/MacOS) or
carriage return, line-feed pair (Windows).
The "sequential" text file terminology is in contrast to a
"random-access" text file which would
The 'sequential' text file terminology is in contrast to a
'random-access' text file which would
have a fixed-length, non-zero record length, so that the
file position of any individual record can be calculated.

View File

@ -21,7 +21,8 @@ as it comes with the cc65 C compiler. It describes the memory layout,
enhanced&nbsp;Apple&nbsp;//e specific header files, available drivers, and any
pitfalls specific to that platform.
Please note that enhanced&nbsp;Apple&nbsp;//e specific functions are just mentioned
Please note that this target requires a 65C02 or 65816 CPU,
enhanced&nbsp;Apple&nbsp;//e specific functions are just mentioned
here, they are described in detail in the separate <url url="funcref.html"
name="function reference">. Even functions marked as "platform dependent" may
be available on more than one platform. Please see the function reference for
@ -33,7 +34,7 @@ more information.
The standard binary file format generated by the linker for the
enhanced&nbsp;Apple&nbsp;//e target is an <url name="AppleSingle"
url="http://kaiser-edv.de/documents/AppleSingle_AppleDouble.pdf"> file.
url="https://nulib.com/library/AppleSingle_AppleDouble.pdf"> file.
The default load address is &dollar;803.
<bf/AppleCommander 1.4.0/ or later (available at <url
@ -62,7 +63,7 @@ Special locations:
</descrip><p>
While running <tt/main()/ the Language Card bank 2 is enabled for read access.
However while running module constructors/destructors the Language Card is disabled.
However while running module constructors the Language Card is disabled.
Enabling the Language Card allows to use it as additional memory for cc65
generated code. However code is never automatically placed there. Rather code
@ -73,7 +74,7 @@ system takes care of actually moving the code into the Language Card.
The amount of memory available in the Language Card for generated code depends
on the <ref id="link-configs" name="linker configuration"> parameters. There are
several usefull settings:
several useful settings:
<descrip>
@ -281,7 +282,7 @@ AppleCommander option to put LOADER.SYSTEM on a ProDOS 8 disk image is <tt/-p/.
If the cc65 program can be successfully linked as system program using the linker
configuration <ref id="apple-sys-cfg" name="apple2enh-system.cfg">, but
uses the heap either explicitly or implicitly (i.e. by loading a driver) then
the memory from &dollar;800 to &dollar;2000 can be added to the heap by calling
the memory from &dollar;800 to &dollar;1FFF can be added to the heap by calling
<tt/_heapadd ((void *) 0x0800, 0x1800);/ at the beginning of <tt/main()/.
@ -321,21 +322,38 @@ Programs containing enhanced&nbsp;Apple&nbsp;//e specific code may use the
<sect1>Enhanced&nbsp;Apple&nbsp;//e specific functions<p>
The functions listed below are special for the enhanced&nbsp;Apple&nbsp;//e. See
the <url url="funcref.html" name="function reference"> for declaration and
The functions and variables listed below are special for the Apple&nbsp;&rsqb;&lsqb;.
See the <url url="funcref.html" name="function reference"> for declaration and
usage.
<itemize>
<item>_auxtype
<item>_dos_type
<item>_filetype
<item>_datetime
<item>beep
<item>get_ostype
<item>gmtime_dt
<item>mktime_dt
<item>rebootafterexit
<item>ser_apple2_slot
<item>textframe
<item>textframexy
<item>tgi_apple2_mix
<item>videomode
<item>waitvsync
</itemize>
<sect1>Apple IIgs specific functions in accelerator.h<p>
In addition to those, the <tt/accelerator.h/ header file contains three functions
to help determine whether the program is running on a IIgs, and change the IIgs
CPU speed. See the <url url="funcref.html" name="function reference"> for declaration and
usage.
<itemize>
<item>detect_iigs
<item>get_iigs_speed
<item>set_iigs_speed
</itemize>
@ -377,7 +395,7 @@ The names in the parentheses denote the symbols to be used for static linking of
In memory constrained situations the memory from &dollar;803 to &dollar;1FFF
can be made available to a program by calling <tt/_heapadd ((void *) 0x0803, 0x17FD);/
at the beginning of <tt/main()/. Doing so is beneficial even if the program
doesn't use the the heap explicitly because loading the driver (and in fact
doesn't use the heap explicitly because loading the driver (and in fact
already opening the driver file) uses the heap implicitly.
</descrip><p>
@ -428,17 +446,47 @@ The names in the parentheses denote the symbols to be used for static linking of
<descrip>
<tag><tt/a2e.ssc.ser (a2e_ssc_ser)/</tag>
Driver for the Apple&nbsp;II Super Serial Card. Supports up to 19200 baud,
hardware flow control (RTS/CTS) and interrupt driven receives. Note
that because of the peculiarities of the 6551 chip transmits are not
Driver for the Apple&nbsp;II Super Serial Card.
The SSC is an extension card for the II, II+, IIe; the Apple //c and //c+ have
the same hardware and firmware integrated.
It supports up to 9600 baud, supports no flow control and hardware flow control
(RTS/CTS) and does interrupt driven receives. Speeds faster than 9600 baud
aren't reachable because the ROM and ProDOS IRQ handlers are too slow.
Software flow control (XON/XOFF) is not supported.
Note that because of the peculiarities of the 6551 chip transmits are not
interrupt driven, and the transceiver blocks if the receiver asserts
flow control because of a full buffer.
Note that using the driver at SER_BAUD_115200 will disable IRQs. It will be up
to the users to use the serial port, either by re-enabling IRQs themselves,
or by directly poll-reading the ACIA DATA register without the help of ser_get().
The driver defaults to slot 2. Call <tt/ser_apple2_slot()/ prior to
<tt/ser_open()/ in order to select a different slot. <tt/ser_apple2_slot()/
succeeds for all Apple&nbsp;II slots, but <tt/ser_open()/ fails with
<tt/SER_ERR_NO_DEVICE/ if there's no SSC firmware found in the selected slot.
In the Apple //c and //c+, slot 1 is the printer port, and slot 2 is the modem
port.
Never call <tt/ser_apple2_slot()/ after <tt/ser_open()/.
<tag><tt/a2e.gs.ser (a2e_gs_ser)/</tag>
Driver for the Apple&nbsp;IIgs serial ports (printer and modem).
It supports up to 9600 baud, supports no flow control and hardware flow control
(RTS/CTS) and does interrupt driven receives. Speeds faster than 9600 baud
aren't reachable because the ROM and ProDOS IRQ handlers are too slow.
Software flow control (XON/XOFF) is not supported.
Note that transmits are not interrupt driven, and the transceiver blocks if
the receiver asserts flow control because of a full buffer.
The driver defaults to opening the modem port. Calling <tt/ser_apple2_slot()/
prior to <tt/ser_open()/ allows to select the printer port (1) or the modem
port (0).
Never call <tt/ser_apple2_slot()/ after <tt/ser_open()/.
</descrip><p>
@ -550,6 +598,28 @@ program. See the discussion of the <tt/.CONDES/ feature in the <url
url="ca65.html" name="assembler manual">.
<sect1>ProDOS date/time manipulation<p>
<descrip>
The readdir and stat function return ProDOS timestamps in their file
creation/modification time attributes. You can convert them to more portable
time representations using either:
<tag/struct tm/
<tt/struct tm* __fastcall__ gmtime_dt (const struct datetime* dt);/
Converts a <tt/struct datetime/ into a <tt/struct tm/. Returns -1 in case
of error and sets errno, 0 on success.
<tag/time_t/
<tt/time_t __fastcall__ mktime_dt (const struct datetime* dt);/
Parses a <tt/struct datetime/ and returns a UNIX timestamp. Returns 0 on error and
sets errno.
</descrip>
<sect1>DIO<p>
<descrip>
@ -581,22 +651,20 @@ url="ca65.html" name="assembler manual">.
<tag>Explanation of File Types</tag>
ProDOS associates a file type and an auxiliary type with each file.
ProDOS 8 associates a file type and an auxiliary type with each file.
These type specifications are separate from the file's name, unlike
Windows which uses the file name's suffix (a.k.a.
extension) to specify the file type. For example, <tt/.exe/,
<tt/.doc/, or <tt/.bat/.
The ProDOS low-level
Machine-Language Interface (MLI) functions for creating and opening
files require these types to be specified. And if they don't match
with the file being opened, the operation may fail.
The ProDOS 8 Machine-Language Interface (MLI) function for creating a
file require these types to be specified.
In contrast, the ISO C function <tt/fopen()/ and the POSIX function
<tt/open()/ have no parameter to specify either a file type or an
auxiliary type. Therefore, some additional mechanism for specifying
the file types is needed.
<tag>Specifying the File Type and Auxiliary Type</tag>
<tag>Specifying the File Type, Auxiliary Type and creation date</tag>
There are two global variables provided that allow the file type
and auxiliary type to be specified before a call to <tt/fopen()/
@ -612,8 +680,16 @@ url="ca65.html" name="assembler manual">.
The header file <tt/apple2_filetype.h/ also defines many values
that can be used to set these variables. It is included in
<tt/apple2.h/, which is in turn included in <tt/apple2enh.h/.
So it isn't necessary to include it directly. Just
include one of <tt/apple2.h/ or <tt/apple2enh.h/.
The global variable <tt/_datetime/ allows the file creation date/time
to be set before a call to <tt/fopen()/
or <tt/open()/ that creates the file. It is defined in <tt/apple2.h/:
<tscreen>
<verb>
extern struct datetime _datetime;
</verb>
</tscreen>
<tag>Example</tag>
@ -630,8 +706,8 @@ url="ca65.html" name="assembler manual">.
carriage return instead of a line-feed (Linux/BSD/MacOS) or
carriage return, line-feed pair (Windows).
The "sequential" text file terminology is in contrast to a
"random-access" text file which would
The 'sequential' text file terminology is in contrast to a
'random-access' text file which would
have a fixed-length, non-zero record length, so that the
file position of any individual record can be calculated.

View File

@ -117,7 +117,7 @@ Special locations:
The startup code rearranges the memory as follows:
<enum>
<item>Sceen memory and display list are moved below the program start address.
<item>Screen memory and display list are moved below the program start address.
<item>The ROM is disabled, making the memory in the areas &lsqb;&dollar;C000-&dollar;CFFF&rsqb;
and &lsqb;&dollar;D800-&dollar;FFF9&rsqb; available.
<item>Character generator data is copied from ROM to the CHARGEN location specified in the
@ -131,7 +131,7 @@ With the default load address of &dollar;2400 this gives a usable memory range o
&lsqb;&dollar;2400-&dollar;CFFF&rsqb;.
Please note that the first load chunk (which checks the system
compatibilty and available memory) will always be loaded at
compatibility and available memory) will always be loaded at
&dollar;2E00, regardless of the specified start address. This address
can only be changed by a custom linker config file.
@ -305,7 +305,7 @@ The names are the usual ones you can find in system reference manuals. Example:
...
</verb></tscreen>
Please note that memory location 762/$2FA is called "<tt/char_/" while the orignal name "<tt/char/" conflicts with the C keyword.
Please note that memory location 762/$2FA is called "<tt/char_/" while the original name "<tt/char/" conflicts with the C keyword.
If you like to use the OS names and locations for the original Atari 800 operating system, please "<tt/#define OSA/" before including the
<tt/atari.h/ header file.
@ -332,6 +332,8 @@ See the <url url="funcref.html" name="function reference"> for declaration and u
<item>_scroll
<item>_setcolor
<item>_setcolor_low
<item>_sound
<item>waitvsync
</itemize>
@ -400,7 +402,7 @@ OS.sdlst = &amp;DisplayList;
...
</verb></tscreen>
Please inspect the <tt/_antic.h/ header file to detemine the supported
Please inspect the <tt/_antic.h/ header file to determine the supported
instruction names. Modifiers on instructions can be nested without need
for an order:
@ -409,7 +411,7 @@ for an order:
Please mind that ANTIC has memory alignment requirements for "player
missile graphics"-data, font data, display lists and screen memory. Creation
of a special linker configuration with appropriate aligned segments and
switching to that segment in the c-code is usually neccessary. A more memory
switching to that segment in the c-code is usually necessary. A more memory
hungry solution consists in using the "<tt/posix_memalign()/" function in
conjunction with copying your data to the allocated memory.
@ -441,19 +443,7 @@ package delivers the same feature.</em>
You can switch back to the ATASCII mapping by including
"<tt/atari_atascii_charmap.h/".
A final note: Since cc65 has currently some difficulties with string merging
under different mappings, defining remapped strings works only flawlessly
with static array initialization:
<tscreen><verb>
#include &lt;atari_screen_charmap.h&gt;
char pcScreenMappingString[] = "Hello Atari!";
#include &lt;atari_atascii_charmap.h&gt;
char pcAtasciiMappingString[] = "Hello Atari!";
</verb></tscreen>
delivers correct results, while
Example:
<tscreen><verb>
#include &lt;atari_screen_charmap.h&gt;
@ -463,8 +453,6 @@ char* pcScreenMappingString = "Hello Atari!";
char* pcAtasciiMappingString = "Hello Atari!";
</verb></tscreen>
does not.
<sect1>Keyboard codes<p>
For direct keyboard scanning in conjunction with e.g. the OS location "CH" (764/$2FC),
@ -674,9 +662,9 @@ The default callbacks definition (<tt/mouse_def_callbacks/) is an alias for the
<sect1>RS232 device drivers<p>
Currently there is one RS232 driver. It uses the R: device (therefore
an R: driver needs to be installed) and was tested with the 850
interface module.
Currently there is one RS232 driver. It supports up to 9600 baud, requires hardware flow control
(RTS/CTS) and uses the R: device (therefore an R: driver needs to be installed). It was tested
with the 850 interface module.
<table>
<tabular ca="rr">
@ -725,6 +713,11 @@ for sectors 1 to 3, regardless of the type of diskette.
The console I/O is speed optimized therefore support for XEP80 hardware
or f80.com software is missing. Of course you may use stdio.h functions.
<tt/cprintf/ targets a 40 character line. On a 20-column display this has
the unexpected effect of a blank line after your text. On such displays you can either
use for example <tt/gotoxy(20,0)/ to target the "next" line, or you can switch to <tt/write()/
function which does not have this side effect.
<sect>Technical details<label id="techdetail"><p>
@ -1140,8 +1133,8 @@ ld65: Error: Missing memory area assignment for segment 'MAINHDR'
</verb></tscreen>
The old "HEADER" memory description contained six bytes: &dollar;FFFF
and the first and last memory addess of the program. For the "system
check" load chunk this had to be split into two memory assigments. The
and the first and last memory address of the program. For the "system
check" load chunk this had to be split into two memory assignments The
"HEADER" now only contains the &dollar;FFFF. The main program's first
and last memory address were moved to a new segment, called "MAINHDR",
which in the new linker config file goes into its own memory area (also
@ -1169,7 +1162,7 @@ When using cl65, you can leave it out with this command line:
cl65 -Wl -D__SYSTEM_CHECK__=1 <arguments>
</verb></tscreen>
The value you assign to <tt/__SYSTEM_CHECK_/ doesn't matter. If the
The value you assign to <tt/__SYSTEM_CHECK__/ doesn't matter. If the
<tt/__SYSTEM_CHECK__/ symbol is defined, the load chunk won't be included.

Some files were not shown because too many files have changed in this diff Show More