PETCAT and special characters in basic

You need an actual VIC.

Moderator: Moderators

Post Reply
User avatar
majikeyric
Vic 20 Afficionado
Posts: 350
Joined: Fri Oct 24, 2014 2:08 pm
Website: http://majikeyric.free.fr
Location: France

PETCAT and special characters in basic

Post by majikeyric »

Hi,

(I asked the question on Lemon but nobody replied until now...)

I try to tokenize a BASIC text file containing a special character, for example :
10 a$="hello{095}"

{095} is the back arrow (this is the TOK64 syntax).

But the output basic v2 file contains garbage after the back arrow character (the last double quote is missing).

What is the proper syntax to generate special characters with PETCAT ?

Thanks
User avatar
buzbard
Vic 20 Devotee
Posts: 213
Joined: Sun Jul 03, 2005 9:10 am

Re: PETCAT and special characters in basic

Post by buzbard »

One thing you could do is create a program in VICE, using the characters that you're unsure of, then use petcat to convert the prg into text.
By doing that I discovered that the PETSCII back-arrow character is converted to a "_" underscore character.

Other than that, you might try and study the source code.
Ray..
User avatar
majikeyric
Vic 20 Afficionado
Posts: 350
Joined: Fri Oct 24, 2014 2:08 pm
Website: http://majikeyric.free.fr
Location: France

Re: PETCAT and special characters in basic

Post by majikeyric »

Thanks buzbard ! :D

I really wonder why I haven't thought about this solution :oops:

I have found that Petcat uses this kind of syntax for special characters : {CBM-Q} , {SHIFT-A} ... etc
Post Reply