73 lines
1.6 KiB
HTML
73 lines
1.6 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
|
<head>
|
|
|
|
<title>MVàP</title>
|
|
|
|
<script src="js/Pile.js" type="text/javascript"></script>
|
|
<script src="js/MVaP.js" type="text/javascript"></script>
|
|
|
|
<style type="text/css">
|
|
body{ color: #333; font: 13px 'Lucida Grande', Verdana, sans-serif; }
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
<h1>Machine Virtuelle à Pile</h1>
|
|
|
|
<h2>Historique</h2>
|
|
Blabla sur la MVàP...
|
|
|
|
<h2>Documentation</h2>
|
|
Toute la doc
|
|
<p>
|
|
lorem ipsum
|
|
<h2>La MVàP</h2>
|
|
<h3>Entrez le code</h3>
|
|
<div class="runcode">
|
|
<textarea id="codeMVaP" name="Code MVàP" label="Enter your code" rows="15" cols="33" spellcheck="false">
|
|
PUSHI 2
|
|
DUP
|
|
PUSHI 3
|
|
ADD
|
|
PUSHI 4
|
|
MUL
|
|
WRITE
|
|
HALT
|
|
</textarea>
|
|
</div>
|
|
|
|
<h3>Exécution</h3>
|
|
<script>
|
|
var M = "";
|
|
function runcode() {
|
|
let text = document.getElementById("codeMVaP").value;
|
|
let d = document.getElementById("debug").checked;
|
|
let maxSteps = document.getElementById("MaxSteps").value;
|
|
if (M == "") M = new MVaP();
|
|
M.load(text);
|
|
M.runcode(maxSteps, d);
|
|
}
|
|
|
|
</script>
|
|
<input type="button" value="Run" onclick="runcode();"/>
|
|
<label for="MaxSteps">Nombre maximum de pas (O pour pas de limite)</label>
|
|
<input type="text" id="MaxSteps" name="MaxSteps" value="1000" minLength="4" maxLength="8" size="10"/>
|
|
<label for="debug">Traces pas à pas</label>
|
|
<input type="checkbox" id="debug" name="debug" checked />
|
|
|
|
|
|
|
|
<pre>
|
|
<input type="button" value="Nettoyer les traces" onclick="traces.innerText='';"/>
|
|
<div id="traces"></div>
|
|
</pre>
|
|
<script>
|
|
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|