Code: Select all
Procedure Jump (x)
DataSection
DataSta:
Data.i ?Label_000
Data.i ?Label_001
Data.i ?Label_002
Data.i ?Label_003
Data.i ?Label_004
Data.i ?Label_005
EndDataSection
*AdrLabel = PeekI (?DataSta + x * SizeOf (Integer))
!jmp dword [p.p_AdrLabel]
LabelBack:
;Some other code
ProcedureReturn
Label_000: : Debug "X = 000" : Goto LabelBack
Label_001: : Debug "X = 001" : Goto LabelBack
Label_002: : Debug "X = 002" : Goto LabelBack
Label_003: : Debug "X = 003" : Goto LabelBack
Label_004: : Debug "X = 004" : Goto LabelBack
Label_005: : Debug "X = 005" : Goto LabelBack
EndProcedure
Jump (3)
- Is the ASM-code correct?
- Is the same ASM-code running on linux and osx too?
- Must 'dword ' be changed for x64?
Thxs
Josh