Why is Visual C++ 2010 using this Assembly syntax for memory addressing?

后端 未结 1 606
醉梦人生
醉梦人生 2020-12-21 18:38

I converted the following C++ code into Assembly using Visual C++ 2010:

int main()
{
    int i;
    i = 1234;

    return 0;
}

I received t

相关标签:
1条回答
  • 2020-12-21 18:56

    Microsoft's assembler treats something like a[b] about the same way C or C++ would so a[b] and b[a] are pretty much equivalent. Both indicate addition and some optional scaling followed by dereferencing, but don't place many requirements about which part is "address" and which part is "index".

    0 讨论(0)
提交回复
热议问题