BicaVM/webserver/index.html

79 lines
2.0 KiB
HTML
Raw Permalink Normal View History

2011-07-01 22:28:15 +01:00
<html>
<head>
2011-11-13 23:23:23 +00:00
<title>BicaVM</title>
2011-07-02 19:38:10 +01:00
<script>
var lident = -1;
2011-07-02 19:38:10 +01:00
write = function(msg){
var l = document.getElementById("log");
2011-08-06 01:03:21 +01:00
var match;
if (msg.match(/Calling/)){
lident++;
}
2011-08-06 01:03:21 +01:00
if ((match = msg.match(/(\d+): (\w+) (op:\[[^\]]*]) (.*)/))){
var space3 = "";
for(var i=0; i<3-(match[1].length); i++){space3 += " " }
var space1 = "";
for(var i=0; i<23-(match[1].length + space3.length + match[2].length);i++ ){space1 += " " }
var space2 = "";
for(var i=0; i<30-(match[3].length); i++ ){space2 += " " }
msg = "<span style='color:DarkOrchid '>" + match[1] + "</span>:"+ space3 +"<a style='color:red;' href='http://homepages.inf.ed.ac.uk/kwxm/JVM/" + match[2].toLowerCase().replace(/\d+/,"n") + ".html'>" + match[2] + "</a>" + space1 + htmlentities(match[3]) + space2 +" "+ htmlentities(match[4]) ;
}else{
msg=htmlentities(msg);
}
if (msg.match(/!! NATIVE !!/)){
msg = "<span style='color:green'>" + msg + "</span>"
}
var spac = ""
for (var i =0; i<lident; i++){ spac += " ";}
if (msg.match(/Returing/)){
lident--;
}
l.innerHTML = l.innerHTML + spac + msg + "\n";
2011-08-06 01:03:21 +01:00
2011-07-02 19:38:10 +01:00
}
2011-11-10 23:14:01 +00:00
function panic(msg){
var l = document.getElementById("log");
msg = "<div style='background:red; color:white; padding:5px; margin-top:5px;'>" + msg + "</div>";
l.innerHTML = l.innerHTML + msg;
}
2011-08-10 11:34:08 +01:00
function include(filename)
{
document.write('<script type="text/javascript" src="' + filename +
'"><' + '/script>');
}
if(!window.DataView){
include("dataview.js");
}
</script>
<script src="jvm.js" type="text/javascript"></script>
2011-07-01 22:28:15 +01:00
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
body{
background:#DDE1ED;
font-family:Arial;
font-size:12px;
}
#background{
background:#DDE1ED;
}
#stick textarea{
margin-top:20px;
height:180px;
width:200px;
background:#FFCC00;
}
.ui-dialog-title{
padding-left:40px;
}
</style>
</head>
<body onload="main()">
2011-11-13 23:23:23 +00:00
<h1>BicaVM Debug</h1>
2011-07-03 12:51:20 +01:00
Debug:
2011-07-02 19:38:10 +01:00
<pre id="log"></pre>
2011-07-01 22:28:15 +01:00
</body>
</html>