init code for 8800 simulator, with a simple temporary test code in index.html

This commit is contained in:
Yonggang Wang
2020-03-06 12:36:30 +08:00
parent 00a6a5ccdd
commit dd9c51125c
2 changed files with 133 additions and 0 deletions

29
index.html Normal file
View File

@@ -0,0 +1,29 @@
<!doctype html>
<html>
<head>
</head>
<body onload="test();">
<h1>test</h1>
<div id="dump"></div>
<script src="js/8080.js"></script>
<script src="js/sim8800.js"></script>
<script>
function test() {
var sim = new Sim8800(256, 100000);
var dumpElem = document.getElementById('dump');
sim.dumpMem(dumpElem);
var writeFunc = sim.getWriteByteCallback();
var readFunc = sim.getReadByteCallback();
var i = readFunc(256);
writeFunc(256, 16);
i = readFunc(256);
sim.dumpMem(dumpElem);
}
</script>
</body>
</html>