AFAIK, you can open a .ba-file, if that .ba-file is TEXT/ASCII.
You get such a file, by saving a BASIC program as follows:
SAVE"BASPRG.BA",A
Attention, use a different name than the original .BA, and the ASCII version
takes a lot more place.
I've never done it, but I suppose that way you could also open it for
read/write by another BASIC program. You'd be reading an ASCII data file, no
matter what the extention. I think.
As I don't have a Model T handy - @ work - someone else should test this. Let
us know.
Converting back to tokenized BASIC code, should be as easy as opening the ASCII
.BA-file and saving it again. The tokenized BASIC should overwrite the
ASCII-format.
|\ _,,,--,,_
/ ,`.-'`' ._ \-;;,_
|,4- ) )_ .;.( `'-'
<---''(_/._)--'(_\_)
Jan Vanden Bossche @ work
From: M100 [mailto:[email protected]] On Behalf Of Brian White
Sent: vrijdag 7 april 2017 08:54
To: Model 100 Discussion
Subject: Re: [M100] Writing to a .ba file
That is correct, but that's what a user can do interactively from the keyboard,
with no pre-existing basic program in basic.
For his problem, he wants a running basic program to read and write a .ba file.
How could you have a basic program that loads a .ba file, without overwriting
it's own self and immediately crashing to the ground? I don't think there is
any such thing as "load file.ba, offsetting all line numbers +5000 along the
way", then later "save lines 5000-10,000 to foo.ba, offsetting all line numbers
-5000 along the way"
That said... teeny is an assemby program, which can manipulate .ba files. But
teeny itself is created from a .ba program...so, it *seems* it really only
depends just how Rube Goldberg you want to get, and just how much ram you are
willing to spend on embedding a data-encoded assembly program into the basic
program, just so it can be unpacked, used, and removed. ;)
On Thu, Apr 6, 2017 at 8:24 PM, Bryan Ard <[email protected]> wrote:
If you have a .do file and you load it from basic, if you save it, it will save
as a .ba file. Or am I completely not remembering how this works?
On Thu, Apr 6, 2017 at 6:48 PM, Ron Lauzon <[email protected]> wrote:
Ya, that's what I want to do. The .ba I want to write was originally
read from the same box. So I know it's a valid .ba file.
I just don't know how "special" they are (sort of like the
restrictions on the .co files).
On Thu, Apr 6, 2017 at 5:30 PM, MikeS <[email protected]> wrote:
> Assuming that a .BA file is really what you want and depending on the details
> of your project maybe you could write a .DO file and then convert it, perhaps
> using the keyboard buffer?
>
> m
>
> ----- Original Message -----
> From: "Ron Lauzon" <[email protected]>
> To: "Model 100 Discussion" <[email protected]>
> Sent: Thursday, April 06, 2017 5:25 PM
> Subject: Re: [M100] Writing to a .ba file
>
>
>> That's what I figured. Oh, well. One more limit as to what project can do.
>>
>> Thanks.
>>
>>
>> On Thu, Apr 6, 2017 at 4:33 PM, Ken Pettit <[email protected]> wrote:
>>> Hi Ron,
>>>
>>> TS-DOS and Teeny can do it because they are assembly programs, not BASIC
>>> programs. From BASIC, you can only open .DO (ASCII Text) files.
>>>
>>> Ken
>>>
>>> On 4/6/17 1:09 PM, Ron Lauzon wrote:
>>>>
>>>> Can anyone point me to information about how to open a .ba file for
>>>> writing?
>>>>
>>>> My latest project is rather successful, but when I try to
>>>>
>>>> open "file.ba" for output as #1
>>>>
>>>> I get an error. Based on the research I've done so far, writing to a
>>>> .ba file is not something that they want you to do, but I know it can
>>>> be done (because TS-DOS and Teeny can do it).
>>>>
>>>
>>
>>
>>
>> --
>> Ron Lauzon - rlauzon at acm dot org
>> Homepage: http://webpages.charter.net/rlauzon/
>> Weblog: http://ronsapartment.blogspot.com/
>>
>> DNRC: Lord of All Things That Are Fattening
>>
>> "To be sure, conservative radio talk show hosts have a built-in
>> audience unavailable to liberals: People driving cars to some
>> sort of job." - Ann Coulter
>>
>> Microsoft Free since July 06, 2001
>> Running Ubuntu 16.04
--
Ron Lauzon - rlauzon at acm dot org
Homepage: http://webpages.charter.net/rlauzon/
Weblog: http://ronsapartment.blogspot.com/
DNRC: Lord of All Things That Are Fattening
"To be sure, conservative radio talk show hosts have a built-in
audience unavailable to liberals: People driving cars to some
sort of job." - Ann Coulter
Microsoft Free since July 06, 2001
Running Ubuntu 16.04
[http://www.vivaqua.be/facebook.png] Rejoignez-nous sur Facebook - Volg ons op
Facebook
DISCLAIMER Pensez à l'environnement, n'imprimez cette page et ses annexes que
si c'est nécessaire. Ce message électronique, y compris ses annexes, est
confidentiel et réservé à l’attention de son destinataire. Si vous n'êtes pas
le destinataire de ce message, merci de le détruire et d’en informer
l’expéditeur. Toute divulgation, copie ou utilisation de ce mail est dans ce
cas interdite. La sécurité et l'exactitude des transmissions de messages
électroniques ne peuvent être garanties. Denk aan het milieu; druk deze pagina
en de bijlagen alleen af als het nodig is. Dit e-mailbericht (inclusief zijn
bijlagen) is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde. Als
dit bericht niet voor u bestemd is, wordt u verzocht het te wissen en de
afzender te informeren. Het is in dat geval niet toegestaan dit bericht te
verspreiden, te kopiëren of te gebruiken. We kunnen niet garanderen dat de
gegevensoverdracht via het internet veilig en nauwkeurig is.