Data Dumper
Clifford Engels
Turn machine language routines in BASIC DATA statements into an object file that can be loaded from the Assembler/Editor for disassembly and modification.
Ever wonder how those great little subroutines in BASIC programs work? Have you ever wanted to easily load those ML routines with your Assembler/Editor?
Here is a small utility that will convert the DATA statements in a BASIC program to machine language and store the data on tape or disk. Later, this data can be loaded by the Assembler/Editor cartridge using the LOAD#C: or LOAD#D: filename command. The code can then be disassembled.
First, type and LIST the program to tape or disk. Then load in the program with the DATA statements. Since the utility program uses lines 0-11, be sure that no DATA statements are at those line numbers. If there are, temporarily adjust your BASIC program (remember, for the moment you're only interested in the DATA statements). Next, enter the utility. It should be the first 12 lines of the program in memory.
When you run the program, the first prompt will ask for the starting DATA line number. Enter the line number of the DATA statement at which you wish to start disassembling. The utility will stop automatically after the last data element has been read. The next prompt asks for the starting address. This address is where the machine language data will load using the Assembler/Editor cartridge. This address does not have to be the same as the load address in the BASIC program. You are going to disassemble the program, not run it. In fact, I recommend using 4096 as the load address so that you can easily remember the address when you disassemble the data. Decimal 4096 is hexadecimal 1000. You must use hexadecimal address when using the Assembler cartridge. Finally, you'll be asked for a filename. Enter C: to save to tape or D-.filename (substitute a legal filename for filename) to save to disk. No quote marks are necessary.
Post a comment