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.

HI-TECH C Assembly LanguageMacro Assemblergoto $will represent code that will jump to itself and form an endless loop. By using this symbol and anoffset, a relative jump destination to be specified.The address represented by $ is a word address and thus any offset to this symbol represents anumber of instructions. For example:goto $+1mov #8, w8mov w8, _foowill skip one instruction.4.3.5.4 Register SymbolsCode in assembly modules may gain access to the special function registers by including pre-definedassembly header files. The appropriate file can be included by add the line:#include to the assembler source file. Note that the file must be included using a C pre-processor directive andhence the option to pre-process assembly files must be enabled when compiling, see Section 2.4.12.This header file contains appropriate commands to ensure that the header file specific for the targetdevice is included into the souce file.These header files contain EQU declarations for all byte or multi-byte sized registers and #definemacros for named bits within byte registers.4.3.5.5 Symbolic LabelsA label is symbolic alias which is assigned a value equal to its offset within the current psect.A label definition consists of any valid assembly identifier followed by a colon, :. The definitionmay appear on a line by itself or be positioned before a statement. Here are two examples oflegitimate labels interspersed with assembly code.frank:simon44:mov #1, w0goto finclrf _input72

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

Saved successfully!

Ooh no, something went wrong!