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 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Lines: 19 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Sat, 19 Jul 1997 14:27:25 -0600, Jason Meehan 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