static void Decode() { int address = TEXT_SECTION_START; while (_memory.Read(address).Any(x => x != 0)) { byte[] bytes = _memory.Read(address); InstructionDecoder.PrintInstruction(bytes); address += 4; } }
private void Lw(Instruction_I instruction) { int register = _registers.Read(instruction.RS).AsInt(); int address = register + instruction.Immediate; var word = _memory.Read(address).Reverse().ToArray(); _registers.Write(instruction.RT, word); }