Re: Two new PRGs

rbaltiss_at_worldaccess.nl
Date: 1998-02-16 21:50:42

Hallo Mark,

> 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

                  lda  #<(String)
                  ldx  #>(String)
                  ldy  #StringLen
                  jsr  PrintString

String            .db  "This is an example"
.eq StringLen = * - String

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

                  ldy  #$13
> 
> 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.

In my point of view this is an operation which is only valid for one specific 
address. If you have to tell the disassembler first that he has to create a 
label at a certain point and to tell it to replace a specific #hex by #label 
then this will take as much time (or more) then changing those itmes by hand in 
the result file. 
OR.... I'm completely missed the point.

One thing my disassembler does not is replacing the numbers after a # by a 
label. Most of the time it ARE numbers and changing them back costc more time 
then only replacing the numbers by labels. 

> 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.

Except the jumping thing, my text editor does the rest :-)


Groetjes, Ruud

Archive generated by hypermail 2.1.1.