projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switched to using logical U for mnemonic X to avoid glitches in Am2900
[Mograsim.git]
/
plugins
/
net.mograsim.machine
/
src
/
net
/
mograsim
/
machine
/
mi
/
MicroInstructionMemoryParser.java
diff --git
a/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/MicroInstructionMemoryParser.java
b/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/MicroInstructionMemoryParser.java
index
b351ca7
..
3cf971a
100644
(file)
--- a/
plugins/net.mograsim.machine/src/net/mograsim/machine/mi/MicroInstructionMemoryParser.java
+++ b/
plugins/net.mograsim.machine/src/net/mograsim/machine/mi/MicroInstructionMemoryParser.java
@@
-6,6
+6,7
@@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
import net.mograsim.machine.mi.parameters.MicroInstructionParameter;
import net.mograsim.machine.mi.parameters.ParameterClassification;
import net.mograsim.machine.mi.parameters.MicroInstructionParameter;
import net.mograsim.machine.mi.parameters.ParameterClassification;
@@
-49,7
+50,7
@@
public class MicroInstructionMemoryParser
*/
public static void parseMemory(final MicroInstructionMemory memory, InputStream input) throws IOException
{
*/
public static void parseMemory(final MicroInstructionMemory memory, InputStream input) throws IOException
{
- try (BufferedReader reader = new BufferedReader(new InputStreamReader(input)))
+ try (BufferedReader reader = new BufferedReader(new InputStreamReader(input
, StandardCharsets.UTF_8
)))
{
MicroInstructionMemoryDefinition def = memory.getDefinition();
MicroInstructionDefinition miDef = def.getMicroInstructionDefinition();
{
MicroInstructionMemoryDefinition def = memory.getDefinition();
MicroInstructionDefinition miDef = def.getMicroInstructionDefinition();
@@
-99,7
+100,7
@@
public class MicroInstructionMemoryParser
}
catch (Exception e)
{
}
catch (Exception e)
{
- throw new MicroInstructionMemoryParseException(e
.getCause()
);
+ throw new MicroInstructionMemoryParseException(e);
}
}
}
}
@@
-129,7
+130,8
@@
public class MicroInstructionMemoryParser
int val = instStream.read();
if (val == -1 && instIndex <= maxAddress)
{
int val = instStream.read();
if (val == -1 && instIndex <= maxAddress)
{
- instStream = new ByteArrayInputStream((toCSV(memory.getCell(instIndex++)) + lineSeparator).getBytes());
+ instStream = new ByteArrayInputStream(
+ (toCSV(memory.getCell(instIndex++)) + lineSeparator).getBytes(StandardCharsets.UTF_8));
val = instStream.read();
}
return val;
val = instStream.read();
}
return val;