CX51 用户手册----INTERVAL 伪指令

来源:互联网 发布:android编程软件 编辑:程序博客网 时间:2024/05/22 06:41

声明:

1、本翻译仅供个人学习使用,本人没有提供技术支持的义务,也不承担由此引发的任何后果。

2、请勿用于商业用途。

3、英文来自:http://www.keil.com/support/man/docs/c51/。

4、欢迎大家共同与我交流探讨(290207203@qq.com)。

INTERVAL Compiler Directive

Abbreviation

None.

Arguments

An optional interval, in parentheses, for the interrupt vector table. The permitted range is 3 — 64.

Default

INTERVAL (8)

µVision

Options — C51 — Misc controls.

Description

The INTERVAL directive specifies an interval for interrupt vectors. When this directive is specified, the compiler locates interrupt vectors at the absolute address calculated by:

(interval × n) + offset + 3,

Where

intervalis the argument of the INTERVAL directive (default 8).nis the interrupt number.offsetis the argument of the INTVECTOR directive (default 0).

 Note

  • An interval specification is required for SIECO-51 derivatives which define interrupt vectors in 3-byte intervals.
See Also

INTVECTORNOINTVECTOR

Example
C51 SAMPLE.C INTERVAL(3)#pragma interval(3)

 Related Knowledgebase Articles

  • C51: INTERVAL DIRECTIVE
  • C251: INTERVAL DIRECTIVE


INTERVAL 编译器伪指令

缩写

None.

参数

中断向量表间隔,用括号括起来。 允许的范围是 3 — 64。

缺省

INTERVAL (8)

µVision

Options — C51 — Misc controls.

描述

INTERVAL 伪指令指定中断向量表之间的间隔。当指定这个伪指令时,编译器按照下面的公式,把中断向量定位在绝对地址上。

(interval × n) + offset + 3,

这里

intervalINTERVAL伪指令的参数 (缺省是 8)。n中断号offsetINTVECTOR 伪指令的参数  (缺省是 0)。

注意

  • SIECO-51 派生器件需要间隔规范,因为它定义的中断向量间隔是 3字节。
参数

INTVECTORNOINTVECTOR

示例
C51 SAMPLE.C INTERVAL(3)#pragma interval(3)

 相关知识库标题

  • C51: INTERVAL DIRECTIVE
  • C251: INTERVAL DIRECTIVE


原创粉丝点击