Coding workflow on a Mac

A place to discuss everything Dragon related that doesn't fall into the other categories.
Post Reply
jonby
Posts: 4
Joined: Wed Jul 29, 2020 5:04 pm

Coding workflow on a Mac

Post by jonby »

Hi Everyone. I just got back into programming the Dragon after 37 years away from it. I'm using XRoar 0.33.2 on a Mac laptop running OS 10.12.6. It has been great fun!

First, I'd just like to thank Ciaran for doing an amazing job on XRoar - it has been a joy to get back into it all again.

My first question is about coding workflow. Does anyone know if there is a way of using an external editor to write basic programs which can then be loaded and run on the XRoar Dragon? As I'm sure you know, it's pretty difficult to edit a large program on a 32x16 screen. Moving code blocks around is particularly difficult. I have been writing code in TextEdit and manually entering it into the Dragon, which is quite a slow process. Is there any software which can add the appropriate headers so that it can be CLOADed as an ASCII file, for example? Being able to go the other way would also be useful (something which strips the headers out of an ASCII file, or using the printer output, for example). If not, are there any other approaches which people find helpful?

Thanks
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: Coding workflow on a Mac

Post by sixxie »

Just give your ASCII BASIC files an extension of ".asc" or ".bas", and attach them as with other tape images. XRoar will automatically packet it up to load with CLOAD.

Oh, and yes, going the other way, the easiest is to use "-lp-file outfile" and LLIST.
jonby
Posts: 4
Joined: Wed Jul 29, 2020 5:04 pm

Re: Coding workflow on a Mac

Post by jonby »

Thanks for the reply.

So far I haven't been able to get the input to work. I am just getting a continuous search symbol (inverted S) when I try to CLOAD.

This is what I am doing:
In TextEdit, convert to a plain text file (Make plain text), write a small basic program with line numbers, no extra spacing between lines.
Save with a .asc or .bas extension (tried both), using the Unicode UTF-8 encoding option.
In XRoar, go to File > Cassette > Input Tape... and choose the file.
In the Dragon, type CLOAD.

Is this procedure correct, or am I missing something?
If not, maybe it's the encoding that TextEdit uses is non-standard. I did try another program called TextWrangler, but got the same result.

I will try the output thing when I get chance. So far I haven't tried using any command-line options with XRoar.
jonby
Posts: 4
Joined: Wed Jul 29, 2020 5:04 pm

Re: Coding workflow on a Mac

Post by jonby »

Update - ah I have now worked out the problem. The problem seemed to be with line breaks. There is no obvious option in TextEdit to choose what kind of line breaks to use. In TextWrangler I chose the Legacy Mac OS (CR) option and now it is working.

I have also got the print to file working now, thank you, having figured out starting XRoar from the command line.

Thanks for your help.
Post Reply