mov eax, [fs:30h]
or something like that ?
regards.
Maybe if you told us what you are trying to do, someone could help you. Segment "fs" is normally not used in win32 for application coding so it would appear you have some other use for it.
i know what i'm doing :green
however this code will give you the module base address of KERNEL32.DLL on every 32bits Windows version (stored in eax)
mov edx, fs:[30h]
mov eax, [edx+0ch]
mov esi, [eax+01ch]
mov edx, [esi]
mov eax, [edx+8]
this code compil without pb using msvc and inline asm syntax (__asm {...})
I would like to write a whole prog in asm using this (not just some inline asm in a C code), so i have to find the correct masm syntax to write this ^^
and yes i know
mov eax, fs
add eax, 30h
mov eax, [eax]
would work, but why use 3 instructions when a single one do the same job :8)
and btw, i'm new to masm, so i still need to figure out the masm syntax specificity
Quote from: Sigmatador on January 30, 2005, 12:34:18 PM
i know what i'm doing :green
however this code will give you the module base address of KERNEL32.DLL on every 32bits Windows version (stored in eax)
Tried it on Win9x/ME? or do you not considder them to be 32-bit since you know what you're doing?
oki found!
by default masm prevent from using fs segment
a simple
assume fs:nothing
mov eax, [fs:30h]
do the trick ^^
cu all
regards