[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delete key issue...



"Harry Potter" <rose.joseph12@yahoo.com> wrote:

>I *would* post it on the cc65 mailing list, but I got kicked off it because 
>*somebdy else* posted SPAM on it even though *I* was warned not to.  At 
>least I was right about the bug this time.

Yes you are. Recognizing the delete character on the apple2 as a printable 
character is a bug.

In ftp://ftp.musoftware.de/pub/uz/cc65  2.13.9.20120311 snapshot, when you 
call libsrc/common/_isprint(127)

_isprint calls libsrc/apple2/__ctype(127)

In __ctype for the apple2 the table masks all characters below 32 with the 
CT_CTRL mask:

i.e.

.byte CT_CTRL ;  31/1f ___ctrl_____


However for some reason (or maybe no reason) the DELETE character is only 
masked as a wordstar character:

.byte CT_OTHER_WS  ; 127/7f ____DEL____

_isprint checks the CT_CTRL mask and since it was not set by __ctype, 
_isprint fails!

The fix (if indeed this is fixed) should be done in ctype.s and should 
probably be applied as follows:

 .byte CT_CTRL | CT_OTHER_WS ; 127/7f ____DEL____

At least that's what I think. Again, I can't imagine how on earth a C 
compiler like cc65 would have got this far on the apple2 by recognizing  a 
control character as a printable character.

Bill