From: Bernhard Urban Date: Mon, 17 May 2010 17:44:41 +0000 (+0200) Subject: codea: sub mit 0 und mul mit 1 X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=testub10.git;a=commitdiff_plain;h=d3d627e7166d7334032fcacb2f498118c8b3646e codea: sub mit 0 und mul mit 1 referenzinstruktionen: todo ;) --- diff --git a/codea/lewurm_12.0 b/codea/lewurm_12.0 new file mode 100644 index 0000000..78f2b1c --- /dev/null +++ b/codea/lewurm_12.0 @@ -0,0 +1,12 @@ +method f1() + return (this*2*3)*1; +end; +method f2() + return (this)*1; +end; +method f3() + return this*1; +end; +method f4() + return (this*1)*(this*1)*1; +end; diff --git a/codea/lewurm_12.call b/codea/lewurm_12.call new file mode 100644 index 0000000..e8615de --- /dev/null +++ b/codea/lewurm_12.call @@ -0,0 +1,7 @@ +long f1(long); +long f2(long); +long f3(long); +long f4(long); +RET((f1(4) == 24) && + (f2(4) == 4) && + (f3(4) == 4)); diff --git a/codea/lewurm_12.instr b/codea/lewurm_12.instr new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/codea/lewurm_12.instr @@ -0,0 +1 @@ +10 diff --git a/codea/lewurm_13.0 b/codea/lewurm_13.0 new file mode 100644 index 0000000..a190acd --- /dev/null +++ b/codea/lewurm_13.0 @@ -0,0 +1,9 @@ +method f1() + return (this-0-0)-0-0-6; +end; +method f2() + return (this)-0; +end; +method f3() + return this-0; +end; diff --git a/codea/lewurm_13.call b/codea/lewurm_13.call new file mode 100644 index 0000000..f1a4291 --- /dev/null +++ b/codea/lewurm_13.call @@ -0,0 +1,6 @@ +long f1(long); +long f2(long); +long f3(long); +RET((f1(4) == -2) && + (f2(4) == 4) && + (f3(4) == 4)); diff --git a/codea/lewurm_13.instr b/codea/lewurm_13.instr new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/codea/lewurm_13.instr @@ -0,0 +1 @@ +10