Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is an opcode ?

9 views
Skip to first unread message

Thomas Seiler

unread,
Nov 30, 2004, 12:58:28 PM11/30/04
to perl6-i...@perl.org
I have the impression that there has been some confusion about the term
"opcode"
There are IHMO two things that qualify for beeing an "opcode":

* Mnemonics: These are Strings that help humans to write in assembly,
i.e. ' ADD' in PASM.
* Instructions: These are words of bits that are executed by a cpu/vm,
i.e. add_i_i_i in bytecode.

An assembler therefore is something that takes a textfile containing a
sequence of Mnemonics
and translate it into a binary sequence of Instructions.

Now the important note: There has not to be a 1:1 correspondance between
Mnemonics
and Instructions, ex:
* ADD vs add_i_i_i, add_n_n_n, ...
* GT beeing transparently implemented by lt_x_x_x
* ...

And I think this is precicely where the confiusion is comming from.
Sorry, enough of my CS textbook for now...

tom

0 new messages