-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathide.html
102 lines (92 loc) · 2.03 KB
/
ide.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
<!DOCTYPE html>
<html>
<head>
<title>Amatl IDE</title>
<script src="amatl.js"></script>
<link rel="stylesheet" href="editor.css">
</head>
<body class="toggle">
<div class="editor">
<div class="title">Amatl IDE</div>
<textarea
id="source"
autocorrect="off"
autocapitalize="off"
spellcheck="false"
placeholder="write code...">( Click the "execute" button or Ctrl+Enter to run. )
@Main ( -> ) [
\ set vectors
00 00
\ draw two horizontal lines
#bd #b2 ,line-x JSR
#dd #d2 ,line-x JSR
\ draw "t"
#74 #32 ,line-y JSR
#53 #01 SET
#83 #01 SET
\ draw "n"
#95 #55 ,line-y JSR
#46 #01 SET
#97 #47 ,line-y JSR
\ draw "y"
#79 #49 ,line-y JSR
#7b #4b ,line-y JSR
#7a #01 SET
#89 #01 SET
BRK
]
@line-x ( hi lo -- ) [
@loop-x
DUP #01 SET
INC OVR OVR GTH ,loop-x JCN
POP POP
JMPr
]
@line-y ( hi lo -- ) [
@loop-y
DUP #01 SET
#10 ADD OVR OVR GTH ,loop-y JCN
POP POP
JMPr
]
</textarea>
<div class="actions">
<button id="compile" onclick="compile()">execute</button>
</div>
</div>
<div class="resizer"></div>
<div class="preview">
<details id="screen_wrapper" open>
<summary class="title">screen</summary>
<canvas id="screen" width="16" height="16" tabindex=1></canvas>
</details>
<details open>
<summary class="title">wstack</summary>
<div id="wstack"></div>
</details>
<details open>
<summary class="title">rstack</summary>
<div id="rstack"></div>
</details>
<details>
<summary class="title">buffer</summary>
<div id="buffer"></div>
</details>
<details>
<summary class="title">ram</summary>
<div id="ram"></div>
</details>
<details>
<summary class="title">rom</summary>
<div id="rom"></div>
<div id="share"></div>
</details>
<details open>
<summary class="title">errors</summary>
<div id="errors"></div>
</details>
</div>
<script src="editor.js"></script>
<script src="blit.js"></script>
</body>
</html>