Is it possible to run x86 assembly on a x64 operating system?

前端 未结 3 1233
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-04 12:08

Recently I decided that it was worth getting a try on basic x86 assembly so that it would be easier to debug programs, etc, etc. So I started (about a week ago) learning x86 ass

3条回答
  •  天涯浪人
    2021-02-04 12:26

    Is it possible to work with x86 assembly on a x64 operating system? Will it run properly in the emulator?

    Yes it is possible & it will run properly. Instruction Set Architecture is always backwards compatible.

    Registers in x86-64:


    (source: usenix.org)

    For example: Here you can see that rax is the new 64 General Purpose register but you still can use eax as it refers to lower 32 bits of rax.

    Or should I learn x64 assembly?

    x86-32 architecture is subset of x86-64. Its like first you learnt x86 then go & find whats new in x86-64 assembly. Once you learn x86 asm. Then this will be a useful resource: http://www.cs.cmu.edu/~fp/courses/15213-s06/misc/asm64-handout.pdf

提交回复
热议问题