-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
61 lines (53 loc) · 1.65 KB
/
index.html
File metadata and controls
61 lines (53 loc) · 1.65 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Hack emulator written in javascript</title>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
<link rel="stylesheet" href="//cdn.rawgit.com/necolas/normalize.css/master/normalize.css">
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css">
</head>
<style>
#screen {
border: 1px solid;
}
.control {
cursor: pointer
}
#asm {
height: 200px;
width: 50%
}
#opcodes,
#milli {
max-width: 50%
}
</style>
<script>
// 24576 KBD
var cpu
</script>
<script src="./bundle.js"></script>
<body>
<div class="container">
<div class="row">
<div class="column">
<h3>Hack emulator</h3>
<canvas id="screen" width=512 height=256></canvas>
<div id="controls">
<span class="control" id="run">Run ▶</span>
<span class="control" id="stop">Stop ⏸</span>
<span id="numOpcodes">0</span><b> Cycles</b>
</div>
<form>
<label for="opcodes">Opcodes</label>
<input type="text" id="opcodes" value="50000">
<label for="opcodes">Per milli seconds</label>
<input type="text" id="milli" value="100">
<label for="asm">Assemble code (e.g. Copy and insert <a href="pong.txt">Pong</a>)</label>
<textarea id="asm"></textarea>
</form>
</div>
</div>
</div>
</body>
</html>