Re: [cc65] hex encoded string bug?

From: thefox xofeht <thefox1aspekt.fi>
Date: 2010-11-25 11:53:17
On Thu, Nov 25, 2010 at 12:32 PM, Stefan Wessels <swessels@email.com> wrote:
> I think there may be a bug in the way cc65 deals with hex encoded strings.  The following program has output as shown when run on the C64 and OS X.  I can't see any reason for the first character coming out as 0x48 and the 5th as 0xc0.

Not a bug. It applies a character map to string literals based on
system, in this case it maps from ASCII 'h' (0x68) to PETSCII 'h'
(0x48).

Not really sure why you're using string literals anyway, you could use
something like this instead:

const unsigned char level_data[] = {
  0x68, 0x03, ... etc
};

unsigned char *levelBuffer[1] =
{
  level_data
};

-thefox
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Nov 25 11:53:23 2010

This archive was generated by hypermail 2.1.8 : 2010-11-25 11:53:26 CET