After doing some board searching (and looking at some examples) and
then reading in the Masm32 manuals, I am still having trouble setting
up a test jump table declaration. The problem seems to be coming from
the label.

This compiles:


.data
_JmpTbl dd _TestLbl, _TestLbl

.code
start:
_TestLbl:
...


This does not:


.data
_JmpTbl dd _TestLbl, _TestLbl

.code
start:
call WinMain
...

proc WinMain
local wc :WNDCLASS
local msg :MSG

_TestLbl:
...


My best guess is that since the label is within the proc, it is being
modified or pre-pended with something to make it unique so the
same labels can be reused again in other procs.

Regardless, is there a way to get the address at that label (or a
differenct way of calculating the address I need) so I can populate
my jump table? Did not really find any mention in the manual or
any posts regarding accessing labels outside of their scope.

Thanks :tongue:
Posted on 2002-09-05 15:00:36 by Graebel
Hi Graebel

Moving the table inside the proc does the trick.

proc WinMain
local wc :WNDCLASS
local msg :MSG

.data
_JmpTbl dd _TestLbl, _TestLbl

.code

_TestLbl:


KetilO
Posted on 2002-09-05 15:28:36 by KetilO
I think you can also use double colons to declare a proc label as global, ie _TestLbl::
Posted on 2002-09-05 16:48:23 by Eóin