1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 19:29:37 +00:00
cc65/libsrc
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
..
apple2 Added CONIO cursor support. 2016-06-19 15:03:20 +02:00
atari A small rearrangement of instructions in Atari's exec() to let the comments 2016-06-16 00:47:13 +02:00
atari5200 Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
atmos Converted the Atmos configuration to the new constructor segment model. 2016-03-18 11:28:56 -04:00
c16 Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
c64 Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
c128 Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
cbm Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
cbm510 Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
cbm610 Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
common Implement exec() for Atari XDOS. 2016-06-13 20:40:01 +02:00
conio Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02: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 Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
geos-apple directory structure changed from driver-centric to target-centric 2016-05-16 19:49:43 +02:00
geos-cbm Create static drivers directly from source files. 2014-06-04 23:50:18 +02:00
geos-common Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
joystick added compiler/assembler target, lib compiles 2014-11-29 15:35:20 +01:00
lynx Renamed RAM to MAIN for all disk based targets. 2016-03-07 01:28:55 +01:00
mouse Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
nes Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
osic1p Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
pce Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
pet Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
plus4 Fixed the Plus/4 joystick driver. 2016-06-18 13:18:26 -04:00
runtime Renamed INITBSS to INIT and INIT to ONCE. 2016-03-06 21:27:19 +01:00
serial Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
sim6502 Renamed RAM to MAIN for all disk based targets. 2016-03-07 01:28:55 +01:00
supervision Don't presume the stack size to be a multiple of pages. 2016-03-10 10:07:09 +01:00
tgi Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
vic20 Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
zlib Made _afailed() and uncompress() be fastcall functions. 2015-03-13 07:35:47 -04:00
Makefile samples zip and install targets moved into samples/Makefile as agreed 2016-05-30 17:42:01 +02:00