Package br.com.gmartins.simbler.instructions

Examples of br.com.gmartins.simbler.instructions.Instruction


        // MATCHES MUL AX, MUL DX
        //REGEX[2] - "MUL [ABCD]X"

        if (RegexMatcher.matches(regex0, getCurrentInstruction().getLineCommand())) {
            // Pega o comando na posição definida pelo numero após o @
            Instruction dest = getInstructionAt(getCurrentInstruction().getValue().toInteger());
            // Multiplica o valor definido no ADD com o valor atual de AX
            Value value = ALU.mul(getRegisters().getAx().getValue(), dest.getValue());
            // Define em AX o novo valor.
            getRegisters().getAx().setValue(value);
        } else if (RegexMatcher.matches(regex1, getCurrentInstruction().getLineCommand())) {
            // Multiplica o valor definido no ADD com o valor atual de AX
            Value value = ALU.mul(getRegisters().getAx().getValue(), getCurrentInstruction().getValue());
View Full Code Here




        if (RegexMatcher.matches(regex0, getCurrentInstruction().getLineCommand())) {
            // Pega o comando na posição definida pelo numero após o @
            Instruction dest = getInstructionAt(getCurrentInstruction().getValue());
            // Define em AX o novo valor.
            getRegisters().getAx().setValue(dest.getValue());
        } else if (RegexMatcher.matches(regex1, getCurrentInstruction().getLineCommand())) {
            // Pega o comando na posição definida no registrador especificado.
            Instruction dest = getInstructionAt(getCurrentInstruction().getRegister().toInteger());
            // Define o novo valor no AX
            getRegisters().getAx().setValue(dest.getValue());
        } else if (RegexMatcher.matches(regex2, getCurrentInstruction().getLineCommand())) {
            // Define o novo valor em AX
            getMainPanel().getRegisterManager().getAx().setValue(getCurrentInstruction().getValue());
        } else if (RegexMatcher.matches(regex3, getCurrentInstruction().getLineCommand())) {
            // Pega o valor do registrador definido no comando
View Full Code Here

TOP

Related Classes of br.com.gmartins.simbler.instructions.Instruction

Copyright © 2018 www.massapicom. 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.