Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Labels as byte values in inline assembly
#1
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?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)