summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw0735.pp
blob: 19c68ea0e36326a3a477e9cdc2353306d50b3ef1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ %CPU=i386 }
{ %OPT=-Cg- }
{$asmmode intel}
{$inline on}

procedure DoIt;
begin
  Writeln('DoIt was called');
end;

const
  CB : word = 5;

procedure A(B: word); assembler; inline;
asm
   MOV  AX,B
   CMP  AX,[CB]
   JZ   @OK
   MOV  [CB],AX
   CALL DoIt
@OK:      { <-- creates labels with same name }
end;

begin
   A(5);
   A(8);
end.