How to Jump to a memory address using ASM
Posted: Fri Aug 26, 2005 8:40 am
Anybody who have knowledge on ASM?
I'm looking for a method to continue program execution from a label. Basically, I'm trying to do 'Goto' in ASM. I know this is done via !JMP, but it's not that simple. I'd like to Jump to a memory address defined by a variable. Like this:
I know there's an alternative method by using the 'GotoEIP()' command from the OnError-library. However, I wonder which is faster since 'GotoEIP' has some CALLs in the ASM output.
I'm looking for a method to continue program execution from a label. Basically, I'm trying to do 'Goto' in ASM. I know this is done via !JMP, but it's not that simple. I'd like to Jump to a memory address defined by a variable. Like this:
Code: Select all
address = ?label ; PureBasic variable
!JMP [_address]
;This line will never be executed
label:
;The execution continues here