home *** CD-ROM | disk | FTP | other *** search
-
- ** BLOAD **
- (Better known as Binary Load)
-
-
- Written by: Alan Gardner
-
-
- If you've ever tried to LOAD a file
-
- from within a BASIC program, then you
-
- know how much of a problem this can
-
- be. Loading one file is bad enough,
-
- but when you have to load three, four,
-
- or more, you could get yourself into
-
- so much red tape that the IRS would
-
- be embarrassed! Why in the world
-
- Commodore designed the LOAD command to
-
- GOTO the first line in your program
-
- after loading is beyond me! All I
-
- know is that it is a pain in the royal
-
- behind!
-
- Wouldn't it be nice to just say
-
- LOAD a file and it would load and NOT
-
- GOTO the first line in your program?
-
- Do you know what I'm leading up to
-
- now? Well, it just so happens that I
-
- got so fed up with designing the logic
-
- structures so that all my files would
-
- load at the right time in the program
-
- (plus I wanted to LOAD a file anywhere
-
- I needed it, but more on this later),
-
- that I wrote BLOAD.
-
- With the BLOAD utility installed,
-
- all you need is one simple SYS to LOAD
-
- a file. And guess what!? That's
-
- right, the program does NOT GOTO the
-
- first line of your program. You know
-
- what else you can do with this happy
-
- little utility? Remember I said I
-
- wanted to LOAD a file anywhere I
-
- needed it? Well, with BLOAD I can
-
- specify the address the file will
-
- begin to LOAD into. For example,
-
- if I had a great piece of ML music
-
- whose load address was right where I
-
- wanted to put some sprites, then I
-
- could simply LOAD the music somewhere
-
- else in memory by specifying a new
-
- load address. By the way, here is the
-
- syntax of the BLOAD utility:
-
-
- SYS 828,load address,filename
-
- Since BLOAD resides at 828, it
-
- would not be a good idea to BLOAD a
-
- file into there! The load address can
-
- be any addressable space in memory (0-
-
- 65535). The filename can be a
-
- constant (enclosed in quotes), or
-
- an evaluated expression. Here are
-
- some examples:
-
-
- SYS 828,49152,"TOCATTA"
- -- This will load the file TOCATTA
- starting at 49152
-
- SYS 828,16384+J,F$(K)
- -- This will load the file specified
- by F$(K) (whatever that might be)
- and begin loading it at memory
- location 16384 plus the current
- value of J.
-
- SYS 828,32768,LEFT$(L$,3)
- -- This will load the file specified
- by LEFT$(L$,3) begining at memory
- location 32768.
-
-
- Oh, to get the BLOAD working you
-
- have to use the old fashioned way of
-
- LOADing a file. If you're not sure
-
- how, this line will get the job done:
-
-
- 5 IF X=0 THEN X=1:LOAD"BLOAD",8,1
-
- After this, any SYSes to 828 will be
-
- directed at BLOAD.
-
- Just to show you that we here at
-
- LOADSTAR really use what we write,
-
- take a look at this month's program
-
- on Halley's Comet. It actually uses
-
- BLOAD! So see, we really do use what
-
- we write.
-
- BLOAD was written with the MERLIN
-
- Assembler.
-
-
- *** NOTE ***
- Because of the nature of BLOAD, you
- cannot RUN it from the LOADSTAR
- environment.
-
-
- >Files used: BLOAD.S __ source file
- BLOAD.O __ object file
-
- --------< end of article >------------
-