Mail Archives: djgpp/1996/05/23/19:04:57
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
- Raw text -