Browse Source

* Test changed to check that w value is correctly passed to ax register

git-svn-id: trunk@14448 -
pierre 15 years ago
parent
commit
e3293a4e11
1 changed files with 12 additions and 4 deletions
  1. 12 4
      tests/webtbs/tw15370.pp

+ 12 - 4
tests/webtbs/tw15370.pp

@@ -4,7 +4,7 @@
 program test_word_ref;
 
 var
-  loc : word;
+  j,loc : word;
 {$asmmode att}
 procedure TestAtt(w : word);
 
@@ -19,17 +19,25 @@ end;
 procedure TestIntel(w : word);
 
 begin
+  loc:=56*j;
   asm
-      mov ax,[w]
+      mov ax,w
       mov [loc],ax
   end;
 end;
 
 begin
+  j:=6;
   TestAtt(6);
   if loc<>6 then
-    halt(1);
+    begin
+      Writeln('Error in att code');
+      halt(1);
+    end;
   TestIntel(46);
   if loc<>46 then
-    halt(1);
+    begin
+      Writeln('Error in intel code');
+      halt(1);
+    end;
 end.