mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-12-12 22:38:54 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
package net.simon987.server.event;
|
||||
|
||||
public class TickEvent {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package net.simon987.server.event;
|
||||
|
||||
public class UpdateEvent {
|
||||
}
|
||||
Reference in New Issue
Block a user