Absolute jump without register?

From: Kaelin Colclasure (kaelin_at_bridge.com)
Date: 03/28/04

  • Next message: TS: "Re: newbie about winAPI"
    Date: Sun, 28 Mar 2004 19:06:19 +0000 (UTC)
    
    

    Hi :)

    I want to to an absolute jump to an address.

    With the aid of a register it looks like this and jumps to the desired
    address:

    mov edx, 00411A30h
    call edx

    My question is now: Can I do this in one instruction without the
    register (or mem)?

    I found the following syntax...

    call dword ptr cs:[00411A30h]

    ...but it seems that it is not the same. It crashes my app with an
    access violation.

    Why doesn't this work? Is there another way to do it without indirection?

    Environment: Windows XP, Visual C++ .NET Inline Assembly

    Bye,
    Kaelin


  • Next message: TS: "Re: newbie about winAPI"

    Relevant Pages

    • Re: Absolute jump without register?
      ... > I want to to an absolute jump to an address. ... > With the aid of a register it looks like this and jumps to the desired ... > mov edx, 00411A30h ... you're generating code at run-time, ...
      (comp.lang.asm.x86)
    • Re: Absolute jump without register?
      ... > I want to to an absolute jump to an address. ... > With the aid of a register it looks like this and jumps to the desired ... > mov edx, 00411A30h ... That is not the same as calling 411A30 it is instead calling the address ...
      (comp.lang.asm.x86)