All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bean <bean123ch@gmail.com>
To: "The development of GRUB 2" <grub-devel@gnu.org>
Subject: Re: Failed to build grub2
Date: Thu, 27 Dec 2007 18:43:22 +0800	[thread overview]
Message-ID: <ca0f59980712270243o7a7381cdl7ec9e27256e7a9fc@mail.gmail.com> (raw)
In-Reply-To: <20071227095705.GA30225@thorin>

On Dec 27, 2007 5:57 PM, Robert Millan <rmh@aybabtu.com> wrote:
> Why not force it with .code32 / .code16 ?

No, you can't use .code32/.code16, it will not cause compile error,
but the machine code is wrong. However, you can write it like this:

.byte 0x66, 0x67
.code32
leal	0x200 + data_start - data_next(%ebx,%eax), %eax
.code16

0x66 and 0x67 is the DATA32 and ADDR32 prefix, it tell the cpu that
the next instruction use different registry and address mode. (16-bit
%ax -> 32-bit %eax, 16-bit address mode to 32-bit address mode).

-- 
Bean



  reply	other threads:[~2007-12-27 10:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-25  9:41 Failed to build grub2 Francis Gendreau
2007-12-25 11:07 ` Robert Millan
2007-12-25 11:23   ` Francis Gendreau
2007-12-25 11:37     ` Bean
2007-12-26  7:17       ` Robert Millan
2007-12-26 11:13         ` Bean
2007-12-27  9:57           ` Robert Millan
2007-12-27 10:43             ` Bean [this message]
2007-12-27 11:00               ` Robert Millan
2007-12-27 11:07                 ` Bean
2007-12-26  7:15     ` Robert Millan
2007-12-27  6:40       ` Francis Gendreau

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=ca0f59980712270243o7a7381cdl7ec9e27256e7a9fc@mail.gmail.com \
    --to=bean123ch@gmail.com \
    --cc=grub-devel@gnu.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.