here I'm again with a MASM question

following problem:


mov ebp, 012345678h ;//some value

lea ESI,
mov dword ptr , ebp

;// above 2 lines should patch the instruction
;// mov eax, 66666666h to mov eax, 12345678h

call BlaBla ;// after this call there should be EAX=12345678h

invoke ExitProcess,0

BlaBla Proc

nop
xyz: mov eax, 066666666h
nop
ret

BlaBla Endp



--> gives a error message: Undefined symbol xyz


(this is self modifing code. make shure that .CODE section is writeable)

Anyone with a solution for this? :confused:

CRYO
Posted on 2002-04-22 11:22:18 by CRYO


local_label_has_one_colon_like_this:

global_label_has_two_like_this::


See this thread.

Mirno
Posted on 2002-04-22 11:38:00 by Mirno
Simple solution:
BlaBla Proc 


nop
xyz[color=red][b]::[/b][/color] mov eax, 066666666h
nop
ret

BlaBla Endp
Labels inside PROCs default to private - the double colon makes it global - be careful to not use this frivalously. :)

Posted on 2002-04-22 11:47:21 by bitRAKE
yes, you were right! It's a real easy solution.
thanks mirno
thanks bitrake

:grin:
Posted on 2002-04-22 13:31:58 by CRYO