Compare commits

...
Sign in to create a new pull request.

510 commits

Author SHA1 Message Date
Bob Andrews
06d423d503
Merge pull request #1713 from karrika/atari7800stdjoy
[atari7800] Atari7800stdjoy
2022-04-04 22:23:02 +02: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
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
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
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
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
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
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
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
dfe478b154 upload snapshot to sourceforge 2022-02-06 18:20:09 +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
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
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
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
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
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
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
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
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
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
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
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
polluks2
1dcb21eaa7
Merge pull request #2 from cc65/master
Update
2021-03-04 09:09:46 +01:00
jede
872739b5f4 Fix comments, return line and bordercolor return 2021-03-03 22:14:29 +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
polluks2
0636c4bc30
Merge pull request #1 from cc65/master
Update
2021-01-13 12:26:00 +01:00
Polluks
5fa7b90e05 crt0 clean-up 2020-11-29 17:10:34 +01:00
jede
b8889bf37e Now getchar works 2020-10-23 23:47:30 +02:00
476 changed files with 15577 additions and 5028 deletions

View file

@ -0,0 +1,66 @@
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@v2
- 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 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: 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 (Windows)
runs-on: windows-latest
steps:
- shell: bash
run: git config --global core.autocrlf input
- name: Checkout Source
uses: actions/checkout@v2
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- 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

View file

@ -0,0 +1,108 @@
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@v2
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- 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@v2
- 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 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@v2
with:
name: cc65-snapshot-win32.zip
path: cc65-snapshot-win32.zip
- name: Upload a 64-bit Snapshot Zip
uses: actions/upload-artifact@v2
with:
name: cc65-snapshot-win64.zip
path: cc65-snapshot-win64.zip
# enter secrets under "repository secrets"
- name: Upload 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 }}
# TODO: Update docs at https://github.com/cc65/doc
# TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io

3
.gitignore vendored
View file

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

View file

@ -9,14 +9,14 @@ jobs:
- 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 -j2 bin USER_CFLAGS=-Werror
- make -j2 lib QUIET=1
- make test QUIET=1
- make samples
- make -j2 samples
- make -C src clean
- make bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
- make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
- make -C samples clean
- make doc zip
- make -j2 doc zip
after_success:
- make -f Makefile.travis

View file

@ -1,4 +1,4 @@
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples test
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples test util
.SUFFIXES:
@ -6,6 +6,7 @@ all mostlyclean clean 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 $@
avail unavail bin:
@ -23,6 +24,9 @@ samples:
test:
@$(MAKE) -C test --no-print-directory $@
util:
@$(MAKE) -C util --no-print-directory $@
%65:
@$(MAKE) -C src --no-print-directory $@

View file

@ -1,10 +1,12 @@
[Windows 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)
[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)
[![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)
cc65 is a complete cross development package for 65(C)02 systems, including
a powerful macro assembler, a C compiler, linker, librarian and several
@ -25,6 +27,7 @@ including
- the Atari 8-bit machines.
- the Atari 2600 console.
- the Atari 5200 console.
- the Atari 7800 console.
- GEOS for the C64, C128 and Apple //e.
- the Bit Corporation Gamate console.
- the NEC PC-Engine (aka TurboGrafx-16) console.
@ -35,6 +38,8 @@ including
- the Oric Telestrat.
- the Lynx console.
- the Ohio Scientific Challenger 1P.
- the Commander X16.
- the Synertek Systems Sym-1.
The libraries are fairly portable, so creating a version for other 6502s
shouldn't be too much work.

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

8
asminc/atari7800.inc Normal file
View file

@ -0,0 +1,8 @@
; 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"

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

@ -77,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

@ -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

@ -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

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

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 */
;/* */

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

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

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

@ -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 TELEMON 3.x
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
@ -275,8 +275,9 @@ XFWRITE = $3B ; Only in TELEMON 3.x write file (bank 7 of Orix
; 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
; 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 +285,25 @@ XSOUND = $44
XMUSIC = $45
XZAP = $46 ; Send Zap sound to PSG
XSHOOT = $47
; Path Management
XGETCWD = $48 ; Get current CWD
XPUTCWD = $49 ; Chdir
; File management
XMKDIR = $4B ; Create a folder. Only available in TELEMON 3.x (bank 7 of Orix)
XHCHRS = $4C ; Hard copy hires
; File management
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
; 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
@ -299,8 +315,27 @@ 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)
; 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 TELEMON 3.x (bank 7 of 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 & 3.x : 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 +359,7 @@ PWD_PTR = $00
; ---------------------------------------------------------------------------
;
BUFTRV := $100
BUFTRV := $100
; ---------------------------------------------------------------------------
@ -337,7 +372,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,8 +1,7 @@
;
; 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
@ -36,6 +35,8 @@ KBDREPEAT := $28a
KBDREPEATRATE := $28b
KBDREPEATDELAY := $28c
RSSTAT := $297 ; RS-232 device driver status
; ---------------------------------------------------------------------------
; Screen size
@ -89,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
@ -111,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

67
cfg/atari7800.cfg Normal file
View file

@ -0,0 +1,67 @@
# 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 = 121, 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;
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__;
}

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;
}

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;
}

19
cfg/vic20-asm.cfg Normal file
View file

@ -0,0 +1,19 @@
FEATURES {
STARTADDRESS: default = $1001;
}
SYMBOLS {
__LOADADDR__: type = import;
}
MEMORY {
ZP: file = "", start = $0002, size = $001A, define = yes;
LOADADDR: file = %O, start = $1001, size = $0002;
MAIN: file = %O, start = %S, size = $0DF3 - %S;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, optional = yes, define = yes;
}

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
@ -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()/.
@ -370,7 +370,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,8 +428,8 @@ The names in the parentheses denote the symbols to be used for static linking of
<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
requires hardware flow control (RTS/CTS) and does interrupt driven receives.
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.
@ -575,15 +575,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
@ -606,8 +604,6 @@ 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/.
<tag>Example</tag>
@ -624,8 +620,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

@ -33,7 +33,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
@ -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="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()/.
@ -376,7 +376,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,8 +428,8 @@ The names in the parentheses denote the symbols to be used for static linking of
<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
requires hardware flow control (RTS/CTS) and does interrupt driven receives.
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.
@ -580,15 +580,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
@ -611,8 +609,6 @@ 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/.
<tag>Example</tag>
@ -629,8 +625,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.
@ -401,7 +401,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:
@ -410,7 +410,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.
@ -675,9 +675,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">
@ -726,6 +726,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>
@ -1141,8 +1146,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
@ -1170,7 +1175,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.

View file

@ -237,7 +237,7 @@ The runtime library provides a default game name which is "cc65
compiled". To change that, one has to link a file which puts data into
the "<tt/CARTNAME/" segment.
For reference, here's the default version used by the cc65 libary:
For reference, here's the default version used by the cc65 library:
<tscreen><verb>
.export __CART_NAME__: absolute = 1
.macpack atari

157
doc/atari7800.sgml Normal file
View file

@ -0,0 +1,157 @@
<!doctype linuxdoc system>
<article>
<title>Atari 7800 specific information for cc65
<author>
<url url="mailto:karri@sipo.fi" name="Karri Kaksonen"><newline>
<abstract>
An overview over the Atari 7800 runtime system as it is implemented
for the cc65 C compiler.
</abstract>
<!-- Table of contents -->
<toc>
<!-- Begin the document -->
<sect>Overview<p>
This file contains an overview of the Atari 7800 runtime system as it
comes with the cc65 C compiler. It describes the memory layout, Atari
7800 specific header files and any pitfalls specific to that platform.
<sect>Binary format<p>
The default binary output format generated by the linker for the Atari
7800 target is a 48K cartridge image.
<sect>A78 header<p>
There is lots of different cart hardware available for the atari7800.
Some carts have ROM, RAM, sound hardware, non-volatile high score chips.
In order to know what kind of hardware the cart build requires there is
a header file of 128 bytes in front of the binary.
The default build creates a cart file for a 48K rom cart without any
extra features like the pokey audio chip or extra RAM.
In order to make cc65 more user friendly the build will add the a78
header automatically. This allows you to run the binary on emulators
and flash carts on the real console.
<sect>Encryption<p>
In order to boot the game in a mode that supports atari7800 functions
the cart must be encrypted after the linking phase.
There is a program called sign7800 that can be used to sign the cart.
The encryption is not required for running the cart on emulators.
You can also run atari2600 games without encryption.
<sect>Memory layout<p>
cc65 generated programs with the default setup can use RAM from
from &dollar;1800 to &dollar;203f.
The 4k RAM is then mapped to zero page area.
&dollar;2040 to &dollar;20ff is visible as zero page.
After that we have a vero small RAM area that is unused.
&dollar;2100 to &dollar;213f.
Then we mirror a second block from the RAM to become the hardware stack.
This would be from &dollar;2140 to &dollar;21ff.
The C-stack starts at &dollar;2800 and it can grow down to &dollar;2200.
size of the system stack can be customized by defining the
__STACKSIZE__ linker variable.
Special locations:
<descrip>
<tag/Stack/ The C runtime stack is located at &dollar;2800 -
__STACKSIZE__ and growing downwards.
<tag/Heap/ The C heap is located at &dollar;2200 and grows upwards.
</descrip><p>
<sect>Start-up condition<p>
When powered-up, the Atari 7800 TIA registers contain random
values. During the initialization phase, the start-up code needs to
initialize the TIA registers to sound values (or else the console has
an unpredictable behavior). In this implementation, zeros are written
to all of TIA registers during the start-up phase.
Note that RIOT registers (mostly timers) are left uninitialized, as
they don't have any consequence on the console behavior.
<sect>Platform specific header files<p>
Programs containing Atari 7800 specific code may use the
<tt/atari7800.h/ header file.
The following pseudo variables declared in the <tt/atari7800.h/ header
file allow access to the Atari 7800 TIA, MARIA & RIOT chips registers.
<descrip>
<tag><tt/TIA/</tag> The <tt/TIA/ structure allows read/write access
to the Atari 7800 TIA chip registers. See the <tt/_tia.h/ header
file located in the include directory for the declaration of the
structure. Also refer to the Stella Programmer's Guide by Steve
Wright for a detailed description of the chip and its registers.
<tag><tt/RIOT/</tag> The <tt/RIOT/ structure allows read/write
access to the Atari 7800 RIOT chip registers. See the
<tt/_riot.h/ header file located in the include directory for the
declaration of the structure. Also refer to the Stella Programmer's
Guide by Steve Wright for a detailed description of the chip and its
registers.
<tag><tt/MARIA/</tag> The <tt/MARIA/ structure allows read/write
access to the Atari 7800 MARIA chip registers. See the
<tt/_maria.h/ header file located in the include directory for the
declaration of the structure.
</descrip><p>
<sect>Loadable drivers<p>
There are no drivers for the Atari 7800.
<sect>Limitations<p>
TBD
<sect>Other hints<p>
One may write a custom linker configuration file to tune the memory
layout of a program. See the <tt/atari7800.cfg/ file in the cfg
directory as a starting point.
<sect>License<p>
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:
<enum>
<item> 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.
<item> Altered source versions must be plainly marked as such, and must not
be misrepresented as being the original software.
<item> This notice may not be removed or altered from any source
distribution.
</enum>
</article>

View file

@ -176,10 +176,11 @@ No mouse drivers are currently available for the Atmos.
<tag><tt/atmos-acia.ser (atmos_acia_ser)/</tag>
Driver for the Telestrat integrated serial controller and the Atmos with a
serial add-on.
Note that, because of the peculiarities of the 6551 chip, together with the
use of the NMI, transmits are not interrupt driven; and, the transceiver
blocks if the receiver asserts flow control because of a full buffer.
serial add-on. Supports up to 19200 baud, requires hardware flow control
(RTS/CTS) and does interrupt driven receives. Note that, because of the
peculiarities of the 6551 chip, together with the use of the NMI, transmits
are not interrupt driven; and, the transceiver blocks if the receiver
asserts flow control because of a full buffer.
</descrip><p>

View file

@ -324,9 +324,9 @@ The default drivers, <tt/mouse_stddrv (mouse_static_stddrv)/, point to <tt/c128-
<descrip>
<tag><tt/c128-swlink.ser (c128_swlink_ser)/</tag>
Driver for the SwiftLink cartridge. Supports up to 38400 BPS, hardware flow
control (RTS/CTS), and interrupt-driven receives. Note that, because of the
peculiarities of the 6551 chip, together with the use of the NMI, transmits
Driver for the SwiftLink cartridge. Supports up to 38400 baud, requires hardware
flow control (RTS/CTS) and does interrupt driven receives. Note that, because of
the peculiarities of the 6551 chip, together with the use of the NMI, transmits
are not interrupt driven; and, the transceiver blocks if the receiver asserts
flow control because of a full buffer.

View file

@ -126,7 +126,7 @@ and &dollar;FF3F.
In memory constrained situations the memory from &dollar;400 to &dollar;7FF
can be made available to a program by calling <tt/_heapadd ((void *) 0x0400, 0x0400);/
at the beginning of <tt/main()/. Doing so is beneficial even if the program
doesn't use the the heap explicitly because loading a driver uses the heap implicitly.
doesn't use the heap explicitly because loading a driver uses the heap implicitly.
Using <tt/c64-soft80.o/ is as simple as placing it on the linker command
line like this:
@ -410,9 +410,9 @@ The default drivers, <tt/mouse_stddrv (mouse_static_stddrv)/, point to <tt/c64-1
<descrip>
<tag><tt/c64-swlink.ser (c64_swlink_ser)/</tag>
Driver for the SwiftLink cartridge. Supports up to 38400 BPS, hardware flow
control (RTS/CTS), and interrupt-driven receives. Note that, because of the
peculiarities of the 6551 chip, together with the use of the NMI, transmits
Driver for the SwiftLink cartridge. Supports up to 38400 baud, requires hardware
flow control (RTS/CTS) and does interrupt driven receives. Note that, because of
the peculiarities of the 6551 chip, together with the use of the NMI, transmits
are not interrupt driven; and, the transceiver blocks if the receiver asserts
flow control because of a full buffer.

View file

@ -301,7 +301,7 @@ Here is a description of all the command line options:
compiler, see there for a list.
Depending on the target, the default CPU type is also set. This can be
overriden by using the <tt/<ref id="option--cpu" name="--cpu">/ option.
overridden by using the <tt/<ref id="option--cpu" name="--cpu">/ option.
<label id="option-v">
@ -1353,15 +1353,15 @@ writable.
<sect>Pseudo functions<label id="pseudo-functions"><p>
Pseudo functions expect their arguments in parenthesis, and they have a result,
either a string or an expression.
Pseudo functions expect their arguments in parentheses, and they have a result,
either a string or an expression value.
<sect1><tt>.ADDRSIZE</tt><label id=".ADDRSIZE"><p>
The <tt/.ADDRSIZE/ function is used to return the interal address size
The <tt/.ADDRSIZE/ function is used to return the internal address size
associated with a symbol. This can be helpful in macros when knowing the address
size of symbol can help with custom instructions.
size of a symbol can help with custom instructions.
Example:
@ -1389,7 +1389,7 @@ either a string or an expression.
<sect1><tt>.BANK</tt><label id=".BANK"><p>
The <tt/.BANK/ function is used to support systems with banked memory. The
argument is an expression with exactly one segment reference - usually a
argument is an expression with exactly one segment reference -- usually a
label. The function result is the value of the <tt/bank/ attribute assigned
to the run memory area of the segment. Please see the linker documentation
for more information about memory areas and their attributes.
@ -1397,13 +1397,13 @@ either a string or an expression.
The value of <tt/.BANK/ can be used to switch memory so that a memory bank
containing specific data is available.
The <tt/bank/ attribute is a 32 bit integer and so is the result of the
The <tt/bank/ attribute is a 32-bit integer, and so is the result of the
<tt/.BANK/ function. You will have to use <tt><ref id=".LOBYTE"
name=".LOBYTE"></tt> or similar functions to address just part of it.
Please note that <tt/.BANK/ will always get evaluated in the link stage, so
an expression containing <tt/.BANK/ can never be used where a constant known
result is expected (for example with <tt/.RES/).
Please note that <tt/.BANK/ always will get evaluated in the link stage, so
an expression containing <tt/.BANK/ never can be used where a constant, known
result is expected (for example, with <tt/.RES/).
Example:
@ -1440,7 +1440,7 @@ either a string or an expression.
<sect1><tt>.BLANK</tt><label id=".BLANK"><p>
Builtin function. The function evaluates its argument in braces and yields
Builtin function. The function evaluates its argument in parentheses and yields
"false" if the argument is non blank (there is an argument), and "true" if
there is no argument. The token list that makes up the function argument
may optionally be enclosed in curly braces. This allows the inclusion of
@ -1479,7 +1479,7 @@ either a string or an expression.
<sect1><tt>.CONST</tt><label id=".CONST"><p>
Builtin function. The function evaluates its argument in braces and
Builtin function. The function evaluates its argument in parentheses and
yields "true" if the argument is a constant expression (that is, an
expression that yields a constant value at assembly time) and "false"
otherwise. As an example, the .IFCONST statement may be replaced by
@ -1489,6 +1489,41 @@ either a string or an expression.
</verb></tscreen>
<sect1><tt>.DEF, .DEFINED</tt><label id=".DEFINED"><p>
Builtin function. The function expects an identifier as argument in parentheses.
The argument is evaluated, and the function yields "true" if the identifier
is a symbol that already is defined somewhere in the source file up to the
current position. Otherwise, the function yields false. As an example, the
<tt><ref id=".IFDEF" name=".IFDEF"></tt> statement may be replaced by
<tscreen><verb>
.if .defined(a)
</verb></tscreen>
<sect1><tt>.DEFINEDMACRO</tt><label id=".DEFINEDMACRO"><p>
Builtin function. The function expects an identifier as argument in parentheses.
The argument is evaluated, and the function yields "true" if the identifier
already has been defined as the name of a macro. Otherwise, the function yields
false. Example:
<tscreen><verb>
.macro add foo
clc
adc foo
.endmacro
.if .definedmacro(add)
add #$01
.else
clc
adc #$01
.endif
</verb></tscreen>
<sect1><tt>.HIBYTE</tt><label id=".HIBYTE"><p>
The function returns the high byte (that is, bits 8-15) of its argument.
@ -1525,6 +1560,23 @@ either a string or an expression.
</verb></tscreen>
<sect1><tt>.ISMNEM, .ISMNEMONIC</tt><label id=".ISMNEMONIC"><p>
Builtin function. The function expects an identifier as argument in parentheses.
The argument is evaluated, and the function yields "true" if the identifier
is defined as an instruction mnemonic that is recognized by the assembler.
Example:
<tscreen><verb>
.if .not .ismnemonic(ina)
.macro ina
clc
adc #$01
.endmacro
.endif
</verb></tscreen>
<sect1><tt>.LEFT</tt><label id=".LEFT"><p>
Builtin function. Extracts the left part of a given token list.
@ -1719,7 +1771,7 @@ either a string or an expression.
<sect1><tt>.REF, .REFERENCED</tt><label id=".REFERENCED"><p>
Builtin function. The function expects an identifier as argument in braces.
Builtin function. The function expects an identifier as argument in parentheses.
The argument is evaluated, and the function yields "true" if the identifier
is a symbol that has already been referenced somewhere in the source file up
to the current position. Otherwise the function yields false. As an example,
@ -1826,24 +1878,6 @@ either a string or an expression.
</descrip>
<sect1><tt>.STRAT</tt><label id=".STRAT"><p>
Builtin function. The function accepts a string and an index as
arguments and returns the value of the character at the given position
as an integer value. The index is zero based.
Example:
<tscreen><verb>
.macro M Arg
; Check if the argument string starts with '#'
.if (.strat (Arg, 0) = '#')
...
.endif
.endmacro
</verb></tscreen>
<sect1><tt>.SPRINTF</tt><label id=".SPRINTF"><p>
Builtin function. It expects a format string as first argument. The number
@ -1863,9 +1897,27 @@ either a string or an expression.
</verb></tscreen>
<sect1><tt>.STRAT</tt><label id=".STRAT"><p>
Builtin function. The function accepts a string and an index as
arguments and returns the value of the character at the given position
as an integer value. The index is zero based.
Example:
<tscreen><verb>
.macro M Arg
; Check if the argument string starts with '#'
.if (.strat (Arg, 0) = '#')
...
.endif
.endmacro
</verb></tscreen>
<sect1><tt>.STRING</tt><label id=".STRING"><p>
Builtin function. The function accepts an argument in braces and converts
Builtin function. The function accepts an argument in parentheses and converts
this argument into a string constant. The argument may be an identifier, or
a constant numeric value.
@ -1884,7 +1936,7 @@ either a string or an expression.
<sect1><tt>.STRLEN</tt><label id=".STRLEN"><p>
Builtin function. The function accepts a string argument in braces and
Builtin function. The function accepts a string argument in parentheses and
evaluates to the length of the string.
Example:
@ -1901,7 +1953,7 @@ either a string or an expression.
<sect1><tt>.TCOUNT</tt><label id=".TCOUNT"><p>
Builtin function. The function accepts a token list in braces. The function
Builtin function. The function accepts a token list in parentheses. The function
result is the number of tokens given as argument. The token list may
optionally be enclosed into curly braces which are not considered part of
the list and not counted. Enclosement in curly braces allows the inclusion
@ -2084,7 +2136,11 @@ Here's a list of all control commands and a description, what they do:
This will put the string "Hello world" followed by a binary zero into
the current segment. There may be more strings separated by commas, but
the binary zero is only appended once (after the last one).
the binary zero is only appended once (after the last one). Strings will
be translated using the current character mapping definition.
See: <tt><ref id=".BYTE" name=".BYTE"></tt>,<tt><ref id=".CHARMAP" name=".CHARMAP"></tt>,
<tt><ref id=".LITERAL" name=".LITERAL"></tt>
<sect1><tt>.ASSERT</tt><label id=".ASSERT"><p>
@ -2180,7 +2236,8 @@ Here's a list of all control commands and a description, what they do:
<sect1><tt>.BYT, .BYTE</tt><label id=".BYTE"><p>
Define byte sized data. Must be followed by a sequence of (byte ranged)
expressions or strings.
expressions or strings. Strings will be translated using the current
character mapping definition.
Example:
@ -2189,6 +2246,9 @@ Here's a list of all control commands and a description, what they do:
.byt "world", $0D, $00
</verb></tscreen>
See: <tt><ref id=".ASCIIZ" name=".ASCIIZ"></tt>,<tt><ref id=".CHARMAP" name=".CHARMAP"></tt>
<tt><ref id=".LITERAL" name=".LITERAL"></tt>
<sect1><tt>.CASE</tt><label id=".CASE"><p>
@ -2207,8 +2267,10 @@ Here's a list of all control commands and a description, what they do:
<sect1><tt>.CHARMAP</tt><label id=".CHARMAP"><p>
Apply a custom mapping for characters. The command is followed by two
numbers. The first one is the index of the source character (range 0..255);
Apply a custom mapping for characters for the commands <tt><ref id=".ASCIIZ"
name=".ASCIIZ"></tt> and <tt><ref id=".BYTE" name=".BYTE"></tt>. The command
is followed by two numbers. The first one is the index of the source character
(range 0..255);
the second one is the mapping (range 0..255). The mapping applies to all
character and string constants <em/when/ they generate output; and, overrides
a mapping table specified with the <tt><ref id="option-t" name="-t"></tt>
@ -2356,7 +2418,7 @@ Here's a list of all control commands and a description, what they do:
Start a define style macro definition. The command is followed by an
identifier (the macro name) and optionally by a list of formal arguments
in braces.
in parentheses.
Please note that <tt/.DEFINE/ shares most disadvantages with its C
counterpart, so the general advice is, <bf/NOT/ do use <tt/.DEFINE/ if you
@ -2380,41 +2442,6 @@ Here's a list of all control commands and a description, what they do:
See also section <ref id="macros" name="Macros">.
<sect1><tt>.DEF, .DEFINED</tt><label id=".DEFINED"><p>
Builtin function. The function expects an identifier as argument in braces.
The argument is evaluated, and the function yields "true" if the identifier
is a symbol that is already defined somewhere in the source file up to the
current position. Otherwise the function yields false. As an example, the
<tt><ref id=".IFDEF" name=".IFDEF"></tt> statement may be replaced by
<tscreen><verb>
.if .defined(a)
</verb></tscreen>
<sect1><tt>.DEFINEDMACRO</tt><label id=".DEFINEDMACRO"><p>
Builtin function. The function expects an identifier as argument in braces.
The argument is evaluated, and the function yields "true" if the identifier
has already been defined as the name of a macro. Otherwise the function yields
false. Example:
<tscreen><verb>
.macro add foo
clc
adc foo
.endmacro
.if .definedmacro(add)
add #$01
.else
clc
adc #$01
.endif
</verb></tscreen>
<sect1><tt>.DESTRUCTOR</tt><label id=".DESTRUCTOR"><p>
Export a symbol and mark it as a module destructor. This may be used
@ -3081,7 +3108,7 @@ Here's a list of all control commands and a description, what they do:
<sect1><tt>.IFDEF</tt><label id=".IFDEF"><p>
Conditional assembly: Check if a symbol is defined. Must be followed by
a symbol name. The condition is true if the the given symbol is already
a symbol name. The condition is true if the given symbol is already
defined, and false otherwise.
See also: <tt><ref id=".DEFINED" name=".DEFINED"></tt>
@ -3116,7 +3143,7 @@ Here's a list of all control commands and a description, what they do:
<sect1><tt>.IFNDEF</tt><label id=".IFNDEF"><p>
Conditional assembly: Check if a symbol is defined. Must be followed by
a symbol name. The condition is true if the the given symbol is not
a symbol name. The condition is true if the given symbol is not
defined, and false otherwise.
See also: <tt><ref id=".DEFINED" name=".DEFINED"></tt>
@ -3125,7 +3152,7 @@ Here's a list of all control commands and a description, what they do:
<sect1><tt>.IFNREF</tt><label id=".IFNREF"><p>
Conditional assembly: Check if a symbol is referenced. Must be followed
by a symbol name. The condition is true if if the the given symbol was
by a symbol name. The condition is true if the given symbol was
not referenced before, and false otherwise.
See also: <tt><ref id=".REFERENCED" name=".REFERENCED"></tt>
@ -3170,7 +3197,7 @@ Here's a list of all control commands and a description, what they do:
<sect1><tt>.IFREF</tt><label id=".IFREF"><p>
Conditional assembly: Check if a symbol is referenced. Must be followed
by a symbol name. The condition is true if if the the given symbol was
by a symbol name. The condition is true if the given symbol was
referenced before, and false otherwise.
This command may be used to build subroutine libraries in include files
@ -3186,7 +3213,8 @@ Here's a list of all control commands and a description, what they do:
.endif
</verb></tscreen>
See also: <tt><ref id=".REFERENCED" name=".REFERENCED"></tt>
See also: <tt><ref id=".REFERENCED" name=".REFERENCED"></tt>, and
<tt><ref id=".REFERTO" name=".REFERTO"></tt>
<sect1><tt>.IMPORT</tt><label id=".IMPORT"><p>
@ -3284,23 +3312,6 @@ Here's a list of all control commands and a description, what they do:
the feature in more detail.
<sect1><tt>.ISMNEM, .ISMNEMONIC</tt><label id=".ISMNEMONIC"><p>
Builtin function. The function expects an identifier as argument in braces.
The argument is evaluated, and the function yields "true" if the identifier
is defined as an instruction mnemonic that is recognized by the assembler.
Example:
<tscreen><verb>
.if .not .ismnemonic(ina)
.macro ina
clc
adc #$01
.endmacro
.endif
</verb></tscreen>
<sect1><tt>.LINECONT</tt><label id=".LINECONT"><p>
Switch on or off line continuations using the backslash character
@ -3356,6 +3367,22 @@ Here's a list of all control commands and a description, what they do:
</verb></tscreen>
<sect1><tt>.LITERAL</tt><label id=".LITERAL"><p>
Define byte sized data. Must be followed by a sequence of (byte ranged)
expressions or strings. Strings will disregard the current character
mapping definition and will be interpreted literally.
Example:
<tscreen><verb>
.literal "Hello "
.literal "world", $0D, $00
</verb></tscreen>
See: <tt><ref id=".ASCIIZ" name=".ASCIIZ"></tt>,<tt><ref id=".BYTE" name=".BYTE"></tt>
<sect1><tt>.LOBYTES</tt><label id=".LOBYTES"><p>
Define byte sized data by extracting only the low byte (that is, bits 0-7) from
@ -3601,6 +3628,21 @@ Here's a list of all control commands and a description, what they do:
See: <tt><ref id=".P02" name=".P02"></tt>
<sect1><tt>.POPCHARMAP</tt><label id=".POPCHARMAP"><p>
Pop the last character mapping from the stack, and activate it.
This command will switch back to the character mapping that was last pushed onto the
character mapping stack using the <tt><ref id=".PUSHCHARMAP" name=".PUSHCHARMAP"></tt>
command, and remove this entry from the stack.
The assembler will print an error message if the mappting stack is empty when
this command is issued.
See: <tt><ref id=".CHARMAP" name=".CHARMAP"></tt>, <tt><ref id=".PUSHCHARMAP"
name=".PUSHCHARMAP"></tt>
<sect1><tt>.POPCPU</tt><label id=".POPCPU"><p>
Pop the last CPU setting from the stack, and activate it.
@ -3675,6 +3717,22 @@ Here's a list of all control commands and a description, what they do:
<tt><ref id=".P4510" name=".P4510"></tt>
<sect1><tt>.PUSHCHARMAP</tt><label id=".PUSHCHARMAP"><p>
Push the currently active character mapping onto a stack. The stack has a size of 16
entries.
<tt/.PUSHCHARMAP/ allows together with <tt><ref id=".POPCHARMAP"
name=".POPCHARMAP"></tt> to switch to another character mapping and to restore the old
character mapping later, without knowledge of the current mapping.
The assembler will print an error message if the character mapping stack is already full,
when this command is issued.
See: <tt><ref id=".CHARMAP" name=".CHARMAP"></tt>, <tt><ref id=".POPCHARMAP"
name=".POPCHARMAP"></tt>
<sect1><tt>.PUSHCPU</tt><label id=".PUSHCPU"><p>
Push the currently active CPU onto a stack. The stack has a size of 8
@ -3707,6 +3765,46 @@ Here's a list of all control commands and a description, what they do:
See: <tt><ref id=".POPSEG" name=".POPSEG"></tt>
<sect1><tt>.REFERTO, .REFTO</tt><label id=".REFERTO"><p>
Mark a symbol as referenced.
It is useful in combination with the <tt><ref id=".IFREF" name=".IFREF"></tt>
command. A subroutine with two entry points can be created. When the first
entry point is called, it sets some default value as an argument, and falls
through into the second entry point. <tt>.REFERTO</tt> helps to ensure that
the second part is included into binary when only the first entry point is
actually used from the code.
Example:
<tscreen><verb>
.ifref NegateValue ; If this subroutine is used
NegateValue: ; Define it
lda #0
sec
sbc Value
.ifref ResetValue ; If the ResetValue is also used
jmp SetValue ; Jump over it
.else
.refto SetValue ; Ensure that SetValue will be included
.endif
.endif
.ifref ResetValue ; If this subroutine is used
ResetValue: ; Define it
lda #0 ; Set a default value
.refto SetValue ; Ensure that SetValue will be included
.endif
.ifref SetValue ; If this or previous subroutine is used
SetValue:
sta Value
rts
.endif
</verb></tscreen>
<sect1><tt>.RELOC</tt><label id=".RELOC"><p>
Switch back to relocatable mode. See the <tt><ref id=".ORG"
@ -4342,8 +4440,8 @@ different:
For this macro type, the number of actual parameters must match
exactly the number of formal parameters.
To make this possible, formal parameters are enclosed in braces when
defining the macro. If there are no parameters, the empty braces may
To make this possible, formal parameters are enclosed in parentheses when
defining the macro. If there are no parameters, the empty parentheses may
be omitted.
<item> Since <tt><ref id=".DEFINE" name=".DEFINE"></tt> style macros may not
@ -4393,8 +4491,8 @@ Macros with parameters may also be useful:
Note that, while formal parameters have to be placed in parentheses,
the actual argument used when invoking the macro should not be.
The invoked arguments are separated by commas only, if parentheses are
used by accident they will become part of the replaced token.
The invoked arguments are separated by commas only; if parentheses are
used by accident, they will become part of the replaced token.
If you wish to have an expression follow the macro invocation, the
last parameter can be enclosed in curly braces {} to indicate the end of that
@ -4665,6 +4763,7 @@ compiler, depending on the target system selected:
<item><tt/__APPLE2ENH__/ - Target system is <tt/apple2enh/
<item><tt/__ATARI2600__/ - Target system is <tt/atari2600/
<item><tt/__ATARI5200__/ - Target system is <tt/atari5200/
<item><tt/__ATARI7800__/ - Target system is <tt/atari7800/
<item><tt/__ATARI__/ - Target system is <tt/atari/ or <tt/atarixl/
<item><tt/__ATARIXL__/ - Target system is <tt/atarixl/
<item><tt/__ATMOS__/ - Target system is <tt/atmos/
@ -4688,6 +4787,7 @@ compiler, depending on the target system selected:
<item><tt/__SIM6502__/ - Target system is <tt/sim6502/
<item><tt/__SIM65C02__/ - Target system is <tt/sim65c02/
<item><tt/__SUPERVISION__/ - Target system is <tt/supervision/
<item><tt/__SYM1__/ - Target system is <tt/sym1/
<item><tt/__VIC20__/ - Target system is <tt/vic20/
</itemize>

View file

@ -231,10 +231,10 @@ The default drivers, <tt/mouse_stddrv (mouse_static_stddrv)/, point to <tt/cbm51
<tag><tt/cbm510-std.ser (cbm510_std_ser)/</tag>
Driver for the 6551 ACIA chip built into the Commodore 510. Supports up to
19200 BPS, hardware flow control (RTS/CTS), and interrupt-driven receives.
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.
19200 baud, requires hardware flow control (RTS/CTS) and does interrupt driven
receives. 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.
</descrip><p>

View file

@ -212,10 +212,10 @@ No mouse drivers are currently available for the Commodore 610.
<tag><tt/cbm610-std.ser (cbm610_std_ser)/</tag>
Driver for the 6551 ACIA chip built into the Commodore 610. Supports up to
19200 BPS, hardware flow control (RTS/CTS), and interrupt-driven receives.
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.
19200 baud, requires hardware flow control (RTS/CTS) and does interrupt driven
receives. 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.
</descrip><p>

View file

@ -198,6 +198,189 @@ Here is a description of all the command line options:
Enables debug mode, for debugging the behavior of cc65.
<tag><tt>--debug-tables name</tt></tag>
Writes symbol table information to a file, which includes details on structs, unions
functions, and global variables. For example, given the following code:
<tscreen><verb>
struct l {
unsigned char m;
unsigned char n;
};
struct hello {
unsigned char j;
unsigned char k;
struct l l;
};
struct sub {
unsigned char x;
unsigned char y;
};
union xy {
struct sub xy;
unsigned int mem;
};
typedef struct hello thingy;
unsigned char single;
unsigned char test_local_vars_main(void) {
static unsigned char wahoo;
static unsigned char bonanza = 0x42;
unsigned char i;
unsigned int j;
unsigned int *random;
unsigned char *lol;
signed char whoa;
struct hello wow;
thingy *cool;
union xy xy;
return 0;
}
</verb></tscreen>
The following output would be produced:
<tscreen><verb>
SC_FUNC: _test_local_vars_main: Symbol table
============================================
__fixargs__:
Flags: SC_CONST SC_DEF
Type: unsigned int
__argsize__:
Flags: SC_CONST SC_DEF
Type: unsigned char
wahoo:
AsmName: M0001
Flags: SC_STATIC SC_DEF SC_REF
Type: unsigned char
bonanza:
AsmName: M0002
Flags: SC_STATIC SC_DEF SC_REF
Type: unsigned char
i:
Flags: SC_AUTO SC_DEF SC_REF
Type: unsigned char
j:
Flags: SC_AUTO SC_DEF SC_REF
Type: unsigned int
random:
Flags: SC_AUTO SC_DEF SC_REF
Type: unsigned int *
lol:
Flags: SC_AUTO SC_DEF SC_REF
Type: unsigned char *
whoa:
Flags: SC_AUTO SC_DEF SC_REF
Type: signed char
wow:
Flags: SC_AUTO SC_DEF SC_REF
Type: struct hello
cool:
Flags: SC_AUTO SC_DEF SC_REF
Type: struct hello *
xy:
Flags: SC_AUTO SC_DEF SC_REF
Type: union xy
Global symbol table
===================
thingy:
AsmName: _thingy
Flags: SC_TYPEDEF 0x100000
Type: struct hello
single:
AsmName: _single
Flags: SC_STATIC SC_EXTERN SC_STORAGE SC_DEF SC_REF 0x100000
Type: unsigned char
test_local_vars_main:
AsmName: _test_local_vars_main
Flags: SC_FUNC SC_STATIC SC_EXTERN SC_DEF 0x100000
Type: unsigned char (void)
Global tag table
================
l:
Flags: SC_STRUCT SC_DEF
Type: (none)
hello:
Flags: SC_STRUCT SC_DEF
Type: (none)
sub:
Flags: SC_STRUCT SC_DEF
Type: (none)
xy:
Flags: SC_UNION SC_DEF
Type: (none)
Global struct and union definitions
=========================
SC_STRUCT: l
============
m:
Flags: SC_STRUCTFIELD
Type: unsigned char
n:
Flags: SC_STRUCTFIELD
Type: unsigned char
SC_STRUCT: hello
================
j:
Flags: SC_STRUCTFIELD
Type: unsigned char
k:
Flags: SC_STRUCTFIELD
Type: unsigned char
l:
Flags: SC_STRUCTFIELD
Type: struct l
SC_STRUCT: sub
==============
x:
Flags: SC_STRUCTFIELD
Type: unsigned char
y:
Flags: SC_STRUCTFIELD
Type: unsigned char
SC_UNION: xy
============
xy:
Flags: SC_STRUCTFIELD
Type: struct sub
mem:
Flags: SC_STRUCTFIELD
Type: unsigned int
</verb></tscreen>
<tag><tt>--debug-opt name</tt></tag>
The named file contains a list of specific optimization steps to enable or disable.
@ -395,7 +578,7 @@ Here is a description of all the command line options:
This option is used to set the target system. The target system determines
the character set that is used for strings and character constants and the
default CPU. The CPU setting can be overriden by use of the <tt/<ref
default CPU. The CPU setting can be overridden by use of the <tt/<ref
id="option--cpu" name="--cpu">/ option.
The following target systems are supported:
@ -546,6 +729,12 @@ Here is a description of all the command line options:
Treat all warnings as errors.
<tag><tt/no-effect/</tag>
Warn about statements that don't have an effect.
<tag><tt/pointer-sign/</tag>
Warn if a pointer assignment changes the signedness of the target
of a pointer value, and the new signedness wasn't cast explicitly.
<tag><tt/pointer-types/</tag>
Warn if a pointer assignment changes the type of the target
of a pointer value, and the new type wasn't cast explicitly.
<tag><tt/remap-zero/</tag>
Warn about a <tt/<ref id="pragma-charmap" name="#pragma charmap()">/
that changes a character's code number from/to 0x00.
@ -555,6 +744,10 @@ Here is a description of all the command line options:
Warn when passing structs by value.
<tag><tt/unknown-pragma/</tag>
Warn about #pragmas that aren't recognized by cc65.
<tag><tt/unreachable-code/</tag>
Warn about unreachable code in cases of comparing constants, etc.
<tag><tt/unused-func/</tag>
Warn about unused functions.
<tag><tt/unused-label/</tag>
Warn about unused labels.
<tag><tt/unused-param/</tag>
@ -1012,6 +1205,10 @@ The compiler defines several macros at startup:
This macro is defined if the target is the Supervision (-t supervision).
<tag><tt>__SYM1__</tt></tag>
This macro is defined if the target is the Sym-1 (-t sym1).
<tag><tt>__TELESTRAT__</tt></tag>
This macro is defined if the target is the Telestrat (-t telestrat).
@ -1236,7 +1433,7 @@ parameter with the <tt/#pragma/.
This pragma is used to display informational messages at compile-time.
The message intented to be displayed must be a string literal.
The message intended to be displayed must be a string literal.
Example:
<tscreen><verb>
@ -1355,7 +1552,7 @@ parameter with the <tt/#pragma/.
Switch compiler warnings on or off. "name" is the name of a warning (see the
<tt/<ref name="-W" id="option-W">/ compiler option for a list). The name is
followed either by "pop", which restores the last pushed state, or by "on" or
"off", optionally preceeded by "push" to push the current state before
"off", optionally preceded by "push" to push the current state before
changing it.
Example:
@ -1380,7 +1577,12 @@ parameter with the <tt/#pragma/.
the <tt/Y/ register if it wraps any variadic functions (they have "<tt/.../"
in their prototypes).
The identifier is an 8-bit number that's set into <tt/tmp4/.
The identifier is an 8-bit number that's set into <tt/tmp4/. If the identifier
is "bank", then ca65's <tt><url url="ca65.html#.BANK" name=".bank"></tt> function will be used
to determine the number from the bank attribute defined in the linker config,
see <url url="ld65.html#MEMORY" name="Other MEMORY area attributes">. Note that
this currently implies that only the least significant 8 bits of the bank attribute
can be used.
The address of a wrapped function is passed in <tt/ptr4/. The wrapper can
call that function by using "<tt/jsr callptr4/".
@ -1654,7 +1856,7 @@ This is the original compiler copyright:
Anyone may copy or redistribute these programs, provided that:
1: You don't charge anything for the copy. It is permissable to
1: You don't charge anything for the copy. It is permissible to
charge a nominal fee for media, etc.
2: All source code and documentation for the programs is made

View file

@ -57,11 +57,11 @@ Short options:
-O Optimize code
-Oi Optimize code, inline more code
-Or Optimize code, honour the register keyword
-Os Optimize code, inline standard funtions
-Os Optimize code, inline standard functions
-S Compile but don't assemble and link
-T Include source as comment
-V Print the version number
-W name[,...] Supress compiler warnings
-W name[,...] Suppress compiler warnings
-Wa options Pass options to the assembler
-Wc options Pass options to the compiler
-Wl options Pass options to the linker

View file

@ -235,12 +235,12 @@ things to be different from runtime loading:
<item> Without changing the segment names, all segments take the default
names used by the standard linker configurations. This means that the
driver code is no longer contingous in memory, instead the code
driver code is no longer contiguous in memory, instead the code
segment is placed somewhere in between all other code segments, the
data segment is placed with all other data segments and so on. If the
driver doesn't do strange things this shouldn't be a problem.
<item> With statically linked code, data and bss segments will get intialized
<item> With statically linked code, data and bss segments will get initialized
once (when the application is loaded), while a loadable driver will
get its initialization each time the driver is loaded into memory
(which may be more than once in the lifetime of a program). It depends

View file

@ -59,7 +59,7 @@ slower than the same code for unsigned types.
<sect>Use chars instead of ints if possible<p>
While in arithmetic operations, chars are immidiately promoted to ints, they
While in arithmetic operations, chars are immediately promoted to ints, they
are passed as chars in parameter lists and are accessed as chars in variables.
The code generated is usually not much smaller, but it is faster, since
accessing chars is faster. For several operations, the generated code may be

View file

@ -142,13 +142,20 @@ The functions listed below are special for the CX16. See the <url
url="funcref.html" name="function reference"> for declarations and usage.
<itemize>
<item>get_ostype
<item>set_tv
<item>videomode
<item>vpeek
<item>vpoke
<item>get_ostype()
<item>set_tv()
<item>videomode()
<item>vpeek()
<item>vpoke()
</itemize>
<tt/cpeekcolor()/ works differently on the Commander X16 than it does on other
platforms. Each character has two colors: background and text (foreground).
<tt/cpeekcolor()/ returns both colors. The high nybble describes the
background color, the low nybble describes the text color. For example, if the
function is used on the default screen, then it returns &dollar;61, which means
white-on-blue.
<sect1>CBM-specific functions<p>
@ -157,32 +164,32 @@ machines. See the <url url="funcref.html" name="function reference"> for
declarations and usage.
<itemize>
<item>cbm_close
<item>cbm_closedir
<item>cbm_k_basin
<item>cbm_k_bsout
<item>cbm_k_chkin
<item>cbm_k_ckout
<item>cbm_k_close
<item>cbm_k_clrch
<item>cbm_k_getin
<item>cbm_k_load
<item>cbm_k_open
<item>cbm_k_readst
<item>cbm_k_save
<item>cbm_k_second
<item>cbm_k_setlfs
<item>cbm_k_setnam
<item>cbm_k_tksa
<item>cbm_load
<item>cbm_open
<item>cbm_opendir
<item>cbm_read
<item>cbm_readdir
<item>cbm_save
<item>cbm_write
<item>get_tv
<item>waitvsync
<item>cbm_close()
<item>cbm_closedir()
<item>cbm_k_basin()
<item>cbm_k_bsout()
<item>cbm_k_chkin()
<item>cbm_k_ckout()
<item>cbm_k_close()
<item>cbm_k_clrch()
<item>cbm_k_getin()
<item>cbm_k_load()
<item>cbm_k_open()
<item>cbm_k_readst()
<item>cbm_k_save()
<item>cbm_k_second()
<item>cbm_k_setlfs()
<item>cbm_k_setnam()
<item>cbm_k_tksa()
<item>cbm_load()
<item>cbm_open()
<item>cbm_opendir()
<item>cbm_read()
<item>cbm_readdir()
<item>cbm_save()
<item>cbm_write()
<item>get_tv()
<item>waitvsync()
</itemize>

View file

@ -156,7 +156,7 @@ Here is a description of all the command line options:
<tag><tt>-i name, --info name</tt></tag>
Specify an info file. The info file contains global options that may
override or replace command line options plus informations about the code
override or replace command line options plus information about the code
that has to be disassembled. See the separate section <ref id="infofile"
name="Info File Format">.

View file

@ -16,7 +16,7 @@ How to debug your code using the VICE and Oricutron emulators.
<sect>Overview<p>
This document describes how to debug your programs using the cc65 development
tools and the VICE CBM emulator.
tools and the VICE or Oricutron emulator.
@ -39,7 +39,7 @@ transfer the program to the real machine until it is done.
<item>An emulator allows many things that are almost impossible one of the
original machines. You may set watchpoints (detect read or write access to
arbitary addresses), debug interrupt handlers and even debug routines that run
arbitrary addresses), debug interrupt handlers and even debug routines that run
inside the 1541 floppy.
<item>You may use the label file generated by the linker to make much more use
@ -117,7 +117,7 @@ these warnings and errors as long as they reference any problems VICE thinks
it has with the labels.
After loading the labels, they are used by VICE in the disassembler listing,
and you may use them whereever you need to specify an address. Try
and you may use them wherever you need to specify an address. Try
<tscreen><verb>
d ._main
@ -126,6 +126,12 @@ and you may use them whereever you need to specify an address. Try
as an example (note that VICE needs a leading dot before all labels, and that
the compiler prepends an underline under most named labels).
If you start the emulator from the commandline, you can also load the labels
directly using something like this:
<tscreen><verb>
x64sc -moncommands hello.lbl hello.prg
</verb></tscreen>
<sect>How to use the label file with Oricutron<p>
@ -138,14 +144,13 @@ load your label file like this:
</verb></tscreen>
After loading the labels, they are used by Oricutron in the disassembler listing,
and you may use them whereever you need to specify an address. Try
and you may use them wherever you need to specify an address. Try
<tscreen><verb>
d ._main
</verb></tscreen>
as an example (note that VICE needs a leading dot before all labels, and that
the compiler prepends an underline under most named labels).
as an example.

View file

@ -298,6 +298,16 @@ function.
</itemize>
<sect1><tt/creativision.h/<label id="creativision.h"><p>
<itemize>
<item><ref id="bios_playsound" name="bios_playsound">
<item><ref id="psg_delay" name="psg_delay">
<item><ref id="psg_outb" name="psg_outb">
<item><ref id="psg_silence" name="psg_silence">
</itemize>
<sect1><tt/ctype.h/<label id="ctype.h"><p>
<itemize>
@ -744,6 +754,16 @@ communication, see also <tt>testcode/lib/ser-test.c</tt>.
</itemize>
<sect1><tt/sym1.h/<label id="sym1.h"><p>
<itemize>
<item><ref id="beep" name="beep">
<item><ref id="fdisp" name="fdisp">
<item><ref id="loadt" name="loadt">
<item><ref id="dumpt" name="dumpt">
</itemize>
<sect1><tt/telestrat.h/<label id="telestrat.h"><p>
<itemize>
@ -1659,6 +1679,27 @@ used in presence of a prototype.
</quote>
<sect1>beep<label id="beep"><p>
<quote>
<descrip>
<tag/Function/Beep sound.
<tag/Header/<tt/<ref id="sym1.h" name="sym1.h">/
<tag/Declaration/<tt/void beep(void);/
<tag/Description/<tt/beep/ makes a brief tone.
<tag/Notes/<itemize>
<item>The function is specific to the Sym-1.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="fdisp" name="fdisp">,
<ref id="loadt" name="loadt">,
<ref id="dumpt" name="dumpt">,
<tag/Example/None.
</descrip>
</quote>
<sect1>bgcolor<label id="bgcolor"><p>
<quote>
@ -1684,6 +1725,44 @@ used in presence of a prototype.
</quote>
<sect1>bios_playsound<label id="bios_playsound"><p>
<quote>
<descrip>
<tag/Function/Play a sequence of musical notes.
<tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/
<tag/Declaration/<tt/void __fastcall__ bios_playsound (const void *a, unsigned char b);/
<tag/Description/The function plays chords based on a BASIC statement. Notes and
durations are defined in the BASIC manual, chapter 13 on pages 102 resp. 103.
<tag/Notes/<itemize>
<item>BASIC has a fixed tempo of 18.
<item>The function is only available as fastcall function, so it may only be
used in presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="psg_delay" name="psg_delay">,
<ref id="psg_outb" name="psg_outb">
<tag/Example/<verb>
#include <creativision.h>
void main (void)
{
static const unsigned char notes[] = {
0x77, 0x4F, 0x37,
0x4B, 0x05, 0xBB,
0x4F, 0x27, 0x83,
0x93, 0x9B, 0x93,
0x17, 0x4F, 0x96, // played backwards
0xAB, 0x17, 0x4F, // three-note chords
0x0E // tempo
};
bios_playsound (notes, sizeof notes);
}
</verb>
</descrip>
</quote>
<sect1>bordercolor<label id="bordercolor"><p>
<quote>
@ -1778,7 +1857,7 @@ be used in presence of a prototype.
<item>The function is specific to the C128.
<item>The function will not return to the caller.
</itemize>
<tag/Availability/C128
<tag/Availability/cc65
<tag/Example/None.
</descrip>
</quote>
@ -2813,6 +2892,8 @@ location of the cursor in the display screen RAM. That number can be passed to
done to make it obvious that peeking doesn't move the cursor in any way. Your
program must place the cursor where it wants to peek before it calls any of
those functions.
<item>On the cx16 (Commander X16) target, this function returns two values: the
background color, in the high nybble, and the text color, in the low nybble.
</itemize>
<tag/Availability/cc65
<tag/See also/
@ -3313,6 +3394,30 @@ int main(void)
</quote>
<sect1>dumpt<label id="dumpt"><p>
<quote>
<descrip>
<tag/Function/Dump memory to tape.
<tag/Header/<tt/<ref id="sym1.h" name="sym1.h">/
<tag/Declaration/<tt/int __fastcall__ dumpt (unsigned char id, const void* start, const void* end);/
<tag/Description/<tt/dumpt/ saves memory onto data tape.
<tag/Notes/<itemize>
<item>The function is specific to the Sym-1.
<item>The return value is status. Non-zero status indicates an error.
<item>The function is only available as fastcall function, so it may only
be used in presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="beep" name="beep">,
<ref id="fdisp" name="fdisp">,
<ref id="loadt" name="loadt">,
<tag/Example/None.
</descrip>
</quote>
<sect1>em_commit<label id="em_commit"><p>
<quote>
@ -3408,7 +3513,7 @@ loaded.
<descrip>
<tag/Function/Install an already loaded extended memory driver.
<tag/Header/<tt/<ref id="em.h" name="em.h">/
<tag/Declaration/<tt/unsigned char _fastcall__ em_install (void* driver);/
<tag/Declaration/<tt/unsigned char _fastcall__ em_install (const void* driver);/
<tag/Description/The function installs an already loaded extended memory driver
and returns an error code. The function may be used to install a driver linked
statically to the program.
@ -3463,7 +3568,7 @@ extended memory that should be supported. There is no autodetect capability.
<tag/Declaration/<tt/void* __fastcall__ em_map (unsigned page);/
<tag/Description/The function maps one page of extended memory into linear
memory and returns a pointer to the page frame. Depending on the hardware
and driver, the data is either mapped into the address space or transfered
and driver, the data is either mapped into the address space or transferred
into a buffer. If you don't need the actual contents of the page (for example
because you're going to overwrite it completely), it is better to call
<tt/<ref id="em_use" name="em_use">/ instead. <tt/em_use/ will not transfer the
@ -3671,6 +3776,28 @@ switching the CPU into double clock mode.
</quote>
<sect1>fdisp<label id="fdisp"><p>
<quote>
<descrip>
<tag/Function/Flash front-panel display.
<tag/Header/<tt/<ref id="sym1.h" name="sym1.h">/
<tag/Declaration/<tt/void fdisp(void);/
<tag/Description/<tt/fdisp/ flashes front-panel display.
<tag/Notes/<itemize>
<item>The function is specific to the Sym-1.
<item>The front-panel display buffer must be loaded prior to calling fdisp. See the DISPLAY struct definition in sym1.h.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="beep" name="beep">,
<ref id="loadt" name="loadt">,
<ref id="dumpt" name="dumpt">,
<tag/Example/None.
</descrip>
</quote>
<sect1>feof<label id="feof"><p>
<quote>
@ -3678,7 +3805,7 @@ switching the CPU into double clock mode.
<tag/Function/Return the end-of-file indicator of a stream.
<tag/Header/<tt/<ref id="stdio.h" name="stdio.h">/
<tag/Declaration/<tt/int __fastcall__ feof (FILE* f);/
<tag/Description/<tt/feof/ tests the end-of-file indicator ofthe stream
<tag/Description/<tt/feof/ tests the end-of-file indicator of the stream
<tt/f/, and returns a non zero value if it is set.
<tag/Notes/<itemize>
<item>The indicator is set only after a read past the end of a file is
@ -4122,7 +4249,7 @@ const char* optstring);/
is a string that contains command line option characters. If a character in
<tt/optstring/ is followed by a colon, the option requires an argument. An
option on the command line is recognized if it is one of the option characters
preceeded by a '-'.
preceded by a '-'.
<tt/getopt/ must be called repeatedly. It will return each option character
found on the command line and <tt/EOF/ (-1) if there is no other option. An
option argument is placed in <tt/optarg/, the index of the next element on the
@ -4731,7 +4858,7 @@ There's no way to check for the number of actually connected joysticks.
<descrip>
<tag/Function/Install an already loaded driver and return an error code.
<tag/Header/<tt/<ref id="joystick.h" name="joystick.h">/
<tag/Declaration/<tt/unsigned char __fastcall__ joy_install (void* driver);/
<tag/Declaration/<tt/unsigned char __fastcall__ joy_install (const void* driver);/
<tag/Description/The function installs a driver that was already loaded into
memory (or linked statically to the program). It returns an error code
(<tt/JOY_ERR_OK/ in case of success).
@ -4911,6 +5038,30 @@ used in presence of a prototype.
</quote>
<sect1>loadt<label id="loadt"><p>
<quote>
<descrip>
<tag/Function/Load memory from tape.
<tag/Header/<tt/<ref id="sym1.h" name="sym1.h">/
<tag/Declaration/<tt/int __fastcall__ loadt (unsigned char id);/
<tag/Description/<tt/loadt/ loads memory from data tape.
<tag/Notes/<itemize>
<item>The function is specific to the Sym-1.
<item>The return value is status. Non-zero status indicates an error.
<item>The function is only available as fastcall function, so it may only
be used in presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="beep" name="beep">,
<ref id="fdisp" name="fdisp">,
<ref id="dumpt" name="dumpt">,
<tag/Example/None.
</descrip>
</quote>
<sect1>ltoa<label id="ltoa"><p>
<quote>
@ -4970,7 +5121,7 @@ always be the same.
<tag/Header/<tt/<ref id="setjmp.h" name="setjmp.h">/
<tag/Declaration/<tt/void __fastcall__ longjmp (jmp_buf buf, int retval);/
<tag/Description/The <tt/longjmp/ function restores a program context from the
data in <tt/buf/, which must have been set by a preceeding call to
data in <tt/buf/, which must have been set by a preceding call to
<tt/<ref id="setjmp" name="setjmp">/. Program execution continues as if the
call to <tt/<ref id="setjmp" name="setjmp">/ has just returned the value
<tt/retval/.
@ -5184,7 +5335,7 @@ the module just loaded. Possible error codes are:
<item><tt/MLOAD_ERR_MEM/ - Not enough memory
</itemize>
<tag/Notes/<itemize>
<item>The <htmlurl url="ld65.html" name="ld65"> linker is needed to create
<item>The <url url="ld65.html" name="ld65 linker"> is needed to create
relocatable o65 modules for use with this function.
<item>The function is available only as a fastcall function; so, it may be used
only in the presence of a prototype.
@ -5614,7 +5765,7 @@ cc65 allows to pass this argument, it is ignored.
<tag/Function/Open a directory.
<tag/Header/<tt/<ref id="dirent.h" name="dirent.h">/
<tag/Declaration/<tt/DIR* __fastcall__ opendir (const char* name);/
<tag/Description/<tt/opendir/ opens a directory and returns the direcory
<tag/Description/<tt/opendir/ opens a directory and returns the directory
descriptor associated with it. On error, NULL is returned and an error code is
stored in <tt/errno/.
<tag/Notes/<itemize>
@ -5767,6 +5918,78 @@ be used in presence of a prototype.
</quote>
<sect1>psg_delay<label id="psg_delay"><p>
<quote>
<descrip>
<tag/Function/Delay for a short period of time.
<tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/
<tag/Declaration/<tt/void __fastcall__ psg_delay (unsigned char b);/
<tag/Description/The function specifies how long each note or pause between
notes should last.
<tag/Notes/<itemize>
<item>The function is only available as fastcall function, so it may only be
used in presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="psg_outb" name="psg_outb">,
<ref id="psg_silence" name="psg_silence">
<tag/Example/None.
</descrip>
</quote>
<sect1>psg_outb<label id="psg_outb"><p>
<quote>
<descrip>
<tag/Function/Output a byte to the PSG.
<tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/
<tag/Declaration/<tt/void __fastcall__ psg_outb (unsigned char b);/
<tag/Description/The function sends a byte to the Programmable Sound
Generator, then waits for the PSG to acknowledge.
<tag/Notes/<itemize>
<item>The function is only available as fastcall function, so it may only be
used in presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="psg_delay" name="psg_delay">,
<ref id="psg_silence" name="psg_silence">
<tag/Example/<verb>
#include <creativision.h>
void main (void)
{
psg_outb (0x80); // Latch frequency
psg_outb (0x07); // Frequency byte 2
psg_outb (0x90); // Channel 0 full volume
psg_delay (100);
psg_silence ();
}
</verb>
</descrip>
</quote>
<sect1>psg_silence<label id="psg_silence"><p>
<quote>
<descrip>
<tag/Function/Set volume off on each PSG channel.
<tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/
<tag/Declaration/<tt/void psg_silence (void);/
<tag/Description/The function resets the Programmable Sound Generator,
then sends $9F, $BF, $DF, $FF to the PSG.
<tag/Availability/cc65
<tag/See also/
<ref id="psg_delay" name="psg_delay">,
<ref id="psg_outb" name="psg_outb">
<tag/Example/None.
</descrip>
</quote>
<sect1>qsort<label id="qsort"><p>
<quote>
@ -5904,7 +6127,7 @@ pointer you're passing somewhere else, otherwise
<tscreen><verb>
ptr = realloc (ptr, size);
</verb></tscreen>
will loose your only copy of <tt/ptr/ if <tt/realloc/ returns <tt/NULL/.
will lose your only copy of <tt/ptr/ if <tt/realloc/ returns <tt/NULL/.
<item>The function is only available as fastcall function, so it may only
be used in presence of a prototype.
</itemize>
@ -6196,7 +6419,7 @@ while (ser_get(&amp;ch) == SER_ERR_NO_DATA)
<descrip>
<tag/Function/Install an already loaded driver and return an error code.
<tag/Header/<tt/<ref id="serial.h" name="serial.h">/
<tag/Declaration/<tt/unsigned char __fastcall__ ser_install (void* driver);/
<tag/Declaration/<tt/unsigned char __fastcall__ ser_install (const void* driver);/
<tag/Description/The function installs a driver that was already loaded into
memory (or linked statically to the program). It returns an error code
(<tt/SER_ERR_OK/ in case of success).
@ -6741,7 +6964,7 @@ be used in presence of a prototype.
<quote>
<descrip>
<tag/Function/Concatentate two strings.
<tag/Function/Concatenate two strings.
<tag/Header/<tt/<ref id="string.h" name="string.h">/
<tag/Declaration/<tt/char* __fastcall__ strcat (char* s1, const char* s2);/
<tag/Description/The <tt/strcat/ function appends a copy of the string
@ -7067,7 +7290,7 @@ be used in presence of a prototype.
<quote>
<descrip>
<tag/Function/Concatentate two strings.
<tag/Function/Concatenate two strings.
<tag/Header/<tt/<ref id="string.h" name="string.h">/
<tag/Declaration/<tt/char* __fastcall__ strncat (char* s1, const char* s2, size_t n);/
<tag/Description/The <tt/strncat/ function appends not more than n characters
@ -7192,7 +7415,7 @@ be used in presence of a prototype.
<tag/Header/<tt/<ref id="string.h" name="string.h">/
<tag/Declaration/<tt/char* __fastcall__ strpbrk (const char* str, const char* set);/
<tag/Description/<tt/strpbrk()/ searches within <tt/str/ for the first
occurance of any character from <tt/set/. It returns a pointer to that
occurrence of any character from <tt/set/. It returns a pointer to that
character if found; otherwise, it returns <tt/NULL/.
<tag/Notes/<itemize>
<item>The function is available only as a fastcall function;
@ -7296,7 +7519,7 @@ be used in presence of a prototype.
<tag/Function/Find a substring.
<tag/Header/<tt/<ref id="string.h" name="string.h">/
<tag/Declaration/<tt/char* __fastcall__ strstr (const char* str, const char* substr);/
<tag/Description/<tt/strstr/ searches for the first occurance of the string
<tag/Description/<tt/strstr/ searches for the first occurrence of the string
<tt/substr/ within <tt/str/. If found, it returns a pointer to the copy,
otherwise it returns <tt/NULL/.
<tag/Notes/<itemize>
@ -7363,7 +7586,7 @@ the behaviour is undefined.
<item>If <tt/n/ is zero, <tt/s1/ may be a NULL pointer.
<item>The function is only available as fastcall function, so it may only
be used in presence of a prototype.
<item>Since cc65 doesn't support different charcter sets, <tt/strxfrm/ will
<item>Since cc65 doesn't support different character sets, <tt/strxfrm/ will
just copy s2 to s1 using <tt><ref id="strncpy" name="strncpy"></tt>.
</itemize>
<tag/Availability/ISO 9899

View file

@ -3,7 +3,7 @@
<article>
<title>Gamate System specific information for cc65
<author>
<url url="mailto:groepaz@gmx.net" name="Groepaz/Hitmen">
<url url="mailto:groepaz@gmx.net" name="Groepaz">
<abstract>
An overview over the Gamate runtime system as it is implemented for the
@ -117,14 +117,7 @@ following functions (and a few others):
<sect>Other hints<p>
<itemize>
<item>The Gamate is emulated by MESS (<url url="http://www.mess.org/">),
run like this: <tt>mess gamate -debug -window -skip_gameinfo -cart test.bin</tt>
</itemize>
some resources on the Gamate:
<itemize>
<item><url url="http://en.wikipedia.org/wiki/Gamate">
<item>some resources on the Gamate: <url url="http://en.wikipedia.org/wiki/Gamate">
</itemize>
<sect>License<p>

View file

@ -205,9 +205,9 @@ see them together in the filling box in GeoPaint.
<sect2>GraphicsString
<p>
<tt/void GraphicsString (char *myGString)/
<tt/void GraphicsString (const void *myGString)/
<p>
One of the more powerfull routines of GEOS. This function calls other graphic functions depending
One of the more powerful routines of GEOS. This function calls other graphic functions depending
on the given command string. See the structures chapter for a more detailed description.
<sect2>Rectangle functions
@ -652,7 +652,7 @@ For some purposes you might consider using the <tt/dio.h/ interface to disk acce
<p>
All GEOS disk functions return an error code in the X register. In some cases this is returned by the
GEOSLib function (if its type is <tt/char/), but in all cases the last error is saved in the <tt/__oserror/
location. If it is nonzero - an error occured. See <tt/gdisk.h/ for the list of possible errorcodes.
location. If it is nonzero - an error occurred. See <tt/gdisk.h/ for the list of possible errorcodes.
You need to include <tt/errno.h/ to get <tt/__oserror/, together with the standard <tt/errno/. The
latter gives less verbose, but still usable information and can be used with <tt/strerror/.
Probably you will get more information using <tt/_stroserror/ in a similar way.

View file

@ -7,7 +7,7 @@
<url url="mailto:greg.king5@verizon.net" name="Greg King">
<abstract>
This document describes a compiler that can create GEOS headers and menues for
This document describes a compiler that can create GEOS headers and menus for
cc65-compiled programs.
</abstract>
@ -24,7 +24,7 @@ Optional resources might be menu definitions, other headers (e.g., for data
files of an app.), dialog definitions, etc. Without an application's header,
GEOS is unable to load and start it.
Currently, <bf/grc65/ supports only menues and the required header definition,
Currently, <bf/grc65/ supports only menus and the required header definition,
along with support for building applications with VLIR-structured overlays.
<bf/grc65/ generates output in two formats: C header and <bf/ca65/ source (.s).
@ -345,7 +345,7 @@ for addresses.
<!-- <appendix> -->
<sect>Appendix A -- example.grc<label id="example-grc">
<p><tscreen><verb>
; Note that MENU can define both menues and submenues.
; Note that MENU can define both menus and submenus.
; If you want to use any C operators (such as "|", "&", etc.), do it WITHOUT
; any spaces between the arguments (the parser is simple and weak).

View file

@ -124,6 +124,9 @@
<tag><htmlurl url="atari5200.html" name="atari5200.html"></tag>
Topics specific to the Atari 5200 Game Console.
<tag><htmlurl url="atari7800.html" name="atari7800.html"></tag>
Topics specific to the Atari 7800 Game Console.
<tag><htmlurl url="atmos.html" name="atmos.html"></tag>
Topics specific to the Oric Atmos.
@ -172,6 +175,9 @@
<tag><htmlurl url="supervision.html" name="supervision.html"></tag>
Topics specific to the Watara Supervision Console.
<tag><htmlurl url="sym1.html" name="sym1.html"></tag>
Topics specific to the Synertek Systems Sym-1.
<tag><htmlurl url="telestrat.html" name="telestrat.html"></tag>
Topics specific to the Oric Telestrat.

View file

@ -6,6 +6,7 @@
<url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">,<newline>
<url url="mailto:cbmnut@hushmail.com" name="CbmNut">,<newline>
<url url="mailto:greg.king5@verizon.net" name="Greg King">,<newline>
<url url="mailto:groepaz@gmx.net" name="Groepaz">,<newline>
<url url="mailto:stephan.muehlstrasser@web.de" name="Stephan M&uuml;hlstrasser">
<abstract>
@ -458,12 +459,8 @@ Substitute the name of a Commodore computer for that <tt/&lt;sys&gt;/:
Start the desired version of the emulator (CBM610 programs run on
the CBM II &lsqb;<tt/xcbm2/&rsqb; emulator).
In the Windows versions of VICE, choose <bf>File&gt;Autoboot disk/tape
image...</bf>, choose your executable, and click <bf/OK/.
In the Unix versions, hold down the mouse's first button. Move the pointer to
<bf>Smart-attach disk/tape...</bf>, and release the button. Choose your
executable, and click <bf/Autostart/.
Choose <bf>File&gt;Autostart disk/tape image...</bf>, choose your executable,
and click <bf/OK/.
The file has a 14-byte header which corresponds to a PRG-format BASIC program,
consisting of a single line, similar to this:
@ -499,6 +496,29 @@ The output will appear on a separate line, and you will be returned to a BASIC
prompt.
<sect1>Gamate<p>
Before you can run the cartridge image produced by the linker, the binary has to
be patched using the <bf/gamate-fixcart/ tool that is included in the cc65
package in the util/gamate/ directory.
<tscreen><verb>
gamate-fixcart <image.bin>
</verb></tscreen>
<sect2>MESS<p>
Available at <url
url="https://www.mamedev.org">:
MESS (Multiple Emulator Super System) is a multi system emulator that emulates
various cc65 targets. It once started as a MAME fork, but was marged into MAME
again at some point.
<tscreen><verb>
mess gamate -debug -window -skip_gameinfo -cart <image.bin>
</verb></tscreen>
<sect1>GEOS<p>
Available at <it/Click Here Software's/ <url
url="http://cbmfiles.com/geos/index.html" name="GEOS download section">:
@ -535,17 +555,8 @@ feature on.
</quote>
<quote>
VICE even has different ways that depend on which operating system is running
the emulator.
<itemize>
<item>In Windows, you must click on <bf/Options/ (in an always visible menu).
Then, you must click on <bf/True drive emulation/.
<item>In Unix, you must <em/hold down/ the second button on your mouse. Move
the pointer down to <bf/Drive settings/. Then, move the pointer over to
<bf/Enable true drive emulation/. (If there is a check-mark in front of
those words, that feature already is turned on -- then, move the pointer
off of that menu.) Release the mouse button.
</itemize>
In VICE, got to <bf/Settings/ -> <bf/Settings/, then <bf/Peripheral devices/ ->
<bf/Drive/. Then, you must enable the <bf/True drive emulation/ checkbox.
</quote>
Find the <bf/CONVERT/ program on the boot disk &lsqb;tap the 6-key; then, you
@ -572,6 +583,29 @@ directory notePad. Look at the eight file-positions on each page until you see
The output is shown in a GEOS dialog box; click <bf/OK/ when you have finished
reading it.
Alternatively you can use the <bf/c1541/ program that comes with VICE to write the
file to a disk image directly in GEOS format, so it can be used in GEOS directly
without having to use the <bf/CONVERT/ program.
<tscreen><verb>
c1541 -attach geos.d64 -geoswrite hello1
</verb></tscreen>
<sect1>Nintendo Entertainment System<p>
<sect2>Mednafen (NES)<p>
Available at <url
url="https://mednafen.github.io/releases/">:
Mednafen is a multi system emulator that emulates a couple of the supported
targets of cc65: Apple II/II+, Atari Lynx, Nintendo Entertainment System and
PC Engine/TurboGrafx 16.
<tscreen><verb>
mednafen -force_module nes <image.bin>
</verb></tscreen>
<sect1>Ohio Scientific Challenger 1P<p>
The <tt/osic1p/ runtime library returns to the boot prompt when the main()
@ -694,6 +728,32 @@ Press <RETURN>.
After hitting the RETURN key, you should see the boot prompt again.
<sect1>PC Engine/TurboGrafx 16<p>
For the cartridge image produced by the linker to work in emulators and on real
hardware, its content must be rearranged so the first 8k block becomes the last
8k block in the image.
For example, for a 32k image this can be done using <bf/dd/ as follows:
<tscreen><verb>
dd if=infile.bin bs=8K skip=3 > outfile.pce
dd if=infile.bin bs=8K count=3 >> outfile.pce
</verb></tscreen>
<sect2>Mednafen<p>
Available at <url
url="https://mednafen.github.io/releases/">:
Mednafen is a multi system emulator that emulates a couple of the supported
targets of cc65: Apple II/II+, Atari Lynx, Nintendo Entertainment System and
PC Engine/TurboGrafx 16.
<tscreen><verb>
mednafen -force_module pce <image.pce>
</verb></tscreen>
<sect1>Contributions wanted<p>
We need your help! Recommended emulators and instructions for other targets

View file

@ -166,6 +166,7 @@ Here is a description of all of the command-line options:
<item>apple2
<item>apple2enh
<item>atari2600
<item>atari7800
<item>atari
<item>atarixl
<item>atmos
@ -760,7 +761,7 @@ There's a library subroutine called <tt/copydata/ (in a module named
look at it's inner workings before using it!
<sect1>Other MEMORY area attributes<p>
<sect1>Other MEMORY area attributes<label id="MEMORY"><p>
There are some other attributes not covered above. Before starting the
reference section, I will discuss the remaining things here.
@ -822,7 +823,6 @@ that has a segment reference (for example a symbol). The result of this
function is the value of the bank attribute for the run memory area of the
segment.
<sect1>Other SEGMENT attributes<p>
Segments may be aligned to some memory boundary. Specify "<tt/align = num/" to
@ -887,7 +887,7 @@ also for a segment. The value must be an integer between 0 and 255. It is used
as the fill value for space reserved by the assembler's <tt/.ALIGN/ and <tt/.RES/
commands. It is also used as the fill value for space between sections (part of a
segment that comes from one object file) caused by alignment, but not for
space that preceeds the first section.
space that precedes the first section.
To suppress the warning, the linker issues if it encounters a segment that is
not found in any of the input files, use "<tt/optional=yes/" as an additional

View file

@ -59,6 +59,9 @@ Functions that are <em/not/ available:
Functions not available on all supported systems:
<itemize>
<item><tt>clock</tt>: Support depends on the capabilities of the target
machine.
<p>
<item><tt>fopen/fread/fwrite/fclose/fputs/fgets/fscanf</tt>: The functions
are built on open/read/write/close. Those latter functions are not available
on all systems.

View file

@ -2,7 +2,7 @@
<article>
<title>PC-Engine (TurboGrafx 16) System-specific information for cc65
<author><url url="mailto:groepaz@gmx.net" name="Groepaz/Hitmen">,<newline>
<author><url url="mailto:groepaz@gmx.net" name="Groepaz">,<newline>
<url url="mailto:greg.king5@verizon.net" name="Greg King">
<abstract>
@ -206,11 +206,6 @@ following functions (and a few others):
<sect>Other hints<p>
<itemize>
<item><url url="https://mednafen.github.io/" name= "Mednafen"> is a good
emulator to use for the PC-Engine.
</itemize>
Some useful resources on PCE coding:
<itemize>

View file

@ -195,10 +195,10 @@ No mouse drivers are currently available for the Plus/4.
<tag><tt/plus4-stdser.ser (plus4_stdser_ser)/</tag>
Driver for the 6551 ACIA chip built into the Plus/4. 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
interrupt driven, and the transceiver blocks if the receiver asserts flow
control because of a full buffer.
baud, requires hardware flow control (RTS/CTS) and does interrupt driven
receives. 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.
You need an adapter to use the builtin port, since the output levels
available at the user port don't follow the RS232 standard.

View file

@ -85,7 +85,7 @@ Please note:
<item> The macro '<tt>SMC_StoreValue</tt>' takes care, that the store
operation will occur on the value-position of a SMC-instruction. As
you will see, other macros influence other instruction part positions.
There is no consistency check, if the targeted SMC instruction acually
There is no consistency check, if the targeted SMC instruction actually
contains a value. Storing a 'value' on an immplied SMC instruction
would corrupt the following memory cell!
</enum>
@ -257,7 +257,7 @@ SMC LoadDefault, { LDX #25 }
<label id="Load value">
<tag><tt>SMC_LoadValue label (, register)</tt></tag>
Retreives the value of a SMC line.
Retrieves the value of a SMC line.
Example:
<tscreen><verb>
@ -582,7 +582,7 @@ into a single instruction line. These can be changed of course too.
Line 10,11: These lines construct a branch operation for line 8: The
X-register will be used to change it from 'inc StoreAccuFirstSection+2'
(high-byte operation) to 'beq restoreCode'. Please note: To calculate the
relaive branch offset, we introduced a second label
relative branch offset, we introduced a second label
('RestoreCodeBranchBaseAdr') for to calculate it. Some could also use the
internal name of the SMC label, but you should abstain to do so - it may be
changed in the future...

173
doc/sym1.sgml Normal file
View file

@ -0,0 +1,173 @@
<!doctype linuxdoc system>
<article>
<title>Synertek Systems Sym-1 specific information for cc65
<author><url url="mailto:wayne@parhamdata.com" name="Wayne Parham">
<abstract>
An overview over the Sym-1 runtime system as it is implemented for the cc65 C compiler.
</abstract>
<!-- Table of contents -->
<toc>
<!-- Begin the document -->
<sect>Overview<p>
This file contains an overview of the Sym-1 runtime system as it comes with the cc65 C compiler.
It describes the memory layout, Sym-1 specific header files, available drivers, and any pitfalls
specific to the platform.
Please note that Sym-1 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
&quot;platform dependent&quot; may be available on more than one platform. Please see the
function reference for more information.
<sect>Binary format<p>
The output format generated by the linker for the Sym-1 target is a raw binary BIN file, which
is essentially a memory image. You can convert this to a HEX file using BIN2HEX, which is a
popular open-source conversion utility program. A HEX file has ASCII representations of the
hexadecimal byte values of the machine-language program. So the HEX file can be transferred
to the Sym-1 using the RS-232 terminal port, just as if the machine-code was entered by hand.
Enter 'm 200' in the monitor and start the HEX file transfer.
<p>
Included with this distribution is a 4k configuration file and a 32k config file. The Sym-1
on-board memory is limited to 4 kbytes but system memory can be increased to 32 kbytes of
contiguous RAM with aftermarket add-on boards. So choose the config file that matches your
system configuration before compiling and linking user programs.
<sect>Memory layout<p>
The ROMs and I/O areas are defined in the configuration files, as are most of the entry points
for useful subroutines in the Sym-1 monitor ROM. cc65 generated programs compiled and linked
using 4k config run in the memory range of &dollar;200 - &dollar;0FFF. The 32k config expands
this range to &dollar;7FFF. Memory above 32k can be used to extend the heap, as described below.
The starting memory location and entry point for running the program is &dollar;200, so when the
program is transferred to the Sym-1, it is executed by typing 'g 200'. The system returns control
back to the monitor ROM when the program terminates, providing the '.' prompt.
Special locations:
<descrip>
<tag/Text screen/
Conio support is not currently available for the Sym-1. But stdio console functions are available.
<tag/Stack/
The C runtime stack is located at &dollar;0FFF on 4kb Syms, or at &dollar;7FFF for 32kb systems.
The stack always grows downwards.
<tag/Heap/
The C heap is located at the end of the program and grows towards the C runtime stack. Extended
memory can be added to the heap, as described below.
</descrip><p>
<sect>Platform specific header files<p>
Programs containing Sym-1 code may use the <tt/sym1.h/ header file. See the header file for more information.
<sect1>Hardware access<p>
The pseudo variables declared in the <tt/sym1.inc/ include file allow access to hardware located in the
address space. See the include file for more information.
<sect>Loadable drivers<p>
<sect1>Graphics drivers<p>
No graphics drivers are currently available for the Sym-1.
<sect1>Extended memory drivers<p>
There are no extended memory drivers for the Sym-1. However, there is a way to access memory beyond the
32kb boundary, if extended memory is physically present in the system. See the example program,
symExtendedMemory, in the samples directory.
<sect1>Joystick drivers<p>
No joystick driver is currently available for the Sym-1.
<sect1>Mouse drivers<p>
No mouse drivers are currently available for the Sym-1.
<sect1>RS232 device drivers<p>
No communication port drivers are currently available for the Sym-1. It has only the &quot;master console&quot;
e.g. stdin and stdout.
<sect>Limitations<p>
<sect1>Disk I/O<p>
The existing library for the Sym-1 doesn't implement C file I/O.
To be more specific, this limitation means that you cannot use any of the following functions (and a few others):
<itemize>
<item>fopen
<item>fclose
<item>fread
<item>fwrite
<item>...
</itemize>
<sect>Other hints<p>
<sect1>sym1.h<p>
This header exposes Sym-specific I/O functions that are useful for reading and writing its ports and front panel.
See the <tt/sym1.h/ include file for a list of the functions available.
<sect2>Limited memory applications<p>
As stated earlier, there are config files for 4kb and 32kb systems. If you have 32kb RAM, then you will probably
want to use the sym1-32k configuration, but if not - if you are using the sym1-4k configuration - then you may
want to use functions like getchar, putchar, gets and puts rather than functions like scanf and printf.
Printf, for example, requires about 1KB because it needs to know how to process all the format specifiers.
<sect3>Using extended memory<p>
Memory may be physically present that is addressed at locations above the monitor ROM at $8000. This extended
memory is accessible by adding to the heap, as described in the symExtendedMemory sample program.
<sect4>Sample programs<p>
All the samples will run on the &quot;stock&quot; 4kb Sym-1, except for symIO and symNotepad, which require 32kb.
Additionally, symExtendedMemory shows how to access memory above 32kb, so it expects more than 32kb.
These sample programs can be found in the samples/sym1 directory:
<itemize>
<item>symHello prints &quot;Hello World!&quot; and then inputs characters, which are echoed on the screen.
It also makes a &quot;beep&quot; sound.</item>
<item>symTiny does the same as symHello, but does it with puts() rather than printf() to show the difference
in compiled binary size.</item>
<item>symDisplay allows entry of a message, which is then displayed by scrolling it across the front panel display.</item>
<item>symIO allows access to the Sym-1 digital I/O ports.</item>
<item>symNotepad is a simple text entry/retrieval program that uses tape storage.</item>
<item>symExtendedMemory demonstrates how to access upper-memory and add it to the heap.</item>
</itemize>
<sect>License<p>
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:
<enum>
<item> 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.
<item> Altered source versions must be plainly marked as such, and must not
be misrepresented as being the original software.
<item> This notice may not be removed or altered from any source
distribution.
</enum>
</article>

View file

@ -79,7 +79,7 @@ in Telemon, there is no way to load a binary easily.
Stratsed (the Telestrat operating system) handles files management. Stratsed
is loaded to memory from floppy disk. Stratsed vector are declared in asminc/telestrat.inc.
But, reverse engineering is required to find how theses vectors works. Please, note that
But, reverse engineering is required to find how these vectors works. Please, note that
Stratsed is located in overlay memory (bank 0)
There is no tool to insert a binary in a Stratsed floppy disk.
@ -194,7 +194,7 @@ if you get input from keyboard by conio cgetc function, you will get direction f
Anyway, if you don't want to use ROM, you can use joysticks standard drivers in your code.
The standard driver manages two joysticks. Only one button is managed for theses joysticks.
The standard driver manages two joysticks. Only one button is managed for these joysticks.
Telestrat can handle one button for the left port, and three buttons for the right port (but this port was designed for a mouse).

View file

@ -555,7 +555,7 @@ tgi_init(); //Set up the default palette and clear the screen.
<descrip>
<tag/Function/Install an already loaded driver and return an error code.
<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
<tag/Declaration/<tt/unsigned char __fastcall__ tgi_install (void* driver);/
<tag/Declaration/<tt/unsigned char __fastcall__ tgi_install (const void* driver);/
<tag/Description/The function installs a driver that was already loaded into
memory (or linked statically to the program). It returns an error code
(<tt/TGI_ERR_OK/ in case of success).

View file

@ -105,7 +105,7 @@ struct __dos2x {
unsigned char* zbufp; /* points to user filename */
unsigned char* zdrva; /* points to serveral buffers (mostly VTOC) */
unsigned char* zsba; /* points to sector buffer */
unsigned char errno; /* number of occured error */
unsigned char errno; /* number of occurred error */
};
typedef struct __dos2x dos2x_t;

63
include/_maria.h Normal file
View file

@ -0,0 +1,63 @@
/*****************************************************************************/
/* */
/* _maria.h */
/* */
/* Atari 7800, Maria chip register hardware structures */
/* */
/* */
/* 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. */
/* */
/*****************************************************************************/
/*
* MARIA registers
*/
struct __maria {
unsigned char bkgrnd;
unsigned char p0c1;
unsigned char p0c2;
unsigned char p0c3;
unsigned char wsync;
unsigned char p1c1;
unsigned char p1c2;
unsigned char p1c3;
unsigned char mstat;
unsigned char p2c1;
unsigned char p2c2;
unsigned char p2c3;
unsigned char dpph;
unsigned char p3c1;
unsigned char p3c2;
unsigned char p3c3;
unsigned char dppl;
unsigned char p4c1;
unsigned char p4c2;
unsigned char p4c3;
unsigned char chbase;
unsigned char p5c1;
unsigned char p5c2;
unsigned char p5c3;
unsigned char offset;
unsigned char p6c1;
unsigned char p6c2;
unsigned char p6c3;
unsigned char ctrl;
unsigned char p7c1;
unsigned char p7c2;
unsigned char p7c3;
};

View file

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

65
include/atari7800.h Normal file
View file

@ -0,0 +1,65 @@
/*****************************************************************************/
/* */
/* Atari VCS 7800 TIA & RIOT registers addresses */
/* */
/* Karri Kaksonen (karri@sipo.fi), 2022 */
/* */
/* */
/*****************************************************************************/
#ifndef _ATARI7800_H
#define _ATARI7800_H
/* Check for errors */
#if !defined(__ATARI7800__)
# error This module may only be used when compiling for the Atari 7800!
#endif
/*****************************************************************************/
/* Data */
/*****************************************************************************/
/* Color defines */
#define COLOR_BLACK 0x00
#define COLOR_GREY 0x01
#define COLOR_LIGHTGREY 0x02
#define COLOR_WHITE 0x03
/* TGI color defines (default palette) */
#define TGI_COLOR_BLACK COLOR_BLACK
#define TGI_COLOR_GREY COLOR_GREY
#define TGI_COLOR_LIGHTGREY COLOR_LIGHTGREY
#define TGI_COLOR_WHITE COLOR_WHITE
/* Masks for joy_read */
#define JOY_RIGHT_MASK 0x80
#define JOY_LEFT_MASK 0x40
#define JOY_DOWN_MASK 0x20
#define JOY_UP_MASK 0x10
#define JOY_BTN_1_MASK 0x01
#define JOY_BTN_2_MASK 0x02
#define JOY_BTN_A_MASK JOY_BTN_1_MASK
#define JOY_BTN_B_MASK JOY_BTN_2_MASK
#define JOY_BTN_A(v) ((v) & JOY_BTN_A_MASK)
#define JOY_BTN_B(v) ((v) & JOY_BTN_B_MASK)
/* No support for dynamically loadable drivers */
#define DYN_DRV 0
#include <_tia.h>
#define TIA (*(struct __tia*)0x0000)
#include <_riot.h>
#define RIOT (*(struct __riot*)0x0280)
#include <_maria.h>
#define MARIA (*(struct __maria*)0x0020)
/* End of atari7800.h */
#endif

View file

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

View file

@ -8,7 +8,7 @@
/* from ASCII to screen-code mapping, so you can write directly */
/* to the screen memory. */
/* */
/* If this include is used, no additional macroes are needed. */
/* If this include is used, no additional macros are needed. */
/* */
/*****************************************************************************/

View file

@ -59,21 +59,21 @@ unsigned long __fastcall__ udiv32by16r16 (unsigned long rhs, unsigned lhs);
*/
int __fastcall__ imul8x8r16 (signed char lhs, signed char rhs);
/* Multiplicate two signed 8 bit to yield an signed 16 bit result */
/* Multiply two signed 8 bit to yield an signed 16 bit result */
long __fastcall__ imul16x16r32 (int lhs, int rhs);
/* Multiplicate two signed 16 bit to yield a signed 32 bit result */
/* Multiply two signed 16 bit to yield a signed 32 bit result */
unsigned __fastcall__ umul8x8r16 (unsigned char lhs, unsigned char rhs);
/* Multiplicate two unsigned 8 bit to yield an unsigned 16 bit result */
/* Multiply two unsigned 8 bit to yield an unsigned 16 bit result */
unsigned long __fastcall__ umul16x8r32 (unsigned lhs, unsigned char rhs);
/* Multiplicate an unsigned 16 bit by an unsigned 8 bit number yielding a 24
/* Multiply an unsigned 16 bit by an unsigned 8 bit number yielding a 24
** bit unsigned result that is extended to 32 bits for easier handling from C.
*/
unsigned long __fastcall__ umul16x16r32 (unsigned lhs, unsigned rhs);
/* Multiplicate two unsigned 16 bit to yield an unsigned 32 bit result */
/* Multiply two unsigned 16 bit to yield an unsigned 32 bit result */
unsigned int __fastcall__ mul20 (unsigned char value);
/* Multiply an 8 bit unsigned value by 20 and return the 16 bit unsigned

View file

@ -70,9 +70,9 @@
#define COLOR_WHITE 15
/* Protos */
void __fastcall__ psg_outb(unsigned char b);
void __fastcall__ psg_delay(unsigned char b);
void psg_silence(void);
void __fastcall__ bios_playsound(void *a, unsigned char b);
void __fastcall__ psg_outb (unsigned char b);
void __fastcall__ psg_delay (unsigned char b);
void psg_silence (void);
void __fastcall__ bios_playsound (const void *a, unsigned char b);
#endif /* #ifndef _CVISION_H */

View file

@ -278,6 +278,9 @@ struct __vera {
#define VIA1 (*(volatile struct __6522 *)0x9F60)
#define VIA2 (*(volatile struct __6522 *)0x9F70)
#define RAM_BANK (VIA1.pra)
#define ROM_BANK (VIA1.prb)
/* A structure with the x16emu's settings registers */
struct __emul {
unsigned char debug; /* Boolean: debugging enabled */
@ -295,7 +298,7 @@ struct __emul {
#define EMULATOR (*(volatile struct __emul *)0x9FB0)
/* An array window into the half Mebibyte or two Mebibytes of banked RAM */
#define BANK_RAM ((unsigned char[0x2000])0xA000)
#define BANK_RAM ((unsigned char *)0xA000)

View file

@ -82,7 +82,7 @@ unsigned char __fastcall__ em_load_driver (const char* driver);
unsigned char em_unload (void);
/* Uninstall, then unload the currently loaded driver. */
unsigned char __fastcall__ em_install (void* driver);
unsigned char __fastcall__ em_install (const void* driver);
/* Install an already loaded driver. Return an error code. */
unsigned char em_uninstall (void);

View file

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

View file

@ -145,6 +145,8 @@
/* constants for the conio implementation */
#define COLOR_BLACK 0x03
#define COLOR_GRAY2 0x02
#define COLOR_GRAY1 0x01
#define COLOR_WHITE 0x00
#define CH_HLINE 1

View file

@ -43,7 +43,7 @@ void __fastcall__ BitOtherClip(void *proc1, void *proc2, char skipl,
char skipr, unsigned skiptop,
struct iconpic *myIcon);
void __fastcall__ GraphicsString(char *myGfxString);
void __fastcall__ GraphicsString(const void *myGfxString);
#ifdef __GEOS_CBM__
void SetNewMode(void);

View file

@ -89,7 +89,7 @@ unsigned char __fastcall__ joy_load_driver (const char* driver);
unsigned char joy_unload (void);
/* Uninstall, then unload the currently loaded driver. */
unsigned char __fastcall__ joy_install (void* driver);
unsigned char __fastcall__ joy_install (const void* driver);
/* Install an already loaded driver. Return an error code. */
unsigned char joy_uninstall (void);

View file

@ -63,6 +63,20 @@
#define ULONG_MAX 4294967295UL
/* These defines that are platform dependent */
#if defined(__APPLE2__)
# define PATH_MAX (64+1)
#elif defined(__ATARI__)
# define PATH_MAX (63+1)
#elif defined(__CBM__)
# define PATH_MAX (255) /* should be 256+1, see libsrc/common/_cmd.s why it's not */
#elif defined(__LUNIX__)
# define PATH_MAX (80+1)
#elif defined(__TELESTRAT__)
# define PATH_MAX (50+1)
#else
# define PATH_MAX (16+1)
#endif
/* End of limits.h */

View file

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

View file

@ -52,24 +52,25 @@
/* Color defines */
#define COLOR_BLACK 0x00
#define COLOR_RED 0x01
#define COLOR_PINK 0x02
#define COLOR_LIGHTGREY 0x03
#define COLOR_GREY 0x04
#define COLOR_DARKGREY 0x05
#define COLOR_BROWN 0x06
#define COLOR_PEACH 0x07
#define COLOR_YELLOW 0x08
#define COLOR_LIGHTGREEN 0x09
#define COLOR_GREEN 0x0A
#define COLOR_DARKBROWN 0x0B
#define COLOR_TRANSPARENT 0x00
#define COLOR_BLACK 0x01
#define COLOR_RED 0x02
#define COLOR_PINK 0x03
#define COLOR_LIGHTGREY 0x04
#define COLOR_GREY 0x05
#define COLOR_DARKGREY 0x06
#define COLOR_BROWN 0x07
#define COLOR_PEACH 0x08
#define COLOR_YELLOW 0x09
#define COLOR_LIGHTGREEN 0x0A
#define COLOR_GREEN 0x0B
#define COLOR_VIOLET 0x0C
#define COLOR_BLUE 0x0D
#define COLOR_LIGHTBLUE 0x0E
#define COLOR_WHITE 0x0F
/* TGI color defines (default palette) */
#define TGI_COLOR_TRANSPARENT COLOR_TRANSPARENT
#define TGI_COLOR_BLACK COLOR_BLACK
#define TGI_COLOR_RED COLOR_RED
#define TGI_COLOR_PINK COLOR_PINK
@ -81,7 +82,6 @@
#define TGI_COLOR_YELLOW COLOR_YELLOW
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
#define TGI_COLOR_GREEN COLOR_GREEN
#define TGI_COLOR_DARKBROWN COLOR_DARKBROWN
#define TGI_COLOR_VIOLET COLOR_VIOLET
#define TGI_COLOR_BLUE COLOR_BLUE
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE

View file

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

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

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

View file

@ -136,7 +136,7 @@ unsigned char __fastcall__ ser_load_driver (const char* driver);
unsigned char ser_unload (void);
/* Uninstall, then unload the currently loaded driver. */
unsigned char __fastcall__ ser_install (void* driver);
unsigned char __fastcall__ ser_install (const void* driver);
/* Install an already loaded driver. Return an error code. */
unsigned char ser_uninstall (void);

View file

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

View file

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

View file

@ -40,6 +40,7 @@
#include <stddef.h>
#include <stdarg.h>
#include <limits.h>
@ -64,18 +65,7 @@ extern FILE* stderr;
#define SEEK_SET 2
#define TMP_MAX 256
/* Standard defines that are platform dependent */
#if defined(__APPLE2__)
# define FILENAME_MAX (64+1)
#elif defined(__ATARI__)
# define FILENAME_MAX (12+1)
#elif defined(__LUNIX__)
# define FILENAME_MAX (80+1)
#elif defined(__TELESTRAT__)
# define FILENAME_MAX (50+1)
#else
# define FILENAME_MAX (16+1)
#endif
#define FILENAME_MAX PATH_MAX
#define L_tmpnam FILENAME_MAX

View file

@ -78,6 +78,7 @@ int __fastcall__ stricmp (const char* s1, const char* s2); /* DOS/Windows */
int __fastcall__ strcasecmp (const char* s1, const char* s2); /* Same for Unix */
int __fastcall__ strnicmp (const char* s1, const char* s2, size_t count); /* DOS/Windows */
int __fastcall__ strncasecmp (const char* s1, const char* s2, size_t count); /* Same for Unix */
size_t __fastcall__ strnlen (const char* s, size_t maxlen); /* POSIX.1-2008 */
char* __fastcall__ strlwr (char* s);
char* __fastcall__ strlower (char* s);
char* __fastcall__ strupr (char* s);

165
include/sym1.h Normal file
View file

@ -0,0 +1,165 @@
/*****************************************************************************/
/* */
/* sym1.h */
/* */
/* Sym-1 system-specific definitions */
/* */
/* */
/* */
/* (C) 2020 Wayne Parham */
/* EMail: wayne@parhamdata.com */
/* */
/* */
/* 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. */
/* */
/*****************************************************************************/
#ifndef _SYM1_H
#define _SYM1_H
/* Check for errors */
#if !defined(__SYM1__)
# error This module may only be used when compiling for the Sym-1!
#endif
/*****************************************************************************/
/* Data */
/*****************************************************************************/
/* Display character definitions */
#define DISP_1 0x06 // '1'
#define DISP_2 0x5B // '2'
#define DISP_3 0x4F // '3'
#define DISP_4 0x66 // '4'
#define DISP_5 0x6D // '5'
#define DISP_6 0x7C // '6'
#define DISP_7 0x07 // '7'
#define DISP_8 0x7F // '8'
#define DISP_9 0x67 // '9'
#define DISP_0 0x3F // '0'
#define DISP_A 0x77 // 'A'
#define DISP_b 0x7C // 'b'
#define DISP_C 0x39 // 'C'
#define DISP_c 0x58 // 'c'
#define DISP_d 0x5E // 'd'
#define DISP_E 0x79 // 'E'
#define DISP_e 0x7B // 'e'
#define DISP_F 0x71 // 'F'
#define DISP_G 0x7D // 'G'
#define DISP_g 0x6F // 'g'
#define DISP_H 0x76 // 'H'
#define DISP_h 0x74 // 'h'
#define DISP_I 0x06 // 'I'
#define DISP_i 0x04 // 'i'
#define DISP_J 0x1E // 'J'
#define DISP_K 0x74 // 'K'
#define DISP_L 0x38 // 'L'
#define DISP_M_1 0x33 // 'M'
#define DISP_M_2 0x27 // 2nd half
#define DISP_n 0x54 // 'n'
#define DISP_O 0x3F // 'O'
#define DISP_o 0x5C // 'o'
#define DISP_P 0x73 // 'P'
#define DISP_q 0x67 // 'q'
#define DISP_r 0x50 // 'r'
#define DISP_S 0x6D // 'S'
#define DISP_t 0x46 // 't'
#define DISP_U 0x3E // 'U'
#define DISP_u 0x1C // 'u'
#define DISP_V_1 0x64 // 'V'
#define DISP_V_2 0x52 // 2nd half
#define DISP_W_1 0x3C // 'W'
#define DISP_W_2 0x1E // 2nd half
#define DISP_Y 0x6E // 'Y'
#define DISP_Z 0x5B // 'Z'
#define DISP_SPACE 0x00 // ' '
#define DISP_PERIOD 0x80 // '.'
#define DISP_HYPHEN 0x40 // '-'
#define DISP_APOSTR 0x20 // '''
#define DISP_EQUAL 0x41 // '='
#define DISP_3_BAR 0x49 // '='
#define DISP_BOTTOM 0x08 // '_'
#define DISP_TOP 0x01 // Top segment
#define DISP_LEFT 0x30 // '|' Left side, both segments
#define DISP_RIGHT 0x06 // '|' Right side, both segments
#define DISP_DEGREE 0x63 // 'o' An 'o' character in the upper segments
#define DISP_HAT 0x23 // 'n' An 'n' character in the upper segments
#define DISP_FORK 0x62 // 'u' A 'u' character in the upper segments
#define DISP_SLASH 0x51 // '/'
#define DISP_BACKSLASH 0x34 // '\'
#define DISP_TOP_RIGHT 0x02 // Top right segment
#define DISP_TOP_LEFT 0x20 // Top left segment
#define DISP_LOW_RIGHT 0x04 // Lower right segment
#define DISP_LOW_LEFT 0x10 // Lower left segment
/*****************************************************************************/
/* Hardware */
/*****************************************************************************/
#include <_6522.h>
#define VIA1 (*(struct __6522*)0xA000) // U25
#define VIA2 (*(struct __6522*)0xA800) // U28
#define VIA3 (*(struct __6522*)0xAC00) // U29
struct _display {
unsigned char d0; // left-most seven-segment display
unsigned char d1; // second seven-segment display
unsigned char d2; // third seven-segment display
unsigned char d3; // fouth seven-segment display
unsigned char d4; // fifth seven-segment display
unsigned char d5; // sixth seven-segment display
unsigned char d6; // buffer byte to the right
};
#define DISPLAY (*(struct _display*)0xA640)
/*****************************************************************************/
/* Code */
/*****************************************************************************/
void beep (void);
/* Beep sound. */
void fdisp (void);
/* Flash display */
int __fastcall__ loadt (unsigned char);
/* Read from tape */
int __fastcall__ dumpt (unsigned char, const void*, const void*);
/* Write to tape */
/* End of sym1.h */
#endif

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

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

View file

@ -43,6 +43,8 @@
# include <atari2600.h>
#elif defined(__ATARI5200__)
# include <atari5200.h>
#elif defined(__ATARI7800__)
# include <atari7800.h>
#elif defined(__ATMOS__)
# include <atmos.h>
#elif defined(__CBM__)

View file

@ -85,6 +85,8 @@
#define CH_LTEE '+'
#define CH_RTEE '+'
#define CH_CROSS '+'
#define CH_HLINE '-'
#define CH_VLINE '|'
#define CH_CURS_UP 11
#define CH_CURS_DOWN 10
#define CH_CURS_LEFT 8
@ -98,8 +100,8 @@
/* Masks for joy_read */
#define JOY_UP_MASK 0x10
#define JOY_DOWN_MASK 0x08
#define JOY_LEFT_MASK 0x01
#define JOY_RIGHT_MASK 0x02
#define JOY_LEFT_MASK 0x02
#define JOY_RIGHT_MASK 0x01
#define JOY_BTN_1_MASK 0x04
#define JOY_FIRE_MASK JOY_BTN_1_MASK
@ -119,3 +121,9 @@ void shoot();
void explode();
void kbdclick1();
/* The following #defines will cause the matching functions calls in conio.h
** to be overlaid by macros with the same names, saving the function call
** overhead.
*/
#define _bordercolor(color) COLOR_BLACK

View file

@ -82,7 +82,7 @@ void tgi_unload (void);
** necessary.
*/
void __fastcall__ tgi_install (void* driver);
void __fastcall__ tgi_install (const void* driver);
/* Install an already loaded driver. */
void tgi_uninstall (void);

View file

@ -98,11 +98,13 @@ extern struct _timezone {
# define CLOCKS_PER_SEC 50
#elif defined(__PCE__)
# define CLOCKS_PER_SEC 60
#elif defined(__GAMATE__)
#elif defined(__GAMATE__)
# define CLOCKS_PER_SEC 135 /* FIXME */
#elif defined(__GEOS__)
#elif defined(__GEOS__)
# define CLOCKS_PER_SEC 1
#else
#elif defined(__TELESTRAT__)
# define CLOCKS_PER_SEC 10
#elif defined(__ATARI__) || defined (__LYNX__)
/* Read the clock rate at runtime */
clock_t _clocks_per_sec (void);
# define CLOCKS_PER_SEC _clocks_per_sec()

View file

@ -114,7 +114,8 @@ int __fastcall__ uncompress (unsigned char* dest, unsigned* destLen,
*/
unsigned long __fastcall__ adler32 (unsigned long adler, const char* buf,
unsigned long __fastcall__ adler32 (unsigned long adler,
const unsigned char* buf,
unsigned len);
/*
@ -140,7 +141,8 @@ unsigned long __fastcall__ adler32 (unsigned long adler, const char* buf,
*/
unsigned long __fastcall__ crc32 (unsigned long crc, const char* buf,
unsigned long __fastcall__ crc32 (unsigned long crc,
const unsigned char* buf,
unsigned len);
/*
Original zlib description:

View file

@ -21,6 +21,7 @@ TARGETS = apple2 \
atarixl \
atari2600 \
atari5200 \
atari7800 \
atmos \
creativision \
$(CBMS) \
@ -34,6 +35,7 @@ TARGETS = apple2 \
sim6502 \
sim65c02 \
supervision \
sym1 \
telestrat
DRVTYPES = emd \

View file

@ -129,7 +129,7 @@ setbuf: lda #$00 ; Low byte
.assert MLI::OPEN::PATHNAME = MLI::INFO::PATHNAME, error
; Lower file level to avoid program file
; being closed by C libary shutdown code
; being closed by C library shutdown code
ldx LEVEL
stx level
beq :+
@ -185,13 +185,13 @@ setbuf: lda #$00 ; Low byte
lda #$00 ; '\0'
beq :- ; Branch always
; Call loader stub after C libary shutdown
; Call loader stub after C library shutdown
: lda #<target
ldx #>target
sta done+1
stx done+2
; Initiate C libary shutdown
; Initiate C library shutdown
jmp _exit
.bss

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