⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hal_wait.s51

📁 zigbee location examples
💻 S51
字号:
//////////////////////////////////////////////////////////////////////////////
//                                                                           /
// IAR 8051 C/C++ Compiler V7.20H/W32                  16/Jan/2007  15:33:13 /
// Copyright 2004-2006 IAR Systems. All rights reserved.                     /
//                                                                           /
//    Core               =  plain                                            /
//    Code model         =  banked                                           /
//    Data model         =  large                                            /
//    Calling convention =  xdata reentrant                                  /
//    Constant location  =  data                                             /
//    Dptr setup         =  1,16                                             /
//    Source file        =  E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Eng /
//                          ine\lib\hal\CC2430\hal_wait.c                    /
//    Command line       =  -I "C:\Program Files\IAR Systems\Embedded        /
//                          Workbench 4.05 Evaluation version\8051\INC\" -I  /
//                          "C:\Program Files\IAR Systems\Embedded           /
//                          Workbench 4.05 Evaluation                        /
//                          version\8051\SRC\LIB\" -I "C:\Program Files\IAR  /
//                          Systems\Embedded Workbench 4.05 Evaluation       /
//                          version\8051\INC\CLIB\" -I                       /
//                          E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Eng /
//                          ine\Test\mac\mac_loc\..\..\..\include\ -I        /
//                          E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Eng /
//                          ine\Test\mac\mac_loc\..\..\..\include\mac\cc2430 /
//                          \ -I E:\公司产品资料\Zigbee\cc2431\cc2431定位\LO /
//                          C_Engine\Test\mac\mac_loc\..\..\..\include\hal\c /
//                          c2430\ -I E:\公司产品资料\Zigbee\cc2431\cc2431定 /
//                          位\LOC_Engine\Test\mac\mac_loc\..\..\..\apps\    /
//                          -D USE_LED -D SOC_BB -lCN                        /
//                          "E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_En /
//                          gine\Test\mac\mac_loc\SOC_BB, hex\List\" -lA     /
//                          "E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_En /
//                          gine\Test\mac\mac_loc\SOC_BB, hex\List\" -o      /
//                          "E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_En /
//                          gine\Test\mac\mac_loc\SOC_BB, hex\Obj\" -e -s9   /
//                          --debug --core=plain --dptr=16,1                 /
//                          --data_model=large --code_model=banked           /
//                          --calling_convention=xdata_reentrant             /
//                          --place_constants=data --nr_virtual_regs 8       /
//                          E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Eng /
//                          ine\lib\hal\CC2430\hal_wait.c                    /
//    List file          =  E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Eng /
//                          ine\Test\mac\mac_loc\SOC_BB,                     /
//                          hex\List\hal_wait.s51                            /
//                                                                           /
//                                                                           /
//////////////////////////////////////////////////////////////////////////////

        NAME hal_wait

        RTMODEL "__calling_convention", "xdata_reentrant"
        RTMODEL "__code_model", "banked"
        RTMODEL "__core", "plain"
        RTMODEL "__data_model", "large"
        RTMODEL "__dptr_size", "16"
        RTMODEL "__extended_stack", "disabled"
        RTMODEL "__location_for_constants", "data"
        RTMODEL "__number_of_dptrs", "1"
        RTMODEL "__rt_version", "1"

        RSEG DOVERLAY:DATA:NOROOT(0)
        RSEG IOVERLAY:IDATA:NOROOT(0)
        RSEG ISTACK:IDATA:NOROOT(0)
        RSEG PSTACK:XDATA:NOROOT(0)
        RSEG XSTACK:XDATA:NOROOT(0)

        PUBLIC halMacWait
        FUNCTION halMacWait,080203H
        
        CFI Names cfiNames0
        CFI StackFrame CFA_SP SP DATA
        CFI StackFrame CFA_PSP16 PSP16 XDATA
        CFI StackFrame CFA_XSP16 XSP16 XDATA
        CFI StaticOverlayFrame CFA_IOVERLAY IOVERLAY
        CFI StaticOverlayFrame CFA_DOVERLAY DOVERLAY
        CFI Resource `PSW.CY`:1, `B.BR0`:1, `B.BR1`:1, `B.BR2`:1, `B.BR3`:1
        CFI Resource `B.BR4`:1, `B.BR5`:1, `B.BR6`:1, `B.BR7`:1, `VB.BR8`:1
        CFI Resource `VB.BR9`:1, `VB.BR10`:1, `VB.BR11`:1, `VB.BR12`:1
        CFI Resource `VB.BR13`:1, `VB.BR14`:1, `VB.BR15`:1, VB:8, B:8, A:8
        CFI Resource PSW:8, DPL0:8, DPH0:8, R0:8, R1:8, R2:8, R3:8, R4:8, R5:8
        CFI Resource R6:8, R7:8, V0:8, V1:8, V2:8, V3:8, V4:8, V5:8, V6:8, V7:8
        CFI Resource SP:8, PSPH:8, PSPL:8, PSP16:16, XSPH:8, XSPL:8, XSP16:16
        CFI VirtualResource ?RET:24
        CFI Resource ?BRET_EXT:8
        CFI VirtualResource ?RET_HIGH:8, ?RET_LOW:8
        CFI ResourceParts PSP16 PSPH, PSPL
        CFI ResourceParts XSP16 XSPH, XSPL
        CFI ResourceParts ?RET ?BRET_EXT, ?RET_HIGH, ?RET_LOW
        CFI EndNames cfiNames0
        
        CFI Common cfiCommon0 Using cfiNames0
        CFI CodeAlign 1
        CFI DataAlign -1
        CFI ReturnAddress ?RET CODE
        CFI CFA_DOVERLAY Used
        CFI CFA_IOVERLAY Used
        CFI CFA_SP SP+-2
        CFI CFA_PSP16 PSP16+0
        CFI CFA_XSP16 XSP16+0
        CFI `PSW.CY` SameValue
        CFI `B.BR0` SameValue
        CFI `B.BR1` SameValue
        CFI `B.BR2` SameValue
        CFI `B.BR3` SameValue
        CFI `B.BR4` SameValue
        CFI `B.BR5` SameValue
        CFI `B.BR6` SameValue
        CFI `B.BR7` SameValue
        CFI `VB.BR8` SameValue
        CFI `VB.BR9` SameValue
        CFI `VB.BR10` SameValue
        CFI `VB.BR11` SameValue
        CFI `VB.BR12` SameValue
        CFI `VB.BR13` SameValue
        CFI `VB.BR14` SameValue
        CFI `VB.BR15` SameValue
        CFI VB SameValue
        CFI B Undefined
        CFI A Undefined
        CFI PSW SameValue
        CFI DPL0 SameValue
        CFI DPH0 SameValue
        CFI R0 Undefined
        CFI R1 Undefined
        CFI R2 Undefined
        CFI R3 Undefined
        CFI R4 Undefined
        CFI R5 Undefined
        CFI R6 SameValue
        CFI R7 SameValue
        CFI V0 SameValue
        CFI V1 SameValue
        CFI V2 SameValue
        CFI V3 SameValue
        CFI V4 SameValue
        CFI V5 SameValue
        CFI V6 SameValue
        CFI V7 SameValue
        CFI PSPH Undefined
        CFI PSPL Undefined
        CFI XSPH Undefined
        CFI XSPL Undefined
        CFI ?RET Concat
        CFI ?BRET_EXT SameValue
        CFI ?RET_HIGH Frame(CFA_SP, 2)
        CFI ?RET_LOW Frame(CFA_SP, 1)
        CFI EndCommon cfiCommon0
        
// E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Engine\lib\hal\CC2430\hal_wait.c
//    1 /*******************************************************************************************************
//    2  *                                                                                                     *
//    3  *        **********                                                                                   *
//    4  *       ************                                                                                  *
//    5  *      ***        ***                                                                                 *
//    6  *      ***   +++   ***                                                                                *
//    7  *      ***   + +   ***                                                                                *
//    8  *      ***   +                        CHIPCON HARDWARE ABSTRACTION LIBRARY FOR THE CC2430             *
//    9  *      ***   + +   ***                                  Idle Looping                                  *
//   10  *      ***   +++   ***                                                                                *
//   11  *      ***        ***                                                                                 *
//   12  *       ************                                                                                  *
//   13  *        **********                                                                                   *
//   14  *                                                                                                     *
//   15  *******************************************************************************************************
//   16  * Copyright Chipcon AS, 2005                                                                          *
//   17  *******************************************************************************************************
//   18  * The Chipcon Hardware Abstraction Library is a collection of functions, macros and constants, which  *
//   19  * can be used to ease access to the hardware on the CC2430 and the target microcontroller.            *
//   20  *                                                                                                     *
//   21  * This file contains a function that implements idle looping, with a resolution of 1 msec.            *
//   22  *                                                                                                     *
//   23  * EXAMPLE OF USAGE:                                                                                   *
//   24  *     // Wait for at least 50 milliseconds                                                            *
//   25  *     halWait(50000);                                                                                 *
//   26  *******************************************************************************************************
//   27  *******************************************************************************************************/
//   28 #include <mac_headers.h>
//   29 
//   30 
//   31 
//   32 
//   33 //-------------------------------------------------------------------------------------------------------
//   34 //  void halMacWait(UINT16 timeout)
//   35 //
//   36 //  DESCRIPTION:
//   37 //      Runs an idle loop for [timeout] microseconds.
//   38 //      Note: The time spent in interruptions will be added to the timeout!
//   39 //
//   40 //  ARGUMENTS:
//   41 //      UINT16 timeout
//   42 //          The timeout in microseconds
//   43 //-------------------------------------------------------------------------------------------------------

        RSEG NEAR_CODE:CODE:NOROOT(0)
//   44 ROOT void halMacWait(UINT16 timeout) {
halMacWait:
        CFI Block cfiBlock0 Using cfiCommon0
        CFI Function halMacWait
        ; Saved register size: 0
        ; Auto size: 0
        SJMP	??halMacWait_0
//   45     while (timeout--) {
//   46         asm("NOP");
??halMacWait_1:
        NOP
//   47         asm("NOP");
        NOP
//   48         asm("NOP");
        NOP
//   49         asm("NOP");
        NOP
//   50         asm("NOP");
        NOP
//   51         asm("NOP");
        NOP
//   52         asm("NOP");
        NOP
//   53         asm("NOP");
        NOP
//   54     }
??halMacWait_0:
        MOV	A,R2
        MOV	R0,A
        MOV	A,R3
        MOV	R1,A
        MOV	A,#-0x1
        ADD	A,R0
        DEC	R2
        MOV	A,#-0x1
        ADDC	A,R1
        MOV	R3,A
        MOV	A,R0
        JNZ	??halMacWait_2
        MOV	A,R1
??halMacWait_2:
        JNZ	??halMacWait_1
//   55 }
        RET
        CFI EndBlock cfiBlock0

        END
//   56 
//   57 
// 
// 29 bytes in segment NEAR_CODE
// 
// 29 bytes of CODE memory
//
//Errors: none
//Warnings: none

⌨️ 快捷键说明

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