1723 views|0 replies

6570

Posts

0

Resources
The OP
 

TMS320C55x assembly language knowledge--macro instructions [Copy link]

If you need to execute a certain section of a program multiple times, you can define it as a macro, and then call the macro where you need to repeat it. If you need to reference a macro multiple times, but with different data each time, you can use parameters in the macro and assign different values to the parameters each time. The main functions of macro instructions are: Define your own macro instructions and redefine existing macro instructions Simplify long or complex assembly codes Access the instruction library Define conditional and repeatable blocks in a macro Operate strings in a macro Control the extension list Macros can be defined anywhere in the program Must be defined before use A macro can be defined at the beginning of the source file, in the .include/.copy file or in a macro instruction library Macro definitions can be nested. Other macros can be referenced in the definition, but these macros must be in the same file as the currently defined macro. The format of macro definition: macname .macro [parameter 1][,…,parameter n] ……..macro program statement or macro pseudo-instruction [.mexit] .endm macname: macro program name, the name must be placed in the source program label field. .macro: used to indicate that this statement is the first line of pseudo-instructions for macro definition, must be placed in the mnemonic operation code area. parameters: optional replacement parameters, used as operands of macro instructions. Macro program statement: instructions or assembly commands to be executed each time the macro is called. Macro pseudo-instruction: commands used to control the expansion of macro instructions. .mexit: equivalent to a jump to the .endm statement. .endm: end of macro definition.

This post is from DSP and ARM Processors
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list