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

Create successful ePaper yourself

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

Macro AssemblerHI-TECH C Assembly Language4.3.8.9 DDWDDW operates in a similar fashion to DW, except that it assembles expressions into double (32-bit)words. Example:DDW 12345678h4.3.8.10 DSThis directive reserves, but does not initialize, memory locations. The single argument is the numberof bytes to be reserved. Examples:alabel: DS 23xlabel: DS 2+3;Reserve 23 bytes of memory;Reserve 5 bytes of memory4.3.8.11 IF, ELSIF, ELSE and ENDIFThese directives implement conditional assembly. The argument to IF and ELSIF should be anabsolute expression. If it is non-zero, then the code following it up to the next matching ELSE,ELSIF or ENDIF will be assembled. If the expression is zero then the code up to the next matchingELSE or ENDIF will be skipped.At an ELSE the sense of the conditional compilation will be inverted, while an ENDIF will terminatethe conditional assembly block. Example:IF ABCgoto aardvarkELSIF DEFgoto denverELSEgoto grapesENDIFIn this example, if ABC is non-zero, the first jmp instruction will be assembled but not the second orthird. If ABC is zero and DEF is non-zero, the second jmp will be assembled but the first and thirdwill not. If both ABC and DEF are zero, the third jmp will be assembled. Conditional assembly blocksmay be nested.4.3.8.12 MACRO and ENDMThese directives provide for the definition of macros. The MACRO directive should be preceded bythe macro name and optionally followed by a comma-separated list of formal parameters. When the81

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

Saved successfully!

Ooh no, something went wrong!