diff --git a/src/hucc/io.c b/src/hucc/io.c index e3163938..c50475ee 100644 --- a/src/hucc/io.c +++ b/src/hucc/io.c @@ -466,8 +466,9 @@ void outsymbol (SYMBOL *ptr) outstr(ptr->name); } if (ptr->linked) { - outstr(" ; "); + outstr(" /* "); outstr(ptr->linked->name); + outstr(" */"); } } diff --git a/src/mkit/as/command.c b/src/mkit/as/command.c index ba746529..e1683dd3 100644 --- a/src/mkit/as/command.c +++ b/src/mkit/as/command.c @@ -2020,6 +2020,10 @@ do_kickc(int *ip) /* enable forward-references when building KickC code */ asm_opt[OPT_FORWARD] |= kickc_mode; + /* disable C comments in HuCC code, it breaks HuCC's macro comments */ + if (hucc_mode) + asm_opt[OPT_CCOMMENT] = 0; + /* output line */ if (pass == LAST_PASS) println(); diff --git a/src/mkit/as/macro.c b/src/mkit/as/macro.c index 067e76e6..d0de488a 100644 --- a/src/mkit/as/macro.c +++ b/src/mkit/as/macro.c @@ -268,6 +268,19 @@ macro_getargs(int ip) f = 0; level = 0; while (c) { + if (c == '/' && prlnbuf[ip] == '*') { + ++ip; + do { + c = prlnbuf[ip++]; + if (c == '\0') { + error("Macro argument comment cannot span multiple lines!"); + return (0); + } + } while (c != '*' && prlnbuf[ip] != '/'); + ++ip; + c = prlnbuf[ip++]; + continue; + } if (c == ',') { if (level == 0) break; @@ -296,8 +309,8 @@ macro_getargs(int ip) else { ptr[i++] = c; } - if (i == 80) { - error("Macro argument string too long, max. 80 characters!"); + if (i == 255) { + error("Macro argument string too long, max. 255 characters!"); return (0); } j++;