Xref: news2.mv.net comp.graphics.algorithms:20780 comp.os.msdos.djgpp:4184 Newsgroups: comp.os.msdos.djgpp,comp.graphics.algorithms From: penquerc AT enssat DOT fr (Vincent Penquerc'h) Subject: Re: Inline ASM, Mode 13h problem Message-ID: <1996May23.061756.10087@cnet.fr> Sender: usenet AT cnet DOT fr Nntp-Posting-Host: lat1072.lannion.cnet.fr Organization: CNET References: <31A26377 DOT 29C6 AT postoffice DOT ptd DOT net> <4nva9j$5l5 AT wapping DOT ecs DOT soton DOT ac DOT uk> Date: Thu, 23 May 1996 06:17:56 GMT Lines: 33 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <4nva9j$5l5 AT wapping DOT ecs DOT soton DOT ac DOT uk>, rjc94 AT ecs DOT soton DOT ac DOT uk (Robert Cooper) says: > > >>void putpixel(short x,short y,short c) { >> __asm__ __volatile__(" >> movw %0, %%es; >> movl $0xA0000, %%edi; >> movw %2, %%ax; >> imulw $320, %%ax; >> addw %1, %%ax; >> addw %%ax, %%di; >> movb %3, %%es:(%%edi);" >> : >> : "g" (glib_selector), "g" (x), "g" (y), "g" (c) >> ); >>I'm developing under RHIDE beta4. I get an assembler error in the >>putpixel function, and I believe it is with the following line: >> movb %3, %%es:(%%edi);" > >>ERROR: OPERANDS GIVEN DON'T MATCH ANY KNOWN 386 INSTRUCTION. > >Hmm. Shouldn't those commands be something like movsb/movsw. Rather >than movb/movw. I think that may be right, but then again, I don't know >a huge amount about ASM either. > >Ica Hmmm ... Are these 80x86 opcodes ?? Uses es, edi, but seem so weird ... I think operands are in reversed order. Where does this assembler come from ??? Vincent 'Indy' Penquerc'h penquerc AT enssat DOT fr