so will can use Variables for label
Code: Select all
n=?label_1
For a=0 To 9
Goto n
label_1: :Debug 1:n=?label_2
label_2: :Debug 2
Next
Code: Select all
n=?label_1
For a=0 To 9
Goto n
label_1: :Debug 1:n=?label_2
label_2: :Debug 2
Next
Code: Select all
EnableASM
n=?label_1
For a=0 To 9
jmp n
label_1: :Debug 1:n=?label_2
label_2: :Debug 2
Next
Code: Select all
EnableASM
n=?label_1
m=?re_1
JMP n
re_1:
n=?label_2
m=?re_2
JMP n
re_2:
Debug 3
End
label_1: :Debug 1
JMP m
label_2: :Debug 2
JMP m
Code: Select all
EnableASM
Define n
n=?label_1
push rsp
call qword [v_n]
pop rsp
n=?label_2
push rsp
call [v_n]
pop rsp
Debug 3
End
label_1:
a = 1
Debug 1
ret
label_2:
a = 2
Debug 2
ret
Code: Select all
Prototype ProtoInvoke()
Structure udtInvoke
Invoke.ProtoInvoke[0]
EndStructure
Procedure fc0()
Debug 0
EndProcedure
Procedure fc1()
Debug 1
EndProcedure
Procedure fc2()
Debug 2
EndProcedure
Procedure fc3()
Debug 3
EndProcedure
*fc.udtInvoke = ?MyFunctions
For i = 0 To 3
*fc\Invoke[i]()
Next
DataSection
MyFunctions:
Data.i @fc0()
Data.i @fc1()
Data.i @fc2()
Data.i @fc3()
EndDataSection
Code: Select all
Prototype ProtoInvoke()
Structure udtInvoke
Invoke.ProtoInvoke
EndStructure
Procedure fc0()
Debug 0
EndProcedure
Procedure fc1()
Debug 1
EndProcedure
Procedure fc2()
Debug 2
EndProcedure
Procedure fc3()
Debug 3
EndProcedure
Global NewList ToDo.udtInvoke()
Macro AddToDo(Function)
AddElement(ToDo())
ToDo()\Invoke = Function
EndMacro
AddToDo(@fc0())
AddToDo(@fc1())
AddToDo(@fc2())
AddToDo(@fc3())
ForEach ToDo()
ToDo()\Invoke()
Next