delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/23/15:07:40

Newsgroups: comp.os.msdos.djgpp
Subject: Re: djgpp inline asm
Message-ID: <5qtcvu$le0$5@news01.btx.dtag.de>
From: p DOT steiner AT t-online DOT de (Peter Steiner)
Date: 20 Jul 1997 16:05:18 GMT
Reply-To: p DOT steiner AT t-online DOT de
References: <33D1232D DOT 58B6 AT nowhere DOT com>
Organization: Telekom Online Internet Gateway
Mime-Version: 1.0
Lines: 19
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sat, 19 Jul 1997 14:27:25 -0600, Jason Meehan <Fuckyou AT nowhere DOT com> wrote:
>Anyone know why this crashes?
>
>asm("movw %bx,%es");
>
>I get a GPF at eip =00002457, error=f140
>
>Thanks

You are writing an illegal value into the es register.
Note that the processor not just copies the value from BX to ES but also
tries to load the data from the descriptor table to the hidden part of ES.

Peter Steiner
-- 
   _   x    ___
  / \_/_\_ /,--'  p DOT steiner AT t-online DOT de (Peter Steiner)
  \/>'~~~~//
    \_____/   signature V0.2 alpha

- Raw text -


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