www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/07/19/15:00:01

Date: Mon, 19 Jul 93 14:27:49 EDT
From: DJ Delorie <dj AT ctron DOT com>
To: iclone!mjhostet AT cs DOT unm DOT edu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: How to load ES in protected mode?

> I modified turbo_assist() to give me a "low memory" malloc().  I use  
> this buffer to communicate with the BIOS.  I've used this technique  
> successfully.  Right now I am trying to pass the returned  
> segment/offset pair to the BIOS in ES:BX.

Oh.  That's different.  The problem you are hitting is the fact that
the 80386 does not let you load any segment register with a value that
does not represent a valid segment selector when the 80386 is in
protected mode.  The basic result of this is the following:

	SEGMENT REGISTERS ARE NOT GENERAL PURPOSE REGISTERS.

You simply cannot load any value you want to into them.  If it's not a
valid protected mode selector value, you get an exception.  A brief
reading of the DPMI spec will indicate that they always use real
general purpose registers (cx, dx, etc) to pass real-mode segment
values around.

DJ

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019