diff --git a/Server/src/main/java/net/simon987/server/assembly/DefaultInstructionSet.java b/Server/src/main/java/net/simon987/server/assembly/DefaultInstructionSet.java index cd9aa3f..b7288a6 100755 --- a/Server/src/main/java/net/simon987/server/assembly/DefaultInstructionSet.java +++ b/Server/src/main/java/net/simon987/server/assembly/DefaultInstructionSet.java @@ -104,18 +104,9 @@ public class DefaultInstructionSet implements InstructionSet { return defaultInstruction; } } - /** - * Add a new instruction to the instructionSet - * - * @param opcode opcode of the instruction - * @param instruction Instruction to add + * Get an instruction from its mnemonic */ - public void addInstruction(int opcode, Instruction instruction) { - instructionMap.put(opcode, instruction); - } - - @Override public Instruction get(String mnemonic) { for (Instruction ins : instructionMap.values()) { @@ -131,7 +122,15 @@ public class DefaultInstructionSet implements InstructionSet { return null; } - + /** + * Add a new instruction to the instructionSet + * + * @param opcode opcode of the instruction + * @param instruction Instruction to add + */ + public void addInstruction(int opcode, Instruction instruction) { + instructionMap.put(opcode, instruction); + } @Override public void add(Instruction instruction) {