gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
improved the translator; manual (h1) version of sample0 worked as it should
[mjc2wsl.git] / samples / chrtest.wsl
diff --git a/samples/chrtest.wsl b/samples/chrtest.wsl
new file mode 100644 (file)
index 0000000..13a7395
--- /dev/null
@@ -0,0 +1,36 @@
+C:" This file automatically converted from microjava bytecode";
+C:" with mjc2wsl v 0.1";
+VAR < tempa := 0, tempb := 0, tempres :=0,
+       stack := < >, t_e_m_p := 0 > :
+
+C:"#51";
+C:" enter";
+C:"#22";
+stack := <10 > ++ stack;
+C:"#22";
+stack := <15 > ++ stack;
+C:"#56";
+tempa := HEAD(stack); stack := TAIL(stack);
+PRINT(tempa);
+C:"#22";
+stack := <97 > ++ stack;
+C:"#20";
+stack := <5 > ++ stack;
+C:"#54";
+tempa := HEAD(stack); stack := TAIL(stack);
+PRINT(tempa);
+C:"#15";
+stack := <0 > ++ stack;
+C:"#38";
+C:"!unknown op error: 38";
+C:"#15";
+stack := <0 > ++ stack;
+C:"#54";
+tempa := HEAD(stack); stack := TAIL(stack);
+PRINT(tempa);
+C:"#52";
+C:"!unknown op error: 52";
+C:"#50";
+C:"!unknown op error: 50";
+SKIP
+ENDVAR
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner