tmmxshift.pp 812 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {$mmx+}
  2. uses
  3. mmx;
  4. var
  5. wa,wb : tmmxword;
  6. ca,cb : tmmxcardinal;
  7. i : longint;
  8. begin
  9. for i:=low(wa) to high(wa) do
  10. wa[i]:=2;
  11. wb:=default(tmmxword);
  12. wb[0]:=2;
  13. wa:=wa shl 3;
  14. for i:=low(wa) to high(wa) do
  15. if wa[i]<>16 then
  16. halt(1);
  17. wa:=wa shl wb;
  18. for i:=low(wa) to high(wa) do
  19. if wa[i]<>64 then
  20. halt(1);
  21. wa:=(wa shr 3) shr wb;
  22. for i:=low(wa) to high(wa) do
  23. if wa[i]<>2 then
  24. halt(1);
  25. for i:=low(ca) to high(ca) do
  26. ca[i]:=2;
  27. cb:=default(tmmxcardinal);
  28. cb[0]:=2;
  29. ca:=ca shl 3;
  30. for i:=low(ca) to high(ca) do
  31. if ca[i]<>16 then
  32. halt(1);
  33. ca:=ca shl cb;
  34. for i:=low(wa) to high(ca) do
  35. if ca[i]<>64 then
  36. halt(1);
  37. ca:=(ca shr 3) shr cb;
  38. for i:=low(ca) to high(ca) do
  39. if ca[i]<>2 then
  40. halt(1);
  41. writeln('ok');
  42. end.