BetaArchive
https://www.betaarchive.com/forum/

Compiling for Windows 1.0 DR5 - Working toolchain
https://www.betaarchive.com/forum/viewtopic.php?f=59&t=37194
Page 1 of 1

Author:  jagotu [ Wed May 31, 2017 12:33 pm ]
Post subject:  Compiling for Windows 1.0 DR5 - Working toolchain

Hi,
I finally got a semi-working toolchain for compiling DR5 apps. It works on DosBox.

There is one major thing you need to take care of when compiling the apps included with DR5 - all of the makefiles specify "-Asnwa" for cc as the parameters. The included cc doesn't support "-Aa", so you have to replace it with just "-Asnw". All the included samples have this change done.

Also, we are completely missing "SWLIBC.LIB". For apps that don't try to use it, you can skip through questions about it just fine. However, apps that use the libc's functions, for example the floating point operations, will not compile. The compiled obj wants to import "__acrtused", which I satisfied by adding it to MC.DAT. If you supply your own working libc, make sure to remove it from there, so that you can initialize your libc properly.

The template compiles fine - just do "path C:\bin", "cd samples\template", "make template" and you're good to go!

Download: https://idgaf.hurrdurr.cz/DR5_toolchain.zip
Image

Author:  dfawcus [ Wed May 31, 2017 1:09 pm ]
Post subject:  Re: Compiling for Windows 1.0 DR5 - Working toolchain

I was able to use Borland C simply by fixing the windows C startup module (examples/startup/c0w.asm).

Since Windows 1.0 does not support the GetWinFlags API, remove that call and replace with suitable hardcoded values.

Author:  jagotu [ Wed May 31, 2017 1:15 pm ]
Post subject:  Re: Compiling for Windows 1.0 DR5 - Working toolchain

dfawcus wrote:
I was able to use Borland C simply by fixing the windows C startup module (examples/startup/c0w.asm).

Since Windows 1.0 does not support the GetWinFlags API, remove that call and replace with suitable hardcoded values.


So you managed to compile apps for DR5 before?

Author:  xelloss [ Wed May 31, 2017 1:27 pm ]
Post subject:  Re: Compiling for Windows 1.0 DR5 - Working toolchain

jagotu wrote:
Hi,
I finally got a semi-working toolchain for compiling DR5 apps. It works on DosBox.

Since you have been doing some development tests with DR5, what is your impression of its API?
I remember that the templates seemed to be structured quite differently from the usual message loop style. Overall, how far it is from Windows 1.01 RTM?

Author:  DiaoSlime [ Wed May 31, 2017 3:23 pm ]
Post subject:  Re: Compiling for Windows 1.0 DR5 - Working toolchain

How do you make the toolchain?

我從使用 Tapatalk 的 LG-D722 發送

Author:  dfawcus [ Wed May 31, 2017 6:20 pm ]
Post subject:  Re: Compiling for Windows 1.0 DR5 - Working toolchain

jagotu wrote:
dfawcus wrote:
I was able to use Borland C simply by fixing the windows C startup module (examples/startup/c0w.asm).

Since Windows 1.0 does not support the GetWinFlags API, remove that call and replace with suitable hardcoded values.


So you managed to compile apps for DR5 before?


Sorry. I meant I was able to use the above scheme to compile a program which then ran on RTM Windows 1 (1.03 or 1.04) I believe.

Author:  RubyTuesday [ Wed Apr 10, 2019 11:44 am ]
Post subject:  Re: Compiling for Windows 1.0 DR5 - Working toolchain

Are you using the C 3.0 version? http://www.pcjs.org/disks/pcx86/tools/microsoft/c/3.00/

Author:  jagotu [ Wed Apr 10, 2019 11:46 am ]
Post subject:  Re: Compiling for Windows 1.0 DR5 - Working toolchain

I can't edit the first post, so I just wanted to say that the download was moved here:
https://betawiki.net/files/DR5_toolchain.zip

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/