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

📄 echo_asm.s54

📁 CCS以及DSP/BIOS中文教程的光盘代码
💻 S54
字号:
;;  Copyright 2001 by Texas Instruments Incorporated.;  All rights reserved. Property of Texas Instruments Incorporated.;  Restricted rights to use, duplicate or disclose this code are;  granted through contract.;  ;; "@(#) DSP/BIOS 4.60.22 12-07-01 (barracuda-j15)";
;  ======== echo_asm.s54 ========
;  C-callable interface to assembly language utility functions for the
;  echo example.
;

    .mmregs

    .global _ECHO_load

    .text

N       .set    1000

;
;  ======== _ECHO_load ========
;  This function simulates a load on the DSP by executing N * loopCount
;  instructions, where loopCount is the input parameter to ECHO_load().
;
;      void ECHO_load(int loopCount)
;
;  true execution time: ?? + N * (loop count)
;
_ECHO_load:
        sub     #1, a
        stlm    a, ar4          ; ar4 = loopCount - 1
        ld      #(N/4-2), a     ; a = (N / 4) - 2
loop:   
        stlm    a,brc           ; initialize count register for block rpt
        nop
        nop
        rptb    $1
        nop
        nop
        nop
$1      nop
        banz    loop, *ar4-

    .if __far_mode      ; -mf flag will assemble far mode return opcode
        fret
    .else
        ret
    .endif
    
    .end

⌨️ 快捷键说明

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