1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-02 15:29:33 +00:00
Commit Graph

90 Commits

Author SHA1 Message Date
Greg King
c7969a78b0 Refined the comments in the target start-up files.
Fixed typo errors.  Made the comments consistent across all those files.
2014-08-24 10:10:20 -04:00
Greg King
0390c34e88 Changed multi-line C comments into another style.
The left side doesn't look unbalanced.
2014-06-30 16:51:07 -04:00
Oliver Schmidt
2c975d3642 Create static drivers directly from source files.
Up to now static drivers were created via co65 from dynamic drivers. However there was an issue with that approach:

The dynamic drivers are "o65 simple files" which obligates that they start with the 'code' segment. However dynamic drivers need to start with the module header - which is written to. For dynamic drivers this isn't more than a conceptual issue because they are always contain a 'data' segment and may therefore only be loaded into writable memory.

However when dynamic drivers are converted to static drivers using co65 then that issue becomes a real problem as then the 'code' segment may end up in non-writable memory - and thus writing to the module header fails.

Instead of changing the way dynamic drivers work I opted to rather make static driver creation totally independent from dynamic drivers. This allows to place the module header in the 'data' segment (see 'module.mac').
2014-06-04 23:50:18 +02:00
Oliver Schmidt
d6c3bd29ac Renamed JUMPTABLE and cleaned up module.cfg.
This change was suppsed to fix the issue that the former JUMPTABLE is merked as 'ro' while it is actually written to in several scenarios. When drivers are converted using co65 and then compiled into ROMs the JUMPTABLE isn't copied to RAM and therefore the write operations in question fail.

However unfortunately I didn't succeed in changing that :-( Just setting the former JUMPTABLE to 'rw' broke the drivers. So I placed the DATA segment directly after the former JUMPTABLE segment. This made the drivers converted with co65 work again - obviously after changing libsrc/Makefile:235 from '--code-label' to '--data-label'. But the actual dynamic drivers still didn't work as the former JUMPTABLE wasn't placed as the beginning of the loaded file anymore. That effect could be changed by exchanging src/ld65/o65.c:1391 with src/ld65/o65.c:1394 but doing so broke the drivers again :-((
2014-05-01 21:44:39 +02:00
Oliver Schmidt
ae409e4978 Added library reference ser_libref to SER interface. 2013-06-01 11:03:14 +02:00
Oliver Schmidt
23650cb946 Added library reference joy_libref to JOY interface. 2013-06-01 00:36:08 +02:00
Oliver Schmidt
85885001b1 Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
Oliver Schmidt
81e467cdc2 Replaced whole bunch for Makefiles with a single generic Makefile.
- No complex shell logic.
- "Source file shadowing" for all targets via vpath.
- Dependency handling.
- True incremental build.
- Don't write into source directories.
- Easy cleanup by just removing 'wrk'.
2013-05-04 22:15:30 +02:00
Oliver Schmidt
008b4c4e1d Replaced whole bunch for Makefiles with a single generic Makefile.
- No complex shell logic.
- "Source file shadowing" for all targets via vpath.
- Dependency handling.
- True incremental build.
- Don't write into source directories.
- Easy cleanup by just removing 'wrk'.
2013-05-04 22:10:48 +02:00
ol.sc
7c9171ee87 Moved IRQ hooking / unhooking from startup code to constructor / destructor to avoid linking in the hooking / unhooking code (and callirq) for the majority of cc65 prorams not linking in interruptors.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5985 b7a2c559-68d2-44c3-8de9-860c34a00d81
2013-02-12 22:39:38 +00:00
ol.sc
6860ac7dfd Introduced static standard drivers.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5891 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-11-01 19:53:47 +00:00
ol.sc
1bba8355da Fixed typo.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5889 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-31 23:39:58 +00:00
ol.sc
a3c940e315 Convert dynamically loadable drivers into statically linkable drivers and add them to the target libraries.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5887 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-29 20:26:26 +00:00
uz
3470f230ae Need to import ST since it is no longer declared in plus4.inc.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5839 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-02 19:22:19 +00:00
ol.sc
59e96ef740 Turned the 'ST' status byte into a symbol resolved by the linker in order to allow to use it from code living in the 'cbm' directory.
Moved getdevice.s from 'c64'/'c128' to 'cbm' making use of the new 'ST' setup.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5834 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-09-30 18:20:15 +00:00
uz
285aaf8933 Patch by Stefan Haubenthal: Remove __fastcall__ in comments and/or the
function description for functions that don't take any parameters.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5573 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-04 13:08:54 +00:00
uz
5b659547b8 Removed the jump to RESTOR on exit for all the CBM platforms.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5355 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-01 19:58:31 +00:00
ol.sc
97b950b8d8 Removed unused TGI mode tables.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5015 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-02 10:30:49 +00:00
uz
8aff2a9159 Fixed a problem with the last change in crt0.s: The symbols for the RAM memory
area had been used but not defined in the linker config. Changed the startup
module and the linker config to use the common loadaddr and exehdr modules.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4870 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-16 17:33:25 +00:00
uz
fa1b5047dd Fixed order of options in call to ld65, which became important after the
latest changes.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4843 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-09 21:33:14 +00:00
ol.sc
eef8ecc74d User linker generated symbols for stack placement (like most other targets) instead of a hardcoded constant in order to allow control of stack placement via linker configuration.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4821 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-10-02 10:32:26 +00:00
ol.sc
d1aad57b98 Initialize _curunit from the zeropage value DEVNUM (aka First Address) in a constructor with a very high priority to be called before DEVNUM gets overwritten by other constructors.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4588 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-02-14 23:12:54 +00:00
uz
7e2a24176f Replaced $30 by literal '0' for better readability.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4513 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-10 22:12:24 +00:00
uz
13698871cb Removed the call to CLRCH in the startup code.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4512 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-10 21:22:17 +00:00
uz
60bc009991 * Moved the BASIC stub that calls the compiled program into it's own segment
named EXEHDR.
* Renamed BASICHDR to EXEHDR for the PET-II machines.
* Moved the call to CHRCH in front of the code that saves the zero page, since
  open files are sometimes remembered in the zero page, so we need to close
  them before we grab a copy.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4507 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-09 12:42:24 +00:00
uz
bfbf94404b Squeezed bytes and cycles out of the kbhit functions for almost all platforms.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4480 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-11-24 18:31:16 +00:00
uz
c7a33334ba Don't hardcode the address of the SYS call for the startup code of the
Commodore machines.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4474 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-11-23 12:01:24 +00:00
uz
5c5d01d84a Moved most platform assembler includes into asminc, so they will be available
in the distribution. 
Added --forget-inc-paths to the command line of the assembler in the
Makefiles, because the assembler does now have builtin paths and will find
include files from an installation first.
Hopefully fixed any problems that arose from the two changes.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4223 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-24 17:44:22 +00:00
uz
7de61e351c Define a standard driver and mode for tgi graphics and use it in the sample
program. The standard driver and mode is the first one in the tgi_mode_table.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4153 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-11 18:59:37 +00:00
uz
8216bf1d6a Force an import of the special symbol __STARTUP__ in the C compiler when
main() is encountered. Define this symbol in the startup code. This will
automatically force linking of the startup code which can then reside inside
the standard library as any other object file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3988 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-31 12:05:42 +00:00
uz
931add050e Added a systime implementation by Stefan Haubenthal with a few changes. The
routine reads the TOD clock of CIA1 on the C64 and C128. Since systime was a
dummy routine common for all CBMs before, this change adds an individual dummy
routine for all other CBM systems. CBM510/610 do also have a TOD clock, so a
similar function as in the C64 could be used ...


git-svn-id: svn://svn.cc65.org/cc65/trunk@3974 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-27 18:44:37 +00:00
uz
0aea6d28dc Removed an unsed import.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3952 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-22 18:14:54 +00:00
uz
d28ba06f79 Fixed problems with the startup code (Greg King): Interrupts must be hooked
before calling initlib because initlib calls contructors and may install
drivers, which enable hardware interrupts. Similar for donelib.

See also R3897 where this change was done for other platforms.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3951 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-22 18:10:01 +00:00
uz
e5cbba264f Move the irqcount variable from BSS into DATA, since it is used by the
interrupt handler, which is installed *before* zerobss is called.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3950 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-22 18:04:25 +00:00
uz
4812feb44b git-svn-id: svn://svn.cc65.org/cc65/trunk@3863 b7a2c559-68d2-44c3-8de9-860c34a00d81 2008-08-02 22:02:54 +00:00
cuz
f257b2ee81 Moved the data that keeps a copy of the used zero page locations in its own
segment to reduce the executable size.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3849 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-07-03 19:39:14 +00:00
cuz
0fcc998024 Inline InitBuffers
git-svn-id: svn://svn.cc65.org/cc65/trunk@3503 b7a2c559-68d2-44c3-8de9-860c34a00d81
2005-05-05 10:32:06 +00:00
cuz
a170b50687 CLOSE is actually the same as INSTALL/UNINSTALL
git-svn-id: svn://svn.cc65.org/cc65/trunk@3502 b7a2c559-68d2-44c3-8de9-860c34a00d81
2005-05-05 10:25:27 +00:00
cuz
f096dc95ae Carry is clear on IRQ entry
git-svn-id: svn://svn.cc65.org/cc65/trunk@3500 b7a2c559-68d2-44c3-8de9-860c34a00d81
2005-05-05 10:11:23 +00:00
cuz
107ead3211 Adjusted IRQ handler for new callirq semantics
git-svn-id: svn://svn.cc65.org/cc65/trunk@3498 b7a2c559-68d2-44c3-8de9-860c34a00d81
2005-05-05 10:00:17 +00:00
cuz
d0bee35728 Move constructor code into the INIT segment
git-svn-id: svn://svn.cc65.org/cc65/trunk@3405 b7a2c559-68d2-44c3-8de9-860c34a00d81
2005-02-26 09:28:46 +00:00
cuz
dc781be7f9 Add the irq entry point
git-svn-id: svn://svn.cc65.org/cc65/trunk@3280 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-11-06 13:27:38 +00:00
cuz
303304fe90 Add definitions for tools so the makefile is useful by itself.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3262 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-10-26 19:28:26 +00:00
cuz
7b13d79bde Use get_tv.inc
git-svn-id: svn://svn.cc65.org/cc65/trunk@3259 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-10-26 19:05:19 +00:00
cuz
cfef8e1e0d Renamed __IRQFUNC_xxx -> __INTERRUPTOR_xxx
git-svn-id: svn://svn.cc65.org/cc65/trunk@3189 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-09-20 10:24:59 +00:00
cuz
215955ecba Added address of FETCH routine
git-svn-id: svn://svn.cc65.org/cc65/trunk@2995 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-04-28 12:03:09 +00:00
cuz
e68196c252 Add command line evaluation for the Plus/4
git-svn-id: svn://svn.cc65.org/cc65/trunk@2994 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-04-28 11:57:50 +00:00
cuz
c62b4ae73f Rename INBUF to FNBUF, add basic buffer
git-svn-id: svn://svn.cc65.org/cc65/trunk@2993 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-04-28 11:55:43 +00:00
cuz
dadaf734af Rename FNAM_ADR to FNAM, use new := operator for addresses
git-svn-id: svn://svn.cc65.org/cc65/trunk@2992 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-04-28 11:53:59 +00:00
cuz
0d7cf8ebce Use new callirq function
git-svn-id: svn://svn.cc65.org/cc65/trunk@2970 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-04-04 14:28:57 +00:00