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] );
m_fixed.hand the surrounding code – Omar and Lorraine Jul 10 '20 at 07:02extern "C" { here #include };helps. 2. the asm syntax is weird. its more usual to haveasm { instruction; instruction; .... }in C/C++ no"instruction"also the$and%are weird maybe you should get the operands from BP pointed heap instead of%and direct constant for$(but I am just assuming the meaning of those). However according to GC its extended asm but I never saw this in GCCparse error before string constant. As far the extended asm, I'm willing to believe that it's there due to this being older gcc (version 2) – ioi-xd Jul 10 '20 at 16:37asm {}C/C++ syntax is actually older than Windows ...IIRC it starts with Borland's TC,TCPP. Theextern "C"directive tells CPP compiler to compile what is inside{}as C and also to use C calling style of functions (for importing obj,dll,...). – Spektre Jul 11 '20 at 08:08operand constraints for 'asm' differ in number of alternatives– ioi-xd Jul 13 '20 at 14:38