1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 21:32:19 +00:00
cc65/libsrc/apple2
Oliver Schmidt 04cc463452 Implemented some CONIO peek functions.
Please refer to https://github.com/cc65/cc65/pull/532 for background info.

I wrote in https://sourceforge.net/p/cc65/mailman/message/35873183/

===
cputs() wraps to the next line if the strings is too long to fit in the current line. I don't know if it's worth the effort to allow cpeeks() to continue reading from the next line. I'd like to discuss this aspect with the actual implementers.
===

This is still as unclear today as it was when I wrote the above. Therefore this change just doesn't add cpeeks() at all.

Since f8c6c58373 the Apple II CONIO implementation doesn't "need" revers() anymore - meaning that (nearly) every possible value can be placed in VRAM with a straight cputc() (without the need for a previous revers(1)).

The implementation of cpeekc() leverages that cputc() ability by always returning the value that can be fed into cputc() without a previous revers(1). Accordingly, cpeekrevers() always returns 0.

So after the sequence revers(1); cputc(x); a cpeekc() will return a value different from x! However, I don't see this behavior braking the cpeekc() contract. I see the cpeekc() contract being defined by the sequence textcolor(cpeekcolor()); revers(cpeekrevers()); cputc(cpeekc()); placing the very same value in VRAM that there was before. And that contract is fulfilled.
2020-07-12 22:19:55 +02:00
..
emd
extra
joy
mou
ser
targetutil
tgi
_scrsize.s
_sys.s
break.s
cclear.s Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
cgetc.s
chline.s Made Apple II CONIO more flexible. 2018-08-20 00:30:17 +02:00
close.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
closedir.c
clrscr.s
color.s
cout.s
cpeekc.s
cputc.s Implemented line wrap. 2018-08-20 00:30:17 +02:00
crt0.s
curdevice.s
cvline.s Made Apple II CONIO more flexible. 2018-08-20 00:30:17 +02:00
devicedir.s Fixed regression introduced by https://github.com/cc65/cc65/pull/652. 2018-07-26 14:31:17 +02:00
dioclose.s
diocommon.s
dioopen.s
dioread.s
diosectcount.s
diosectsize.s
diowrite.s
dir.h
doesclrscr.s Added Apple II version of doesclrscrafterexit(). 2016-06-05 13:01:42 +02:00
dosdetect.s
exec.s
exehdr.s Switched Apple II output format to AppleSingle. 2018-03-07 23:05:21 +01:00
filedes.inc
filedes.s
filename.s
get_ostype.s
getdevice.s Just a minor comment improvement. 2018-09-02 23:07:26 +02:00
getres.s
gettime.s Adjusted comments to match actual prototypes. 2018-11-06 11:13:23 +01: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 Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
initcwd.s Just removed some trailing spaces. 2018-09-08 23:14:54 +02:00
iobuf.s
irq.s
isdevice.s
joy_stat_stddrv.s
joy_stddrv.s
joyref.s Reflect that the Apple //c supports only one joystick. 2020-06-04 23:24:24 +02:00
kbhit.s
libref.s
lseek.s
mainargs.s Adjusted constructors. 2016-03-16 16:28:32 +01:00
mcbdefault.s
mli.inc
mli.s Protect random counter against ProDOS. 2018-09-08 23:29:59 +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
randomize.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
rdkey.s
read.s Renamed INITBSS to INIT and INIT to ONCE. 2016-03-06 21:27:19 +01:00
readdir.c Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
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 Added "popptr1" which is of common use to save some bytes. 2018-05-20 15:30:18 +02:00
settime.s Use MACHID to check for realtime clock. 2019-09-10 09:49:06 +02:00
syschdir.s
sysmkdir.s
sysremove.s
sysrename.s
sysrmdir.s
sysuname.s New uname function 2003-08-12 17:24:02 +00:00
tgi_colors.s
tgi_stat_stddrv.s
tgi_stddrv.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
videomode.s Made use of 65C02 opcode (thx to polluks). 2020-03-05 14:38:36 +01:00
vtabz.s
waitvsync.s
wherex.s
wherey.s
write.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00