Skip to content

Instantly share code, notes, and snippets.

@LTe
Created June 10, 2010 07:52
Show Gist options
  • Save LTe/432684 to your computer and use it in GitHub Desktop.
Save LTe/432684 to your computer and use it in GitHub Desktop.
gen_code("ZERO", -1);
is_declare("STORE", "xB");
is_declare("LOAD", $1);
is_declare("STORE", "xA");
is_declare("LOAD", "#jeden");
is_declare("STORE", "xD");
is_declare("LOAD", $3);
is_declare("STORE", "xC");
is_declare("ADD", "xC");
is_declare("SUB", "xA");
gen_code("JGE", gen_label()+9);
is_declare("LOAD", "xD");
is_declare("ADD", "xD");
is_declare("STORE", "xD");
is_declare("LOAD", "xC");
is_declare("ADD", "xC");
is_declare("STORE", "xC");
is_declare("ADD", "xC");
gen_code("JUMP", gen_label()-9); //
is_declare("LOAD", "xC");
is_declare("SUB", "xA");
gen_code("JGE", gen_label()+7);
is_declare("LOAD", "xA");
is_declare("SUB", "xC");
is_declare("STORE", "xA");
is_declare("LOAD", "xB");
is_declare("ADD", "xD");
is_declare("STORE", "xB");
is_declare("LOAD", $3);
is_declare("SUB", "xA");
gen_code("JGE", gen_label()+2);
gen_code("JUMP", gen_label()-27);
is_declare("LOAD", "xA");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment