Beside the problem mentioned by Philipp, it would be IMHO better to replace the special character with newlines in the lexer instead of propagating it to the code generators. Probably something like this could be added to SDCC.lex (I didn't test it):

<asm>‡       {
  static char nl[1] = '\n';
  dbuf_append_char(&asmbuff, &nl);

P.S.: I can't resist to mention once more that introducing such a magic in sdcpp seems not to be a correct approach to me...

P.P.S.: I was curious how this is solved in other C compilers (MSVC, Digital Mars) and I found out that they propose to use __asm in each line in C macro definition (they don't have __endasm). Just as curiosity see and (Please don't accuse me that I'm a M$ fan  ;-) ). The Watcom C complier uses an approach similar to the gcc: the assembly code is represented as a C strings, defined as pragma. See


On 09/14/2011 08:17 PM, Philipp Klaus Krause wrote:
In revision #6852, an end of area,
case '‡':
was introduced into the gen.c files. I don't know if its a valid
character literal in C. But even if it is: It was introduced in
ISO-8859-15 encoding, which makes the gen.c files invalid when read as
UTF-8, which is rather unfortunate, since UTF-8 is the ubiquitous
encoding these days.


BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today! 
sdcc-devel mailing list