11.07.2015 Views

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

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.

Macro AssemblerHI-TECH C Assembly LanguageBy default, the assembly list file will show macro in an unexpanded format, i.e. as the macro wasinvoked. Expansion of the macro in the listing file can be shown by using the EXPAND assemblercontrol, see Section 4.3.9.2,4.3.8.13 LOCALThe LOCAL directive allows unique labels to be defined for each expansion of a given macro. Anysymbols listed after the LOCAL directive will have a unique assembler generated symbol substitutedfor them when the macro is expanded. For example:down MACRO countLOCAL moremore: dec countcp0 countbra nz, moreENDMwhen expanded will include a unique assembler generated label in place of more. For example:expands to:down foobar??0001 dec foobarcp0 foobarbra nz, ??0001if invoked a second time, the label more would expand to ??0002.4.3.8.14 ALIGNThe ALIGN directive aligns whatever is following, data storage or code etc., to the specified boundaryin the psect in which the directive is found. The boundary is specified by a number following thedirective and it specifies a number of bytes. For example, to align output to a 2 byte (even) addresswithin a psect, the following could be used.ALIGN 2Note, however, that what follows will only begin on an even absolute address if the psect begins onan even address. The ALIGN directive can also be used to ensure that a psect’s length is a multipleof a certain number. For example, if the above ALIGN directive was placed at the end of a psect, thepsect would have a length that was always an even number of bytes long.83

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

Saved successfully!

Ooh no, something went wrong!