diff --git a/.gitattributes b/.gitattributes index 3625ec6714..5b5f3ee107 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/tests/test/cpu16/i8086/tlbldat1.pp b/tests/test/cpu16/i8086/tlbldat1.pp new file mode 100644 index 0000000000..ddd1fe25f3 --- /dev/null +++ b/tests/test/cpu16/i8086/tlbldat1.pp @@ -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.