Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.0.0 / tests / webtbs / tw26668.pp
Size: Mime:
{ %CPU=i386 }
{ %OPT=-Cg- }

{$mode delphi}
const __dd = 1;
function f1 (var p : longword) : byte;
asm
  lea eax, [ eax + 2 ]
  mov al,  [eax - __dd + 1].byte
end;

function f2 (var p : longword) : byte;
asm
  lea eax, [ eax + 2 ]
  mov al,  [eax - __dd].byte [1]
end;

function f3 (var p : longword) : byte;
asm
  lea eax, [ eax + 2 ]
  mov al,  [eax - 1 + 1].byte
end;

var v : longword = $01020304;

begin
  { all three functions must produce the same code }
  if f1(v)<>2 then
    halt(1);
  if f2(v)<>2 then
    halt(2);
  if f3(v)<>2 then
    halt(3);
end.