use of com.rox.emu.processor.mos6502.util.Mos6502Compiler in project emuRox by rossdrew.
the class Mos6502CompilerTest method testRelativeNavigationForwards.
@Test
public void testRelativeNavigationForwards() {
final Mos6502Compiler compiler = new Mos6502Compiler("SEC BCS MyLabel NOP MyLabel: SED");
final int[] expectedResult = new int[] { OpCode.SEC.getByteValue(), OpCode.BCS.getByteValue(), 0b00000001, OpCode.NOP.getByteValue(), OpCode.SED.getByteValue() };
final Program program = compiler.compileProgram();
final int[] actualResult = program.getProgramAsByteArray();
assertTrue("Expected " + Arrays.toString(expectedResult) + ", got " + Arrays.toString(actualResult), Arrays.equals(actualResult, expectedResult));
}
Aggregations