1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-04 13:29:35 +00:00
cc65 - a freeware C compiler for 6502 based systems
Go to file
Oliver Schmidt e47485f925 Added CONIO cursor support.
For quite some time I deliberately didn't add cursor support to the Apple II CONIO imöplementation. I consider it inappropriate to increase the size of cgetc() unduly for a rather seldom used feature.

There's no hardware cursor on the Apple II so displaying a cursor during keyboard input means reading the character stored at the cursor location, writing the cursor character, reading the keyboard and finally writing back the character read initially.

The naive approach is to reuse the part of cputc() that determines the memory location of the character at the cursor position in order to read the character stored there. However that means to add at least one additional JSR / RTS pair to cputc() adding 4 bytes and 12 cycles :-( Apart from that this approach means still a "too" large cgetc().

The approach implemented instead is to include all functionality required by cgetc() into cputc() - which is to read the current character before writing a new one. This may seem surprising at first glance but an LDA(),Y / TAX sequence adds only 3 bytes and 7 cycles so it cheaper than the JSR / RTS pair and allows to brings down the code increase in cgetc() down to a reasonable value.

However so far the internal cputc() code in question saved the X register. Now it uses the X register to return the old character present before writing the new character for cgetc(). This requires some rather small adjustments in other functions using that internal cputc() code.
2016-06-19 15:03:20 +02:00
asminc Implement exec() for Atari XDOS. 2016-06-13 20:40:01 +02:00
cfg make BSS segment optional in atari-cassette.cfg 2016-05-25 01:29:00 +02:00
doc Added CONIO cursor support. 2016-06-19 15:03:20 +02:00
include Implement exec() for Atari XDOS. 2016-06-13 20:40:01 +02:00
libsrc Added CONIO cursor support. 2016-06-19 15:03:20 +02:00
samples Adjusted to recent change. 2016-06-19 01:39:27 +02:00
src Allowed character code zero to be remapped with other character codes. 2016-06-11 06:43:19 -04:00
test Harmonized goal name. 2016-06-01 23:51:43 +02:00
testcode Some improvements to Atari exec() after review. 2016-06-14 20:44:57 +02:00
util dont use that silly buffer 2015-11-29 21:15:10 +01:00
.gitignore Don't ignore more than necessary. 2016-06-01 22:36:38 +02:00
.travis.yml Update package index (as recommended by Travis CI). 2015-12-16 12:24:47 +01:00
LICENSE Simplified license. 2015-05-05 21:56:23 +02:00
Makefile Allow to build samples from the main Makefile. 2016-06-12 23:30:29 +02:00
Makefile.travis Fixed file name of Windows binary snapshot. 2015-01-20 21:00:44 +01:00
README.md Merge pull request #238 from mrdudz/gamate 2016-02-27 18:44:26 +01:00

Windows Snapshot

Documentation

Wiki

Build Status

cc65 is a complete cross development package for 65(C)02 systems, including a powerful macro assembler, a C compiler, linker, librarian and several other tools.

cc65 has C and runtime library support for many of the old 6502 machines, including

  • the following Commodore machines:
    • VIC20
    • C16/C116 and Plus/4
    • C64
    • C128
    • CBM 510 (aka P500)
    • the 600/700 family
    • newer PET machines (not 2001).
  • the Apple ][+ and successors.
  • the Atari 8 bit machines.
  • the Atari 5200 console.
  • GEOS for the C64, C128 and Apple //e.
  • the Bit Corporation Gamate console.
  • the NEC PC-Engine (aka TurboGrafx-16).
  • the Nintendo Entertainment System (NES) console.
  • the Watara Supervision console.
  • the Oric Atmos.
  • the Lynx console.
  • the Ohio Scientific Challenger 1P.

The libraries are fairly portable, so creating a version for other 6502s shouldn't be too much work.