UI support for loading hex string data
This commit is contained in:
34
index.html
34
index.html
@@ -9,6 +9,11 @@
|
||||
font-family: monospace;
|
||||
font-size: 14px;
|
||||
}
|
||||
hr {
|
||||
border-top: #ccc solid 1px;
|
||||
height: 0;
|
||||
margin: 10px 0 10px 0;
|
||||
}
|
||||
div {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
@@ -23,6 +28,11 @@
|
||||
margin: 0 13px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
.comments {
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
line-height: 14px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -54,6 +64,17 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<p>
|
||||
<input id="data" type="text" size="60">
|
||||
<input type="button" value="LOAD DATA" onclick="loadData();">
|
||||
</p>
|
||||
<pre class="comments">
|
||||
Examples - binary data of simple programs:
|
||||
db ff d3 ff c3 00 00 // Switch echo between A2 and A1.
|
||||
3e 8c d3 ff 0f c3 02 00 // Pattern shift.</pre>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>LEDs: <!-- ● - on. ○ - off. -->
|
||||
<div id="status-leds">
|
||||
<p>
|
||||
@@ -203,14 +224,19 @@
|
||||
sim.powerOff();
|
||||
}
|
||||
|
||||
function loadData() {
|
||||
var data = document.getElementById("data").value;
|
||||
sim.loadDataAsHexString(0, data);
|
||||
}
|
||||
|
||||
function run() {
|
||||
// Switch echo between A2 and A1.
|
||||
// sim.loadDataAsHexString(0, 'db ff d3 ff c3 00 00');
|
||||
// Pattern shift.
|
||||
sim.loadDataAsHexString(0, '3e 8c d3 ff 0f c3 02 00');
|
||||
sim.start();
|
||||
}
|
||||
|
||||
function singleStep() {
|
||||
sim.step(1);
|
||||
}
|
||||
|
||||
function stop() {
|
||||
sim.stop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user