* i386: far jumps
@ 2002-07-16 2:21 Emanuele Altieri
2002-07-19 17:44 ` h-peter recktenwald
0 siblings, 1 reply; 3+ messages in thread
From: Emanuele Altieri @ 2002-07-16 2:21 UTC (permalink / raw)
To: Linux Assembly List
Greetings,
I'm doing some experiments with far jumps to different code segments.
For example:
ljmp $16, $hello
where $16 is the segment selector, and "hello" is a label that I set up
for testing. The code above works fine.
However, when I change the code as following:
movw $16, %dx
movw %dx, %fs
ljmp *%fs:hello
I get a general protection error. I don't understand why. I believe it's
a notation error. Can anybody see it?
I'm interested in this because I need the segment argument of ljmp to be
variable.
Thanks!
-Emanuele
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: i386: far jumps
2002-07-16 2:21 i386: far jumps Emanuele Altieri
@ 2002-07-19 17:44 ` h-peter recktenwald
2002-07-22 20:16 ` Emanuele Altieri
0 siblings, 1 reply; 3+ messages in thread
From: h-peter recktenwald @ 2002-07-19 17:44 UTC (permalink / raw)
To: Emanuele Altieri; +Cc: linux-assembly
On 15 Jul 2002 22:21:26 -0400
Emanuele Altieri <ealtieri@hampshire.edu> wrote:
> Greetings,
>
> I'm doing some experiments with far jumps to different code segments.
> For example:
>
> ljmp *%fs:hello
>
> I get a general protection error. I don't understand why. I believe it's
> a notation error. Can anybody see it?
>
> I'm interested in this because I need the segment argument of ljmp to be
Linux?
--
Linux,Assembly,Forth: http://www.lxhp.in-berlin.de/index-lx.shtml en/de
NO abusive software patents http://petition.eurolinux.org/pr/pr17.html
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: i386: far jumps
2002-07-19 17:44 ` h-peter recktenwald
@ 2002-07-22 20:16 ` Emanuele Altieri
0 siblings, 0 replies; 3+ messages in thread
From: Emanuele Altieri @ 2002-07-22 20:16 UTC (permalink / raw)
To: h-peter recktenwald; +Cc: Linux Assembly List
On Fri, 2002-07-19 at 13:44, h-peter recktenwald wrote:
> On 15 Jul 2002 22:21:26 -0400
> Emanuele Altieri <ealtieri@hampshire.edu> wrote:
>
> > Greetings,
> >
> > I'm doing some experiments with far jumps to different code segments.
> > For example:
> >
> > ljmp *%fs:hello
> >
> > I get a general protection error. I don't understand why. I believe it's
> > a notation error. Can anybody see it?
> >
> > I'm interested in this because I need the segment argument of ljmp to be
>
> Linux?
No (/ not yet). I'm just experimenting on Intel's segmentation and task
support with a small OS that I created for this purpose. I'm using GCC
and GAS to implement it.
By the way, I found a workaround to the ljmp problem:
pushw <segment>
pushl <offset>
lret
For example
pushw $16
pushl $hello
lret
This is equivalent to "ljmp $16, $hello", but now the segment and offset
arguments do not need to be constants.
-Emanuele
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-07-22 20:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-16 2:21 i386: far jumps Emanuele Altieri
2002-07-19 17:44 ` h-peter recktenwald
2002-07-22 20:16 ` Emanuele Altieri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).