1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-10 19:29:45 +00:00
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
2016-06-13 20:40:01 +02:00
2016-06-19 15:03:20 +02:00
2016-06-13 20:40:01 +02:00
2016-06-19 15:03:20 +02:00
2016-06-19 01:39:27 +02:00
2016-06-01 23:51:43 +02:00
2015-11-29 21:15:10 +01:00
2016-06-01 22:36:38 +02:00
2015-05-05 21:56:23 +02: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.

Description
cc65 - a freeware C compiler for 6502 based systems
Readme Zlib 404 MiB
Languages
C 62.4%
Assembly 35.6%
PHP 0.7%
Makefile 0.6%
Perl 0.3%
Other 0.3%