-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcpu.html
101 lines (98 loc) · 2 KB
/
cpu.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<style>
* {
font-family: courier;
font-size: 1em;
}
#left, #middle, #right, #right-2 {
display: inline-block;
position: relative;
}
#middle {
width: 3em;
}
#asm {
height: 25em;
}
#stackdump {
position: absolute:
top: 0;
left: 0;
}
</style>
<body>
<div id='left'>
<table>
<tr>
<td>b</td>
<td>c</td>
<td>d</td>
<td>e</td>
<td>h</td>
<td>l</td>
<td>a</td>
<td>f</td>
<td>sp</td>
<td>pc</td>
</tr>
<tr>
<td id='b'>0</td>
<td id='c'>0</td>
<td id='d'>0</td>
<td id='e'>0</td>
<td id='h'>0</td>
<td id='l'>0</td>
<td id='a'>0</td>
<td id='f'>0</td>
<td id='sp'>0</td>
<td id='pc'>0</td>
</tr>
</table>
<table>
<tr>
<td>s</td>
<td>z</td>
<td>a</td>
<td>p</td>
<td>c</td>
</tr>
<tr>
<td id='flag-s'>0</td>
<td id='flag-z'>0</td>
<td id='flag-a'>0</td>
<td id='flag-p'>0</td>
<td id='flag-c'>0</td>
</tr>
</table>
<table>
<tr>
<td>Address</td>
<td><input id='address' value='0'></input></td>
</tr>
</table>
<pre id='memdump'></pre>
<div>Instructions</div>
<pre id='idump'></pre>
<button id='step'>(s)tep</button>
<button id='toggle-run'>toggle (r)un</button>
<select id='program-list'>
</select>
</div>
<div id='middle'>
<pre id='stackdump'></pre>
</div>
<div id='right'>
<textarea id='asm' tabindex=1></textarea>
<pre id='asm-out'></pre>
<button id='asm-run'>assemble (shift+CR)</button>
</div>
<div id='right-2'>
<canvas id='vidmem' width='128' height='128'></canvas>
</div>
</body>
<script>var module = {};</script>
<script src='asm_parser.js'></script>
<script>var parser = module.exports;</script>
<script src='asm.js'></script>
<script src='cpu.js'></script>
<script src='programs.js'></script>
<script src='ui.js'></script>