flat assembler
Message board for the users of flat assembler.

Index > Windows > Translation MASM to FASM problem

Author
Thread Post new topic Reply to topic
Carlito



Joined: 08 Apr 2004
Posts: 11
Location: Paris
Carlito 18 Apr 2004, 19:31
Hi everybody, I'm having problems turning this instruction to fasm :

mov eax, fs:[30h] <- which is masm.

So, if someone's got an idea, please help me.
Many thanks.
Post 18 Apr 2004, 19:31
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 18 Apr 2004, 19:57
try this:
Code:
mov eax, [fs:30h]    
Post 18 Apr 2004, 19:57
View user's profile Send private message Visit poster's website Reply with quote
Carlito



Joined: 08 Apr 2004
Posts: 11
Location: Paris
Carlito 18 Apr 2004, 20:00
k gonna try thx man
Post 18 Apr 2004, 20:00
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
Carlito



Joined: 08 Apr 2004
Posts: 11
Location: Paris
Carlito 18 Apr 2004, 20:08
It WORKS, many thanks decard
Post 18 Apr 2004, 20:08
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
Carlito



Joined: 08 Apr 2004
Posts: 11
Location: Paris
Carlito 19 Apr 2004, 19:14
But This part of my code for the program not to be debug-able make it crash on win2000 stations, on XP it works fine
Code:
     push    00h
 mov eax, [fs:30h]
       movzx   eax, byte [eax+2h]
  or      al, al

  jz      ok
  jmp     debug

   debug:      invoke  ExitProcess,0
    


if the program is being debugged it closes and if not, it runs normally.
Help me please
Post 19 Apr 2004, 19:14
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv 20 Apr 2004, 11:29
crash as in? Can give me details? The following code works fine for me.

Code:
       mov     ecx, [fs:30h]
   test    ecx, ecx
    js      _9x
 movzx   ecx, byte[ecx+2]
    jecxz   @F
;;;;blah blah
_9x:
     mov     ecx, [fs:20h]
   jecxz   @F
;;;;;blah blah
@@:

    
Post 20 Apr 2004, 11:29
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
Carlito



Joined: 08 Apr 2004
Posts: 11
Location: Paris
Carlito 20 Apr 2004, 15:34
Many thanks, it works fine there. But why
Code:
mov   ecx, [fs:20h]      
???
Post 20 Apr 2004, 15:34
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.