started working to integrate vm and site

This commit is contained in:
2015-04-03 01:42:04 -04:00
parent 20913ff264
commit decf25ed29
11 changed files with 558 additions and 16 deletions

15
public/vm/index.js Normal file
View File

@@ -0,0 +1,15 @@
parser = require("./bytecode-parser");
c0vm = require("./c0vm.js");
// console.log("Reading in sample bytecode file:");
// console.log(parser.getBytes("../test/test.bc0"));
// console.log("That was the sample bytecode file" +
// " -- it probably took up your whole terminal screen.");
// var file = parser.parse("../test/test.bc0");
// console.log(file);
// console.log(file.function_pool[0].code);
$("#run").click(function() {
var file = parser.parse($("#bytecode").text);
$("#output").text(c0vm.execute(file));
});