Browse Source

+ added test, which tests public labels as well as 'external far' variables on i8086

git-svn-id: trunk@37533 -
nickysn 7 years ago
parent
commit
d570c09b9d
2 changed files with 33 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 32 0
      tests/test/tasmpublic3.pp

+ 1 - 0
.gitattributes

@@ -12425,6 +12425,7 @@ tests/test/tasm8.pp svneol=native#text/plain
 tests/test/tasm9.pp svneol=native#text/pascal
 tests/test/tasmpublic1.pp svneol=native#text/pascal
 tests/test/tasmpublic2.pp svneol=native#text/pascal
+tests/test/tasmpublic3.pp svneol=native#text/pascal
 tests/test/tasmread.pp svneol=native#text/plain
 tests/test/tasout.pp svneol=native#text/plain
 tests/test/tassignmentoperator1.pp svneol=native#text/pascal

+ 32 - 0
tests/test/tasmpublic3.pp

@@ -0,0 +1,32 @@
+{ %CPU=i8086 }
+program tasmpublic3;
+
+{$goto on}
+{$asmmode intel}
+
+label
+  test_gLoBaL_label;
+
+var
+  codeseg_var: LongWord; external far name 'test_gLoBaL_label';
+
+begin
+  asm
+    public test_gLoBaL_label
+    jmp @@skip
+    db 'some garbage here'
+test_gLoBaL_label:
+    nop
+    nop
+    nop
+    nop
+@@skip:
+  end;
+  if codeseg_var<>$90909090 then
+  begin
+    Writeln('Error!');
+    Halt(1);
+  end
+  else
+    Writeln('Ok!');
+end.