delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/18/16:00:11

Message-ID: <394D26D7.61094FFE@home.com>
From: Robin Johnson <robbat2 AT home DOT com>
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: <Pine DOT GSO DOT 3 DOT 96 DOT 1000618130705 DOT 28300A-200000 AT ucsu DOT Colorado DOT EDU>
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)

- Raw text -


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