summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw8195b.pp
blob: fbc339d849da2b9560da1549833db983b9567ee3 (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- }

{$APPTYPE CONSOLE}

{$ifdef fpc}
  {$mode delphi}
{$endif}

function Expression1: Integer;
asm
  mov eax, 4 * 3 - 2 + (-1) / 2
end;

function Expression2: Integer;
asm
  mov eax, NOT 4 OR 3 AND 2 XOR 1 MOD 6 SHL 4 SHR 2
end;


begin
  WriteLn('Expression1: ', Expression1);
  WriteLn('Expression2: ', Expression2);
  if (Expression1<>10) or (Expression2<>-1) then
    halt(1);
end.