1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00
cc65/include
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
..
2018-12-30 18:57:46 +01:00
2020-04-16 17:06:18 +02:00
2017-01-13 21:12:22 +01:00
2019-02-05 23:27:52 +01:00
2018-12-30 03:49:26 -05:00
2017-07-28 12:16:55 -04:00
2019-05-08 10:22:12 +02:00
2020-06-22 23:55:45 +02:00
2017-08-19 19:11:28 +02:00
2019-03-05 21:20:05 -05:00
2020-07-12 22:19:55 +02:00
2019-10-09 06:15:38 -04:00
2020-02-03 20:45:09 +01:00
2018-02-10 11:45:50 +01:00
2016-06-13 20:40:01 +02:00
2017-08-19 19:11:28 +02:00
2017-06-09 10:35:16 +03:00
2017-08-19 19:11:28 +02:00
2018-08-30 11:48:46 +02:00
2017-12-11 19:52:11 +01:00
2018-05-29 14:29:50 -04:00
2018-08-15 16:06:44 +02:00