Re: A83: 83 Disassembler


[Prev][Next][Index][Thread]

Re: A83: 83 Disassembler




Who says it has to be directly jump referred?  What about a jump table?  And
it would be especially bad if there is data between each of the routines
referred to in a jump table.  And this is not contrived, I had probably at
least ten jump tables in my last project, and many had data in between.
Jump tables are quite quite useful.

 ld a,2
 ld hl,JumpTable

; jump to label in 'a'
UseJumpTable:
 add a,a
 ld d,0
 ld e,a
 add hl,de
 ld a,(hl)
 inc hl
 ld h,(hl)
 ld l,a
 jp (hl)

JumpTable:
 .dw Label0, Label1,Label2,Label3

Label0:
 ...

Label1:
 ...

> Well the LD A,4 is pretty unreal I think. :)
> Anyways, no. The disassembler has no jump-refer to the adress with the #FE
> on it (it HAS for the next adress). So the data inbetween should,
especially
> in this case, be recognized as data.
>
> Oh, and by the way, to make things more complicated, some programs (very
few
> or maybe even none... the point is that it's possible) jump _inside_ an
> instruction. So they use the effect described by you above ON PURPOSE.
> However, in that case there has to be a label "routine2a" before the DB.




References: