cc65 return sequence difference porting from other systems

3 posts / 0 new
Last post
Offline
Last seen: 4 days 13 hours ago
Joined: Nov 12 2022 - 16:50
Posts: 128
cc65 return sequence difference porting from other systems

Hi!  I am working on a text adventure.  I need to continue it.  I also have some code around which others can build text adventures for cc65.  I have the latter available for CBM and Atari 8-bit models and want to port it to the Apple2enh.  The problem is that the other systems execute a Return in a string as "\n" while the Apple2 uses "\r."  Somebody elsewhere told me about the charmap #pragma of cc65.  What numbers do I need to supply to get "\n" to translate to "\r"?

Online
Last seen: 4 min 3 sec ago
Joined: Jul 5 2018 - 09:44
Posts: 1518
\r is carriage return which

\r is carriage return which is CTRL-M, decimal 13 and hex 0x0d

\n is line feed which is CTRL-J, decimal 10 and hex 0x0a

 

Offline
Last seen: 4 days 13 hours ago
Joined: Nov 12 2022 - 16:50
Posts: 128
Never mind: I got it to work.

Never mind: I got it to work.  :)

Log in or register to post comments