Each machine instruction in memory occupies one word, and consists of 4 parts: the address (2 bytes and the sign of the word) in memory to read or write; an index specification (1 byte, describing which rI index register to use) to add to the address; a modification (1 byte) that specifies which parts of the register or memory location will be read or altered; and the operation code (1 byte). All operation codes have an associated mnemonic.
MIX programs frequently use self-modifying code, in particular to return from a subroutine, as MIX lacks an automatic subroutine return stack. Self-modifying code is facilitated by the modification byte, allowing the program to store data to, for example, the address part of the target instruction, leaving the rest of the instruction unmodified.
MIX programs are typically constructed using the MIXAL assembly language; for an example, see the list hello world programs page.
|LDA ADDR,i(0:5)||rA := memory;|
|LDX ADDR,i(0:5)||rX := memory;|
|LD? ADDR,i(0:5)||rI? := memory;|
|LDAN ADDR,i(0:5)||rA := - memory;|
|LDXN ADDR,i(0:5)||rX := - memory;|
|LD?N ADDR,i(0:5)||rI? := - memory;|
|STA ADDR,i(0:5)||memory := rA;|
|STX ADDR,i(0:5)||memory := rX;|
|ST? ADDR,i(0:5)||memory := rI?;|
|STJ ADDR,i(0:5)||memory := rJ;|
|STZ ADDR,i(0:5)||memory := 0;|
|ADD ADDR,i(0:5)||rA := rA + memory;|
|SUB ADDR,i(0:5)||rA := rA - memory;|
|MUL ADDR,i(0:5)||(rA,rX) := rA * memory;|
|DIV ADDR,i(0:5)||rA := int( (rA,rX) / memory );
rX := (rA,rX) % memory;
|ENTA ADDR,i||rA := ADDR + rIi;|
|ENTX ADDR,i||rX := ADDR + rIi;|
|ENT? ADDR,i||rI? := ADDR + rIi;|
|ENNA ADDR,i||rA := - ADDR - rIi;|
|ENNX ADDR,i||rX := - ADDR - rIi;|
|ENN? ADDR,i||rI? := - ADDR - rIi;|
|INCA ADDR,i||rA := rA + ADDR + rIi;|
|INCX ADDR,i||rX := rX + ADDR + rIi;|
|INC? ADDR,i||rI? := ADDR + rIi;|
|DECA ADDR,i||rA := rA - ADDR - rIi;|
|DECX ADDR,i||rX := rX -ADDR - rIi;|
|DEC? ADDR,i||rI? := rI? - ADDR - rIi;|
|CMPA ADDR,i(0:5)||compare rA with memory;|
|CMPX ADDR,i(0:5)||compare rX with memory;|
|CMP? ADDR,i(0:5)||compare rI? with memory;|
|JMP ADDR,i||rJ := address of next instruction;
goto ADDR + rIi;
|JSJ ADDR,i||goto ADDR + rIi;|
|JOV ADDR,i||if (overflow) then
overflow := false; goto ADDR + rIi;
|JNOV ADDR,i||if (no overflow) then
goto ADDR + rIi;
else overflow := false;
|JL, JE, JG ADDR,i
JGE, JNE, JLE ADDR,i
|if (less, equal, greater) then goto ADDR + rIi;
if (no less, unequal, no greater) then goto ADDR + rIi;
|if (rA<0 or rA==0 or rA>0) then goto ADDR + rIi;
if (rA>=0 or rA!=0 or rA<=0) then goto ADDR + rIi;
|if (rX<0 or rX==0 or rX>0) then goto ADDR + rIi;
if (rX>=0 or rX!=0 or rX<=0) then goto ADDR + rIi;
|if (rI?<0 or rI?==0 or rI?>0) then goto ADDR + rIi;
if (rI?>=0 or rI?!=0 or rI?<=0) then goto ADDR + rIi;
|MOVE ADDR,i(F)||for (n = 0; n < F; n++, rI1++)
memory := memory;
|shift rA to the left/right by ADDR+rIi bytes
shift (rA,rX) to the left/right by ADDR+rIi bytes
rotate (rA,rX) to the left/right by ADDR+rIi bytes
|IN ADDR,i(F)||read in one block from input unit F
into memory onwards;
|OUT ADDR,i(F)||output one block to unit F
from memory onwards;
|IOC ADDR,i(F)||send control instruction to i/o unit F;|
|JRED ADDR,i(F)||if (i/o unit F is ready) then goto ADDR + rIi;|
|JBUS ADDR,i(F)||if (i/o unit F is busy) then goto ADDR + rIi;|
|NUM||rA := numerical value of characters in (rA,rX);|
|CHAR||(rA,rX) := character codes representing value of rA;|
Other articles related to "instructions, instruction":
... CDC 6600 computer, for dynamically scheduling a pipeline so that the instructions can execute out of order when there are no conflicts and the hardware is available ... In a scoreboard, the data dependencies of every instruction are logged ... Instructions are released only when the scoreboard determines that there are no conflicts with previously issued and incomplete instructions ...
... The LVDC was capable of executing 12190 instructions per second ... a 2012-era microprocessor can execute 4 instructions per cycle at 3 GHz, achieving 12 billion instructions per second, one million times faster ... each bit, 14 bits per phase, and 3 phases per instruction, for a basic time of 168 cycles = 82 μs for a simple add ...
... The following instructions are considered to be processor supplementary instructions on IA-32 architecture ... These instructions were added to later production processors, and are not part of the original IA-32 instruction set ... Programs containing these instructions may not operate correctly on all machines in the IA-32 family bswap cmov cmova cmovae cmovb cmovbe cmovc cmove ...
... During the third stage, the instructions are decoded ... In the fourth stage, they are placed in the instruction reorder buffer (IRB) ... and to provide a temporary place for results to be stored until the instructions are retired ...
... Tensilica Instruction Extension refers to the proprietary language that is used to customize the Xtensa processor core architecture ... By using TIE, the user can customize the Xtensa architecture by adding custom instructions and register files, instantiating TIE Ports and Queues for ... greatly benefit from properly targeted user-defined instructions, while TIE ports and TIE queues facilitate multiprocessor communication by adding separate input and output interfaces to the ...
Famous quotes containing the word instructions:
“They had supposed their formula was fixed.
They had obeyed instructions to devise
A type of cold, a type of hooded gaze.
But when the Negroes came they were perplexed.
These Negroes looked like men....”
—Gwendolyn Brooks (b. 1917)
“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 (18031882)
“Realizing that his time was nearly spent, he gave full oral instructions about his burial and the manner in which he wished to be remembered.... A few minutes later, feeling very tired, he left the room, remarking, I have no disposition to leave this precious circle. I love to be here surrounded by my family and friends. Then he gave them his blessing and said, I am ready to go and I wish you goodnight.”
—For the State of New Hampshire, U.S. public relief program (1935-1943)