This project has moved. For the latest updates, please go here.

Instructions

There are a total of 3 offical instructions and 2 unoffical (though talked about) instructions.

Offical Instructions

From table 1.1 of C.C.L.

Instruction Interpretation
V <- V + 1 Increase by 1 the value of the variable V.
V <- V - 1 If the value of V is 0, leave it unchanged; otherwise decrease by 1 the value of V.
IF V != 0 GOTO L If the value of V is nonzero, perform the instruction with label L next; otherwise proceed to the next instruction in the list.

Unoffical Instructions

These instructions can be made up with the Offical instructions.

Instruction Interpretation
GOTO L A direct jump that causes the program to unconditionally branch to the instruction with the label L.
V <- V Do nothing. The operation doesn't do anything.

Code basis

GOTO L

GOTO L is described in program segment 2.1 of C.C.L. to be:
 Z <- Z + 1
 IF Z != 0 GOTO L

V <- V

V <- V is mentioned in 1.2.3 of C.C.L. No explanation is given other that it is a "dummy" oepration and it doesn't do anything. If it had to be described by code, you could do it as such:
 V <- V + 1
 V <- V - 1

Last edited Oct 21, 2011 at 11:42 PM by rcmaniac25, version 1

Comments

No comments yet.