-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
60 lines (53 loc) · 2.54 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>LC-3 Virtual Machine</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/xterm/3.10.1/xterm.min.css" />
<link rel="stylesheet" href="css/main.css" />
</head>
<body>
<div id="container">
<div id="intro">
<h1>lc3sim-js</h1>
<p>lc3sim-js is a JavaScript implementation of the LC-3 virtual machine, an educational computer architecture.</p>
</div>
<div id="programs">
<h3>Programs</h3>
<p>Although lc3sim-js is capable of running any valid LC-3 program, this demo includes just two sample games:</p>
<p>
<button onclick="restartAndLoad(lc3_2048);">2048</button>
<button onclick="restartAndLoad(lc3_rogue);">Rogue</button>
</p>
</div>
<div id="terminal"></div>
<div id="controls">
<h3>Controls:</h3>
<p>Any keys that are pressed while the terminal is focused will be forwarded to the VM.</p>
<p>
On mobile (or devices with a touch screen), swiping on the terminal will simulate WASD key presses.
To send keys other than this, you can tap anywhere in the terminal to manually focus the terminal and open a keyboard.
</p>
</div>
<div id="more-information">
<h3>More Information</h3>
<p>Source code is available on GitHub at <a href="https://github.com/rpendleton/lc3sim-js">rpendleton/lc3sim-js</a>.</p>
<p>
This project is based on a tutorial written by my friend and me.
If you're interested in writing your own VM (or just want to learn more about the project), you can
<a href="https://www.jmeiners.com/lc3-vm/">find the tutorial here</a>.
</p>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/3.10.1/xterm.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/3.10.1/addons/fit/fit.min.js"></script>
<script src="obj/lc3os.js"></script>
<script src="obj/2048.js"></script>
<script src="obj/rogue.js"></script>
<script src="js/vm.js"></script>
<script src="js/main.js"></script>
</body>
</html>