+ added test for local label data access from i8086 inline asm

git-svn-id: trunk@32178 -
This commit is contained in:
nickysn 2015-10-28 17:00:35 +00:00
parent 83d90c7888
commit ce7672b750
2 changed files with 39 additions and 0 deletions

1
.gitattributes vendored
View File

@ -11474,6 +11474,7 @@ tests/test/cpu16/i8086/thugeptr5.pp svneol=native#text/pascal
tests/test/cpu16/i8086/thugeptr5a.pp svneol=native#text/pascal
tests/test/cpu16/i8086/tintr1.pp svneol=native#text/pascal
tests/test/cpu16/i8086/tintr2.pp svneol=native#text/pascal
tests/test/cpu16/i8086/tlbldat1.pp svneol=native#text/plain
tests/test/cpu16/i8086/tmmc.pp svneol=native#text/pascal
tests/test/cpu16/i8086/tmml.pp svneol=native#text/pascal
tests/test/cpu16/i8086/tmmm.pp svneol=native#text/pascal

View File

@ -0,0 +1,38 @@
{ %cpu=i8086 }
{ test for local label data access from within inline asm }
{ this test is Turbo Pascal 7 compatible }
program tlbldat1;
label
lbl;
var
a, a2, b, b2: Word;
begin
asm
mov ax, word ptr [lbl]
mov a, ax
mov ax, word ptr [lbl + 2]
mov a2, ax
mov ax, word ptr [@@loc_lbl]
mov b, ax
mov ax, word ptr [@@loc_lbl + 2]
mov b2, ax
jmp @@GoOn
lbl:
dw $1234
dw $4321
@@loc_lbl:
dw $5678
dw $8765
@@GoOn:
end;
if (a=$1234) and (a2=$4321) and (b=$5678) and (b2=$8765) then
Writeln('Ok!')
else
begin
Writeln('Error');
Halt(1);
end;
end.