1
0
mirror of https://github.com/simon987/Much-Assembly-Required.git synced 2025-04-16 17:26:43 +00:00

Added NOT Instruction

This commit is contained in:
simon 2017-11-11 15:27:06 -05:00
parent 3d9bfb2a42
commit 1a6f92a29d
3 changed files with 22 additions and 0 deletions
Server/src/net/simon987/server/assembly
plugins

@ -36,6 +36,7 @@ public class DefaultInstructionSet implements InstructionSet {
add(new TestInstruction());
add(new CmpInstruction());
add(new NegInstruction());
add(new NotInstruction());
}
/**

@ -0,0 +1,21 @@
package net.simon987.server.assembly.instruction;
import net.simon987.server.assembly.Instruction;
import net.simon987.server.assembly.Status;
import net.simon987.server.assembly.Target;
public class NotInstruction extends Instruction {
public static final int OPCODE = 29;
public NotInstruction() {
super("not", OPCODE);
}
@Override
public Status execute(Target dst, int dstIndex, Status status) {
dst.set(dstIndex, ~dst.get(dstIndex));
return status;
}
}

Binary file not shown.