Numbers integer to string coercion string formating Strings string to integer coercion string formating Labels examples - dynamic labels examples - dynamic destination Label / Assembler Variable related problems Label / Macro related problems .equ sections .macro Variables examples - dynamic labels examples - dynamic destination Label / Assembler Variable related problems Label / Macro related problems .set .macro location counter .org sections expressions operators priority Listing Description High Level Language Compiler expressions multi-byte quantities (endianess) operators priority word coersion (.word) byte coersion (.byte) early out (logical AND and OR operators) && || array element references [ ] array element references in code space address arithmetic & * mixed 8 bit and 16 bit data boolean values comparison expressions == != > >= < <= memory access and computation statements .let conditional statements xif xthen variable and array declaration .db - byte .dw - word re-enterentcy and interrupt issues temporary RAM usage of generated code array access restrictions I/O port accesses and optimisation issues Embedded simulator (XCSIM) statements Execute simulator or GUI code .xcsim Accessing simulated special registers W, PC, INDF, RET_STK_PTR Accessing simulated hardware return stack RET_STK Accessing simulated data EEPROM EEPROM print to simulator trace .print force simulator trap .breakpoint open file .open close file .close read from file .read write to file .write flush to file .flush XPE Sections defining sections .sect defining section type .code .data .port grouping sections .group examples setting section limits .limit Assembler Statement inserting source from other files .include defining macros .macro .endm Label / Assembler Variable related problems Label / Macro related problems MACINV exiting macros .exit table lookup by index .select defining symbolic constants .equ setting location counter .org setting assembler options .option repeating source processing (loops) .while .endw setting assembler variables .set conditional statements .if .else .endif Defining Data / Statically Allocating Runtime Variables Initialising byte values (including strings) .db Initialising word values (including addresses) .dw Initialising long word .dl Declaring uninitialised storage .ds Builtin Assembler Functions Converting character (string) to ASCII value INT() Converting ASCII value to character (string) CHAR() Converting string to label LABEL() Convert label or number to string STR() Getting current section name SECT_NAME() Checking if label is defined DEFINED() Unique macro invokation number MACINV String length STRLEN() Part (subsection) of string SUBSTR() Pad string to length PADSTR() Locate string within string LOCSTR()