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

📄 load.asm

📁 《DSP集成开发环境:CCS及DSP/BIOS的原理与应用》--源程序
💻 ASM
字号:
;;  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.;  U.S. Patent Nos. 5,283,900  5,392,448;; "@(#) DSP/BIOS 4.51.0 05-23-01 (barracuda-i10)";
;  ======== load.asm ========
;
;  C-callable interface to assembly language utility functions for the
;  volume example.

    .mmregs

    .global _load

    .text

N   .set        1000          ; multiple of four.

;
;  ======== _load ========
;  This function simulates a load on the DSP by executing N * loadValue
;  instructions, where loadValue is the input parameter to load().
;
;  true execution time: (loadValue)*((N/4 + 25) + 13
;
;  Preconditions:        a = loadValue
;
;  Postconditions:       none.
;
;  Modifies:             a
;
;  void load(unsigned int loadValue)
;
_load:
    bc  done, aeq       ; done if a = 0
    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-

done:
    .if __far_mode      ; -mf flag will assemble far mode return opcode
        fret
    .else
        ret
    .endif
                        ;/* end load() */
    .end

⌨️ 快捷键说明

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