IRQ.lst
上传用户:dsfgsdff
上传日期:2022-07-10
资源大小:319k
文件大小:22k
源码类别:

微处理器开发

开发平台:

C/C++

  1. ARM Macro Assembler    Page 1 
  2.     1 00000000         ;/****************************************Copyright (c)*
  3.                        *************************************************
  4.     2 00000000         ;**                               Guangzou ZLG-MCU Devel
  5.                        opment Co.,LTD.
  6.     3 00000000         ;**                                      graduate school
  7.                        
  8.     4 00000000         ;**                                 http://www.zlgmcu.co
  9.                        m
  10.     5 00000000         ;**
  11.     6 00000000         ;**--------------File Info------------------------------
  12.                        -------------------------------------------------
  13.     7 00000000         ;** File Name: IRQ.s
  14.     8 00000000         ;** Last modified Date:  2004-06-14
  15.     9 00000000         ;** Last Version: 1.1
  16.    10 00000000         ;** Descriptions: The irq handle that what allow the int
  17.                        errupt nesting. 
  18.    11 00000000         ;**
  19.    12 00000000         ;**-----------------------------------------------------
  20.                        -------------------------------------------------
  21.    13 00000000         ;** Created By: Chenmingji
  22.    14 00000000         ;** Created date:   2004-09-17
  23.    15 00000000         ;** Version: 1.0
  24.    16 00000000         ;** Descriptions: First version
  25.    17 00000000         ;**
  26.    18 00000000         ;**-----------------------------------------------------
  27.                        -------------------------------------------------
  28.    19 00000000         ;** Modified by:
  29.    20 00000000         ;** Modified date:
  30.    21 00000000         ;** Version:
  31.    22 00000000         ;** Descriptions:
  32.    23 00000000         ;**
  33.    24 00000000         ;*******************************************************
  34.                        *************************************************/
  35.    25 00000000         
  36.    26 00000000         
  37.    27 00000000                 INCLUDE          irq.inc     ; Inport the head f
  38.                                                             ile 引入头文件
  39.     1 00000000         ;/****************************************Copyright (c)*
  40.                        *************************************************
  41.     2 00000000         ;**                               广州周立功单片机发展有
  42.                        限公司
  43.     3 00000000         ;**                                     研    究    所
  44.     4 00000000         ;**                                        产品一部 
  45.     5 00000000         ;**
  46.     6 00000000         ;**                                 http://www.zlgmcu.co
  47.                        m
  48.     7 00000000         ;**
  49.     8 00000000         ;**--------------文件信息-------------------------------
  50.                        -------------------------------------------------
  51.     9 00000000         ;**文   件   名: IRQ.inc
  52.    10 00000000         ;**创   建   人: 陈明计
  53.    11 00000000         ;**最后修改日期: 2004年8月27日
  54.    12 00000000         ;**描        述: 定义IRQ汇编接口代码宏
  55.    13 00000000         ;**
  56.    14 00000000         ;**--------------历史版本信息---------------------------
  57.                        -------------------------------------------------
  58.    15 00000000         ;** 创建人: 陈明计
  59.    16 00000000         ;** 版  本: v1.0
  60.    17 00000000         ;** 日 期: 2004年8月27日
  61. ARM Macro Assembler    Page 2 
  62.    18 00000000         ;** 描 述: 原始版本
  63.    19 00000000         ;**
  64.    20 00000000         ;**--------------当前版本修订---------------------------
  65.                        ---------------------------------------------------
  66.    21 00000000         ;** 修改人:
  67.    22 00000000         ;** 日 期:
  68.    23 00000000         ;** 描 述:
  69.    24 00000000         ;**
  70.    25 00000000         ;**-----------------------------------------------------
  71.                        -------------------------------------------------
  72.    26 00000000         ;*******************************************************
  73.                        *************************************************/
  74.    27 00000000         
  75.    28 00000000 00000080 
  76.                        NoInt   EQU              0x80
  77.    29 00000000         
  78.    30 00000000 00000010 
  79.                        USR32Mode
  80.                                EQU              0x10
  81.    31 00000000 00000013 
  82.                        SVC32Mode
  83.                                EQU              0x13
  84.    32 00000000 0000001F 
  85.                        SYS32Mode
  86.                                EQU              0x1f
  87.    33 00000000 00000012 
  88.                        IRQ32Mode
  89.                                EQU              0x12
  90.    34 00000000 00000011 
  91.                        FIQ32Mode
  92.                                EQU              0x11
  93.    35 00000000         
  94.    36 00000000         
  95.    37 00000000         ;引入的外部标号在这声明
  96.    38 00000000                 IMPORT           OSIntCtxSw  ;任务切换函数
  97.    39 00000000                 IMPORT           OSIntExit   ;中断退出函数
  98.    40 00000000                 IMPORT           OSTCBCur
  99.    41 00000000                 IMPORT           OSTCBHighRdy
  100.    42 00000000                 IMPORT           OSIntNesting ;中断嵌套计数器
  101.    43 00000000                 IMPORT           StackUsr
  102.    44 00000000                 IMPORT           OsEnterSum
  103.    45 00000000         
  104.    46 00000000                 CODE32
  105.    47 00000000         
  106.    48 00000000                 AREA             IRQ,CODE,READONLY
  107.    49 00000000         
  108.    50 00000000                 MACRO
  109.    51 00000000         $IRQ_Label
  110.                                HANDLER          $IRQ_Exception_Function
  111.    52 00000000         
  112.    53 00000000                 EXPORT           $IRQ_Label  ; 输出的标号
  113.    54 00000000                 IMPORT           $IRQ_Exception_Function 
  114.                                                             ; 引用的外部标号
  115.    55 00000000         
  116.    56 00000000         $IRQ_Label
  117.    57 00000000                 SUB              LR, LR, #4  ; 计算返回地址
  118.    58 00000000                 STMFD            SP!, {R0-R3, R12, LR} 
  119.                                                             ; 保存任务环境
  120.    59 00000000                 MRS              R3, SPSR    ; 保存状态
  121. ARM Macro Assembler    Page 3 
  122.    60 00000000                 STMFD            SP, {R3, SP, LR}^ ; 保存用户状