Hello you MASMers out there.
I would like to know how to put labels in .data sections or how to be able to reference a variable with more than one name.
Something like this:
What I would like to do is to be able to reference offset of variable "case00" both as "case00" and "_switch"
I would like to know how to put labels in .data sections or how to be able to reference a variable with more than one name.
Something like this:
.data
_switch:
case00 dd _do_case_00
case01 dd _do_case_01
case02 dd _do_case_02
.code
.
.
.
_do_case_00:
.
.
.
_do_case_01:
.
.
.
_do_case_02:
.
.
.
end
What I would like to do is to be able to reference offset of variable "case00" both as "case00" and "_switch"
.code
.
.
.
mov eax, offset _switch; instead of mov eax, offset case00
.
.
.
end
ptr1 dd offset foo
Sorry, evlncrn8
I edited the post as I found the solution myself. You responded to the unedited post before I was able to edit it !
I edited the post as I found the solution myself. You responded to the unedited post before I was able to edit it !
What about
_switch equ <case00>
Waka,
You do not say what the problem is. That would be a great help. However, I can see that you should use _switch LABEL DWORD for the label in the data section. Ratch
You do not say what the problem is. That would be a great help. However, I can see that you should use _switch LABEL DWORD for the label in the data section. Ratch
Thanks, Ratch
That was EXACTLY what I needed !
That was EXACTLY what I needed !