examine and examineNext logic

This commit is contained in:
wixette
2020-03-07 01:26:25 +08:00
parent 6dc3f05734
commit ae735688e6
2 changed files with 53 additions and 3 deletions

View File

@@ -211,6 +211,17 @@ db ff d3 ff c3 00 00 // Switch echo between A2 and A1.
dumpMemElem.innerHTML = dumpHtml;
}
function getInputWord() {
var word = 0;
for (let i = 0; i < 16; i++) {
var switchElem = document.getElementById('s' + i);
if (switchElem.checked) {
word |= 1 << i;
}
}
return word;
}
var sim = new Sim8800(256, 1000000,
setAddressLedsCallback, setDataLedsCallback,
setWaitLedCallback, setStatusLedsCallback,
@@ -244,6 +255,15 @@ db ff d3 ff c3 00 00 // Switch echo between A2 and A1.
function stop() {
sim.stop();
}
function examine() {
var address = getInputWord();
sim.examine(address);
}
function examineNext() {
sim.examineNext();
}
</script>
</body>
</html>