The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: test on April 14, 2009, 01:15:40 AM

Title: Simple Question
Post by: test on April 14, 2009, 01:15:40 AM
I just started trying to program masm asm as of today and ran into a problem. Everytime I try to use something like...

mov eax, dword ptr fs:[30h]
or
mov eax, fs:[30h]

I get an error and the error is usually on the next line which is blank. I have tried all kinds of combinations to get this to work and nothing. I think masm just doesn't like the fs section?
Title: Re: Simple Question
Post by: drizz on April 14, 2009, 02:36:05 AM
Masm default assumption for FS is error (assume fs:error) - don't ask me why.
Use "assume fs:nothing" to clear it.

assume fs:nothing
mov eax,fs:[NT_TIB.Self]
mov eax,[eax].TEB.Peb


I usually put "assume fs:nothing" in all my project templates.
Title: Re: Simple Question
Post by: test on April 14, 2009, 12:50:44 PM
 :U Thank you Much Appreciated :bg