Update to address issue #101

This commit is contained in:
Josh 2018-01-03 18:36:18 +11:00 committed by GitHub
parent 415500faa9
commit 5a994fe437
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,10 +18,11 @@ public class CubotComPort extends CpuHardware {
private Cubot cubot;
private static final int COMPORT_SELF_CLEAR = 0;
private static final int COMPORT_BUFFER_CLEAR = 0;
private static final int COMPORT_POLL = 1;
private static final int COMPORT_FRONT_PORT_OUT = 2;
private static final int COMPORT_SELF_OUT = 3;
private static final int COMPORT_CONSOLE_CLEAR = 4;
public CubotComPort(Cubot cubot) {
this.cubot = cubot;
@ -34,9 +35,12 @@ public class CubotComPort extends CpuHardware {
int a = getCpu().getRegisterSet().getRegister("A").getValue();
if (a == COMPORT_SELF_CLEAR) {
if (a == COMPORT_BUFFER_CLEAR) {
cubot.getConsoleMessagesBuffer().clear();
} else if (a == COMPORT_CONSOLE_CLEAR) {
cubot.setConsoleMode(Cubot.ConsoleMode.CLEAR);
} else if (a == COMPORT_POLL) {