1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-28 22:30:12 +00:00
cc65/libsrc
Oliver Schmidt 3d08abcfa8 Load INITBSS segment from disk.
Conceptually the INITBSS segment is not initialized in any way. Therefore it makes sense to not load it from disk. However the INIT segment has to be loaded from disk and therefore moved to its run location above the INITBSS segment. The necessary move routine increases runtime RAM usage :-(

Therefore we now "unnecessarily" load the INITBSS segment from disk too meaning that the INIT segment is loaded at its run location. Therefore there's no need for the move routine anymore.

After all we trade disk space for (runtime) RAM space - an easy decision ;-)

Notes:

- The code allowing to re-run a program without re-load present so far could not have worked as far as I can see as it only avoided to re-run the move routine but still tried to re-run the code in the INIT segment that was clobbered by zeroing the BSS. Therefore I removed the code in question altogether. I'm personally not into this "dirty re-run" but if someone wants to add an actually working solution I won't block that.

- INITBSS is intentionally not just merged with the DATA segment as ROM-based targets can't reuse the INIT segment for the BSS and therefore have no reason to place the INIT segment above INITBSS.

- Because ROM-based targets don't copy INITBSS from the ROM (like it is done with the DATA segment) all users of INITBSS _MUST_NOT_ presume INITBSS to be initialized with zeros!
2016-02-28 19:45:36 +01:00
..
apple2 Adjusted current working directory initialization on Apple and Atari. 2015-10-15 00:15:38 +02:00
atari Adjusted current working directory initialization on Apple and Atari. 2015-10-15 00:15:38 +02:00
atari5200 Consistently place constructors (and their exclusive subroutines) in "INIT". 2015-10-09 21:44:20 +02:00
atmos Added more info to a comment. 2015-01-09 22:19:35 -05:00
c16 Changed run location of INIT segment. 2015-10-14 22:52:09 +02:00
c64 Load INITBSS segment from disk. 2016-02-28 19:45:36 +01:00
c128 Merge pull request #241 from blackystardust/c128-function-ram-emd 2016-02-27 18:08:55 +01:00
cbm Changed run location of INIT segment. 2015-10-14 22:52:09 +02:00
cbm510 Changed run location of INIT segment. 2015-10-14 22:52:09 +02:00
cbm610 Changed run location of INIT segment. 2015-10-14 22:52:09 +02:00
common Load INITBSS segment from disk. 2016-02-28 19:45:36 +01:00
conio Updated the fastcall information in a document and two Assembly files. 2015-07-22 13:31:14 -04:00
dbg Made _afailed() and uncompress() be fastcall functions. 2015-03-13 07:35:47 -04:00
em Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
gamate fix comments 2015-12-01 16:55:02 +01:00
geos-apple Have src/Makefile and libsrc/Make use disjoint work directories. 2014-03-05 23:24:35 +01:00
geos-cbm Create static drivers directly from source files. 2014-06-04 23:50:18 +02:00
geos-common Refined the comments in the target start-up files. 2014-08-24 10:10:20 -04:00
joystick added compiler/assembler target, lib compiles 2014-11-29 15:35:20 +01:00
lynx Refined the comments in the target start-up files. 2014-08-24 10:10:20 -04:00
mouse Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
nes nes: Fix reading the second controller 2015-12-14 19:28:53 +02:00
osic1p Consistently place constructors (and their exclusive subroutines) in "INIT". 2015-10-09 21:44:20 +02:00
pce Style changes. 2015-11-07 00:29:07 -05:00
pet Changed run location of INIT segment. 2015-10-14 22:52:09 +02:00
plus4 Changed run location of INIT segment. 2015-10-14 22:52:09 +02:00
runtime Changed run location of INIT segment. 2015-10-14 22:52:09 +02:00
serial Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
sim6502 Moved two errno helper functions into separate files. 2015-09-25 14:06:58 -04:00
supervision Refined the comments in the target start-up files. 2014-08-24 10:10:20 -04:00
tgi Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
vic20 Changed run location of INIT segment. 2015-10-14 22:52:09 +02:00
zlib Made _afailed() and uncompress() be fastcall functions. 2015-03-13 07:35:47 -04:00
Makefile initial import of the gamate stuff 2015-11-14 13:15:29 +01:00