Hi, i'm new to the board. It's been 10 years since i don't use assembly. Those days x64 architecture was recently launched and now im looking for answers to x64 arch.
Anyway my question could fit in masm32 too.
Im using masm x64 and i want to make a static jump table of 256 entries, but it seems masm doesn't recognize the "labels"
I have looked for an answer googling it and found one, but it's for PROC and i want it for labels:
What i'm doing is the following:
.data
jump_table:
dq offset label0
dq offset label1
dq offset label2
dq offset label3
;and so on...
.code
LookJumbTable PROC LEAF
mov rax, [case]
mov rdx, offset jump_table
mov rcx, [rdx + 8 * rax]
jmp qword ptr [rcx]
label0:
label1:
label2:
label3:
;... and so on
LookJumbTable ENDP
In the above example [case] is what should be loaded for indexing the jump table.
The thing is that masm is not recognizing my labels:
1) Thorws me the error "ivalid operad for offset" for the static jump table
2) It doesn't recognize my lables "undefined symbol label0"
Hope you can help me.