2

I'm trying to make a Doom-like game similar to classic Doom that runs on older hardware, and as such I would like to use Boom, an older, open source port of Doom. I've also looked into PrBoom, but the pre-compiled Boom executable works fine on Windows so I'm left to wonder what the point of PrBoom was. Anywho, I've found out that Boom is compiled via DJGPP version 2.02. I've jumped through what seems like hoops to find that version - and all of the programs that will run with it - to compile the code (they're avaliable here, under the v2 folders). This is what I've ended up with (I apologize but I don't know what some of the exact version numbers are, but I'm sure they're the right version because of the date they were added to the ftp server in question):

  • bnu2121.zip (Binutils 2.121)
  • bsn128n.zip (Bison 1.28)
  • em1934s3.zip (Emacs)
  • gcc2952b.zip (GCC 2.952)
  • gdb418b.zip (GNU Debugger 4.18 (?))
  • gpp2952b.zip (G++ 2.952)
  • mak379b.zip (Make 3.79)
  • objc2952.zip (ObjectiveC)
  • txi40b.zip ("Text file viewer" according to the website I used to find out how to install DJGPP in general)

Using the website I just posted to download the files proved to be unsuccessful as I got multiple errors regarding dprintf when trying to compile. The versions I found and downloaded from that first website don't have that error, but instead I get a new error that seems to suggest I got one of the programs wrong:

m_fixed.h:82: operand constraint contains '+' or '=' at illegal position.

and alas, I'm very unexperienced with x86 assembly code, so I have no idea how to fix the code in question to make it compile. So, what program did I get wrong?

EDIT: For those asking, the code is as follows:

            asm("  imull %2 ;"
                "  shrdl $16,%%edx,%0 ;"
                : "=a,=a" (result)           // eax is always the result
                : "0,0" (a),                 // eax is also first operand
                 "m,r" (b)                  // second operand can be mem or reg
                : "%edx", "%cc"              // edx and condition codes clobbered
[line 119]      );
  • 2
    Instead of juggling around with versions of the tools installed, it might be faster to just look at the places the compiler is complaining about, and to fix the code to make it compile. Yes, that requires knowledge about how to program in C, and if your header file contains assembly, how to use that with gcc (docs are available). No, I can't tell what to fix here just based on the error message. – dirkt Jul 10 at 4:48
  • It would be good if you could show us line 199 of m_fixed.h and the surrounding code – OmarL Jul 10 at 7:02
  • and at least 3 lines before it ... Also are you compiling as C or C++ ? – Spektre Jul 10 at 8:23
  • @OmarL I added the code in question. – ioi-xd Jul 10 at 14:31
  • @Spektre The game is coded in regular C. – ioi-xd Jul 10 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.