pMARS 0.9.2 Continuation Mod... The stock pmars 0.9.2 (and 0.8.6) interpret "\" to mean continue on the next line. Nice idea, common for many languages, however it causes PaperOne and Marcia13 from the Wilkies test set and Jack in the Box from the Wilmoo test set to malfunction as they use "\" in the comments to point out code segments. The warriors themselves can be fixed by adding a space after the offending "\" character(s) to prevent them from being mis-interpreted but it is more desirable to not have to modify existing code. This modification to asm.c changes the behavior so that "\" is treated as a continuation character only if a comment symbol is not present on the line, thus permitting old unmodified warriors to run correctly while preserving the ability to use "\" to continue long lines of redcode with long labels and/or complex expressions. ----- asm.c extract from around line 2164 (after patches 01-06) ------- /* * Read characters until newline or EOF encountered. newline is * excluded. Need to be non-strict boolean evaluation */ *buf = '\0'; i = 0; /* pointer to line buffer start */ // fixes by WTN 2/23/09 to make paperone marcia13 jackinthebox // and other warriors that use \ in comments work properly. int commentfound = FALSE; do { if (fgets(buf + i, MAXALLCHAR - i, infp)) { for (; buf[i]; i++) { if (buf[i] == ';') commentfound = TRUE; if (buf[i] == '\n' || buf[i] == '\r') break; } buf[i] = 0; if (buf[i - 1] == '\\' && commentfound == FALSE) { /* line continued */ // end WTN changes conLine = TRUE; buf[--i] = 0; /* reset */ } else conLine = FALSE; } else if (ferror(infp)) { ----- rest of asm.c --------------------------------------------------- Terry Newton (wtn90125 at yahoo.com)