Difference between: Opcode, byte code, mnemonics, machine code and assembly

后端 未结 6 1486
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-12 12:35

I am quite new to this. I tried to understand the difference between the mentioned terms in a clear fashion, however, I am still confused. Here is what I have found:

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-12 12:43

    Recently I read a good article on this, Difference between Opcode and Bytecode, thus like to share with whoever is after a good explanation on this topic. All the credit goes to the original author.

    • Opcode:

      Opcode is short for operation code. As its name suggests, the opcode is a type of code that tells the machine what to do, i.e. what operation to perform. Opcode is a type of machine language instruction.

    • Bytecode:

      Bytecode is similar to opcode in nature, as it also tells the machine what to do. However, bytecode is not designed to be executed by the processor directly, but rather by another program.
      It is most commonly used by a software based interpreter like Java or CLR. They convert each generalized machine instruction into a specific machine instruction or instructions so that the computer's processor will understand.
      In fact, the name bytecode comes from instruction sets that have one-byte opcodes followed by optional parameters.

提交回复
热议问题