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

📄 function.asm

📁 无刷直流电机的无传感器控制TI程序
💻 ASM
字号:
;=====================================================================================
; File name:        Function.ASM                     
;                    
; Originator:	Digital Control Systems Group
;			Texas Instruments
;
; Description:                                 
; This file contains source for a basic function accessing a single argument.
;=====================================================================================
; History:
;-------------------------------------------------------------------------------------
; 9-15-2000	Release	Rev 1.0
;================================================================================
; Applicability: F240,F241,C242,F243,F24xx.  (Peripheral Independant).
;
;
;================================================================================
; Routine Name: Generic function.        Routine Type: C Callable
;
; Description:
;  
;  C prototype : int function(int p)
;================================================================================
                .def        _function
;================================================================================

__function_framesize .set 0001h
;================================================================================
_function:
                     POPD        *+
                SAR        AR0,*+
                SAR        AR1,*
                LARK        AR0,__function_framesize
                LAR        AR0,*0+,AR0

;================================================================================
                SBRK        #3        ; Point AR0 to the first argument.
;--------------------------------------------------------------------------------
                LACL        *        ; get the argument.

;--------------------------------------------------------------------------------
__function_exit:
                MAR     *,AR1   ; can be removed if this condition is met on
                                ; every path to this code.
                        
                SBRK        #(__function_framesize+1)
                LAR        AR0,*-
                PSHD        *
                RET


⌨️ 快捷键说明

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