Name | Modified | Size | Downloads / Week |
---|---|---|---|
readme.txt | 2011-08-19 | 1.6 kB | |
MobileASM.zip | 2010-12-15 | 134.6 kB | |
ExpressionCalc.zip | 2010-09-05 | 28.8 kB | |
Totals: 3 Items | 165.0 kB | 1 |
1. MobileASM: I developped this application with Java(TM) ME platform SDK 3.0, EA. And it is very simple software to execute assembly as script. However, I make it in a haste and the FLAGS is confusing and I have not corrected the error. // 1+2+3+...+100 mov eax,0 mov ecx,100 add eax,ecx dec ecx ja 3 print "1+2+3+...+100 print eax end 2. ExpressionCalc: I write it without using regex of Java to build an own code interpreter. And I use the CalcTree to do calculation for a complicated expression and SymbolTable supports to hold varibles. SymbolTableNode stn; SymbolTable st; CalcTree ct; LineCodeStream lcs; st = new SymbolTable(); ct = new CalcTree(); // declare variables stn = st.add("hello", null); stn.data = Double.valueOf(20.0); stn.type = 0; stn = st.add("world", null); stn.data = Double.valueOf(10.0); stn.type = 0; // declare functions stn = st.add("sqr", null); stn.data = Integer.valueOf(1); // function id stn.type = 1; stn = st.add("cube", null); stn.data = Integer.valueOf(2); stn.type = 1; stn = st.add("double", null); stn.data = Integer.valueOf(3); stn.type = 1; // try an expression lcs = new LineCodeStream("hello+cube(world) - (world + 2)*sqr(2) - sqr(cube(double(2)))/hello"); // TODO: proccess every token from lcs.getWord() // TODO: and add tokens to calculating tree double _val = 0.0; _val = calcTreeValue(ct.getRoot(),st); System.out.println(lcs.getLineCode() + " = " + _val);