From be3ff9128af9ca8acfa394264c32eb832128d7a9 Mon Sep 17 00:00:00 2001 From: nickysn Date: Mon, 30 Oct 2017 17:02:48 +0000 Subject: [PATCH] + added an i8086 test for the public directive git-svn-id: trunk@37531 - --- .gitattributes | 1 + tests/test/tasmpublic2.pp | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tests/test/tasmpublic2.pp diff --git a/.gitattributes b/.gitattributes index a4a82e8ca5..338ee4f6c0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12424,6 +12424,7 @@ tests/test/tasm7.pp svneol=native#text/pascal 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/tasmread.pp svneol=native#text/plain tests/test/tasout.pp svneol=native#text/plain tests/test/tassignmentoperator1.pp svneol=native#text/pascal diff --git a/tests/test/tasmpublic2.pp b/tests/test/tasmpublic2.pp new file mode 100644 index 0000000000..1965ebe921 --- /dev/null +++ b/tests/test/tasmpublic2.pp @@ -0,0 +1,32 @@ +{ %CPU=i8086 } +program tasmpublic2; + +{$goto on} +{$asmmode intel} + +label + test_gLoBaL_label; + +var + codeseg_var: Word; external name 'test_gLoBaL_label'; + v: Word; + +begin + asm + public test_gLoBaL_label + jmp @@skip + db 'some garbage here' +test_gLoBaL_label: + dw 1234h +@@skip: + mov ax, cs:[codeseg_var] + mov v, ax + end; + if v<>$1234 then + begin + Writeln('Error!'); + Halt(1); + end + else + Writeln('Ok!'); +end.