All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maciej Hrebien <m_hrebien@wp.pl>
To: linux-assembly@vger.kernel.org
Subject: Re: gas jump
Date: Sun, 31 Aug 2003 11:55:23 +0200	[thread overview]
Message-ID: <3F51C60B.F6ED8DD6@wp.pl> (raw)
In-Reply-To: 3F51C230.D94AF7EC@wp.pl

Maciej Hrebien wrote:
> 
> Fekete Gabor wrote:
> >
> > hi
> >
> > i want to make a relative jump.
> > i tried it with "jmp 0x09" and expected it to
> > jump to the address that comes 9 bytes after
> > this "jmp".
> > is it correct?
> 
> Nope. Try jmp .+9 as Robert Plantz suggested in his post dated
> 02.02.2003 ("." means current address that gas is assembling into so ie.
> l: .long . gives you l with its own address stored into) or hard code it
> as .byte 0xeb, 0x09 (0xeb is jmp rel8). Isn't it better to just label if
> your code isn't the fixed one? ;)

I missed something, 9 bytes AFTER, so +2 because jmp rel8 encodes with 2
bytes. Sorry!

-- 
Maciej Hrebien


  reply	other threads:[~2003-08-31  9:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-30 22:46 gas jump Fekete Gabor
2003-08-31  9:38 ` Maciej Hrebien
2003-08-31  9:55   ` Maciej Hrebien [this message]
2003-09-01  3:42   ` Rick Hohensee
  -- strict thread matches above, loose matches on Subject: below --
2003-08-31 11:06 peter w krause
2003-09-01  8:10 ` Maciej Hrebien
2003-09-01  9:24   ` peter w krause
2003-09-03  8:45     ` Maciej Hrebien
2003-09-03 11:54       ` peter w krause
2003-09-03 22:22         ` Maciej Hrebien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F51C60B.F6ED8DD6@wp.pl \
    --to=m_hrebien@wp.pl \
    --cc=linux-assembly@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.