delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/05/05:05:00

From: peuha AT cc DOT helsinki DOT fi (Esa A E Peuha)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ASM
Date: 5 Mar 1997 07:42:52 GMT
Organization: University of Helsinki
Lines: 21
Message-ID: <5fj85s$mok@oravannahka.Helsinki.FI>
References: <3313A399 DOT C33 AT bplorraine DOT fr>
Reply-To: Esa DOT Peuha AT helsinki DOT fi
NNTP-Posting-Host: kruuna-ether.helsinki.fi
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Maxime Viallet (Fviallet AT bplorraine DOT fr) wrote:
: Hello !
: I'm have some problem when I write inline ASM :
: to put I pixel a made (in pascal) :
: 	mov ax,$A000
: 	mov es,ax
: but when i do this :
: 	movw $0xA000,%ax\n
: 	movw %ax,%es\n
: The program crash ! (segmentation fault , i think...)
: 	Can you explain me ???

DJGPP compiles *protected mode* programs. This means, among other
things, that memory is accessed in a completely different manner. The
DJGPP FAQ list explains this in some detail, but shortly, you should use
the _far* functions instead of inline assembly.

--
Esa Peuha
student of mathematics at the University of Helsinki
http://www.helsinki.fi/~peuha/

- Raw text -


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