Jump to content
IGNORED

How to append BASIC to a SAVEd program?


Larry

Recommended Posts

Long time ago, I knew how to do this, but have lost the info and certainly don't remember anymore. The idea is that (ram) Basic gets loaded and activated, then executes the SAVEd program. Can be loaded as an executable from Dos. There were several commercial programs like this, IIRC.

 

The question about the stand alone BASIC program made me think of this.

 

-Larry

Link to comment
Share on other sites

I am not completely sure of what you mean. There is a simple way to "ENTER" a listed program or data from a disk or cassette, etc. into an executed basic program (without losing the executed program) through the use of an immediate mode command.

e.g.

POKE 842,13:STOP
...
....
CONT
For more info, refer to Mapping The Atari, Revised Edition, Page 83.
Edited by Madi
Link to comment
Share on other sites

Long time ago, I knew how to do this, but have lost the info and certainly don't remember anymore. The idea is that (ram) Basic gets loaded and activated, then executes the SAVEd program. Can be loaded as an executable from Dos. There were several commercial programs like this, IIRC.

 

The question about the stand alone BASIC program made me think of this.

 

-Larry

 

I haven't heard of a way to add BASIC to a SAVEd BASIC program.

The solution that would make the BASIC SAVEd program run as a DOS binary load is to compile the BASIC SAVEd program with

a compiler such as ABC or MMG compiler. The only restriction I can remember is you can't have floating point in the SAVEd program with ABC, all has to be integer.

I have also a binary load BASIC A, B or C for use with a 800 or 400. I think they work on 800/400.

Edited by russg
Link to comment
Share on other sites

Thanks, but here is hopefully a better explanation. No Basic cart or rom is required. You load and execute a file version of the Basic interpreter, and after initializing, the Basic program (from the same file) is loaded executed. This goes all the way back to the pre-XL days, so no cartridge was needed. "Load and Go" on steroids. Just boot dos and then "L" the file and bingo, the Basic program was up and running. Pretty sure that this was exactly how it worked. Why? Because we could... ;)

 

-Larry

Link to comment
Share on other sites

I found a reprint of an article from the Assembly Language column in Antic June 1983 that explains how to do something similar, but if I read it correctly you need the basic cart and it makes a direct boot disk-not a binary. Here's an excerpt...

 

The system works by loading the BASIC token file to a suitable address with a program used with the Assembler Editor cartridge, and inserting a short header program in front of the token file. This, upon loading, sets up the pointers required by BASIC and then jumps into the BASIC cartridge at the address of the RUN routine. A suitable return address is provided by pushing values onto the stack. A third program is then used to dump the header and token files onto cassette or non-DOS disk.

 

It sounds cool, I may have to try this out.

Link to comment
Share on other sites

Well,

 

there are several options:

 

1) compile: use a Basic compiler (ABC, MMG, TB XL comp., etc.); the compiled file can often be binary loaded from DOS...

 

2) convert Bas to COM: use e.g. BAS2COM by Raster (A8 program) or BAS2XEX by Fandal (PC program) or a similar application to convert BAs into a pseudo ML-file. This ML file still requires Atari Basic and therefore will only run on XL/XE computers (and the ML file is still as slow as the original Atari Basic program)...

 

http://atariage.com/forums/topic/215992-basic-to-xex-compiler-that-keeps-original-basic-speed/?do=findComment&comment=2817638

 

3) use a Basic dialect with an Autorun option, then you can load the Basic dialect from DOS automatically (as Autorun.SYS) and it will load a Basic file (e.g. as Autorun.BAS) afterwards...

http://atariage.com/forums/topic/240811-u-basic/?do=findComment&comment=3284045

(see also post #14)

 

Personally I would not merge (append) a Basic dialect + a Basic program into one file, except TB XL maybe. Luckily Homesoft often does this with TB XL and programs written in TB. No clue how he does it, but you always get a single / stand-alone file in the end. You can also do it with compiled TB XL programs by using the CTB-linker (which will link the CTB Runtime and Autorun.CTB into one single file)...

Edited by CharlieChaplin
Link to comment
Share on other sites

Thanks, but here is hopefully a better explanation. No Basic cart or rom is required. You load and execute a file version of the Basic interpreter, and after initializing, the Basic program (from the same file) is loaded executed. This goes all the way back to the pre-XL days, so no cartridge was needed. "Load and Go" on steroids. Just boot dos and then "L" the file and bingo, the Basic program was up and running. Pretty sure that this was exactly how it worked. Why? Because we could... icon_wink.gif

 

-Larry

I guess the topic is runtime versions of BASIC interpreters. It is somewhere in my dungeons from the pre-XL time. But I cannot really remember anything useful right now.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...