Re: plz help!!!




Nathan Moore wrote:
> 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.
>

There must be something terribly wrong with my CPU because I get a
0x101 in ebx after the movw instruction. Or is it the case with AT&T
syntax that all add instructions are represented by a mov one?

Nathan.

.



Relevant Pages

  • Re: need helps!!!!
    ... > test %ebx, %ebx ... the TEST instruction is like AND except it doesn't ... Testing or anding a register ... by itself sets the sign and zero flags according to the register, ...
    (comp.lang.asm.x86)
  • Re: Futility of CMOVcc
    ... CMOVA EAX, EBX ... On a Pentium the decoder is very much so in the critical path, the first time new code is executed, i.e. not out of L1 cache, you only get a single instruction decoded/cycle. ...
    (comp.lang.asm.x86)
  • Re: Read carry flag
    ... Christian Christmann wrote: ... does the x86 ISA pport an instruction to read the ... XXX ebx; load carry flag into ebx ...
    (comp.lang.asm.x86)
  • Re: HLA malloc problem
    ... instruction to achieve that result. ... malloc(ebx); ... malloc(intmul(@size(int32), ebx)); ...
    (comp.lang.asm.x86)