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 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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/