home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
Geneve
/
9640news
/
CAT14
/
SVUTL.ARK
< prev
next >
Wrap
Text File
|
2006-10-19
|
6KB
|
160 lines
?
SAVE TUTORIAL By Scott Darling
After reading some messages concerning using the Save utility in the Editor
Assembler package I awaited one individuals tutorial on the subject. But none
appeared. So I decided to sit down and write one for it. Now some of you may
know how to do this, but evidently not everyone does; so here goes.
Obviously to use the Save utility, you need the E/A package. But a couple of
programs are helpfull. A sector editor such as DISK-AID, DISKO, and the like.
The Mini-Memory module is a nice shortcut for finding addresses.
USING THE SECTOR EDITOR
-----------------------
First off any D/F 80 file will work, compresed or uncompressed. You should
copy the program to a clean disk to make it easier to find using the sector
editor. Load the editor and search for the end of the program. Disk-Aid will
tell you where the last sector of a program lies. Toggle to Ascii and look at
the sector info. There should be some names and references to VSBW, VMBW, START
and so forth. Compressed code is easier to read by the way. Look carefully to
see if the words SFIRST, SLAST, or SLOAD are there. IF they are skip the rest
of this and go directly to "USING THE SAVE PROGRAM"!!
If those words are not there. Look to see if there are any lines of code that
look like the actual program. The below will serve as an example. It is non-
relocatable code. The "9" stands for that. An "A" stands for relocatable.
(much easier to work with by the way)
(this code was loaded into E/A editor, it will look different in sector editor)
--------------------------------------------------------------------------------
0023 9E1D8B03807FD91F
0024 1E0467FEB9F
0025 6E046START 7FD06F
0026 : 99/4 AS
--------------------------------------------------------------------------------
You will notice that at the line 24 there is a "1" to designate an auto start
program. Change the "1" to a "F". This will defeat auto-start. There may be a
"2" there, it also means auto-start.
Directly after that 1 or 2 is an address. This is the "START"ing address of the
program. SFIRST and SLOAD will equal this address. The starting address also
appears in front of the word "START". As is the case with most "DEFS" in this
location.
To determine the SLAST is a little trickier. Just before the 1 or 2 auto-start
was an address >E1D8. Now count over 1 byte for each 2 letter number combos.
Excluding the B and 7. In other words: 9E1D8_0380_FD91_.
E1D8 9 A B C = E1DC
This will make SLAST = E1DC
Another example is for RELOCATABLE code:
--------------------------------------------------------------------------------
0023 A01D8B03807FD91F
0024 100007FEB9F
0025 60000START 7FD06F
0026 : 99/4 AS
--------------------------------------------------------------------------------
In the above example I have changed a few numbers to show what relocatable code
might look like. You will notice the "1" for auto-start is still in place, but
there now are "0000" instead of and address. But 0000 is an address. It means
that no matter what the lead address is, that the start of the program is "x000"
So SFIRST equals "A000" and SLOAD is the same. Now slast will work the same as
above except this time it equals A0DC.
Confused?? I hope not. If so reread this before continuing!!
ADDING AN ASSEMBLY DEF PROGRAM
------------------------------
I hope that you realize that there was a reason for all of the above jumble! Be-
cause now you are going to use those address to build a short ASSEMBLY program!
Type in the following:
--------------------------------------------------------------------------------
DEF SFIRST,SLOAD,SLAST
SFIRST EQU >A000
SLOAD EQU >A000
SLAST EQU >AODC
END
--------------------------------------------------------------------------------
Save this program using whatever name strikes your fancy. Load the assembler and
assemble using another name. Bypass list, and bypass options. It will take a
whole 2-3 seconds to assemble and you are ready for the next step. This source
code can be used indefinitely. Just plug in the appropiatte addresses.
USING THE SAVE PROGRAM
----------------------
1) Bring up the "LOAD & RUN" option of the E/A module.
2) Load your non auto-start program.
3) Load the "DEF" program that you wrote. (unless the program already has the
DEFs in the program)
4) Load the E/A "SAVE" utility
5) Hit enter to "PROGRAM NAME" and hit enter
6) The next prompt will ask for a name. Remember that it will increment the name
the next ASCII character if the resulting is going to be larger than 8K (33
sectors), plan accordingly.
7) Now hit enter, and try running your NEW program in "RUN PROGRAM FILE" option.
If it runs you are home free. If not you may want to go back and check to see if
used the correct addresses. Most of what I wrote above was trial and error on my
part, so experiment and play around with the programs.
--------------------------------------------------------------------------------
The above was a rather short description. There is a shortcuts to find addresses
that uses the Mini-Memory.
Initiate the M-M, then load the program. If it starts running you know that you
have to defeat the auto-start feature. Escape the M-M and bring up Easybug. Do
"M7020" and look at page 74 of the M-M manual. 7020 is default entry address. Or
SFIRST and SLOAD. Step down to 7024 and this is the last free address in high
memory or the end of the program. IF 7024 is "0000" then you know that the
program is probably absolute code.
--------------------------------------------------------------------------------
My only dissapointment is determining how to save low and high memory code. If
a program loads at >2000 to >4000 then continues at >A000. The above steps are
useless, because it assumes a continuous count between two addresses. I have not
figured out or taken the time to attempt this format.
--------------------------------------------------------------------------------
If anyone can add to this file, Please feel free to do so. I am by no means an
expert when it comes to assembly. Have fun and I will answer any questions
within my capability!
Download complete. Turn off Capture File.