Message-ID: <394D26D7.61094FFE@home.com> From: Robin Johnson Organization: Orbit Computers X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en,af,es MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: nasm w/ djgpp References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 38 Date: Sun, 18 Jun 2000 19:45:28 GMT NNTP-Posting-Host: 24.113.36.103 X-Complaints-To: abuse AT home DOT net X-Trace: news1.rdc1.bc.home.com 961357528 24.113.36.103 (Sun, 18 Jun 2000 12:45:28 PDT) NNTP-Posting-Date: Sun, 18 Jun 2000 12:45:28 PDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com SIZEMORE GREGORY EDWARD wrote: > > Every time I try to load a new value into a segment register I get a > general protection fault. Can any one tell me why that is, and what > I can do to fix that? > Thanks, > Greg Sizemore > sizemore AT ucsu DOT colorado DOT edu > > -------------------------------------------------------------------------------- > Section .text > global _main > > _main: > push es > push eax > > mov eax, 0B800h > mov es, eax ;Here is where it crashes. segment regs are 16 bit! mov es,ax > > pop eax > pop es > > ret -- Robin Hugh Johnson "Robbat2" QTOD: "I used to be an idealist, but I got mugged by reality." E-Mail : robbat2 AT orbis-terrarum DOT net ICQ# : 30269588 or 41961639 Home Page : http://www.orbis-terrarum.net Time Zone : Pacific Daylight (GMT - 8)