forked from skilldrick/6502js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
100 lines (85 loc) · 2.96 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
<!doctype html>
<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css" />
<title>6502 assembler/simulator</title>
</head>
<body>
<div class="widget">
<div class="buttons">
<input type="button" value="Assemble" class="assembleButton" />
<input type="button" value="Run" class="runButton" />
<input type="button" value="Reset" class="resetButton" />
<input type="button" value="Hexdump" class="hexdumpButton" />
<input type="button" value="Disassemble" class="disassembleButton" />
<input type="button" value="Notes" class="notesButton" />
</div>
<textarea class="code"></textarea>
<canvas class="screen" width="320" height="320"></canvas>
<div class="debugger">
<input type="checkbox" class="debug" name="debug" />
<label for="debug">Debugger</label>
<div class="minidebugger"></div>
<div class="buttons">
<input type="button" value="Step" class="stepButton" />
<input type="button" value="Jump to ..." class="gotoButton" />
</div>
</div>
<div class="monitorControls">
<label for="monitoring">Monitor</label>
<input type="checkbox" class="monitoring" name="monitoring" />
<label for="start">Start: $</label>
<input type="text" value="0" class="start" name="start" />
<label for="length">Length: $</label>
<input type="text" value="ff" class="length" name="length" />
<input type="button" value="Update" class="updateButton" />
<label for="unparser">Unparser: $</label>
<input type="text" value="0" class="unparser" name="unparser" />
<label class="unparserOutput" />
</div>
<div class="monitor"><pre><code></code></pre></div>
<div class="messages"><pre><code></code></pre></div>
<div class="notes" style="display: none">Notes:
Memory location $fe contains a new random byte on every instruction.
Memory location $ff contains the ascii code of the last key pressed.
Memory locations $200 to $5ff map to the screen pixels. Different values will
draw different colour pixels. The colours are:
$0: Black
$1: White
$2: Red
$3: Cyan
$4: Purple
$5: Green
$6: Blue
$7: Yellow
$8: Orange
$9: Brown
$a: Light red
$b: Dark grey
$c: Grey
$d: Light green
$e: Light blue
$f: Light grey
</div>
<script src="es5-shim.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="assembler.js"></script>
<script type="text/javascript">
{
var ajaxcallback = function(foo) {
codebox = document.getElementsByClassName("code");
codebox = codebox.item(0);
codebox.value = foo;
}
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4 && xmlhttp.status == 200){
ajaxcallback(xmlhttp.responseText);
}
}
xmlhttp.open("GET", "mos.txt", true);
xmlhttp.send();
}
</script>
</body>
</html>