home *** CD-ROM | disk | FTP | other *** search
- u
- M L M O V E
- by Dave Moorman & Jeff Jones
-
-
- Memory Management! This is one of
- the great logic puzzles that must be
- solved if you are going to do anything
- more complex than a purely BASIC or
- DotBASIC program. If you plan to use
- bitmap graphics, custom fonts, and ML
- routines or modules, you must figure
- out where everything goes.
-
- One difficulty is that ML routines
- are not relocatable -- for the most
- part. That means they must be bloaded
- to the memory location where they will
- work. But what if you have already
- assigned that memory to another item?
- What then?
-
- In the olden days, LOADSTAR
- published numerous versions of ML
- modules -- $C000, $C800, $9000, $9800,
- etc. The theory was that one of the
- many would work for your particular
- situation. The concept was fine -- but
- not perfect. Not only was it quite
- possible that none were what you
- really needed -- but valuable LOADSTAR
- disk space was being spent on what was
- essentially the same thing.
-
- Then, Jeff Jones came up with the
- answer: ML MOVER. Here was a small ML
- routine which could take [two]
- versions of the same ML code (each
- assembled to different memory
- locations) and create a third version
- at yet another location.
-
- Fender was tickled with the
- utility. He could have Toolbox at
- $8000 if needed -- but simply
- processing two Toolbox files at two
- other locations. And, now he had to
- publish only two assemblies -- and
- tell programmers to use ML MOVER to do
- their own conversions.
-
- Which we did. The only problem is
- that Jeff's code was -- and still is
- -- raw ML. You could bload it with a
- simple
-
- LOAD"ML MOVER",8,1
- and
- NEW
-
- But then you were faced with a rather
- long immediate mode command line:
-
- sys49152,"f1",dv,loc,"f2",dv,"loc",
- "f3",dv,loc <RETURN>
-
- As you can see, if the files had much
- in the way of filenames, it was darned
- hard to get it all on one line. And
- your typing had to be perfect.
-
- Hey! We have computers to do all
- that drudgery for us, right? Why
- didn't anyone think of this before?
- Probably because we were too busy
- working on some other project, and
- were just happy we could get that ML
- module where we wanted it.
-
- Enough for the clever patter. I
- have put together a DotBASIC program
- that lets you
-
- 1. Get the two ML files, and
- 2. Make a third version.
-
- The only thing you have to type is the
- new filename and the PAGE number where
- the file is going to go.
-
-
- STEP BY STEP
- ------------
-
- When you boot ML MOVE (note the
- slightly different name), you have
- four buttons you can click on.
-
-
- DISK
-
- Here is where you choose which
- drive you will use for both source and
- target. If you try to change the drive
- after selecting files, the Make New
- will not work. So before you use ML
- MOVE, you will need to copy the two
- files to one disk (or disk image).
-
-
- GET FILES
-
- This will present you with a
- multi-select scrolling directory menu.
- Use the mouse to click on the two ML
- files, then press <SPACE> to continue
- the process. You [must] choose [two]
- and only [two] files. If not, you will
- be asked to try again -- or not.
-
- The two file names are displayed
- for your confirmation. The program
- then examines the two files to
- determine if they are exactly the same
- length. I have no idea what happens if
- your try to use two different ML
- routines to make a third. It probably
- won't be pretty.
-
- If the examination is passed, you
- return to the main screen.
-
-
- MAKE NEW ML
-
- If you have not selected two
- files, clicking this won't do anything
- except tell you it won't do anything.
- But if you have selected two files,
- they are listed, and you can input the
- name for the new file.
-
- This is followed by an input of
- the Page number for the new file. I
- know that many ML programmers like to
- use hexadecimal values, or ever actual
- decimal locations. But Pages are a lot
- easier to manage. As mentioned
- elsewhere, the Page number is the high
- byte of the bload address. It just
- makes everything much easier.
-
- Some favorite locations have easy
- to remember Page numbers:
-
- $8000 - 128
- $9000 - 144
- $A000 - 160
- $C000 - 192
- $D000 - 208 (not a bload address!)
- $E000 - 224
- $F000 - 240
-
- So with my own ML, I put the Page
- number in the file name: SCREEN158.ML,
- SCREEN192.ML, etc. It just makes sense
- to me. And since I am writing this for
- my uses mostly, the program asks for a
- Page number.
-
- If you enter a blank for either
- the new filename or the Page number,
- the program aborts back to the main
- screen. But if both are given -- in an
- instant or two, your new ML version
- has been written to your disk.
-
- That's about all there is to it.
- This is another program I have put on
- my Utility disk image, always ready on
- drive 9.
-
- DMM
-
-
-