Re: plz help!!!



Nathan Moore <spamtrap@xxxxxxxxxx> 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.

Right explanation, wrong answer. It would make ebx = 0x101.
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

.



Relevant Pages

  • Re: improvement of index-calculation
    ... bt eax, ebx ... Les. ... Prev by Date: ...
    (borland.public.delphi.language.basm)
  • Re: plz help!!!
    ... movw %ax, %bx ... 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. ...
    (comp.lang.asm.x86)
  • Re: plz help!!!
    ... Tim Roberts wrote: ... movw %ax, %bx ... 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 ...
    (comp.lang.asm.x86)
  • Re: Setting Up An Icon Upon A Form
    ... >invoke SendMessage, hWndDlg, WM_SETICON, ICON_LARGE, ebx ... Prev by Date: ...
    (alt.lang.asm)
  • Re: [x86] Build error at arch/x86/boot/bioscall.S
    ... movw 68, %di ... movzwl %sp, %ebx ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
    (Linux-Kernel)