summaryrefslogtreecommitdiff
path: root/ecomp-c/test1.e
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-03-15 20:43:50 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2020-03-15 20:43:50 +0100
commite1a0f8cfbce954aaa1568514b9e81bb7a65d2b8c (patch)
treedc0896fee4fbfdb8626eae95c725d5e418a76521 /ecomp-c/test1.e
parentd40ced8e51c27e83d54c7fbbfddd5d9c2d512d28 (diff)
downloadcompilertests-e1a0f8cfbce954aaa1568514b9e81bb7a65d2b8c.tar.gz
compilertests-e1a0f8cfbce954aaa1568514b9e81bb7a65d2b8c.tar.bz2
some work on understand Intel opcodes add and sub
Diffstat (limited to 'ecomp-c/test1.e')
-rw-r--r--ecomp-c/test1.e3
1 files changed, 2 insertions, 1 deletions
diff --git a/ecomp-c/test1.e b/ecomp-c/test1.e
index cc4f336..ca531f9 100644
--- a/ecomp-c/test1.e
+++ b/ecomp-c/test1.e
@@ -15,7 +15,7 @@ var
// this is also an integer
b : integer;
c : integer; // c too
- d, e : integer;
+ d, e, f : integer;
begin
a := 1;
@@ -26,4 +26,5 @@ begin
d := a * c + b; // d should be 8 * 20 + 7 = 167 (A7 hex)
d := a * ( c + b ); // d should be 8 * ( 20 + 7 ) = 216 (D8 hex)
e := ( ( 7 * a + b ) + 2 * ( b + a + 3 ) ) * 4 / 2; // ((7*8+7)+2*(7+8+3))*4/2=198 (C6 hex)
+ f := a - b; // should be 8-7=1
end