grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failed to build grub2


From: Bean
Subject: Re: Failed to build grub2
Date: Thu, 27 Dec 2007 18:43:22 +0800

On Dec 27, 2007 5:57 PM, Robert Millan <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]