03-13-2011, 01:47 PM
If I had code that wanted to make a jump table, and still be able to compile it such that it can move around, how can I do this?
That is, I want something like
jump_table:
defb routine1
defb routine2
defb routine3
routine1:
<code>
ret
routine2:
<code>
routine3:
<code>
The design calls for a jp (hl). I could probably code around it, but I'm wondering how I could get label locations into the actual bytes compiled?
That is, I want something like
jump_table:
defb routine1
defb routine2
defb routine3
routine1:
<code>
ret
routine2:
<code>
routine3:
<code>
The design calls for a jp (hl). I could probably code around it, but I'm wondering how I could get label locations into the actual bytes compiled?