Whitespace and indentation canonicalization. That's what I get for using two editors.
This commit is contained in:
1 parent
d54ad18b17
commit
8bcd8a4a75
18 files changed
+5249
-5250
No files matched your search
@@ -7,33 +7,33 @@ import com.loomcom.symon.exceptions.*;
|
||||
|
||||
public class Memory extends Device {
|
||||
|
||||
private boolean readOnly;
|
||||
private int[] mem;
|
||||
private boolean readOnly;
|
||||
private int[] mem;
|
||||
|
||||
public Memory(int address, int size, boolean readOnly)
|
||||
throws MemoryRangeException {
|
||||
super(address, size, "RW Memory");
|
||||
this.readOnly = readOnly;
|
||||
this.mem = new int[size];
|
||||
// Initialize all locations to 0xff
|
||||
Arrays.fill(this.mem, 0xff);
|
||||
}
|
||||
public Memory(int address, int size, boolean readOnly)
|
||||
throws MemoryRangeException {
|
||||
super(address, size, "RW Memory");
|
||||
this.readOnly = readOnly;
|
||||
this.mem = new int[size];
|
||||
// Initialize all locations to 0xff
|
||||
Arrays.fill(this.mem, 0xff);
|
||||
}
|
||||
|
||||
public Memory(int address, int size)
|
||||
throws MemoryRangeException {
|
||||
this(address, size, false);
|
||||
}
|
||||
public Memory(int address, int size)
|
||||
throws MemoryRangeException {
|
||||
this(address, size, false);
|
||||
}
|
||||
|
||||
public void write(int address, int data) {
|
||||
this.mem[address] = data;
|
||||
}
|
||||
public void write(int address, int data) {
|
||||
this.mem[address] = data;
|
||||
}
|
||||
|
||||
public int read(int address) {
|
||||
return this.mem[address];
|
||||
}
|
||||
public int read(int address) {
|
||||
return this.mem[address];
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "Memory: " + getMemoryRange().toString();
|
||||
}
|
||||
public String toString() {
|
||||
return "Memory: " + getMemoryRange().toString();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user