Skip to content

Instantly share code, notes, and snippets.

@Sophrinix
Forked from figital/fragment.js
Created July 9, 2011 06:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sophrinix/1073377 to your computer and use it in GitHub Desktop.
Save Sophrinix/1073377 to your computer and use it in GitHub Desktop.
jslinux start()
// hi ben
function start() {
var Hf,
i,
start,
If,
Jf;
if (!Gf()) {
aa.writeln("");
aa.writeln("Your browser does not support the W3C Typed Arrays and this version of JS/Linux needs them.\n");
aa.writeln("If you really want to try out JS/Linux, you can use the following browsers:");
aa.writeln("- Firefox 4.x");
aa.writeln("- Google Chrome 11");
return;
}
ya = new ea();
Qe = new vf();
If = 32 * 1024 * 1024;
ya.phys_mem_resize(If);
ya.load_binary("vmlinux26.bin", 0x00100000);
Jf = ya.load_binary("root.bin", 0x00400000);
start = 0x10000;
ya.load_binary("linuxstart.bin", start);
ya.eip = start;
ya.regs[0] = If;
ya.regs[3] = Jf;
ya.cycle_count = 0;
ya.ld8_port = Qe.ld8_port.bind(Qe);
ya.ld16_port = Qe.ld16_port.bind(Qe);
ya.ld32_port = Qe.ld32_port.bind(Qe);
ya.st8_port = Qe.st8_port.bind(Qe);
ya.st16_port = Qe.st16_port.bind(Qe);
ya.st32_port = Qe.st32_port.bind(Qe);
ya.get_hard_intno = Qe.pic.get_hard_intno.bind(Qe.pic);
xf = Date.now();
setTimeout(yf, 10);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment