Mail Archives: djgpp/1997/01/27/05:13:33
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 -