fix operandValid check; remove unused import;

This commit is contained in:
Kevin Ramharak 2019-01-23 10:08:15 +01:00
parent 9cb2c29f0f
commit 311889bc93

View File

@ -10,7 +10,6 @@ import net.simon987.server.assembly.MachineCode;
import net.simon987.server.assembly.exception.AssemblyException;
import net.simon987.server.assembly.exception.IllegalOperandException;
import net.simon987.server.assembly.exception.InvalidMnemonicException;
import net.simon987.server.logging.LogManager;
import java.io.ByteArrayOutputStream;
@ -156,6 +155,11 @@ public class SetccInstruction extends Instruction {
return false;
}
@Override
public boolean operandValid(Operand o1) {
return o1.getType() != OperandType.IMMEDIATE16;
}
/**
* Encodes the instruction. Writes the result in the outputStream.
* Needs one operand of OperandType.REGISTER or OperandType.MEMORY_REG16