tb0367.pp 383 B

12345678910111213141516171819202122232425262728
  1. { %CPU=i386 }
  2. { %VERSION=1.1 }
  3. {$ifdef fpc}
  4. {$mode delphi}
  5. {$asmmode intel}
  6. {$endif}
  7. function LRot(Value:Byte) : Byte; assembler;
  8. asm
  9. MOV CL, Value
  10. MOV Result, CL
  11. MOV AL, 20
  12. end;
  13. var
  14. i : Byte;
  15. begin
  16. i:=LRot(10);
  17. writeln('LRot(10) = ',i,' (should be 10)');
  18. if i<>10 then
  19. begin
  20. writeln('ERROR!');
  21. halt(1);
  22. end;
  23. end.