Re: plz help!!!
- From: Nathan Moore <spamtrap@xxxxxxxxxx>
- Date: Fri, 28 Oct 2005 18:10:42 +0000 (UTC)
newB wrote:
if i have %eax 0x101 %ebx 0x102 %ecx 0x103 %edx 0x01 %esi 0x00 %edi 0x1038 %ebp 0x1036 %esp 0x1032
what would this to be? movw %ax, %bx
Since you are using the % I assume that you are using the AT&T syntax, so that would put the lower 16 bits of eax into the lower 16 bits of
ebx, which would make ebx = 0x103, since that value would fit into
the lower 16 bits and the upper 16 bits would all be 0 in both eax and
ebx before the instruction.
Masm and most Intel assemblers use Intel's syntax, which reverses the operands in instructions.
mov R1, R2 is the same as R1 = R2
But with the AT&T syntax it is like saying move R1 into R2 which is R2 = R1.
AT&T syntax is usually used on assemblers with UNIX like roots.
Nathan
.
- Follow-Ups:
- Re: plz help!!!
- From: Tim Roberts
- Re: plz help!!!
- From: spamtrap
- Re: plz help!!!
- References:
- plz help!!!
- From: newB
- plz help!!!
- Prev by Date: Re: Combining two MMX registers into one SSE register?
- Next by Date: Re: ESP (stack) question (using HLA)???
- Previous by thread: plz help!!!
- Next by thread: Re: plz help!!!
- Index(es):
Relevant Pages
|