[Coco] Loading ASCII BASIC over serial?
Aaron Wolfe
aawolfe at gmail.com
Wed Oct 2 12:13:44 EDT 2013
I think the garbage is because the setting in config.xml that matches .BAS is:
<DECBExtensionMapping ascii="false" category="advanced,disk"
extension="BAS" filetype="0" type="decbextmap"/>
That sets the ascii flag to false, but if your source is an ascii
listing, I believe you would need true. I am no expert on BASIC, but
I think the combination of filetype 0 and ascii set true is what your
source file needs. You may wish to refer to DECB documentation to
verify that.
I believe the mime type of a BASIC program in ASCII or a generic text
file in ASCII would be the same. However, they require different DECB
file attributes.
We could guess based on the destination name instead of source (if you
could specify one). I could look for a header inside the file, I
think there is a telltale present in tokenized basic. I will try to
make it easier in the future. For now, you'll have to adjust the
config to set the attributes correctly or change them from DECB after
importing.
On Wed, Oct 2, 2013 at 11:57 AM, Chris Osborn <fozztexx at fozztexx.com> wrote:
> I tried naming it as .BAS but it loaded as garbage. It sort of looks like it's expecting it to be the tokenized form of a BASIC program. Also, I'm using HDB-DOS so that I could use Extended BASIC. Is there a way to tell BASIC to read in the text file as commands, sort of like the EXEC command on the Apple II?
>
> It still seems to me you could examine the contents of the file and look at existing extension and the requested CoCo extension to make a pretty good guess on the file type. And even throw in a call to file and get it to return the mime-type.
>
More information about the Coco
mailing list