Subject: Re: Dumping monitor listing to a file

From: Rubywand <[email-masked]>
Date: Tue, 02 Dec 1997 06:27:22 -0600

Pete writes ...
> 
> I want to do the following in a Basic program:
> 
> ==========================================================
> ]CALL -151
> PRINT CHR$(4);"OPEN FILE"
> PRINT CHR$(4);"WRITE FILE"
> 
> (AT THIS TIME, THE COMPUTER WOULD BE IN MONITOR MODE, NOT BASIC)
> 
> *5008LLLLLLLLLL       (LIST,",",")
> 
> PRINT CHR$(4);"CLOSE FILE"
> ===========================================================
> 
> THE PROGRAM DUMPS THE MONITOR listing into a TEXT file, where I can look
> at it on my word processor.
> 
> I can do everything I want the program to do, except 1. Keep the BASIC
> program in control of the computer after the Monitor is entered, and 2.
> get the monitor to do the *5008LLLLLLL from Basic.

     That, of course, is the problem. When you're under DOS or ProDOS
with BASIC you are not in the monitor; when you're under the monitor ...
.

     Fortunately, Roger Wagner came up with a way to get machine code
into disassembled Text form some years ago. The various versions of the
Merlin macro assembler come with a utility named "Sourceror".

     Sourceror will take a block of code from a BIN file and change it
to disassembled form which you can edit, print out, and save as a Text
file. You can do printouts which include addresses and disassembled
machine code along with assembler statements. And, if you like, you can
load the text into a word processor.

     You can, also, bring your disassembled code into Merlin as a
"source file" and use Merlin's editor and assembler to change routines,
move them, add new routines, etc..

Rubywand