[Coco] Loading ASCII BASIC over serial?

Bill Pierce ooogalapasooo at aol.com
Wed Oct 2 16:06:53 EDT 2013


There is no distiction in a basic file as to if it's ascii or binary. That is decided by the user when they save it.
The only way basic knows the difference AFTER it's on the disk, is by the bytes following the filename in the directory. These are stored in the directory and NOT in the file. The only way you can tell an ascii basic file from a binary one by JUST looking at the file is that the binary file will have some non-printable characters. An ascii file will not. And this is not reliable. They are both named. "xxxx/BAS" and the"." & "/" make no difference (in RSDOS).

The 32 byte directory entry format is
0-7 - filename
8-10 - file extension
11 - file type 0=Basic program 1=Basic data 2=ML 3=text
12 - ASCII flag 0=binary  255=ascii
13 - the number of the first granule of the file (0-67)
14-15 - the number bytes used in the last sector of the file
16-31 - unused

And this is the only place that I know of to find out what a file type is.



Bill Pierce
My Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Co-Webmaster of The TRS-80 Color Computer Archive
http://www.colorcomputerarchive.com/
Co-Contributor, Co-Editor for CocoPedia
http://www.cocopedia.com/wiki/index.php/Main_Page
E-Mail: ooogalapasooo at aol.com




-----Original Message-----
From: chawks <chawks at dls.net>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Sent: Wed, Oct 2, 2013 2:24 pm
Subject: Re: [Coco] Loading ASCII BASIC over serial?




On Wed 10/02/13  1:11 PM , "Luis Antoniosi (CoCoDemus)" retrocanada76 at gmail.com 
sent:
> an ASCII basic file will appear as: PROGRAM/BAS while a tokenized:
> PROGRAM.BAS
> 
> Also the coco cannot handle newlines, it only contains CRs (like a Mac
> file)
> 

    Only in HDBDOS, in _real_ basic it will be PROGRAM.BAS.

Christopher R. Hawks
---------------------------
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?




--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco

 



More information about the Coco mailing list