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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Assembly Language.ALIGNSyntax.ALIGN expressionDescriptionWith the .ALIGN directive you instruct the assembler to align the location counter. By default the assembleraligns on one byte.When the assembler encounters the .ALIGN directive, it advances the location counter to an addressthat is aligned as specified by expression and places the next instruction or directive on that address.The alignment is in minimal addressable units (MAUs).The assembler fills the ‘gap’ with NOP instructions<strong>for</strong> code sections or with zeros <strong>for</strong> data sections. If the location counter is already aligned on the specifiedalignment, it remains unchanged. The location of absolute sections will not be changed.The expression must be a power of two: 2, 4, 8, 16, ... If you specify another value, the assembler changesthe alignment to the next higher power of two and issues a warning.The assembler aligns sections automatically to the largest alignment value occurring in that section.A label is not allowed be<strong>for</strong>e this directive.Example.SECTION .text.ALIGN 4 ; the assembler alignsinstruction ; this instruction at 4 MAUs and; fills the 'gap' with NOP instructions..ENDSEC.SECTION .text.ALIGN 3 ; WRONG: not a power of two, theinstruction ; assembler aligns this instruction at; 4 MAUs and issues a warning..ENDSEC99

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

Saved successfully!

Ooh no, something went wrong!