Mail Archives: djgpp/1997/12/08/20:31:45
>> Hi !
>> Can someone, please, help me with this Assembly Routine...
>> I'm new to the Extended ASM of DJGPP.. I used to program with RealMode,
TASM
>> Systax,
>> but, all this AT&T syntax confuse me ! Please, Correct this function:
>> void setdaccolor(byte color, byte red, byte green, byte blue) {
...
>> : "%eax", "%edx" );
>> }
>Hmmm. I'm not going to test this, but it should be close if there is a
>bug :)
>void setdaccolor(byte color, byte red, byte green, byte blue) {
> __asm__ __volatile__ (
> "movl $0x3C8, %%edx \n\t"
...
> "outb %%al, %%dx"
> : : "a" (color), "rm" (red), "rm" (green), "rm" (blue)
> : "%eax", "%edx" );
>}
>I also changed your 16-bit move to 32-bit because they are
>faster&better. Also, instead of using %1, I used %b1 to specify byte
>type.
Well, I found that, at least, in my computer, It would only compile if you
switch all the "rm" to "g" in this way:
: : "a" (color), "g" (red), "g" (green), "g" (blue)
Other thing, do you know how can I configure RHIDE to automatically make GGC
produce a .s file ?!?! When I add -S to the compile parameters, it will not
link...
Anyway, Thanks a Lot..
- Raw text -