<var id="fnfpo"><source id="fnfpo"></source></var>
<rp id="fnfpo"></rp>

<em id="fnfpo"><object id="fnfpo"><input id="fnfpo"></input></object></em>
<em id="fnfpo"><acronym id="fnfpo"></acronym></em>
  • <th id="fnfpo"><track id="fnfpo"></track></th>
  • <progress id="fnfpo"><track id="fnfpo"></track></progress>
  • <tbody id="fnfpo"><pre id="fnfpo"></pre></tbody>

  • stst158的個人空間 http://www.portaltwn.com/space-uid-5764.html [收藏] [復制] [RSS]

    博客

    李現路:在DSP6000中怎樣編寫您的第一個程序(二)

    已有 1997 次閱讀2009-11-28 10:32 |個人分類:DSP編程|

    李現路:在DSP6000中怎樣編寫您的第一個程序(二)   Post By:2009-11-23 23:46:16
     

    三、完整的中斷向量表程序如下:
     
     
       .global _vectors ;定義一個能被外部(C語言程序)引用的變量
       .global _c_int00
       .global _vector1
       .global _vector2
       .global _vector3
       .global _vector1
       .global _vector5
       .global _vector6
       .global _vector7
       .global _vector8 
       .global _vector9          
       .global _vector10
       .global _vector11 ; Hookup the c_int08 ISR(連接這個中斷設置寄存器) in main() 
       .global _vector12    ; Hookup the c_int08 ISR in main()
       .global _vector13  
       .global _vector14  
       .global _vector15  

    *------------------------------------------------------------------------------
    * Global symbols referenced in this file but defined somewhere else.
    * Remember that your interrupt service routines need to be referenced here.
    *------------------------------------------------------------------------------
       .ref _c_int00 ;reset ISR(復位中斷設置寄存), .ref表明一個或多個在另一個模塊中定義而在前模塊中要用到的符號

     
    *------------------------------------------------------------------------------
    * This is a macro that instantiates one entry in the interrupt service table.
    *------------------------------------------------------------------------------
    VEC_ENTRY .macro addr ;中斷返回函數
        STW   B0,*--B15
        MVKL  addr,B0
        MVKH  addr,B0
        B     B0
        LDW   *B15++,B0
        NOP   2
        NOP  
        NOP  
       .endm
     
     
    *------------------------------------------------------------------------------
    * This is a dummy interrupt service routine used to initialize the IST.
    *------------------------------------------------------------------------------
    _vec_dummy:  ;初始化IST寄存器(中斷向量表起始地址寄存器,用于設置中斷服務程序存放的地址)
      B    B3
      NOP  5

     
    *------------------------------------------------------------------------------
    * This is the actual interrupt service table (IST). It is properly aligned and
    * is located in the subsection .text:vecs. This means if you don't explicitly
    * specify this section in your linker command file, it will default and link
    * into the .text section. Remember to set the ISTP(中斷向量表起始地址寄存器) register to point to this
    * table.
    *------------------------------------------------------------------------------
     .sect ".vecs"  ;定義初始化帶名稱的段
     .align 1024  ;分配程序頁

     
    _vectors:
    _vector0:   VEC_ENTRY _c_int00    ;RESET(應用程序的入口)
    _vector1:   VEC_ENTRY _vec_dummy  ;NMI(非屏蔽中斷,用于處理極為關鍵的任務)
    _vector2:   VEC_ENTRY _vec_dummy  ;RSVD
    _vector3:   VEC_ENTRY _vec_dummy
    _vector4:   VEC_ENTRY _vec_dummy
    _vector5:   VEC_ENTRY _vec_dummy
    _vector6:   VEC_ENTRY _vec_dummy
    _vector7:   VEC_ENTRY _vec_dummy
    _vector8:   VEC_ENTRY _vec_dummy  
    _vector9:   VEC_ENTRY _vec_dummy
    _vector10:  VEC_ENTRY _vec_dummy
    _vector11:  VEC_ENTRY _vec_dummy ; Hookup the c_int08 ISR in main()
    _vector12:  VEC_ENTRY _vec_dummy    ; Hookup the c_int08 ISR in main()
    _vector13:  VEC_ENTRY _vec_dummy
    _vector14:  VEC_ENTRY _vec_dummy
    _vector15:  VEC_ENTRY _vec_dummy


    路過

    雞蛋

    鮮花

    握手

    雷人

    評論 (0 個評論)

    facelist

    您需要登錄后才可以評論 登錄 | 立即注冊

    關于我們  -  服務條款  -  使用指南  -  站點地圖  -  友情鏈接  -  聯系我們
    電子工程網 © 版權所有   京ICP備16069177號 | 京公網安備11010502021702
    返回頂部
    精品一区二区三区自拍图片区_国产成人亚洲精品_亚洲Va欧美va国产综合888_久久亚洲国产精品五月天婷