1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 21:29:03 +00:00
Commit Graph

492 Commits

Author SHA1 Message Date
Christian Groessler
346d88a6a7 Add issues from pull request #307. 2016-06-07 12:07:38 +02:00
Christian Groessler
c7874b9f60 Add Atari version of of doesclrscrafterexit().
- Update documentation.
- Update atari.h and apple2.h header files.
- Adapt Atari test/target programs.
- Fix a typo in "div" entry in funcref.sgml.
2016-06-07 00:42:51 +02:00
Oliver Schmidt
13482984ca Introduced internal gotoxy that pops both parameters.
About all CONIO functions offering a <...>xy variant call
  popa
  _gotoxy

By providing an internal gotoxy variant that starts with a popa all those CONIO function can be shortened by 3 bytes. As soon as program calls more than one CONIO function this means an overall code size reduction.
2016-06-05 14:58:38 +02:00
Oliver Schmidt
89329f1519 Merge pull request #287 from silverdr/target_goodies
moved output of target utils and drivers to separate directory
2016-06-01 11:01:56 +02:00
Oliver Schmidt
f1a052f259 Merge pull request #303 from groessler/something_to_pull
Atari: get current drive on XDOS
2016-05-31 12:47:11 +02:00
Christian Groessler
0114a850d9 Atari, getdefdev.s: use mnemonics for 'crvec'. 2016-05-31 12:24:21 +02:00
Christian Groessler
4d02d47832 Use atexit() to wait for key press at program ternination.
Idea by polluks.
2016-05-31 10:38:02 +02:00
Christian Groessler
c1f17e9c18 Atari: make __getdefdev function ROM-friendly 2016-05-31 09:28:53 +02:00
Christian Groessler
9523fa2d33 Atari: get current drive on XDOS 2016-05-31 07:37:58 +02:00
Christian Groessler
b3d7c09ba1 forgot to add the new file atari/is_cmdline_dos.s in my last commit... 2016-05-25 01:06:53 +02:00
Christian Groessler
da65866e24 Atari: add new function '_is_cmdline_dos()' and some other small changes.
- use this function instead of directly looking at _dos_type in the included
  targetutil and test programs
- fixes/improvements to the Atari runtime library regarding the recently
  changed _dos_type values
- libsrc/atari/targetutil/w2cas.c: exit if no filename was entered
- add documentation for the new function
2016-05-25 00:57:43 +02:00
Christian Groessler
6d7dfad80b add support for XDOS command lines 2016-05-24 03:06:00 +02:00
Patrycjusz R. Łogiewa
ba10c74a7a directory structure changed from driver-centric to target-centric 2016-05-16 19:49:43 +02:00
Patrycjusz R. Łogiewa
93f55c274b moved output of target utils and drivers to separate directory 2016-05-13 14:28:58 +02:00
Oliver Schmidt
1d1ba3ed3b Adjusted constructors.
The constructors are _NOT_ allowed anymore to access the BSS. Rather they must use the DATA segment or the INIT segment. The latter isn't cleared at any point so the constructors may use it to expose values to the main program. However they must make sure to always write the values as they are not pre-initialized.
2016-03-16 16:28:32 +01:00
Oliver Schmidt
56a8c69b14 Use AX paradigm. 2016-03-13 21:23:45 +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
76a5a72403 Adjusted current working directory initialization on Apple and Atari.
Moving __cwd from BSS into INITBSS does of course ;-) not only impact the CBM targets but all targets with disk I/O support.

Note: Code using `__cwd-1` may trigger an ld65 range error because __cwd may end up at the very begining of a segment. As far as I see this is an ld65 bug which I'm not try to fix - at least here.
2015-10-15 00:15:38 +02:00
Oliver Schmidt
0ee9b2e446 Changed run location of INIT segment.
So far the INIT segment was run from the later heap+stack. Now the INIT segment is run from the later BSS. The background is that so far the INIT segment was pretty small (from $80 to $180 bytes). But upcoming changes will increase the INIT segment in certain scenarios up to ~ $1000 bytes. So programs with very limited heap+stack might just not been able to move the INIT segment to its run location. But moving the INIT segment to the later BSS allows it to occupy the later BSS+heap+stack.

In order to allow that the constructors are _NOT_ allowed anymore to access the BSS. Rather they must use the DATA segment or the new INITBSS segment. The latter isn't cleared at any point so the constructors may use it to expose values to the main program. However they must make sure to always write the values as they are not pre-initialized.
2015-10-14 22:52:09 +02:00
Oliver Schmidt
ccc7c2b1f9 Minor style adjustment. 2015-10-09 22:18:51 +02:00
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
2bc4634860 Normalized style.
We don't use .ifndef .else .endif
2014-06-03 18:30:11 +02:00
Oliver Schmidt
99f0a56f63 Merge pull request #122 from groessler/a5200
new target: Atari 5200 console
2014-05-30 22:52:51 +02:00
Christian Groessler
ef1e96aff0 small optimization 2014-05-27 01:50:22 +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
Christian Groessler
f290c1aa28 remove build warning 2014-04-25 13:21:54 +02:00
Christian Groessler
ec417c0dc5 Merge remote-tracking branch 'upstream/master' into a5200 2014-04-25 02:07:44 +02:00
Christian Groessler
401e18d982 Put mouse cursor shape definition into .rodata. 2014-04-24 02:04:08 +02:00
Oliver Schmidt
9e3154220c Merge pull request #106 from groessler/something_to_pull
add P/M (aka 'Sprite') mouse callback for Atari
2014-04-22 20:01:43 +02:00
Christian Groessler
2059e34114 rename ser_libref.s to serref.s in order to be consistent with other targets 2014-04-22 13:42:17 +02:00
Christian Groessler
eefd33d309 Split libref.s into multiple files to prevent inclusion of unnecessary code. 2014-04-22 12:50:07 +02:00
Christian Groessler
7eaf721e7c Selection whether to use page 6 for mouse P/M data is not done in
Makefile.inc, like the other compile-time options. Small fix in the
P/M mouse "show" routine: adapt mouse cursor colors to current
screen colors.
2014-04-21 11:41:37 +02:00
Christian Groessler
88e3e60550 address issue raised in the pull request; add support to not use page 6
again
2014-04-15 11:37:34 +02:00
Christian Groessler
526b440b24 - always use page 6 for P/M mouse cursor
- make cursor character of text mode callback configurable
- change default cursor character of text mode callback from 'plus' to 'diamond'
- set P/M callback as default
2014-04-11 23:51:49 +02:00
Christian Groessler
661203a89a initial version of a P/M mouse callback 2014-04-11 23:51:49 +02:00
Christian Groessler
f266612697 Merge remote-tracking branch 'upstream/master' into a5200 2014-03-20 00:24:11 +01:00
Christian Groessler
889783bedb add some conio functions 2014-03-11 01:17:59 +01:00
Christian Groessler
73df73194a fix indentation 2014-03-07 23:15:57 +01:00
Christian Groessler
b40fe584d8 fix typo 2014-03-07 23:15:11 +01:00
Oliver Schmidt
3f0af9b241 Have src/Makefile and libsrc/Make use disjoint work directories.
Building the clean target in src or libsrc should only delete stuff created by the make in those directories. Having both separated allows the Travis CI build to replace the native binaries with cross built binaries while keeping everything else.
2014-03-05 23:24:35 +01:00
Oliver Schmidt
44ccb27549 Changed Makefile.inc handling.
It seems more appropriate to trigger the inclusion of Makefile.inc via $TARGET (instead of $SRCDIR). This is btw. more consistent with extzp.s inclusion which is triggered via $TARGET too.
2014-03-04 21:46:25 +01:00
Christian Groessler
bf8eb8c22e rename libsrc/atari/tvtype.s to libsrc/atari/get_tv.s 2014-03-04 15:44:10 +01:00
Oliver Schmidt
3f7cd3387f Optimize for size instead for speed. 2014-03-03 21:08:35 +01:00
Christian Groessler
7a9fa9d4cd rename W2CAS.COM to w2cas.com (lowercase) 2014-03-03 18:12:11 +01:00
Christian Groessler
69f81f6d67 make 'w2cas' a targetutil 2014-03-01 13:11:52 +01:00
Christian Groessler
81fe7a3805 cleanups; split 'header' and 'init' part into two source files 2014-02-21 22:43:44 +01:00
Christian Groessler
65874d4604 Merge remote-tracking branch 'upstream/master' into cassette 2014-02-20 01:05:10 +01:00