1
0
mirror of https://github.com/cc65/cc65.git synced 2024-10-07 23:56:05 +00:00
cc65/libsrc/apple2
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
..
emd Create static drivers directly from source files. 2014-06-04 23:50:18 +02:00
extra
joy Create static drivers directly from source files. 2014-06-04 23:50:18 +02:00
mou
ser
targetutil directory structure changed from driver-centric to target-centric 2016-05-16 19:49:43 +02:00
tgi Create static drivers directly from source files. 2014-06-04 23:50:18 +02:00
_scrsize.s
_sys.s Allow _sys() to call ROM routines. 2016-03-25 21:57:06 +01:00
break.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
cclear.s
cgetc.s
chline.s
close.s
closedir.c
clrscr.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
color.s
cout.s
cputc.s
crt0.s
ctype.s
curdevice.s
cvline.s Added CONIO cursor support. 2016-06-19 15:03:20 +02:00
devicedir.s
dioclose.s
diocommon.s
dioopen.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
dioread.s
diosectcount.s
diosectsize.s
diowrite.s
dir.h Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
doesclrscr.s Added Apple II version of doesclrscrafterexit(). 2016-06-05 13:01:42 +02:00
dosdetect.s
exec.s Minor adjustment to recent change. 2016-05-30 14:31:53 +02:00
exehdr.s
filedes.inc
filedes.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
filename.s
get_ostype.s
getdevice.s I wasn't aware that the unit numbers in the ProDOS device list contain device type identifiers in the low nibble. So if we can't use the device list entries as-is we can as well present the high nibble as low nibble to the user thus providing more meaningful device numbers. 2012-10-15 21:59:51 +00:00
gotoxy.s
gotoy.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
home.s
initcwd.s
iobuf.s
irq.s Made use of recently added Apple scrcode macro. 2016-03-27 18:27:53 +02:00
isdevice.s I wasn't aware that the unit numbers in the ProDOS device list contain device type identifiers in the low nibble. So if we can't use the device list entries as-is we can as well present the high nibble as low nibble to the user thus providing more meaningful device numbers. 2012-10-15 21:59:51 +00:00
joy_stat_stddrv.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
joy_stddrv.s
kbhit.s
libref.s Added library reference tgi_libref to TGI interface. 2013-06-01 12:42:00 +02:00
lseek.s
mainargs.s
mcbdefault.s Some fine tuning of the mouse driver interface harmonization. 2014-01-17 21:09:15 +01:00
mli.inc Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
mli.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
mouse_stat_stddrv.s
mouse_stddrv.s
open.s
opendir.c Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
oserrlist.s
oserror.s Implement exec() for Atari XDOS. 2016-06-13 20:40:01 +02:00
randomize.s
rdkey.s
read.s
readdir.c
reboot.s
revers.s
rewinddir.c Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
rwcommon.s
syschdir.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
sysmkdir.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
sysremove.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
sysrename.s
sysrmdir.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
systime.s
sysuname.s New uname function 2003-08-12 17:24:02 +00:00
textframe.s
tgi_colors.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
tgi_stat_stddrv.s
tgi_stddrv.s
toascii.s
videomode.s
vtabz.s
wherex.s
wherey.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
write.s