tw1122.pp 618 B

1234567891011121314151617181920212223242526272829303132
  1. { %version=1.1 }
  2. { %cpu=i386 }
  3. {$mode objfpc}
  4. { Source provided for Free Pascal Bug Report 1122 }
  5. { Submitted by "Thomas Schatzl" on 2000-08-31 }
  6. { e-mail: [email protected] }
  7. uses
  8. sysutils;
  9. var
  10. error : boolean;
  11. begin
  12. error:=true;
  13. try
  14. asm
  15. // invalid opcode, e.g. SSE instruction
  16. // try several opcode to get the invalid instruction exception
  17. movaps %xmm6, %xmm7
  18. .byte 0x0f,0xc7,0xc8
  19. .byte 1,2,3,4
  20. end;
  21. except
  22. error:=false;
  23. end;
  24. if error then
  25. begin
  26. writeln('Invalid opcode exception doesn'' work');
  27. halt(1);
  28. end;
  29. end.