fpc/tests/test/tasmpublic2.pp
nickysn be3ff9128a + added an i8086 test for the public directive
git-svn-id: trunk@37531 -
2017-10-30 17:02:48 +00:00

33 lines
440 B
ObjectPascal

{ %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.