-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·188 lines (164 loc) · 8.3 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
180
181
182
183
184
185
186
187
188
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="author" content="Thomas Magnusson" />
<!-- Bootstrap styling -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
crossorigin="anonymous">
<link rel="stylesheet" href="app.css" type="text/css" media="screen" />
<title>
Woodhouse - a subservient operating system
</title>
<!-- Globals CONSTANTS and _Variables. Must included be first. -->
<script type="text/javascript" src="distrib/globals.js"></script>
<!-- Host (Virtual Machine / Hardware Simulation) Routines -->
<script type="text/javascript" src="distrib/host/control.js"></script>
<script type="text/javascript" src="distrib/host/devices.js"></script>
<script type="text/javascript" src="distrib/host/cpu.js"></script>
<script type="text/javascript" src="distrib/host/memory.js"></script>
<script type="text/javascript" src="distrib/host/opcode.js"></script>
<!-- Virtual OS Routines: Make sure Kernel code is last, since it needs those above it. -->
<script type="text/javascript" src="distrib/os/interrupt.js"></script>
<script type="text/javascript" src="distrib/os/canvastext.js"></script>
<script type="text/javascript" src="distrib/os/console.js"></script>
<script type="text/javascript" src="distrib/os/deviceDriver.js"></script>
<script type="text/javascript" src="distrib/os/deviceDriverKeyboard.js"></script>
<script type="text/javascript" src="distrib/os/queue.js"></script>
<script type="text/javascript" src="distrib/os/shell.js"></script>
<script type="text/javascript" src="distrib/os/shellCommand.js"></script>
<script type="text/javascript" src="distrib/os/userCommand.js"></script>
<script type="text/javascript" src="distrib/os/memoryGuardian.js"></script>
<script type="text/javascript" src="distrib/os/segment.js"></script>
<script type="text/javascript" src="distrib/os/scheduler.js"></script>
<script type="text/javascript" src="distrib/os/processControlBlock.js"></script>
<script type="text/javascript" src="distrib/os/kernel.js"></script>
<!-- Other Routines -->
<script type="text/javascript" src="distrib/utils.js"></script>
<!-- Uncomment the line below to enable GLaDOS testing. -->
<script type="text/javascript" src="http://alanclasses.github.io/TSOS/test/glados-ip2.js"></script>
</head>
<body onload="onDocumentLoad()" class="bg-dark">
<nav class="navbar sticky-top navbar-light bg-light">
<div id="buttons">
<button type="button" id="btnStartOS" name="brnStartOS" class="btn btn-primary" tabindex="0" onclick="TSOS.Control.hostBtnStartOS_click(this);">Start</button>
<button type="button" id="btnHaltOS" name="brnHaltOS" class="btn btn-danger" disabled="disabled" tabindex="1"
onclick="TSOS.Control.hostBtnHaltOS_click(this);">
Halt</button>
<button type="button" id="btnReset" name="brnReset" class="btn btn-secondary" disabled="disabled" tabindex="3"
onclick="TSOS.Control.hostBtnReset_click(this);">Reset</button>
</div>
<div id="singleStep" style="display:flex">
<button data-state="off" type="button" id="btnStepToggle" class="btn btn-outline-info" onclick="TSOS.Control.onToggleStep(this)">Toggle
Step</button>
<button type="button" id="btnStepOS" class="btn btn-outline-dark" disabled style="margin-left:20px" onclick="TSOS.Control.onStep(this)">Step</button>
</div>
<p class="text-muted" style="margin-bottom:0" class="text-overflow"><strong>Status:</strong> <span id="status"></span></p>
<p class="text-muted" style="margin-bottom:0; float:right"><code id="date" class="monospace">--/--/---- -:--:-- --</code></p>
</nav>
<div id="divMain" style="width:100%;">
<div class="left">
<label class="text-light">Console</label>
<div id="divConsole" class="bg-light" style="width:500px; height:500px;">
<canvas id="display" width="500px" height="500px" tabindex="3">
</canvas>
</div>
</div>
<div class="center">
<div id="divLog" style="display:flex; flex-direction: column; ">
<label class="text-light">
Host Log
</label>
<textarea name="taHostLog" id="taHostLog" rows="10" cols="48"></textarea>
</div>
<div id="divUserProgramInput" style="margin-top: 20px">
<label class="text-light">
User Program Input
</label>
<textarea name="taProgramInput" id="taProgramInput" rows="8" cols="48">A9 03 8D 41 00 A9 01 8D 40 00 AC 40 00 A2 01 FF EE 40 00 AE 40 00 EC 41 00 D0
EF A9 44 8D 42 00 A9 4F 8D 43 00 A9 4E 8D 44 00 A9 45 8D 45 00 A9 00 8D 46 00
A2 02 A0 42 FF 00</textarea>
</div>
</div>
<div class="right">
<label class="text-light">Memory</label>
<div class="memory">
<table class="table table-dark">
<tbody>
</tbody>
</table>
</div>
<div class="cpu-group">
<label class="text-light">CPU</label>
<div class="cpu">
<table class="table table-light text-dark text-center">
<thead>
<th>Counter</th>
<th>Instruction</th>
<th>Accumulator</th>
<th>X</th>
<th>Y</th>
<th>Z</th>
</thead>
<tbody>
<tr scope="row">
<td id="cpuCounter">
</td>
<td id="cpuInstruction">
</td>
<td id="cpuAccumulator">
</td>
<td id="cpuX">
</td>
<td id="cpuY">
</td>
<td id="cpuZ">
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="pcb-group" style="grid-column: 2">
<label class="text-light">PCB</label>
<div class="pcb">
<table class="table table-light text-dark text-center">
<thead>
<th>PID</th>
<th>State</th>
<th>Base</th>
<th>Limit</th>
<th>Counter</th>
<th>Instruction</th>
<th>Accumulator</th>
<th>X</th>
<th>Y</th>
<th>Z</th>
</thead>
<tbody>
<tr scope="row">
<td id="pcbPID"></td>
<td id="pcbState"></td>
<td id="pcbBase"></td>
<td id="pcbLimit"></td>
<td id="pcbCounter">
</td>
<td id="pcbInstruction">
</td>
<td id="pcbAccumulator">
</td>
<td id="pcbX">
</td>
<td id="pcbY">
</td>
<td id="pcbZ">
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>