Re: Absolute jump without register?

From: Bx.C (invalid-email-address_at_invalid.shiragajin)
Date: 03/28/04


Date: Sun, 28 Mar 2004 20:36:02 +0000 (UTC)


"Kaelin Colclasure" <kaelin@bridge.com> wrote in message
news:c464d6$r25$05$1@news.t-online.com...
> 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

your choices for operands are register, memory, or immediate... since you're not wanting
register or memory, your other choice is immediate...

now, there are two major different immediate formats... there's the FAR format, which IS an
absolute, and the SHORT/NEAR/LONG formats which are relative to $+2... ($=current eIP)

if possible, you should use the relative formats... but if necessary, use the far format... if
you need to use an immediate/absolute coding, use the FAR format... i could be wrong though, but
i believe the indirect absolute codings are faster...

what exactly are you needing?



Relevant Pages

  • Re: PIC16F628A Error: section .org_0 can not fit the absolute section
    ... "Error - section '.org_0' can not fit the absolute section. ... overlapping an interrupt vector. ... move status register into W register ...
    (sci.electronics.design)
  • Re: OLEDragDrop custom format
    ... Clipboard formats, and lots of other things, exist in a string table with indices ... Thanks Karl. ... Attachments can be dragged from GroupWise and dropped into Windows Explorer, ... What process does GroupWise go through to register this functionality? ...
    (microsoft.public.vb.general.discussion)
  • Re: Problem with asm
    ... but I have to think that loading an absolute ... >>address into a pointer cannot be wrong, ... > register generates a fault. ...
    (comp.lang.c)
  • Re: Insert pictures/images
    ... When and how does one "register" an Image program as an OLE Server? ... In can also natively load BMP, EMF and WMF formats. ...
    (microsoft.public.access.forms)
  • Re: Problem with asm
    ... The problem is that you *cannot* load an absolute address into a pointer ... >> register generates a fault. ...
    (comp.lang.c)