What's new

is it possible to make jump tables inside __asm blocks?

refraction

PCSX2 Coder
very much doubt it, if it is possible, it'd be very hard.

altho its possbile to use asm blocks FROM a jump table
 
OP
C

cufunha

New member
can I even create a jump table and call it from inside an __asm block?
PS: how do I make a jump table? is it possible to get the labels addresses into a c++ array?
 
OP
C

cufunha

New member
it's not a jump table, it's a tutorial on function pointers, with is a little diferent.
 

Toasty

Sony battery
I'm working on some similar stuff in my interpreter right now, and there is a way to have an array of jump labels (kind of).

Code:
aLabel:

//do something
Now, to copy this label into a variable:

Code:
void* jmpPtr;
__asm mov EAX, aLabel
__asm mov jmpPtr, EAX
Of course, you can then put these jump pointers into an array. That's the way I do it anyway. (Note, you don't have to use the EAX register, any 32-bit general purpose register should do.)
 

Top