-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
109 lines (98 loc) · 4.1 KB
/
test.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
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: "Noto sans tc";
}
table,
tr,
td {
border: 1px solid black;
border-collapse: collapse;
padding: 2px;
}
.test {
position: fixed;
top: 400px;
left: -200px;
}
@font-face {
font-family: "Noto sans tc";
src: url('stuff/NotoSansCJKtc-Black.otf')
}
</style>
<script src="intepreter.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
<p>code:</p>
<textarea id="code_block" wrap="off"></textarea>
<button onclick="begin()">Run</button>
<button onclick="play()">Play</button>
<p>
<table class="hey" width="100%" id="thetable">
<tr>
<td>cell#1</td>
<td>cell#2</td>
<td>cell#3</td>
<td>cell#4</td>
<td>cell#5</td>
<td>cell#6</td>
<td>cell#7</td>
<td>cell#8</td>
<td>cell#9</td>
<td>cell#10</td>
<td>cell#11</td>
<td>cell#12</td>
<td>cell#13</td>
<td>cell#14</td>
<td>cell#15</td>
</tr>
<tr>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
</table>
</p>
<p>input:</p>
<textarea id="input_box" wrap="off"></textarea>
<p>output:</p>
<div id="output"></div>
<p>++++++++ Set Cell #0 to 8<br> [
<br> >++++ Add 4 to Cell #1; this will always set Cell #1 to 4<br> [ as the cell will be cleared by the loop<br> >++ Add 2 to Cell #2<br> >+++ Add 3 to Cell #3<br> >+++ Add 3 to Cell #4<br> >+ Add 1 to Cell #5<br>
<<<<- Decrement the loop counter in Cell #1<br>
] Loop till Cell #1 is zero; number of iterations is 4<br> >+ Add 1 to Cell #2<br> >+ Add 1 to Cell #3<br> >- Subtract 1 from Cell #4<br> >>+ Add 1 to Cell #6<br> [
<] Move back to the first zero cell you find; this will be Cell #1 which was cleared by the previous loop<br>
<- Decrement the loop Counter in Cell #0<br>
] Loop till Cell #0 is zero; number of iterations is 8<br>
<br> The result of this is:<br> Cell No : 0 1 2 3 4 5 6<br> Contents: 0 0 72 104 88 32 8<br> Pointer : ^<br>
<br> >>. Cell #2 has value 72 which is 'H'<br> >---. Subtract 3 from Cell #3 to get 101 which is 'e'<br> +++++++..+++. Likewise for 'llo' from Cell #3<br> >>. Cell #5 is 32 for the space<br>
<-. Subtract 1 from Cell #4 for 87 to give a 'W'<br>
<. Cell #3 was set to 'o' from the end of 'Hello'<br>
+++.------.--------. Cell #3 for 'rl' and 'd'<br> >>+. Add 1 to Cell #5 gives us an exclamation point<br> >++. And finally a newline from Cell #6<br></p>
<p>+[-[
<<[+[--->]-[
<<<]]]>>>-]>-.---.>..>.
<<<<-.<+.>>>>>.>.
<<.<-.</p>
<form action="https://www.google.com/search" class="searchform" method="get" name="searchform" target="_blank">
<input name="sitesearch" type="hidden" value="example.com">
<input autocomplete="on" class="form-control search" name="q" placeholder="Search in example.com" required="required" type="text">
<button class="button" type="submit">Search</button>
</form>
</body>
</html>