HJR-DSP: Keywords and pseudo directives

Source: Internet
Author: User

Key words

Keywords are used to modify variables and functions, indicating some properties of variables and functions


For example, interrupt modifies a function, which means that the function is an interrupt service function

For example, Iopart modifies a variable to indicate that the variable is pointing to Io space (some say that memory is divided into program space, data space and IO space), note: This keyword can only modify global or static variables and local pointers, can not modify local variables

The const modifier variable indicates that the value of the variable is immutable, and assigning to the Rom,vilatile modifier indicates that the variable rejects compiler optimizations, and the Onchip modifier variable indicates that the variable must be linked to the on-chip memory and not linked to the external memory

As for the link to where to go is by cmd, link command file decision, here can look at the link command file ()


Pseudo directive

An instruction is a command that controls what the computer executes, and a pseudo instruction is a command that controls how the compiler assembles the code, a control computer operation, a control assembler how to assemble the code


Both the assembly and the C have pseudo instructions.

Primarily defining code snippets and data segments

Assembly definition code snippet and data segment pseudo instruction can look here HJR tutorial-DSP (ii): assembly operation and understanding of paragraph

C language

Code snippet #pragma code_section (symbol, "section_name"); Tell the assembler to assemble the following code into code snippets such as. Text section or user name

Data segment #pragma data_section (symbol, "section_name"); Tell the assembler to assemble the following data into segments such as. Data section or user name

Symbol here is the global name, such as function name, variable name

Section_name can be the system itself, or it can be named by the user.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.