X-Git-Url: http://svarog.pmf.uns.ac.rs/gitweb/?p=mjc2wsl.git;a=blobdiff_plain;f=samples%2Fchrtest.wsl;fp=samples%2Fchrtest.wsl;h=13a7395de8153b82d87535706d7e14cc8e9f2561;hp=0000000000000000000000000000000000000000;hb=08dc19331d758604747a51cdef7318ca34e9175e;hpb=a24993cfe39a1fd5b7db6e2ffe9f656955fb73bd diff --git a/samples/chrtest.wsl b/samples/chrtest.wsl new file mode 100644 index 0000000..13a7395 --- /dev/null +++ b/samples/chrtest.wsl @@ -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