Menu

#148 general form mov [foo],eax

open
nobody
None
1
2008-07-13
2008-07-08
Anonymous
No

please, sorry for my bad english.

when I write `mov [foo],eax', nasm generate short (0xa3,..) form of the instruction.
I can to generate long (0x89,0x05,..) form of the instruction. How to do it?

Discussion

  • nasm64developer

    nasm64developer - 2008-07-09

    Logged In: YES
    user_id=804543
    Originator: NO

    1 bits 32
    2
    3 foo: equ 0x12345678
    4
    5 00000000 A378563412 mov [foo],eax
    6 00000005 891D78563412 mov [foo],ebx
    7
    8 0000000B 890578563412 mov [byte foo],eax
    9 00000011 891D78563412 mov [byte foo],ebx
    10
    11 ; EOF

     
  • nasm64developer

    nasm64developer - 2008-07-09
    • priority: 5 --> 1
     
  • H. Peter Anvin

    H. Peter Anvin - 2008-07-13

    Logged In: YES
    user_id=58697
    Originator: NO

    OK, the use of "byte" to force a modr/m there is an ugly hack, even if it works.
    I guess this falls under the general umbrella of "alternate forms" which makes it a feature request, not a bug.

     
  • H. Peter Anvin

    H. Peter Anvin - 2008-07-13
    • labels: 1022311 -->
     

Log in to post a comment.