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

来源:互联网 发布:学大数据要高数基础吗 编辑:程序博客网 时间:2024/05/01 09:36

声明:

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

2、请勿用于商业用途。

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

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


INTVECTOR Compiler Directive

Abbreviation

IV

Arguments

An optional offset, in parentheses, for the interrupt vector table.

Default

INTVECTOR (0)

µVision

Options — C51 — Interrupt vectors at address.

Description

The INTVECTOR directive instructs the compiler to generate interrupt vectors for functions which require them. An offset may be entered if the vector table starts at an address other than 0. The range for this offset is 0 .. 65535.

The compiler generates interrupt vectors using either AJMP or LJMP instructions (depending on the size of the program memory specified with the ROM directive).

Vectors are located starting at absolute address:

(n * interval) + offset + 3

Where

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

INTERVALNOINTVECTOR

Example
C51 SAMPLE.C INTVECTOR(0x8000)#pragma iv(0x8000)

 Related Knowledgebase Articles

  • C51: RELOCATING INTERRUPT VECTOR TABLES
  • C51: RELOCATING AUTOVECTOR INTERRUPTS ON THE CYPRESS EZ-USB
  • C51: DALLAS 390/400 INTERRUPTS IN ALTERNATE 64K CODE PAGE
  • C51: INTVECTOR/NOINTVECTOR DIRECTIVE
  • C251: INTVECTOR/NOINTVECTOR DIRECTIVE


INTVECTOR 编译器伪指令
缩写

IV

参数

中断向量表的偏移选项,用括号括起来。

缺省

INTVECTOR (0)

µVision

Options — C51 — Interrupt vectors at address.

描述

INTVECTOR 伪指令通知编译器为中断函数生成中断向量。如果向量表的开始地址不是0,就需要输入偏移,偏移的范围是 0 .. 65535。

编译器使用 AJMP 或 LJMP i指令 (根据由ROM伪指令指定的程序存储器的大小)生成中断向量。

向量定位在绝对地址的开始处:

(n * interval) + offset + 3

这里

n中断号interval INTERVAL 伪指令参数(缺省是 8)。offsetINTVECTOR 伪指令参数(缺省是 0)。参考

INTERVALNOINTVECTOR

示例
C51 SAMPLE.C INTVECTOR(0x8000)#pragma iv(0x8000)

 相关知识库标题

  • C51: RELOCATING INTERRUPT VECTOR TABLES
  • C51: RELOCATING AUTOVECTOR INTERRUPTS ON THE CYPRESS EZ-USB
  • C51: DALLAS 390/400 INTERRUPTS IN ALTERNATE 64K CODE PAGE
  • C51: INTVECTOR/NOINTVECTOR DIRECTIVE
  • C251: INTVECTOR/NOINTVECTOR DIRECTIVE