From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: ASM Date: Tue, 25 Feb 1997 20:07:57 -0800 Organization: Two pounds of chaos and a pinch of salt Lines: 23 Message-ID: <3313B71D.7D0C@cs.com> References: <3313A399 DOT C33 AT bplorraine DOT fr> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp206.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Maxime Viallet wrote: > > but when i do this : > movw $0xA000,%ax\n > movw %ax,%es\n > The program crash ! (segmentation fault , i think...) It's that 0xA000 that's hanging you up. In protected mode (which is what DJGPP uses), you cannot go around randomly accessing any absolute memory address. You have to use one of several techniques; which one you use depends on what you need and how simple or fast you want it to be. The DJGPP Frequently Asked Questions list (v2/faq210b.zip) answers this question and several others in the very first section of chapter 10. -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | "Starting flamewars since 1993" | http://www.cs.com/fighteer | | *** NOTICE *** This .signature is generated randomly. | | If you don't like it, sue my computer. | ---------------------------------------------------------------------