-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.html
179 lines (161 loc) · 3.58 KB
/
index.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!doctype html>
<style>
.spacerheader {
width: 30px;
}
.spacerrow {
height: 30px;
}
#status {
padding-top: 10px;
width: 440px;
}
#codetext::selection {
background: #b4b4b4;
}
/*
#control, #control td {
border: 1px solid black;
}
*/
#codeLabels {
table-layout: fixed;
}
#cpuState {
font-family: "Lucida Console", Courier, monospace;
table-layout: fixed;
}
#ram {
font-family: "Lucida Console", Courier, monospace;
table-layout: fixed;
}
#flags {
font-family: "Lucida Console", Courier, monospace;
table-layout: fixed;
}
#labels {
font-family: "Lucida Console", Courier, monospace;
table-layout: fixed;
}
#ram td {
padding: 2px;
}
#cpuState tr td {
min-width: 40px;
}
#flags td {
min-width: 40px;
}
td.labelName {
background-color: #f3dcfa;
font-weight: bold;
min-width: 120px;
}
td.regName {
background-color: #ffffc1;
font-weight: bold;
text-align: right;
}
td.ramHeader {
background-color: #cde9fa;
font-weight: bold;
text-align: right;
}
td.flagHeader {
background-color: #feeeb6;
font-weight: bold;
text-align: right;
}
.headerRow {
text-align: center;
font-weight: bold;
}
/*
#cpuState, #cpuState td {
border: 1px solid black;
}
*/
</style>
<body>
<table id="control">
<tr>
<td>
<button id="run" title="Run the program untill it reaches given steps.">Run</button> Max steps: <input size="6" id="maxsteps"></input>
<button id="prev" title="Go backward in time for a single machine instruction.">Step prev</button>
<button id="next" title="Execute a single machine instruction from current step.">Step next</button>
</td>
<td class="spacerheader"></td>
<td>Code sample:</td>
<td>
<select id="samples" name="samples">
</select>
</td>
<td><button id="setsample">Set</button></td>
</tr>
<tr>
<td colspan="2"><div id="status"></div></td>
</tr>
</table>
<hr/>
<table id="main">
<tr>
<th>Code</th>
<th class="spacerheader"></th>
<th>CPU State</th>
</tr>
<tr>
<td>
<table id="codeLabels">
<tr>
<td>
<textarea id="codetext" name="codetext" rows="36" cols="60" spellcheck="false"></textarea>
</td>
<tr class="spacerrow"></tr>
<tr>
<td class="headerRow">Labels</td>
</tr>
<tr>
<td>
<table id="labels"></table>
</td>
</tr>
</table>
</td>
<td></td>
<td style="vertical-align: top;">
<table>
<tr>
<td><div><table id="cpuState"></table></div></td>
</tr>
<tr class="spacerrow">
</tr>
<tr class="headerRow">
<td>Flags</td>
</tr>
<tr>
<td><table id="flags"></table></td>
</tr>
<tr class="spacerrow">
</tr>
<tr class="headerRow">
<td>RAM
<select id="ramshowmode" name="ramshowmode">
<option value="Hex">Hex</option>
<option value="ASCII">ASCII</option>
</select>
</td>
</tr>
<tr>
<td><table id="ram"></table></td>
</tr>
<tr class="headerRow">
<td>From address (hex): <input size="4" id="ramstart"></input><button id="showramstart">Show</button></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Include bundle. This exports a global symbol for accessing js8080sim -->
<script src="js8080simBundle.js"></script>
<script src="ui.js"></script>
</body>