1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-27 19:50:10 +00:00

Working on fixing problem with encoding of literal chars. 1/3 done. #245

This commit is contained in:
jespergravgaard 2019-08-03 13:32:34 +02:00
parent 198280e1c8
commit 7f3cfd50af
4 changed files with 6 additions and 4 deletions

View File

@ -8,6 +8,7 @@ import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.TargetPlatform;
import kickass.KickAssembler;
import kickass.nonasm.c64.CharToPetsciiConverter;
import picocli.CommandLine;
import java.io.*;
@ -262,7 +263,7 @@ public class KickC implements Callable<Void> {
System.setOut(new PrintStream(kasmLogOutputStream));
int kasmResult = -1;
try {
//CharToPetsciiConverter.setCurrentEncoding("screencode_mixed");
CharToPetsciiConverter.setCurrentEncoding("screencode_mixed");
kasmResult = KickAssembler.main2(assembleCommand);
} catch(Throwable e) {
throw new CompileError("KickAssembling file failed! ", e);

View File

@ -83,7 +83,7 @@ public class Pass5FixLongBranches extends Pass5AsmOptimization {
System.setOut(new PrintStream(kickAssOut));
int asmRes = -1;
try {
//CharToPetsciiConverter.setCurrentEncoding("screencode_mixed");
CharToPetsciiConverter.setCurrentEncoding("screencode_mixed");
asmRes = KickAssembler.main2(new String[]{asmFile.getAbsolutePath(), "-o", asmPrgFile.getAbsolutePath()});
} catch(Throwable e) {
if(e instanceof AssertionError && e.getMessage().contains("Invalid number of bytes in memblock!")) {

View File

@ -1,6 +1,7 @@
package dk.camelot64.kickc.test;
import kickass.KickAssembler;
import kickass.nonasm.c64.CharToPetsciiConverter;
import org.junit.Test;
import java.io.*;
@ -22,7 +23,7 @@ public class TestKickAssRun {
ByteArrayOutputStream kickAssOut = new ByteArrayOutputStream();
System.setOut(new PrintStream(kickAssOut));
try {
//CharToPetsciiConverter.setCurrentEncoding("screencode_mixed");
CharToPetsciiConverter.setCurrentEncoding("screencode_mixed");
KickAssembler.main2(new String[]{asmPath.toAbsolutePath().toString(), "-o", asmPrgFile.getAbsolutePath()});
} catch (AssertionError e) {
System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));

View File

@ -2810,7 +2810,7 @@ public class TestPrograms {
System.setOut(new PrintStream(kickAssOut));
int asmRes = -1;
try {
//CharToPetsciiConverter.setCurrentEncoding("screencode_mixed");
CharToPetsciiConverter.setCurrentEncoding("screencode_mixed");
asmRes = KickAssembler.main2(new String[]{asmFile.getAbsolutePath(), "-log", asmLogFile.getAbsolutePath(), "-o", asmPrgFile.getAbsolutePath(), "-vicesymbols", "-showmem", "-bytedump"});
} catch(Throwable e) {
fail("KickAssembling file failed! " + e.getMessage());