This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: ljmp syntax question


Thanks.  That was it.

-----Original Message-----
From: Segher Boessenkool [mailto:segher@kernel.crashing.org] 
Sent: Wednesday, March 21, 2007 2:22 PM
To: Smith, Stephen (SWCOE)
Cc: binutils@sources.redhat.com
Subject: Re: ljmp syntax question

> I am writing a BIOS and my code is at $0xF000:$0000 (real mode x86) .
>
> I set up my GDT and switch into protected mode and now do the 
> following:
>
>     /* PROT_MODE_CSEG = 0x8, protcseg=0xFFFF0028 */
>     ljmp     $PROT_MODE_CSEG, $protcseg
>     .code32
> protcseg:
>      movw     $PROT_MODE_DSEG, %ax
>
> When I reach protcseg, CS=0x8, and eip=0x28 which is off by about
> 0xFFFF0000.   How should I have coded the long jump?

ljmpl is what you're after.


Segher


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]