The ## directive works similar to the C preprocessor. It is replaced by nothing, which causes tokens on either side to be concatenated together. Because it acts as a separator initially, it can be used within macro functions to produce identifiers via combination with parameter values.
#define ELEMENT_OUT(n) \ NumOut(0, LCD_LINE##n, b##n) dseg segment b1 byte b2 byte 1 dseg ends thread main ELEMENT_OUT(1) ELEMENT_OUT(2) wait SEC_2 endt
This is the same as writing