-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
128 lines (125 loc) · 5.4 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
<!DOCTYPE html>
<html>
<head>
<title>Papiercomputer</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<link href="main.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-light bg-faded" id="navigation">
<a class="navbar-brand" href="#">Papiercomputer</a>
</nav>
<div class="container">
<div class="menu">
<table><tr>
<td><button type="button" class="btn btn-success" id="stepButton" onclick="step();">Step</button></td>
<td><button type="button" class="btn btn-success" id="runButton" onclick="run();">Run</button></td>
<td><button type="button" class="btn btn-success" id="pauseButton" onclick="pause();">Pause</button></td>
<td><button type="button" class="btn btn-success" id="resumeButton" onclick="resume();">Resume</button></td>
<td><button type="button" class="btn btn-success" id="stopButton" onclick="stop();">Stop</button></td>
<td><button type="button" class="btn btn-success" id="resetButton" onclick="reset();">Reset</button></td>
<td><label>Schrittweite:</label></td>
<td><input type="number" min=0 value=500 id="delay" class="form-control" style="width: 150px;" /></td>
<td>ms</td>
<!--Status: Aus-->
<td><button type="button" class="btn btn-success" onclick="reload();">Clear</button></td>
<td><button type="button" class="btn btn-success" onclick="document.getElementById('file-input').click();">Load</button></td>
<td><input id="file-input" type="file" name="name" style="display: none;" /><button type="button" class="btn btn-success" onclick="download()">Save</button></td>
</tr></table>
</div>
<div class="arrow"><---</div>
<table id="main">
<thead>
<tr>
<th>Instruction</th>
<th>Address</th>
<th>Line-#</th>
<th>Instruction-Pointer</th>
</tr>
</thead>
<tbody><tr class="instruction">
<td class="command_col">
<select class="command form-control">
<option value=-1 selected="selected"></option>
<option value=0>isz</option>
<option value=1>inc</option>
<option value=2>dec</option>
<option value=3>jmp</option>
<option value=4>stp</option>
</select>
</td>
<td class="address_col">
<input type="number" min=0 class="address form-control"/>
</td>
<td class="line_col">0</td>
<td class="pointer_col"> </td>
</tr><tr class="instruction">
<td class="command_col">
<select class="command form-control">
<option value=-1 selected="selected"></option>
<option value=0>isz</option>
<option value=1>inc</option>
<option value=2>dec</option>
<option value=3>jmp</option>
<option value=4>stp</option>
</select>
</td>
<td class="address_col">
<input type="number" min=0 class="address form-control"/>
</td>
<td class="line_col">1</td>
<td class="pointer_col"> </td>
</tr><tr class="instruction">
<td class="command_col">
<select class="command form-control">
<option value=-1 selected="selected"></option>
<option value=0>isz</option>
<option value=1>inc</option>
<option value=2>dec</option>
<option value=3>jmp</option>
<option value=4>stp</option>
</select>
</td>
<td class="address_col">
<input type="number" min=0 class="address form-control"/>
</td>
<td class="line_col">2</td>
<td class="pointer_col"> </td>
</tr><tr class="instruction">
<td class="command_col">
<select class="command form-control">
<option value=-1 selected="selected"></option>
<option value=0>isz</option>
<option value=1>inc</option>
<option value=2>dec</option>
<option value=3>jmp</option>
<option value=4>stp</option>
</select>
</td>
<td class="address_col">
<input type="number" min=0 class="address form-control"/>
</td>
<td class="line_col">3</td>
<td class="pointer_col"> </td>
</tr><tr class="instruction">
<td class="command_col">
<select class="command form-control">
<option value=-1 selected="selected"></option>
<option value=0>isz</option>
<option value=1>inc</option>
<option value=2>dec</option>
<option value=3>jmp</option>
<option value=4>stp</option>
</select>
</td>
<td class="address_col">
<input type="number" min=0 class="address form-control"/>
</td>
<td class="line_col">4</td>
<td class="pointer_col"> </td></tr></tbody></table>
<table id="registers">
<tr><td>Register 0: </td><td><input type="number" min=0 id="reg0" class="register form-control"/></td></tr><tr><td>Register 1: </td><td><input type="number" min=0 id="reg1" class="register form-control"/></td></tr><tr><td>Register 2: </td><td><input type="number" min=0 id="reg2" class="register form-control"/></td></tr><tr><td>Register 3: </td><td><input type="number" min=0 id="reg3" class="register form-control"/></td></tr><tr><td>Register 4: </td><td><input type="number" min=0 id="reg4" class="register form-control"/></td></tr><tr><td>Register 5: </td><td><input type="number" min=0 id="reg5" class="register form-control"/></td></tr><tr><td>Register 6: </td><td><input type="number" min=0 id="reg6" class="register form-control"/></td></tr><tr><td>Register 7: </td><td><input type="number" min=0 id="reg7" class="register form-control"/></td></tr></table>
<script src="./script.js"></script>
</div>
</body>
</html>