mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 18:29:43 +02:00
+ added an i8086 test for the public directive
git-svn-id: trunk@37531 -
This commit is contained in:
parent
29558a74cd
commit
be3ff9128a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
32
tests/test/tasmpublic2.pp
Normal file
32
tests/test/tasmpublic2.pp
Normal file
@ -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.
|
Loading…
Reference in New Issue
Block a user