hi,..
am just fiddling with the code I wrote to understand what's going on better..& the following code fails
for this line - mov edx, offset data - i get the error
error A2098: invalid operand for OFFSET
testrun PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
.data
linne1 db 50
.data?
hInstance dd ?
.code
; ---------------------------------------------------------------------
LibMain proc instance:DWORD,reason:DWORD,unused:DWORD
.if reason == DLL_PROCESS_ATTACH
push instance
pop hInstance
mov eax, TRUE
.elseif reason == DLL_PROCESS_DETACH
.elseif reason == DLL_THREAD_ATTACH
.elseif reason == DLL_THREAD_DETACH
.endif
ret
LibMain endp
testrun proc mWnd:DWORD,aWnd:DWORD,data:DWORD,parms:DWORD,show:BOOL,nopause:BOOL
mov ecx, dword PTR linne1
mov edx, offset data
mov [edx], ecx
mov eax, 3
ret
testrun endp
end LibMain
You can't use OFFSET with local variables or parameters, use lea instead:
lea edx, data
thanks for the info!
it assembled right now :)
Rainstorm.