Re: Two new PRGs

From: Mark (mark_k_at_iname.com)
Date: 1998-02-11 12:58:25

On 10-Feb-98, rbaltiss@worldaccess.nl wrote:
>Hallo Mark,

>> You can save a work-in-progress as a ".rs" file, meaning that you can come 
>> back
>> another day to add more symbols, labels, etc.
>> 
>> Is there anything similar for 6502 code?
>> 

>Idon't fully understand that. Explain and I'll program it. My PRG can read a 
>what I call 'directive' file. It contains extra commands for the disassembler.
>Here is my DIR file for the SYSTEM-ROM of a C64 with a IEEE inteface:

Okay. ReSource allows you to create labels on the fly, as you are examining the
code. It also allows you to set the data type for each byte (e.g. unknown,
code, ASCII, byte, word, longword), as well as number base shown (binary, hex,
decimal).

It allows you to do stuff like this. Apologies for the 680x0 code, but my 6502
is not too hot. I hope you get the idea. The original source code might have
something like this:

                lea     (String,PC),A0
                move.l  #StringLen,D0      ;See below
                jsr     PrintString        ;PrintString routine takes pointer
                                            to string in A0, length in D0.

String:         dc.b    "This is an example."
StringLen       EQU     *-String


Now, the disassembler's output for the move.l #StringLen,D0 would be:
                move.l  #19,D0

This is okay, but what if you change the length of the string in the
disassembled output? You can tell ReSource that the 19 is relative to the label
"String". So ReSource automatically creates a label at String+19 (let's say you
rename the automatically-assigned name lbB001234 to StringLen), and then the
move.l #19,D0 in the disassembly reads:
                move.l  #StringLen-String,D0
which is better.


This may not be directly applicable to 6502 code, but I hope that gives you
some idea. ReSource can also handle jump tables nicely (not really applicable
to 6502 code, I guess).

With ReSource the disassembly is interactive; you can quickly move anywhere in
the disassembly. E.g. if the current instruction transfers flow elsewhere (like
 a JMP), pressing cursor-right moves the view to the jump destination. You can
add full-line and end-of-line comments on the fly, as well as labels and
defining symbols.


If you have access to an (emulated) Amiga, you may want to check out a demo of
ReSource that is on Aminet.



-- Mark

Archive generated by hypermail 2.1.1.