mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-29 16:01:19 -04:00
correct code address is returned to assembler if a von Neumann cpu is simulated.
This commit is contained in:
parent
b46f71f01b
commit
a90052b2d3
@ -81,9 +81,6 @@ public class ROM extends Node implements Element {
|
|||||||
public void readInputs() throws NodeException {
|
public void readInputs() throws NodeException {
|
||||||
addr = (int) addrIn.getValue();
|
addr = (int) addrIn.getValue();
|
||||||
sel = selIn.getBool();
|
sel = selIn.getBool();
|
||||||
if (sel) {
|
|
||||||
romAddr = addr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -107,6 +104,11 @@ public class ROM extends Node implements Element {
|
|||||||
throw new NodeException(e.getMessage(), this, null);
|
throw new NodeException(e.getMessage(), this, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (isProgramMemory)
|
||||||
|
model.addObserver(event -> {
|
||||||
|
if (event == ModelEvent.STEP && sel)
|
||||||
|
romAddr = addr;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user