Re: [cc65] scanf again

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2004-11-27 14:19:36
On Sat, Nov 27, 2004 at 01:49:52PM +0100, MagerValp wrote:
> For some reason petscii has upper case chars in both 97-122 and
> 193-218:

If this is true (and looks like it is), the cc65 library has several more
problems than just the one you noticed with the isxxx() functions. The
following code for example:

    if (C == 'x' || C == 'X') {
        NextChar ();
        Base = 16;  
    }

won't work depending on the input, because 'X' has two different
representations and the code does only check for one. Even when fixing the
ctype table, your parser - and quite some other code - may still not work
because of issues like this:-(

Given this problem, which is almost unsolvable, wouldn't it be better to
declare one of both upper case representations the "official" one, and the
other "unsupported"? The one currently used by cc65 is the one generated by
the keyboard (pressing shift+x will generate 216, not 120). How are the other
codes generated? And how are these codes handled by the kernal and
peripherials? Say, I have a file on the disk that has a name using these
"second" character codes, how can I load it if the keyboard generates the
"other" character codes? I cannot remember any piece of C64 software that had
code to support two different representations of upper case letters.

> ?"{CLR}";chr$(97);chr$(193):?peek(1024);peek(1025)

Yes, I've noticed that already, but I still don't understand the consequences.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Nov 27 14:19:39 2004

This archive was generated by hypermail 2.1.8 : 2004-11-27 14:19:49 CET