Interrupts are an important part of embedded 
systems. Consequently, many compiler vendors 
offer an extension to standard C to support interrupts. 
Typically, the keyword is __interrupt. The following 
code uses __interrupt to define an interrupt service 
routine (ISR). Point out problems in the code. __interrupt double compute_area (double radius) 

          double area = PI * radius * radius; 
          printf("\nArea = %f", area); 
          return area; 

解决方案 »

  1.   

    Interrupt是自动返回的吧?是不是不用写return?
      

  2.   

    __interrupt
    是个什么类型,没见过,管他呢。去掉就对了。要不看看MSDN需要包括什么头文件。
    如果不需要包括头文件。那就是错误。然后这PI定义了没有。别的没有问题了
      

  3.   

    中断函数的声明似乎要声明为far形式
    在声明中加上__fortran, __pascal, 或者 __fastcall 关键字。
      

  4.   

    sorry我的答案后半句是错的!
      

  5.   

    printf("\nArea = %f", area); 
    中断中不能调用printf,因为printf也会引起中断。