adjust source code so all instructions use the same patterns

This commit is contained in:
Kevin Ramharak 2019-01-14 18:32:27 +01:00
parent 1d3d441996
commit c5a34c7a3f
4 changed files with 8 additions and 4 deletions

View File

@ -9,8 +9,10 @@ import net.simon987.server.assembly.Status;
*/
public class BrkInstruction extends Instruction {
public static final int OPCODE = 0;
public BrkInstruction() {
super("brk", 0);
super("brk", OPCODE);
}
@Override

View File

@ -7,7 +7,7 @@ import net.simon987.server.assembly.Util;
public class DecInstruction extends Instruction {
public static final int OPCODE = 0x2B;
public static final int OPCODE = 43;
public DecInstruction() {
super("dec", OPCODE);

View File

@ -7,7 +7,7 @@ import net.simon987.server.assembly.Util;
public class IncInstruction extends Instruction {
public static final int OPCODE = 0x2A;
public static final int OPCODE = 43;
public IncInstruction() {
super("inc", OPCODE);

View File

@ -8,7 +8,9 @@ import net.simon987.server.assembly.Instruction;
*/
public class NopInstruction extends Instruction {
public static final int OPCODE = 63;
public NopInstruction() {
super("nop", 63);
super("nop", OPCODE);
}
}