13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Assembly Language'.' and a user defined name. Optionally, you can specify the at() attribute to locate a section at a specificaddress..SECTION name[,at(address)]; instructions etc..ENDSECSee the description of the .SECTION directive <strong>for</strong> more in<strong>for</strong>mation.Examples.SECTION .data; ....ENDSEC; Declare a .data section.SECTION .data.abs, at(0x0) ; Declare a .data.abs section at; an absolute address; ....ENDSEC3.8. Built-in Assembly FunctionsThe <strong>TASKING</strong> assembler has several built-in functions to support data conversion, string comparison,and math computations. You can use functions as terms in any expression.Syntax of an assembly function@function_name([argument[,argument]...])Functions start with the '@' character and have zero or more arguments, and are always followed byopening and closing parentheses. White space (a blank or tab) is not allowed between the function nameand the opening parenthesis and between the (comma-separated) arguments.The names of assembly functions are case insensitive.Overview of assembly functionsFunction@ALUPCREL(expr,group[,check])@ARG('symbol' | expr)@BIGENDIAN()@CNT()@CPU('architecture')@DEFINED('symbol' | symbol)@LSB(expr)@LSH(expr)DescriptionPC-relative ADD/SUB with operand splitTest whether macro argument is presentTest if assembler generates code <strong>for</strong> big-endian modeReturn number of macro argumentsTest if current CPU matches architectureTest whether symbol existsLeast significant byte of the expressionLeast significant half word of the absolute expression91

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!