Re: [cc65] Print heart character on C64?

From: Marc 'BlackJack' Rintsch <>
Date: 2004-09-20 21:16:08
On Sunday 19 September 2004 21:05, Raj Wurttemberg wrote:

> > The cc65 tools have to translate the ASCII stuff to the
> > target platforms that don't support ASCII.
> True... But if I tell CC65 that I want a \x73 shouldn't I get a $73??
> I understand your point but IMHO I think that if I tell the compiler
> I want X character I should get X character. :)

Okay, if I tell the compiler "\x41" should I get a $41 or a $61?  
However it's implemented you'll find a programmer running into this 
issue who thinks it's done "wrong".  ;-)

> > BTW it's not the compiler but the linker that translates  strings.
> > This  way you can compile C source to an object file and link it
> > into executables for different target platforms and always get the
> > correct text output.
> [...]
> "\nhello world! \x73"
> Is translated into this:
> L0001:
>  .byte
> $0D,$48,$45,$4C,$4C,$4F,$20,$57,$4F,$52,$4C,$44,$21,$20,$53,$00
> See? I never even got to the linker stage before the $73 was
> converted to $53. :(

Yes I stand corrected.  I think I was fooled by the fact that it's okay 
to leave out the `-t` switch with ``cc65`` and ``ca65`` but one has to 
provide it to the linker command.

 Marc 'BlackJack' Rintsch
Hi! I'm a .signature virus!
Copy me into your ~/.signature to help me spread!

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Sep 20 22:07:45 2004

This archive was generated by hypermail 2.1.8 : 2004-09-20 22:07:54 CEST