How Do Assemblers Map x86 Instruction Mnemonics to Binary Machine Instructions?

前端 未结 3 446
面向向阳花
面向向阳花 2021-02-07 18:06

I\'m interested in writing an x86 assembler. I\'m wondering what is a good way to map x86 assembly mnemonic instructions (using an Intel-like syntax) into the corresponding bina

3条回答
  •  孤城傲影
    2021-02-07 18:25

    For x86, it's complicated as hell. A little less complicated since 32-bit processors took over, but yeah. Still a pain.

    You may want to take a look at nasm ( http://www.nasm.us ). It's an open source 32-bit assembler. See how they do it. Or, use it instead. :)

提交回复
热议问题