This commit is contained in:
Brent O'Neil
2017-12-30 02:10:14 +11:00
8 changed files with 64 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ import net.simon987.server.logging.LogManager;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
/**
@@ -144,6 +145,9 @@ public class Assembler {
//Handle DUP operator
if (valueTokens.length == 2 && valueTokens[1].toUpperCase().contains("DUP(")) {
out.write(parseDUPOperator16(valueTokens, labels, currentLine));
} else if (value.startsWith("\"") && value.endsWith("\"")) {
//Handle string
out.write(value.substring(1, value.length() - 1).getBytes(StandardCharsets.UTF_16));
} else if (labels != null && labels.containsKey(value)) {
//Handle label
out.writeChar(labels.get(value));

View File

@@ -44,7 +44,7 @@ public class CPU implements JSONSerialisable {
/**
* Offset of the code segment. The code starts to get
* executed at this address each tick. Defaults to 0x4000
* executed at this address each tick. Defaults to org_offset@config.properties
*/
private int codeSegmentOffset;

View File

@@ -1,4 +0,0 @@
package net.simon987.server.event;
public class TickEvent {
}

View File

@@ -1,4 +0,0 @@
package net.simon987.server.event;
public class UpdateEvent {
}