[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any way to pause an EXEC?



Michael J. Mahon wrote:
Jayson Smith wrote:

Hi,
There are several PRINT CHR$(4), things in the program being cracked.
Here's what my EXEC does
NEW
write program to prompt user for disk
This part is working perfectly.  Then...
LOAD PROGRAM1
do the crack
SAVE PROGRAM1
LOAD PROGRAM2
do the crack
SAVE PROGRAM2
PRINT "DONE."
As soon as program1 loads the EXEC stops and leaves me at an Applesoft
prompt. This does not happen when the two programs are nonexistant on the disk, the already written program is simply saved twice under two different
names since the LOAD attempts fail.


Since LOAD and SAVE implicitly work on the current Applesoft program,
you cannot use them *within* an Applesoft program--for example, LOAD
changes the Applesoft program pointers.

You will need to BLOAD and BSAVE the Applesoft programs to avoid
changes to the program pointers, and you will have to move your
"control" Applesoft program to a region of RAM not overwritten
when these programs are BLOADED to $801 (the standard Applesoft
load address).

In short, this is much more complicated to do than it seems.

I shouldn't have responded to this while jet-lagged.  ;-)

The solution I proposed, is, of course, a ProDOS solution.  ProDOS
allows you to BLOAD any file type as long as you specify it explicitly
along with the load address.  You can BLOAD/BSAVE an Applesoft program
to/from any address, but you have to PEEK the file length so you can
specify it in the BSAVE (if you change it).

This means that the controlling BASIC program can run in the normal
($801) location, but needs to do the BLOADs and BSAVEs from a location
that 1) doesn't interfere with it or its variables, and 2) allows
enough space to fit the program being manipulated.

I don't know any straightforward way to do this under DOS.

-michael

Music synthesis for 8-bit Apple II's!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it is seriously underused."