diff --git a/sources/zweic/Generator.scala b/sources/zweic/Generator.scala index 8356de4..6ab57c7 100644 --- a/sources/zweic/Generator.scala +++ b/sources/zweic/Generator.scala @@ -133,7 +133,7 @@ code.freeRegister(RES); //TODO FP - code.emit(POP, LNK, SP, code.getFrameSize()-params.length*4 + 4); + code.emit(POP, LNK, SP, code.getFrameSize(), "free arguments on stack " + params.length + "plus framesize " + code.getFrameSize()); code.decFrameSize(code.getFrameSize()); // fs = 0 code.incFrameSize(oldFrameSize); // fs = oldframesize @@ -153,7 +153,9 @@ genCond(cond, endwhile, false); stats.foreach(gen); - code.emit(SUBI, SP, SP, fs-code.getFrameSize()); + if (fs-code.getFrameSize() != 0) { + code.emit(SUBI, SP, SP, fs-code.getFrameSize()); + } code.decFrameSize(code.getFrameSize()); code.incFrameSize(fs); code.emit(BEQ, ZERO, startwhile); @@ -340,7 +342,7 @@ if ( used(i) && i != targetReg ) { //code.emit(ADD,ZERO,ZERO,ZERO,targetReg + " tmp " + i); - code.emit(PSH, i, SP, 4); + code.emit(PSH, i, SP, 4, "save registers"); code.incFrameSize(4); code.freeRegister(i); freed = i::freed; @@ -361,7 +363,6 @@ code.emit(PSH, targetReg, SP, 4); code.incFrameSize(4); - //TODO: //load vmt pos code.emit(LDW, targetReg, targetReg, 0); @@ -369,9 +370,12 @@ //code.emit(LDW, targetReg, thisReg, method.sym.offset); // put args on stack - genTmp { tmpReg => - code.emit(LDW, tmpReg, targetReg, method.sym.offset); + genTmp { tmpReg => + //val tmpReg = code.getRegister(); + + //load method address + code.emit(LDW, tmpReg, targetReg, method.sym.offset); for ( val a <- args ) { genLoad(a, targetReg); @@ -382,11 +386,13 @@ //save current position + 8 (after RET) code.emit(ORIU, LNK, ZERO, code.pc() + 8, "call " + method.sym.name.toString() + " offset:" + method.sym.offset.toString()); - - //call function - code.emit(RET, tmpReg); - } + //code.freeRegister(tmpReg); + + //call function + code.emit(RET, tmpReg); + } + if (targetReg!=RES) { code.emit(ADDI, targetReg, RES, 0, "store return value to target reg"); @@ -397,7 +403,7 @@ // retrieve all registers from stack for ( val j <- freed ) { code.getRegister(j); - code.emit(POP, j, SP, 4); + code.emit(POP, j, SP, 4, "restore registers"); code.decFrameSize(4); } diff --git a/tests/5/Factorial.zwei b/tests/5/Factorial.zwei new file mode 100644 index 0000000..03bf79f --- /dev/null +++ b/tests/5/Factorial.zwei @@ -0,0 +1,48 @@ +//#startut +//120\n +//120\n +//120\n +//#endut +class Factorial { + + // Recursive definition + Int factorial1(Int x) { + return if (x == 0) 1 + else x * this.factorial1(x - 1) + } + + // Tail-recursive definition + Int factorial2_aux(Int x, Int acc) { + return if (x == 0) acc + else this.factorial2_aux(x - 1, acc * x) + } + Int factorial2(Int x) { + return this.factorial2_aux(x, 1) + } + + // Iterative definition + Int factorial3(Int x) { + Int p = 1; + while (x > 0) { + p = p * x; + x = x - 1; + } + return p + } + +} + +class Example { + Null main() { + Factorial fac = new Factorial(); + Int x = 5; + printInt(fac.factorial1(x)); + printChar(10); + printInt(fac.factorial2(x)); + printChar(10); + printInt(fac.factorial3(x)); + printChar(10); + } +} + +new Example().main() diff --git "a/tests/5/antoineyersion/arithmetic\0502\051.zwei" "b/tests/5/antoineyersion/arithmetic\0502\051.zwei" new file mode 100644 index 0000000..260e8b6 --- /dev/null +++ "b/tests/5/antoineyersion/arithmetic\0502\051.zwei" @@ -0,0 +1,44 @@ +//#isut +// Evaluate arithmetic expression and logical expression in an arithmetic context + +{ + // arithmetic binary expression + // all results should be equal to 2 + printInt(1 + 1);printChar(10);printChar(13); + printInt(3 - 1);printChar(10);printChar(13); + printInt(2 * 1);printChar(10);printChar(13); + printInt(17 / 6);printChar(10);printChar(13); + printInt(754 % 16);printChar(10);printChar(13); + + // logical binary expression + // the result should be a succession of 0 and 1 + printInt(1 == 1);printChar(10);printChar(13); + printInt(1 == 0);printChar(10);printChar(13); + printInt(1 != 0);printChar(10);printChar(13); + printInt(1 != 1);printChar(10);printChar(13); + printInt(1 < 2);printChar(10);printChar(13); + printInt(1 < 1);printChar(10);printChar(13); + printInt(2 > 1);printChar(10);printChar(13); + printInt(2 > 2);printChar(10);printChar(13); + printInt(1 <= 1);printChar(10);printChar(13); + printInt(2 <= 1);printChar(10);printChar(13); + printInt(1 >= 1);printChar(10);printChar(13); + printInt(1 >= 2);printChar(10);printChar(13); + printInt(true && true);printChar(10);printChar(13); + printInt(true && false);printChar(10);printChar(13); + printInt(true || false);printChar(10);printChar(13); + printInt(false || false);printChar(10);printChar(13); + + // unary operators + printInt(-1);printChar(10);printChar(13); + printInt(-(-1));printChar(10);printChar(13); + printInt(!true);printChar(10);printChar(13); + printInt(!(!true));printChar(10);printChar(13); + + // more complicate expression to evaluate + // the result should be 100{0, 1, 2, 3} + printInt(!((12%4) || (!true))* 1000);printChar(10);printChar(13); + printInt((!((1987 - (1987 % 35)) % 35) && (true + true)) * 1001);printChar(10);printChar(13); + printInt((1 && 2 && 3 && 4) * 1002);printChar(10);printChar(13); + printInt((0 || 1 || 2 || 3) * 1003);printChar(10);printChar(13); +} \ No newline at end of file diff --git "a/tests/5/antoineyersion/blocks_var_set\0505\051.zwei" "b/tests/5/antoineyersion/blocks_var_set\0505\051.zwei" new file mode 100644 index 0000000..fedc022 --- /dev/null +++ "b/tests/5/antoineyersion/blocks_var_set\0505\051.zwei" @@ -0,0 +1,28 @@ +//#isut +class A { + Int a; + Int b; +} +class B { + A classa; + Int c; + Int d; +} + +{ + Int aa = 3; + { + Int inner = 4; + B bclass = new B(new A(1,2),aa,4); + printInt(bclass.c); + printChar(32); + }; + printInt(aa); + printChar(32); + Int b = { + Int c = 5; + Null n = null; + return c + }; + printInt(b); +} \ No newline at end of file diff --git "a/tests/5/antoineyersion/classes_select_new_set\0504\051.zwei" "b/tests/5/antoineyersion/classes_select_new_set\0504\051.zwei" new file mode 100644 index 0000000..8d07fdf --- /dev/null +++ "b/tests/5/antoineyersion/classes_select_new_set\0504\051.zwei" @@ -0,0 +1,36 @@ +//#isut +// test creation of instance, usage of reference, and set statment througth inheritance +// it test also usage of anonymous classes and call attribute form them. + +class A { + Int a; + Int b; +} +class B { + A a; + Int c; + Int d; +} + +{ + A a = new A(1,2); + B b = new B(a, 3, 4); + printInt(a.a); + printChar(32); + printInt(b.c); + printChar(32); + printInt(b.a.a); + printChar(32); + printInt(new B(new A(10,20), 30, 40).c); + printChar(32); + printChar(45); + printChar(32); + { + B b2 = new B(a, 32, 42); + B b3 = b2; + printInt(b2.a.a); + printChar(61); + printInt(b3.a.a); + }; + printChar(32); +} \ No newline at end of file diff --git "a/tests/5/antoineyersion/conditions\0507\051.zwei" "b/tests/5/antoineyersion/conditions\0507\051.zwei" new file mode 100644 index 0000000..f70de7a --- /dev/null +++ "b/tests/5/antoineyersion/conditions\0507\051.zwei" @@ -0,0 +1,124 @@ +//#isut +// the the correct evaluation of conditions using the genCond(...); +// only 1 should be produced on terminal + +class A { + Int a; +} + +{ + // booolean + printInt(if(true) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(false) {return 0} else {return 1}); + printChar(10); + printChar(13); + + // binary operators (arithmetic) + printInt(if(1 + 1) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(0 + 0) {return 0} else {return 1}); + printChar(10); + printChar(13); + printInt(if(2 - 1) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(2 - 2) {return 0} else {return 1}); + printChar(10); + printChar(13); + printInt(if(1 * 1) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(0 * 1) {return 0} else {return 1}); + printChar(10); + printChar(13); + printInt(if(2 / 2) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(0 / 2) {return 0} else {return 1}); + printChar(10); + printChar(13); + printInt(if(17 % 2) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(16 % 2) {return 0} else {return 1}); + printChar(10); + printChar(13); + + // binary operators (logical) + printInt(if(1 == 1) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(1 == 0) {return 0} else {return 1}); + printChar(10); + printChar(13); + printInt(if(0 != 1) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(1 != 1) {return 0} else {return 1}); + printChar(10); + printChar(13); + printInt(if(0 < 1) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(1 < 1) {return 0} else {return 1}); + printChar(10); + printChar(13); + printInt(if(1 > 0) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(1 > 1) {return 0} else {return 1}); + printChar(10); + printChar(13); + printInt(if(1 <= 2) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(1 <= 0) {return 0} else {return 1}); + printChar(10); + printChar(13); + printInt(if(2 >= 0) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(0 >= 2) {return 0} else {return 1}); + printChar(10); + printChar(13); + printInt(if(true && true) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(true && false) {return 0} else {return 1}); + printChar(10); + printChar(13); + printInt(if(true || false) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(false || false) {return 0} else {return 1}); + printChar(10); + printChar(13); + + // unary operators + printInt(if(-true) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(-false) {return 0} else {return 1}); + printChar(10); + printChar(13); + printInt(if(!false) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(!true) {return 0} else {return 1}); + printChar(10); + printChar(13); + + A aa = new A(true); + // condition with variable + printInt(if(aa.a) {return 1} else {return 0}); + printChar(10); + printChar(13); + printInt(if(!aa.a) {return 0} else {return 1}); + printChar(10); + printChar(13); + + +} diff --git "a/tests/5/antoineyersion/functions_call\0508\051.zwei" "b/tests/5/antoineyersion/functions_call\0508\051.zwei" new file mode 100644 index 0000000..17b8e5e --- /dev/null +++ "b/tests/5/antoineyersion/functions_call\0508\051.zwei" @@ -0,0 +1,33 @@ +//#isut +// test method call without inheritance + +class A{ + Int a; + Int b; + Null foo(Int c){ + printInt(c); + printChar(32); + } + Int foo2(Int d, Int e){ + Int acc = e; + while(d > 0){ + printInt(d); + printChar(58); + printChar(32); + printInt(acc/e); + printChar(32); + d = d-1; + acc = acc+e; + } + return acc + } +} + + + +{ + Null k = new A(1, 2).foo(1); + new A(3, 4).foo2(5, 6); +} + + diff --git "a/tests/5/antoineyersion/functions_with_heritage\0508\051.zwei" "b/tests/5/antoineyersion/functions_with_heritage\0508\051.zwei" new file mode 100644 index 0000000..e916a86 --- /dev/null +++ "b/tests/5/antoineyersion/functions_with_heritage\0508\051.zwei" @@ -0,0 +1,45 @@ +//#isut +class A{ + Int a; + Int b; + Null foo(Int c){ + printInt(c); + printChar(32); + } + Int foo2(Int d, Int e){ + Int acc = e; + while(d > 0){ + printInt(d); + printChar(58); + printChar(32); + printInt(acc/e); + printChar(32); + d = d-1; + acc = acc+e; + } + return acc + } +} +class B extends A{ + Int c; + A aa; + A foo3(Int a){ + new A(a, this.aa.foo2(a, this.c)); + } +} + +{ + Null k = new A(1, 2).foo(1); + printChar(45); + printChar(45); + new A(3, 4).foo2(5, 6); + printChar(45); + printChar(45); + B bb = new B(7, 8, 30 ,new A(40, 50)); + A aaa = bb.foo3(5); + printChar(45); + printChar(45); + bb.foo(111); +} + + diff --git "a/tests/5/antoineyersion/if_then_else\0503\051.zwei" "b/tests/5/antoineyersion/if_then_else\0503\051.zwei" new file mode 100644 index 0000000..639f319 --- /dev/null +++ "b/tests/5/antoineyersion/if_then_else\0503\051.zwei" @@ -0,0 +1,48 @@ +//#isut +// test generation of the if/then/else expression and good evaluation of boolean +// NEED ALSO A MINIMAL IMPLEMENTATION OF GENCOND (part 7) + +{ + if(true) { + printInt(1); + printChar(10); + printChar(13); + }; + if(true){ + printInt(1); + printChar(10); + printChar(13); + } + else { + printInt(0); + printChar(10); + printChar(13); + }; + if(false) { + printInt(0); + printChar(10); + printChar(13); + } + else { + printInt(1); + printChar(10); + printChar(13); + }; + if(true) { + if(false) { + printInt(0); + printChar(10); + printChar(13); + } + else { + printInt(1); + printChar(10); + printChar(13); + }; + } + else { + printInt(0); + printChar(10); + printChar(13); + }; +} \ No newline at end of file diff --git "a/tests/5/antoineyersion/read_print\0500\051.zwei" "b/tests/5/antoineyersion/read_print\0500\051.zwei" new file mode 100644 index 0000000..687dac8 --- /dev/null +++ "b/tests/5/antoineyersion/read_print\0500\051.zwei" @@ -0,0 +1,10 @@ +{ + Int a = readChar; + printChar(a); + printChar(10); + printChar(13); + Int b = readInt; + printInt(b); + printChar(10); + printChar(13); +} \ No newline at end of file diff --git "a/tests/5/antoineyersion/recursive_functions\0508\051.zwei" "b/tests/5/antoineyersion/recursive_functions\0508\051.zwei" new file mode 100644 index 0000000..54028d9 --- /dev/null +++ "b/tests/5/antoineyersion/recursive_functions\0508\051.zwei" @@ -0,0 +1,18 @@ +//#isut +class A +{ + Int a1; + Int a2; + Null recfoo(Int a) + { + printInt(a); + printChar(32); + if(a > 0) { + this.recfoo(a-1); + }; + printChar(32); + printChar(40); printInt(this.a1); printChar(59); printChar(32); printInt(this.a2); printChar(41); + } +} + +new A(1,2).recfoo(10) \ No newline at end of file diff --git "a/tests/5/antoineyersion/strings\0508\051.zwei" "b/tests/5/antoineyersion/strings\0508\051.zwei" new file mode 100644 index 0000000..4704d2c --- /dev/null +++ "b/tests/5/antoineyersion/strings\0508\051.zwei" @@ -0,0 +1,34 @@ +//#isut +class List { + Int isEmpty() { return this.isEmpty() } + Int head() { return this.head() } + List tail() { return this.tail() } + List cons(Int x) { return this.cons(x) } + Null println() {} +} + +class Cons extends List { + Int head; + List tail; + Int isEmpty() { return false } + Int head() { return this.head } + List tail() { return this.tail } + List cons(Int x) { return new Cons(x, this) } + Null println() { + printChar(this.head); + this.tail.println(); + } +} + +class Nil extends List { + Int isEmpty() { return true } + List cons(Int x) { return new Cons(x, this) } + Null println() { + printChar(10); + printChar(13); + } +} +{ + List str = "hello, world"; + str.println(); +} \ No newline at end of file diff --git "a/tests/5/antoineyersion/while_do\0506\051.zwei" "b/tests/5/antoineyersion/while_do\0506\051.zwei" new file mode 100644 index 0000000..d99da82 --- /dev/null +++ "b/tests/5/antoineyersion/while_do\0506\051.zwei" @@ -0,0 +1,36 @@ +//#isut +class A { + Int a; + Int b; +} +class B { + A classa; + Int c; + Int d; +} + +{ + Int x = 10; + Int acc = 1; + while(x > 0){ + Int y = 0; + acc = acc*x; + printInt(acc); + printChar(15); + printInt(y); + printChar(32); + x = x-1; + y = y+1; + } + Int y = 5; + Int z = -4; + while(y >= 0){ + while(z <= y){ + printInt(z); + z = z+1; + } + z = -4; + y = y - 1; + } + printChar(10); +} \ No newline at end of file diff --git a/tests/5/block.zwei b/tests/5/block.zwei new file mode 100644 index 0000000..c580ed4 --- /dev/null +++ b/tests/5/block.zwei @@ -0,0 +1,22 @@ +//#startut +//220 +//330 +//21 +//#endut + +{ + Int a = 7; + { + Int b = 20; + a = a + 7; + b = b + 200; + printInt(b); + }; + { + Int b = 30; + a = a + 7; + b = b + 300; + printInt(b); + }; + printInt(a); +} diff --git a/tests/5/class2.zwei b/tests/5/class2.zwei new file mode 100644 index 0000000..80c8505 --- /dev/null +++ b/tests/5/class2.zwei @@ -0,0 +1,23 @@ +//#startut +//33 +//22 +//44 +//66 +//#endut + +class Test { + Int a() { + printInt(33); + return 22 + } + Int b() { + printInt(44); + return 66 + } +} +{ + Test a = new Test(); + printInt (a.a()); + + printInt (a.b()); +} \ No newline at end of file diff --git a/tests/5/class3.zwei b/tests/5/class3.zwei new file mode 100644 index 0000000..5aaa815 --- /dev/null +++ b/tests/5/class3.zwei @@ -0,0 +1,7 @@ +//#isut +class A { + Int a(Int b, Int c) { + return b * c + } +} +new A().a(71, 72) diff --git a/tests/5/cmp.zwei b/tests/5/cmp.zwei new file mode 100644 index 0000000..834c599 --- /dev/null +++ b/tests/5/cmp.zwei @@ -0,0 +1,100 @@ +//a savoir: +//les && pr�c�dent les || +//donc '1 || 0 && 0' �value � 1. + +//#startut +{ + Int i = 0; + + //1 + if(i == 0) {printInt(1);}; + + //2 + if(i >= 0) {printInt(2);}; + + //3 + if(i >= 0) {printInt(3);}; + + //4 + if(i != 0) {} + else {printInt(4);}; + + + + + //\n + printChar(10); + i = 1; + + //1 + if(i == 1) {printInt(1);}; + + //2 + if(i > 0) {printInt(2);}; + + //3 + if(i < 2) {printInt(3);}; + + //4 + if(i != 7) {printInt(4);}; + + + + + //\n + printChar(10); + i = -1; + + //1 + if(i == -1) {printInt(1);}; + + //2 + if(i < 0) {printInt(2);}; + + //3 + if(i > -2) {printInt(3);}; + + //4 + if(i != 12) {printInt(4);}; + + + + + + //\n + printChar(10); + + //1 + if(1 && 1) {printInt(1);}; + + //2 + if(1 && -1) {printInt(2);}; + + //3 + if(0 || 4) {printInt(3);}; + + //4 + if(-2 || 0) {printInt(4);}; + + //5 + if(-1 || 1) {printInt(5);}; + + + + + //\n + printChar(10); + + //66 + if(0 || (1 && 0)) {} else {printInt(6);}; + if(0 || 1 && 0) {} else {printInt(6);}; + + //77 + if(0 || (1 && 1)) {printInt(7);}; + if(0 || 1 && 1) {printInt(7);}; + + //891 + if(1 || (0 && 0)) {printInt(8);}; + if(1 || 0 && 0) {printInt(9);}; + if(0 && 0 || 1) {printInt(1);}; +} \ No newline at end of file diff --git a/tests/5/if1.zwei b/tests/5/if1.zwei new file mode 100644 index 0000000..406de1a --- /dev/null +++ b/tests/5/if1.zwei @@ -0,0 +1,6 @@ +//#startut +//1\n +{ + if (true) { printInt(1); } else { printInt(0); }; + printChar (10); +} diff --git a/tests/5/if3.zwei b/tests/5/if3.zwei new file mode 100644 index 0000000..7d8ce34 --- /dev/null +++ b/tests/5/if3.zwei @@ -0,0 +1,16 @@ +//#startut +//731 +{ + printInt ( + if ( 1 + (2/9) ) { + printInt(7); + return 3 % 5 + } else { + printInt(22); + return 66 + } + ); + + printInt(1); + +} \ No newline at end of file diff --git a/tests/5/parents1.zwei b/tests/5/parents1.zwei new file mode 100644 index 0000000..1b8e2f2 --- /dev/null +++ b/tests/5/parents1.zwei @@ -0,0 +1,29 @@ +//#startut +//10 +//30 +//20 +//30 + +class Vader { + Int a (){ + return 10 + } + Int b (){ + return 30 + } +} + +class Luke extends Vader { + Int a (){ + return 20 + } +} + +{ + Vader v = new Vader(); + printInt(v.a()); + printInt(v.b()); + Luke l = new Luke(); + printInt(l.a()); + printInt(l.b()); +} diff --git a/tests/5/parents2.zwei b/tests/5/parents2.zwei new file mode 100644 index 0000000..c98471a --- /dev/null +++ b/tests/5/parents2.zwei @@ -0,0 +1,41 @@ +//#startut + +class Vader { + Int a (Int b){ + printInt(b); + return 10 + } + Int b (Int c){ + printInt(c); + return 30 + } +} + +class Luke extends Vader { + Int a (Int a){ + return 20 + } +} + +{ + Vader v = new Vader(); + + //99 + //10 + printInt(v.a(99)); + + //73 + //30 + printInt(v.b(73)); + + printChar(10); //\n + + Luke l = new Luke(); + + //20 + printInt(l.a(92)); + + //41 + //30 + printInt(l.b(41)); +} diff --git a/tests/5/parents3.zwei b/tests/5/parents3.zwei new file mode 100644 index 0000000..76bf182 --- /dev/null +++ b/tests/5/parents3.zwei @@ -0,0 +1,43 @@ +//#isut +//#430 + +class Question { + Int i; +} + +class Answer { + Question q; + Null print() { + printInt(this.q.i); + } +} + +class Rubbish extends Answer{ + Null print() { + printInt(! this.q.i); + } +} + +class GeorgeBush { + Answer answer(Question q) { + return new Answer(q) + } +} + +class GeorgeWBush extends GeorgeBush { + Rubbish answer(Question q) { + return new Rubbish(q) + } +} + +{ + Question q = new Question(43); + GeorgeBush me = new GeorgeBush(); + GeorgeWBush minime = new GeorgeWBush(); + + Answer v = me.answer(q); + Answer w = minime.answer(q); + + v.print(); + w.print(); +} \ No newline at end of file diff --git a/tests/5/var1.zwei b/tests/5/var1.zwei new file mode 100644 index 0000000..0fbdbdc --- /dev/null +++ b/tests/5/var1.zwei @@ -0,0 +1,7 @@ +//#startut +//1\n +{ + Int a = 1; + printInt(a); + printChar(10); +} diff --git a/tests/5/while2.zwei b/tests/5/while2.zwei new file mode 100644 index 0000000..a798077 --- /dev/null +++ b/tests/5/while2.zwei @@ -0,0 +1,24 @@ +//#startut +//99\n +//99\n +//99\n +//99\n +//99\n +//99\n +//99\n +//99\n +//99\n +//99\n +//#endut + +{ + Int a = 0; + while ( a < 10 ) { + a = a+1; + + Int b = 99; + printInt(b); + b = b+55; + printChar(10); + } +}