Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Jacob Swehla
2017-12-29 10:06:20 -06:00
9 changed files with 68 additions and 17 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

@@ -15,9 +15,8 @@ import java.util.HashMap;
*/
public class AssemblyResult {
/**
* The origin of the program, default is 0x400
* The origin of the program, default is 0x200
*/
public int origin;
/**
@@ -34,7 +33,7 @@ public class AssemblyResult {
*/
private int codeSegmentOffset;
/**
* Line of the code segment definition (for editor icons)
* Line of the code segment definition
*/
private int codeSegmentLine;
@@ -44,11 +43,11 @@ public class AssemblyResult {
*/
public byte[] bytes;
/**
* Offset of the data segment, default is 0x4000
* Offset of the data segment
*/
private int dataSegmentOffset;
/**
* Line of the data segment definition (for editor icons)
* Line of the data segment definition
*/
private int dataSegmentLine;
/**

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 {
}