www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/27/05:13:33

From: Matthew Mastracci <mmastrac AT acs DOT ucalgary DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: AT&T assembly code won't compile
Date: Sun, 26 Jan 1997 21:40:03 -0700
Organization: The University of Calgary
Lines: 27
Message-ID: <Pine.A41.3.94.970126213214.29096C-100000@acs2.acs.ucalgary.ca>
References: <19970125 DOT 171134 DOT 4439 DOT 2 DOT aclemmer AT juno DOT com>
Reply-To: Matthew Mastracci <mmastrac AT acs DOT ucalgary DOT ca>
NNTP-Posting-Host: mmastrac AT acs2 DOT acs DOT ucalgary DOT ca
Mime-Version: 1.0
In-Reply-To: <19970125.171134.4439.2.aclemmer@juno.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sat, 25 Jan 1997, Aaron M Clemmer wrote:

> When I try to compile this code, it tells me "not a known 386
> instruction".  I don't know which two lines they are (I'm using RHIDE),
> but that the error messages were for two adjacent lines of code.  Why it
> doesn't work, I don't know, it seems to be valid assembly code...

> 	"movl %%ebx, %%ds	\n" // load up the values in the
> 	"movl %%eax, %%es	\n" // segment regs.

This is probably your problem.  You can't move a dword into a word.  Try
just movw %%bx, %%ds; and movw %%ax, %%es.  

Of course, you're going to need to modify your code so you aren't trying 
to access a real-mode segment directly.  Look up
__dpmi_segment_to_descriptor() and pass that as a parameter.  If you've
allocated your buffer with malloc(), ds should already be set with your
data selector and you won't need to reset it.  There are some quick PM
graphics tutorials on the 'net to help you out if you need it.

/\/\att /\/\astracci                  mmastrac AT acs DOT ucalgary DOT  DOT ca

GCS/GE    d- s+:+ a--- C++++ UA P+ L E-- W+ N++ o K+ w+ O M- V 
          PS++ PE++ Y+ PGP t+++ 5+++ X++ R++ tv+ b+++ DI++++ I 
          G++ e h r* z?


- Raw text -


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