Mail Archives: djgpp/2000/06/18/16:00:11
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 -