utl_loop.s54
来自「使用在TI 系列dsk5402 的很多可用例子」· S54 代码 · 共 55 行
S54
55 行
;
; Copyright 2003 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.
;
; @(#) XDAS 2.51.00 11-29-2003 (xdas-2.50.00.9)
;
;
; ======== utl_loop.s54 ========
; C-callable interface to assembly language utility functions for the
; echo example.
;
.mmregs
.global _UTL_loop
.text
N .set 1000
;
; ======== _UTL_loop ========
; This function simulates a load on the DSP by executing N * loopCount
; instructions, where loopCount is the input parameter to UTL_loop().
;
; void UTL_loop(int loopCount)
;
; true execution time: ?? + N * (loop count)
;
_UTL_loop:
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 + =
减小字号Ctrl + -
显示快捷键?