mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 20:29:23 +02:00
* Test for result in assembler for delphi mode
This commit is contained in:
parent
367f7a0362
commit
f399cef4e1
25
tests/tbs/tb0367.pp
Normal file
25
tests/tbs/tb0367.pp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{$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.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user