Page 1 of 1

PETCAT and special characters in basic

Posted: Tue Feb 10, 2015 5:42 pm
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

Re: PETCAT and special characters in basic

Posted: Wed Feb 11, 2015 8:44 am
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.

Re: PETCAT and special characters in basic

Posted: Wed Feb 11, 2015 10:25 am
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