-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
71 lines (68 loc) · 2.14 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
<!DOCTYPE html>
<html>
<head>
<title>URM (unlimited register machine) evaluator</title>
<link href="ext/app-icon.png" rel="apple-touch-icon">
<link href="ext/style.css" rel="stylesheet" type="text/css">
<script src="ext/jquery.js" type="text/javascript"></script>
<script src="ext/urm-evaluator.js" type="text/javascript"></script>
<script src="ext/display-urm-evaluator.js" type="text/javascript"></script>
</head>
<body>
<noscript>
This page requires JavaScript to be enabled in order to work.
</noscript>
<h1 id="title">
<abbr title="Unlimited register machine">URM</abbr> evaluator
</h1>
<p id="about-link">(<a href="about.html">about</a>)</p>
<div id="instructions">
<h2>
Available
<a href="http://planetmath.org/encyclopedia/UnlimitedRegisterMachine.html">URM instructions</a>
</h2>
<dl>
<dt id="zero">Zero</dt>
<dd>
<i>Z</i>(<i>n</i>) sets <i>r<sub>n</sub></i> = 0
</dd>
<dt id="successor">Successor</dt>
<dd>
<i>S</i>(<i>n</i>) increments <i>r<sub>n</sub></i>, giving
<i>r<sub>n</sub></i> = <i>r<sub>n</sub></i> + 1
</dd>
<dt id="transfer">Transfer (copy)</dt>
<dd>
<i>T</i>(<i>m</i>, <i>n</i>) (or <i>C</i>(<i>m</i>, <i>n</i>))
sets <i>r<sub>n</sub></i> = <i>r<sub>m</sub></i>
</dd>
<dt id="jump">Jump</dt>
<dd>
<i>J</i>(<i>m</i>, <i>n</i>, <i>p</i>) jumps to
instruction <i>p</i> if <i>r<sub>m</sub></i>
= <i>r<sub>n</sub></i>
</dd>
</dl>
</div>
<div id="samples">
<h2>Sample programs</h2>
</div>
<form id="urm-evaluator">
<div id="registers">
<h2>Registers</h2>
</div>
<div id="program">
<h2>Program</h2>
<div id="parsed-program"><pre></pre></div>
<textarea id="input-program"></textarea>
</div>
</form>
<div id="output">
<h2>Output</h2>
<div id="results"></div>
</div>
<div id="byline">
<p>By <a href="http://sean.mcgivern.me.uk/">Sean McGivern</a></p>
</div>
</body>
</html>