mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-19 18:46:43 +00:00
add operand constructors for easier testing
This commit is contained in:
parent
b19eb0568d
commit
e8033f3291
@ -36,6 +36,16 @@ public class Operand {
|
|||||||
*/
|
*/
|
||||||
private int data = 0;
|
private int data = 0;
|
||||||
|
|
||||||
|
public Operand(OperandType type, int value) {
|
||||||
|
this.type = type;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Operand(OperandType type, int value, int data) {
|
||||||
|
this(type, value);
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an Operand from text. It assumes that the numerical values that can't be
|
* Create an Operand from text. It assumes that the numerical values that can't be
|
||||||
* parsed are labels that are not defined yet.
|
* parsed are labels that are not defined yet.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user