0

I am trying to compile Quake 1 (QW) from source code and have run into the following problem when compiling client/d_copy.s : Error: Junk at EOL, first unrecognised character is '('.

The file in question is here (please excuse the syntax highlighting, pastebin only supports NASM). I am attempting to compile with GCC (as this is GNU Assembly code) and am trying to figure out what is causing the problem. Any help would be greatly appreciated.

Billylegota
  • 306
  • 1
  • 3
  • 8
  • `C(VGA_UpdatePlanarScreen):` isn't a valid label. The assembler will see `(` as unrecognized. You can't use parentheses in a label or variable name. – lurker Jun 16 '15 at 01:58
  • Please update this question with the relevant code _in the question_. – Mogsdad Jun 20 '15 at 10:43

1 Answers1

1

The assembly file is meant to be run through the C preprocessor before being sent to the assembler. This should result in the C macro being properly expanded, assuming that the macro been defined in the one of the other files that are included by the #include lines.

To have GCC preprocess the assembly file you can either use the -x assembler-with-cpp option or rename the file so that it has a .S (capital S) or .sx extension.

Ross Ridge
  • 38,414
  • 7
  • 81
  • 112