Page 1 of 1
Assemblecode translation
Posted: Wed Jan 05, 2005 3:25 pm
by Poseidon
I'm quite a n00b at assemble code (especially at AT&T), could somebody translate these lines from Intel syntax to AT&T?
Code: Select all
mov [ebx + (isr0.1 - isr0 + 1)], eax
dd idt /* don't know what dd is in AT&T */
mul byte [ebp + 12]
mov [idt + ebx + 5], al
Thanks in advance
Re:Assemblecode translation
Posted: Wed Jan 05, 2005 3:42 pm
by Candy
Poseidon wrote:
I'm quite a n00b at assemble code (especially at AT&T), could somebody translate these lines from Intel syntax to AT&T?
Code: Select all
mov [ebx + (isr0.1 - isr0 + 1)], eax
dd idt /* don't know what dd is in AT&T */
mul byte [ebp + 12]
mov [idt + ebx + 5], al
Thanks in advance
The dd is equal to .dword (if I'm not mistaking). the plus, minus and allt he others do as you expect in Intel syntax (add, substract etc.), so if you know how to write that in AT&T syntax you can do that. I don't for one
Re:Assemblecode translation
Posted: Wed Jan 05, 2005 3:58 pm
by Pype.Clicker
Re:Assemblecode translation
Posted: Fri Jan 07, 2005 4:13 am
by Poseidon
.dword doesn't work.. is it possibly .long? also, I'm still unable to translate this line:
and, why are %al and %bl allowed by mov but not by movl ???
Re:Assemblecode translation
Posted: Fri Jan 07, 2005 5:28 am
by Solar
Poseidon wrote:
.dword doesn't work.. is it possibly .long?
The problem with virtually all such "translation requests" is that those who know Intel syntax only ask for a translation to AT&T without explaining what their Intel syntax source actually
does. :-[
GNU as for i386 knows .byte, .short, .long, and .word (with various synonyms such as .hword). .dword is only available for a couple other architectures AFAIR.
also, I'm still unable to translate this line:
As I said above, you don't know how to express it in AT&T and I don't know (exactly) what it does in the first place... multiplying with the value located at the address in ebp plus 12? That would be...
...out of the top of my - terribly out-of-experience - head and not double-checked.
And, why are %al and %bl allowed by mov but not by movl ???
movl is "move long", which works on %eax and %ebx...
Re:Assemblecode translation
Posted: Fri Jan 07, 2005 12:55 pm
by Poseidon
I think this is my very last question then..
From this line (intel syntax):
I made this (at&t):
but the $ has also to be translated.. I'm not sure what it means, but i think to get the mem address of that current line, but what is it in AT&T?
Thanx
Re:Assemblecode translation
Posted: Fri Jan 07, 2005 10:23 pm
by AR
I'm guessing here but I think from memory that '$' is '.' (full stop) in AT&T