96 lines
4.1 KiB
Erlang
96 lines
4.1 KiB
Erlang
Combining Applesoft with Assembly
|
|
Inspired by an article in Nibble
|
|
==================================
|
|
|
|
The latewt issue of Nibble Magazine ,October '85, has a very interesting
|
|
article in it regarding the combination of Applesoft and Assembly into one
|
|
Applesoft file. I am extremely upset that I didn't think of this before! It
|
|
really is an interesting trick! If you have read the article and had trouble
|
|
using the instructions provide there or if you did not see the article, then
|
|
please read on....
|
|
|
|
When an Applesoft (referred to as A/S from here on) pvogram is loaded into
|
|
memory either as you program or loaded from disk, the length of the A/S program
|
|
is held in a specific memory location: AF.B0. To add some additional assembly
|
|
to the program, you merely move the assembly code in memory down to the location
|
|
right after whatever is stored in AF.B0. For example:
|
|
|
|
|
|
1. The A/S program is loaded first.
|
|
2. Enter monitor by using CALL -151.
|
|
3. Type AF.B0 anl read the last address used by the A/S program.
|
|
4. Remember that the lo-byte is used first (AF) and that the hi-byte (B0) is
|
|
last. If you see this:
|
|
|
|
AF.B0-18 08
|
|
|
|
this means that the last address used by the A/S program is 0818.
|
|
5. The SAVE command in A/S uses this location as a pointer to the last
|
|
aldress in the program and saves everything from 0800 upward to the
|
|
address held at AF.B0.
|
|
6. To add the assembly program to an A/S file, you would BLOAD the assembly
|
|
portion just past the end of the A/S program.
|
|
|
|
BLOAD ULTIMA CHEAT OBJ.,A$0819
|
|
|
|
7. Thys will put the assembly right on Top of the A/S program!
|
|
8. OK but how do I save it??? Easy! Simply add the length of the assembly
|
|
program to the address at AF.B0 anl the change the |