Results 1 to 3 of 3

Thread: Assembly Coding in Delphi Problem

Hybrid View

  1. #1

    Question Assembly Coding in Delphi Problem

    Hi All
    I'm trying to write a piece of Assembly code in Delphi.I know I should
    do this by asm keyword.I want to return Flags value to a
    variable.I use the following code in the start of my Main project file:

    var
    Flags:DWord;
    begin
    asm
    Pushf
    Pop Flags
    end;
    ......
    end.

    But this code make nothing for me and only hide caption bar and Border
    of Main form.
    why?How I can Do this?

    sincerely yours

  2. #2
    Lord8Bit
    Guest
    Try something like :

    Function GetFlags: dword;
    asm
    push eax
    pushfd
    pop eax
    mov Result,eax
    pop eax
    end;

    Best regards
    LordByte
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  3. #3
    Hi Lord8Bit !
    Good code, but don't need to use Result. Function return number in Delphi always uses EAX. So the code will be:

    function GetFlags: DWORD;
    asm
    pushfd
    pop eax
    end;

    Regards !
    TQN

Similar Threads

  1. Ollydbg 2 Coding help
    By ragdog in forum OllyDbg Support Forums
    Replies: 0
    Last Post: October 4th, 2011, 04:45
  2. Delphi Big Lib Signature Problem
    By nanobit in forum Advanced Reversing and Programming
    Replies: 11
    Last Post: July 29th, 2008, 09:26
  3. Coding Digest of the Demo Scene
    By 0xf001 in forum Off Topic
    Replies: 2
    Last Post: May 14th, 2006, 07:38
  4. Coding ASPACK dumper
    By canuckcracker in forum Malware Analysis and Unpacking Forum
    Replies: 4
    Last Post: August 3rd, 2004, 10:25
  5. Coding a Trainer: Hotkey problem, please help :)
    By Predator [PC/pGC] in forum Advanced Reversing and Programming
    Replies: 10
    Last Post: December 11th, 2000, 03:31

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •