Package br.com.gmartins.simbler.instructions

Examples of br.com.gmartins.simbler.instructions.Instruction.replaceValue()


            // Pega o comando na posição definida pelo numero após o @
            Instruction dest = getInstructionAt(getCurrentInstruction().getValue().toInteger());
            // Incrementa o valor em 1
            Value value = ALU.sum(dest.getValue(), ALU.decimal(1));
            // Substitui pelo novo valor
            dest.replaceValue(value, this.getMainPanel().getDataTypeInput().getDataType());
        } else if (RegexMatcher.matches(regex1, getCurrentInstruction().getLineCommand())) {
            // Incrementa o valor em 1
            Value value = ALU.sum(getCurrentInstruction().getRegister().getValue(), ALU.decimal(1));
            // Atribui o novo valor ao registrador especificado
            getCurrentInstruction().getRegister().setValue(value);
View Full Code Here


            // Pega o comando na posição definida pelo numero após o @
            Instruction dest = getInstructionAt(getCurrentInstruction().getValue().toInteger());
            // Decrementa o valor em 1
            Value value = ALU.sub(dest.getValue(), ALU.decimal(1));
            // Substitui pelo novo valor
            dest.replaceValue(value, this.getMainPanel().getDataTypeInput().getDataType());
        } else if (RegexMatcher.matches(regex1, getCurrentInstruction().getLineCommand())) {
            // Decrementa o valor em 1
            Value value = ALU.sub(getCurrentInstruction().getRegister().getValue(), ALU.decimal(1));
            // Atribui o novo valor ao registrador especificado
            getCurrentInstruction().getRegister().setValue(value);
View Full Code Here

        if (RegexMatcher.matches(regex0, getCurrentInstruction().getLineCommand())) {
            // Pega o comando onde o valor deverá ser gravado
            Instruction dest = getInstructionAt(getCurrentInstruction().getValue());
            // Substitui o valor atual pelo valor de AX
            dest.replaceValue(getRegisters().getAx().getValue(), this.getMainPanel().getDataTypeInput().getDataType());
        } else if (RegexMatcher.matches(regex1, getCurrentInstruction().getLineCommand())) {
            // Pega o comando onde o valor deverá ser gravado
            Instruction dest = getInstructionAt(getCurrentInstruction().getRegister().getValue());
            // Substitui o valor atual pelo valor de AX
            dest.replaceValue(getRegisters().getAx().getValue(), this.getMainPanel().getDataTypeInput().getDataType());
View Full Code Here

            dest.replaceValue(getRegisters().getAx().getValue(), this.getMainPanel().getDataTypeInput().getDataType());
        } else if (RegexMatcher.matches(regex1, getCurrentInstruction().getLineCommand())) {
            // Pega o comando onde o valor deverá ser gravado
            Instruction dest = getInstructionAt(getCurrentInstruction().getRegister().getValue());
            // Substitui o valor atual pelo valor de AX
            dest.replaceValue(getRegisters().getAx().getValue(), this.getMainPanel().getDataTypeInput().getDataType());
        } else if (RegexMatcher.matches(regex2, getCurrentInstruction().getLineCommand())) {
            // Define no registrador especificado pelo STORE [ABC]X o valor atual de AX.
           
            getCurrentInstruction().getRegister().setValue(getRegisters().getAx().getValue());
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.