mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 06:39:31 +02:00
27 lines
365 B
ObjectPascal
27 lines
365 B
ObjectPascal
{ %CPU=i386 }
|
|
|
|
{$ifdef fpc}
|
|
{$mode delphi}
|
|
{$asmmode intel}
|
|
{$endif}
|
|
|
|
function LRot(Value:Byte) : Byte; assembler;
|
|
asm
|
|
MOV CL, Value
|
|
MOV Result, CL
|
|
MOV AL, 20
|
|
end;
|
|
|
|
|
|
var
|
|
i : Byte;
|
|
begin
|
|
i:=LRot(10);
|
|
writeln('LRot(10) = ',i,' (should be 10)');
|
|
if i<>10 then
|
|
begin
|
|
writeln('ERROR!');
|
|
halt(1);
|
|
end;
|
|
end.
|