91x_vect.lst

来自「STR912 arm9实现的以太网通信程序」· LST 代码 · 共 732 行 · 第 1/2 页

LST
732
字号



ARM Macro Assembler    Page 1 


    1 00000000         ;******************** (C) COPYRIGHT 2007 STMicroelectron
                       ics ********************
    2 00000000         ;* File Name          : 91x_vect.s
    3 00000000         ;* Author             : MCD Application Team
    4 00000000         ;* Version            : V2.0
    5 00000000         ;* Date               : 12/07/2007
    6 00000000         ;* Description        : This File used to initialize the
                        exception and IRQ
    7 00000000         ;*                      vectors, and to enter/return to/
                       from exceptions
    8 00000000         ;*                      handlers.
    9 00000000         ;*******************************************************
                       ************************
   10 00000000         ; THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS A
                       T PROVIDING CUSTOMERS WITH
   11 00000000         ; CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER F
                       OR THEM TO SAVE TIME. AS
   12 00000000         ; A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE 
                       FOR ANY DIRECT, INDIRECT
   13 00000000         ; OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS AR
                       ISING FROM THE CONTENT
   14 00000000         ; OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF T
                       HE CODING INFORMATION
   15 00000000         ; CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
   16 00000000         ;*******************************************************
                       ***********************/
   17 00000000         
   18 00000000         
   19 00000000 FFFFF030 
                       VectorAddress
                               EQU              0xFFFFF030  ; VIC Vector addres
                                                            s register address.
                                                            
   20 00000000         
   21 00000000         
   22 00000000         ;*******************************************************
                       ************************
   23 00000000         ;              Import  the Program Start address from 91
                       x_init.s
   24 00000000         ;*******************************************************
                       ************************
   25 00000000         
   26 00000000                 EXPORT           Vectors
   27 00000000         ;*******************************************************
                       ************************
   28 00000000         ;              Import  the Reset_Handler address from 71
                       x_init.s
   29 00000000         ;*******************************************************
                       ************************
   30 00000000         
   31 00000000                 IMPORT           Reset_Handler
   32 00000000         
   33 00000000         ;*******************************************************
                       ************************
   34 00000000         ;                      Import exception handlers
   35 00000000         ;*******************************************************
                       ************************
   36 00000000         
   37 00000000                 IMPORT           Undefined_Handler



ARM Macro Assembler    Page 2 


   38 00000000                 IMPORT           SWI_Handler
   39 00000000                 IMPORT           Prefetch_Handler
   40 00000000                 IMPORT           Abort_Handler
   41 00000000                 IMPORT           FIQ_Handler
   42 00000000         
   43 00000000         ;*******************************************************
                       ************************
   44 00000000         ;                        Exception vectors
   45 00000000         ;*******************************************************
                       ************************
   46 00000000                 PRESERVE8
   47 00000000                 AREA             Reset, CODE, READONLY
   48 00000000                 ARM
   49 00000000         Vectors
   50 00000000 E59FF02C        LDR              PC, Reset_Addr
   51 00000004 E59FF02C        LDR              PC, Undefined_Addr
   52 00000008 E59FF02C        LDR              PC, SWI_Addr
   53 0000000C E59FF02C        LDR              PC, Prefetch_Addr
   54 00000010 E59FF02C        LDR              PC, Abort_Addr
   55 00000014 E1A00000        NOP                          ; Reserved vector
   56 00000018 E59FF02C        LDR              PC, IRQ_Addr
   57 0000001C         
   58 0000001C         ;*******************************************************
                       ************************
   59 0000001C         ;* Function Name  : FIQHandler
   60 0000001C         ;* Description    : This function is called when FIQ exc
                       eption is entered.
   61 0000001C         ;* Input          : none
   62 0000001C         ;* Output         : none
   63 0000001C         ;*******************************************************
                       ************************
   64 0000001C         FIQHandler
   65 0000001C E24EE004        SUB              lr,lr,#4    ; Update the link r
                                                            egister.
   66 00000020 E92D400F        STMFD            sp!,{r0-r3,lr} ; Save The works
                                                            pace plus the curre
                                                            nt return
   67 00000024         ; address lr_fiq into the FIQ stack.
   68 00000024 E59F0094        ldr              r0,=FIQ_Handler
   69 00000028 E59FE094        ldr              lr,=FIQ_Handler_end
   70 0000002C E12FFF10        bx               r0          ;Branch to FIQ_Hand
                                                            ler.
   71 00000030         FIQ_Handler_end
   72 00000030         
   73 00000030 E8FD800F        LDMFD            sp!,{r0-r3,pc}^ ; Return to the
                                                             instruction follow
                                                            ing...
   74 00000034         ; ...the exception interrupt.
   75 00000034         
   76 00000034         
   77 00000034         ;*******************************************************
                       ************************
   78 00000034         ;               Exception handlers address table
   79 00000034         ;*******************************************************
                       ************************
   80 00000034         
   81 00000034 00000000 
                       Reset_Addr
                               DCD              Reset_Handler



ARM Macro Assembler    Page 3 


   82 00000038 00000000 
                       Undefined_Addr
                               DCD              UndefinedHandler
   83 0000003C 00000000 
                       SWI_Addr
                               DCD              SWIHandler
   84 00000040 00000000 
                       Prefetch_Addr
                               DCD              PrefetchAbortHandler
   85 00000044 00000000 
                       Abort_Addr
                               DCD              DataAbortHandler
   86 00000048 00000000        DCD              0           ; Reserved vector
   87 0000004C 00000000 
                       IRQ_Addr
                               DCD              IRQHandler
   88 00000050         
   89 00000050         
   90 00000050         ;*******************************************************
                       ************************
   91 00000050         ;                                  MACRO
   92 00000050         ;*******************************************************
                       ************************
   93 00000050         ;*******************************************************
                       ************************
   94 00000050         ;* Macro Name     : SaveContext
   95 00000050         ;* Description    : This macro is used to save the conte
                       xt before entering
   96 00000050         ;                   an exception handler.
   97 00000050         ;* Input          : The range of registers to store.
   98 00000050         ;* Output         : none
   99 00000050         ;*******************************************************
                       ************************
  100 00000050                 MACRO
  101 00000050                 SaveContext      $reg1,$reg2
  102 00000050         
  103 00000050                 STMFD            sp!,{$reg1-$reg2,lr} ; Save The
                                                             workspace plus the
                                                             current return
  104 00000050         ; address lr_ mode into the stack.
  105 00000050         
  106 00000050                 MEND
  107 00000050         
  108 00000050         ;*******************************************************
                       ************************
  109 00000050         ;* Macro Name     : RestoreContext
  110 00000050         ;* Description    : This macro is used to restore the co
                       ntext to return from
  111 00000050         ;                   an exception handler and continue th
                       e program execution.
  112 00000050         ;* Input          : The range of registers to restore.
  113 00000050         ;* Output         : none
  114 00000050         ;*******************************************************
                       ************************
  115 00000050                 MACRO
  116 00000050                 RestoreContext   $reg1,$reg2
  117 00000050         
  118 00000050                 LDMFD            sp!,{$reg1-$reg2,pc}^ ; Return 
                                                            to the instruction 



ARM Macro Assembler    Page 4 


                                                            following...
  119 00000050         ; ...the exception interrupt.
  120 00000050                 MEND
  121 00000050         
  122 00000050         
  123 00000050         ;*******************************************************
                       ************************
  124 00000050         ;                         Exception Handlers
  125 00000050         ;*******************************************************
                       ************************
  126 00000050         
  127 00000050         
  128 00000050         ;*******************************************************
                       ************************
  129 00000050         ;* Function Name  : UndefinedHandler
  130 00000050         ;* Description    : This function is called when undefin
                       ed instruction
  131 00000050         ;                   exception is entered.
  132 00000050         ;* Input          : none
  133 00000050         ;* Output         : none
  134 00000050         ;*******************************************************
                       ************************
  135 00000050         
  136 00000050         UndefinedHandler
  137 00000050                 SaveContext      r0,r3       ; Save the workspac
                                                            e plus the current
  102 00000050         
  103 00000050 E92D400F        STMFD            sp!,{r0-r3,lr} ; Save The works
                                                            pace plus the curre
                                                            nt return
  104 00000054         ; address lr_ mode into the stack.
  105 00000054         
  138 00000054         ; return address lr_ und.
  139 00000054         
  140 00000054 E59F006C        ldr              r0,=Undefined_Handler
  141 00000058 E59FE06C        ldr              lr,=Undefined_Handler_end
  142 0000005C E12FFF10        bx               r0          ; Branch to Undefin
                                                            ed_Handler.
  143 00000060         
  144 00000060         Undefined_Handler_end
  145 00000060                 RestoreContext   r0,r3       ; Return to the ins
                                                            truction following.
                                                            ..
  117 00000060         
  118 00000060 E8FD800F        LDMFD            sp!,{r0-r3,pc}^ ; Return to the
                                                             instruction follow
                                                            ing...
  119 00000064         ; ...the exception interrupt.
  146 00000064         ; ...the undefined instruction.
  147 00000064         
  148 00000064         ;*******************************************************
                       ************************
  149 00000064         ;* Function Name  : SWIHandler
  150 00000064         ;* Description    : This function is called when SWI ins
                       truction executed.
  151 00000064         ;* Input          : none
  152 00000064         ;* Output         : none
  153 00000064         ;*******************************************************
                       ************************



ARM Macro Assembler    Page 5 


  154 00000064         
  155 00000064         SWIHandler
  156 00000064                 SaveContext      r0,r3       ; Save the workspac
                                                            e plus the current
  102 00000064         
  103 00000064 E92D400F        STMFD            sp!,{r0-r3,lr} ; Save The works
                                                            pace plus the curre
                                                            nt return
  104 00000068         ; address lr_ mode into the stack.
  105 00000068         
  157 00000068         ; return address lr_ svc.
  158 00000068         
  159 00000068 E59F0060        ldr              r0,=SWI_Handler
  160 0000006C E59FE060        ldr              lr,=SWI_Handler_end
  161 00000070 E12FFF10        bx               r0          ; Branch to SWI_Han
                                                            dler.
  162 00000074         
  163 00000074         SWI_Handler_end
  164 00000074                 RestoreContext   r0,r3       ; Return to the ins
                                                            truction following.
                                                            ..
  117 00000074         
  118 00000074 E8FD800F        LDMFD            sp!,{r0-r3,pc}^ ; Return to the
                                                             instruction follow
                                                            ing...
  119 00000078         ; ...the exception interrupt.
  165 00000078         ; ...the SWI instruction.
  166 00000078         ;*******************************************************
                       ************************
  167 00000078         ;* Function Name  : PrefetchAbortHandler
  168 00000078         ;* Description    : This function is called when Prefetc
                       h Abort
  169 00000078         ;                   exception is entered.
  170 00000078         ;* Input          : none
  171 00000078         ;* Output         : none
  172 00000078         ;*******************************************************
                       ************************
  173 00000078         
  174 00000078         PrefetchAbortHandler
  175 00000078 E24EE004        SUB              lr,lr,#4    ; Update the link r
                                                            egister.
  176 0000007C                 SaveContext      r0,r3       ; Save the workspac
                                                            e plus the current
  102 0000007C         
  103 0000007C E92D400F        STMFD            sp!,{r0-r3,lr} ; Save The works
                                                            pace plus the curre
                                                            nt return
  104 00000080         ; address lr_ mode into the stack.
  105 00000080         
  177 00000080         ; return address lr_abt.
  178 00000080         
  179 00000080 E59F0050        ldr              r0,=Prefetch_Handler
  180 00000084 E59FE050        ldr              lr,=Prefetch_Handler_end
  181 00000088 E12FFF10        bx               r0          ; Branch to Prefetc
                                                            h_Handler.
  182 0000008C         
  183 0000008C         Prefetch_Handler_end
  184 0000008C                 RestoreContext   r0,r3       ; Return to the ins
                                                            truction following 



ARM Macro Assembler    Page 6 


                                                            that...
  117 0000008C         
  118 0000008C E8FD800F        LDMFD            sp!,{r0-r3,pc}^ ; Return to the
                                                             instruction follow
                                                            ing...
  119 00000090         ; ...the exception interrupt.
  185 00000090         ; ...has generated the prefetch abort exception.
  186 00000090         
  187 00000090         ;*******************************************************
                       ************************
  188 00000090         ;* Function Name  : DataAbortHandler
  189 00000090         ;* Description    : This function is called when Data Ab
                       ort
  190 00000090         ;                   exception is entered.
  191 00000090         ;* Input          : none
  192 00000090         ;* Output         : none
  193 00000090         ;*******************************************************
                       ************************
  194 00000090         
  195 00000090         DataAbortHandler
  196 00000090 E24EE008        SUB              lr,lr,#8    ; Update the link r
                                                            egister.
  197 00000094                 SaveContext      r0,r3       ; Save the workspac
                                                            e plus the current
  102 00000094         
  103 00000094 E92D400F        STMFD            sp!,{r0-r3,lr} ; Save The works
                                                            pace plus the curre
                                                            nt return
  104 00000098         ; address lr_ mode into the stack.
  105 00000098         
  198 00000098         ; return address lr_ abt.
  199 00000098 E59F0040        ldr              r0,=Abort_Handler
  200 0000009C E59FE040        ldr              lr,=Abort_Handler_end
  201 000000A0 E12FFF10        bx               r0          ; Branch to Abort_H
                                                            andler.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?