Machine Code - Machine Code Instructions

Machine Code Instructions

Every processor or processor family has its own machine code instruction set. Instructions are patterns of bits that by physical design correspond to different commands to the machine. The instruction set is thus specific to a class of processors using (much) the same architecture. Successor or derivative processor designs often include all the instructions of a predecessor and may add additional instructions. Occasionally a successor design will discontinue or alter the meaning of some instruction code (typically because it is needed for new purposes), affecting code compatibility to some extent; even nearly completely compatible processors may show slightly different behavior for some instructions, but this is seldom a problem. Systems may also differ in other details, such as memory arrangement, operating systems, or peripheral devices. Because a program normally relies on such factors, different systems will typically not run the same machine code, even when the same type of processor is used.

A machine code instruction set may have all instructions of the same length, or it may have variable-length instructions. How the patterns are organized varies strongly with the particular architecture and often also with the type of instruction. Most instructions have one or more opcode fields which specifies the basic instruction type (such as arithmetic, logical, jump, etc.) and the actual operation (such as add or compare) and other fields that may give the type of the operand(s), the addressing mode(s), the addressing offset(s) or index, or the actual value itself (such constant operands contained in an instruction are called immediates).

Read more about this topic:  Machine Code

Famous quotes containing the words machine, code and/or instructions:

    Much that is natural, to the will must yield.
    Men manufacture both machine and soul,
    And use what they imperfectly control
    To dare a future from the taken routes.
    Thom Gunn (b. 1929)

    Acknowledge your will and speak to us all, “This alone is what I will to be!” Hang your own penal code up above you: we want to be its enforcers!
    Friedrich Nietzsche (1844–1900)

    If we consider what happens in conversation, in reveries, in remorse, in times of passion, in surprises, in the instructions of dreams, wherein often we see ourselves in masquerade,—the droll disguises only magnifying and enhancing a real element, and forcing it on our distinct notice,—we shall catch many hints that will broaden and lighten into knowledge of the secret of nature.
    Ralph Waldo Emerson (1803–1882)