2 Replies - 1358 Views - Last Post: 04 December 2012 - 07:14 AM

#1 sgame  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 22-November 12

my intel syntax didn't work

Posted 04 December 2012 - 07:00 AM

Hello;

I would like someone help me to correct this asm code, it compile but has no effect! Did I miss something ? the compiler alert me about two warnings :
- warning: 'naked' attribute directive ignored [-Wattributes]
- warning: no return statement in function returning non-void [-Wreturn-type]

I use gcc compiler.
Regards
Is This A Good Question/Topic? 0
  • +

Replies To: my intel syntax didn't work

#2 sgame  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 22-November 12

Re: my intel syntax didn't work

Posted 04 December 2012 - 07:09 AM

Hello; I forget to past the source code of my function . Here it is :

void __declspec(naked) *kernel_addr()
{
    asm("mov eax, fs:[0x30]\n");
    asm("mov eax, [eax+0x0c]\n");
    asm("mov eax, [eax+0x1c]\n");
    asm("mov eax, [eax]\n");
    asm("mov eax, [eax+0x08]\n");
    asm("ret\n");
}



Thank you
Was This Post Helpful? 0
  • +
  • -

#3 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5388
  • View blog
  • Posts: 27,383
  • Joined: 10-May 07

Re: my intel syntax didn't work

Posted 04 December 2012 - 07:14 AM

** Topic moved to assembly **
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1