1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-20 17:20:49 +00:00
Commit Graph

6776 Commits

Author SHA1 Message Date
Oliver Schmidt a2c9cb021a Moved things into ONCE.
Code and or data used only during initialization belongs into the ONCE segment.
2016-03-15 22:55:36 +01:00
Oliver Schmidt 0edd05b4bf Removed symbol definition for ONCE.
Almost all targets don't need symbols for the ONCE segment. Likely their definition was a C&P error in the first place.
2016-03-15 22:55:34 +01:00
Oliver Schmidt 46d4307bbb Removed ONCE segment.
Pure assembler programs don't have constructors. Therefore constructor code ending up in an assembler program should trigger an error.
2016-03-15 22:55:32 +01:00
Oliver Schmidt c768de156a Fixed INIT properties.
The main chunk load header references __BSS_LOAD__ so BSS must be the first bss type segment. Subsequent changes will move ONCE to share its address with the BSS. Then it'll be necessary to load INIT from disk. Therefore we do it right now.
2016-03-13 22:18:51 +01:00
Oliver Schmidt 692f96409d Fixed BSS properties.
The cassette boot file header references __BSS_RUN__ so BSS must be the first bss type segment (and for sure isn't optional).
2016-03-13 22:13:41 +01:00
Oliver Schmidt 56a8c69b14 Use AX paradigm. 2016-03-13 21:23:45 +01:00
Oliver Schmidt a3a22733f8 Cleaned up C64 linker configs.
The BSS segment and the ONCE segment share the same start address. So they need to be placed in two different memory areas.

So far BSS was placed in the MAIN memory area and ONCE was placed in an additional memory area. Both memory areas were written to the output file. They just "happened" to be loadable and runnable at a stretch.

Now ONCE is placed in the MAIN memory area and BSS is placed in an additional memory area. Only MAIN is written to the output file. It becomes more obvious that BSS is "just" defined to share memory with ONCE.
2016-03-13 14:32:07 +01:00
Oliver Schmidt 084453ba57 Don't presume the stack size to be a multiple of pages. 2016-03-10 10:07:09 +01:00
Oliver Schmidt aac0b1cbbb Merge pull request #274 from bbbradsmith/doc-cc65-intern
New documentation: cc65-intern.sgml
2016-03-08 21:50:18 +01:00
Oliver Schmidt 69fbcb30fd Use AX paradigm for stack initalization. 2016-03-07 01:44:19 +01:00
Oliver Schmidt d8c31cf1d3 Renamed RAM to MAIN for all disk based targets.
The name RAM doesn't make much sense in general for a memeory area because i.e. the zero page is for sure RAM but is not part of the memory area named RAM.

For disk based targets it makes sense to put the disk file more into focus and here MAIN means the main part of the file - in contrast to some header.

Only for ROM based targets the name RAM is kept as it makes sense to focus on the difference between RAM and ROM.
2016-03-07 01:28:55 +01:00
Oliver Schmidt 419eb700b5 Renamed INITBSS to INIT and INIT to ONCE.
The way we want to use the INITBSS segment - and especially the fact that it won't have the type bss on all ROM based targets - means that the name INITBSS is misleading. After all INIT is the best name from my perspective as it serves several purposes and therefore needs a rather generic name.

Unfortunately this means that the current INIT segment needs to be renamed too. Looking for a short (ideally 4 letter) name I came up with ONCE as it contains all code (and data) accessed only once during initialization.
2016-03-06 21:27:19 +01:00
Oliver Schmidt ab1600b346 Merge pull request #269 from jbrandwood/squarebracket
New ".feature" to use brackets instead of parens for 6502 indirect addressing.
2016-03-03 09:07:21 +01:00
Brad Smith 97e6a8c569 cc65-intern update minor change notes from greg-king5 2016-03-02 21:01:46 -05:00
Brad Smith fa5b0d88c5 Merge remote-tracking branch 'refs/remotes/cc65/master' into doc-cc65-intern 2016-03-02 21:01:04 -05:00
Brad Smith 85a58453cb cc65-intern adjusting mailing address 2016-03-02 02:03:23 -05:00
Brad Smith 18dec35312 cc65-intern sgml fixes 2016-03-02 01:58:44 -05:00
Oliver Schmidt 60958f005a Merge pull request #273 from mrdudz/emddocs
updated docs with recently added extended memory drivers
2016-02-28 21:53:46 +01:00
mrdudz 7d2969d5ac fixed copypaste errors 2016-02-28 21:39:49 +01:00
mrdudz f328532030 updated docs with recently added extended memory drivers 2016-02-28 20:12:28 +01:00
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
Bob Andrews 25f4482641 Merge pull request #238 from mrdudz/gamate
Bit Corporation 'Gamate' support
2016-02-27 18:44:26 +01:00
Bob Andrews 3f72e59e93 Merge pull request #241 from blackystardust/c128-function-ram-emd
C128 function ram emd
2016-02-27 18:08:55 +01:00
Oliver Schmidt 669205600f Merge pull request #271 from silverdr/blackystardust_pr_post_review
Blackystardust pr post review
2016-02-27 00:55:11 +01:00
Patrycjusz R. Łogiewa 01d9d3d151 Merge branch 'blackystardust_pr_post_review' of github.com:silverdr/cc65 into blackystardust_pr_post_review 2016-02-26 23:56:22 +01:00
silverdr 2bcdf32458 blackystardust pull request with post-review changes 2016-02-26 23:55:55 +01:00
Patrycjusz R. Łogiewa 8a3a0e95ad blackystardust pull request with post-review changes 2016-02-26 23:51:37 +01:00
silverdr 2abd077dfd Merge pull request #1 from cc65/master
sync
2016-02-26 23:42:50 +01:00
Brad Smith 222ab93026 revise note on prototypes/K&R conventions 2016-02-26 17:33:46 -05:00
Brad Smith fd708d30ec draft of cc65-intern document 2016-02-26 17:11:11 -05:00
John Brandwood ef153364ea Add indirect JMP examples and fix typos in the documentation. 2016-02-26 08:10:11 -08:00
John Brandwood d23db09f7f Add optional feature to use brackets instead of parens for 6502 indirect addressing. 2016-02-25 12:40:31 -08:00
Oliver Schmidt f7cdfbf5cb Minor fix 2016-01-21 20:51:17 +01:00
Oliver Schmidt 5c3e09685f Added Watara. 2016-01-21 20:49:21 +01:00
Oliver Schmidt 0535075856 Fixed #258. 2016-01-16 22:41:14 +01:00
Oliver Schmidt 2f61c5433e Merge pull request #257 from greg-king5/actor-lineinfo
Make ca65's CONDES-type pseudo-instructions save line numbers correctly.
2016-01-16 13:39:11 +01:00
Greg King 7a39b85e30 Fixed how ca65's CONDES-type pseudo-instructions save line numbers (for error messages). 2016-01-15 17:18:09 -05:00
Oliver Schmidt 8e297aacd1 Merge pull request #256 from polluks/master
Changed stdout to stderr to separate sim65's output streams. Suggeste…
2016-01-05 21:13:12 +01:00
polluks cb3700ef66 Changed stdout to stderr to separate sim65's output streams. Suggested doc edit. 2016-01-05 17:45:18 +01:00
Oliver Schmidt 22348e2f07 Merge pull request #255 from polluks/master
Some missing docu.
2016-01-05 17:26:31 +01:00
polluks f69f8add17 Updated index. 2016-01-05 15:57:18 +01:00
polluks 231150bc3c Added sim65 documentation. 2016-01-05 15:45:51 +01:00
polluks 804f1fded6 Fixed typos. 2016-01-05 15:38:05 +01:00
Oliver Schmidt d34edf8b1f Merge pull request #254 from greg-king5/offset-pointer
Fix an unbalanced C stack that happens when a pointer is added to a 32-bit offset.
2016-01-02 13:55:42 +01:00
Greg King e050655757 Added a cc65 regression test for pointer and offset addition operations. 2016-01-01 11:39:55 -05:00
Greg King 7e14dde07b Fixed the cc65 code that handled an addition of a pointer to a 32-bit offset.
It didn't demote the offset to int because it looked at the pointer (instead of the offset) which already was 16 bits.
2015-12-31 17:41:48 -05:00
Oliver Schmidt 104f898260 Merge pull request #253 from greg-king5/pointer-compares
Make cc65 accept comparisons between pointers with different qualifiers.
2015-12-29 12:11:33 +01:00
Greg King 3b303396bf Made cc65 accept comparisons between pointers with different qualifiers (similarly to subtractions between pointers). 2015-12-29 04:18:17 -05:00
Oliver Schmidt 02e4b5bfe3 Merge pull request #249 from polluks/master
My first PR
2015-12-27 13:40:20 +01:00
polluks a8a6e9df5b Added chrcvt documentation 2015-12-27 02:09:12 +01:00