[Icc-mot] GNU to ICC

Edward Karpicz ekarpicz at freemail.lt
Fri Feb 22 23:45:32 PST 2008


Hi,

I see nothing new in this document. ",x" stands for indexed addressing mode. 
It's either register,x, where register is a,b,or d register. Contents of 
a/b/d register added to contents of x register specifies operand address. 
Or, it's a const,x. Const offset added to contents of x register specifies 
operand address.

You had this code:

           __asm__ __volatile__ (
                    //                "ldx    %1\n"
                    "ldab   %2,x\n"             <- is B reg loaded from 
*((char*)ATD0DR5  + egofactor_table[0]) ?
                    "clra\n"
                    "ldy    %3\n"
                    "emul\n"
                    "ldx    #100\n"
                    "ediv\n"
                    "tfr    y,d\n"
                    "addd   %4\n"
                    : "=d"(tmp3)
                    : "x"(ATD0DR5),           <- is x loaded from ATD0DR5?
                    "m"(egofactor_table[0]),

Is first line "ldx %1" suppressed with //? Anyway it specifies the same 
what's specified by : "x"(ATD0DR5).

Edward


> Hi Edward,
>
> Found a helpful document, a  Motorola-to-GNU Assembly Conversion Chart
> http://robust.cs.utep.edu/arch1/manual/appendix/a-0.html
>
> Explains the "ldab %2,x\n"
>
> Oskar
>
>
>
>
> _______________________________________________
> Icc-mot mailing list
> Icc-mot at imagecraft.com
> http://dragonsgate.net/mailman/listinfo/icc-mot
> 



More information about the Icc-mot mailing list