BetaArchive Logo
Navigation Home Database Screenshots Gallery Image Uploader Server Info FTP Servers Wiki Forum RSS Feed Rules Please Donate
UP: 14d, 20h, 11m | CPU: 29% | MEM: 5311MB of 11650MB used
{The community for beta collectors}

Post new topic Reply to topic  [ 8 posts ] 
Author Message
 PostPost subject: Compiling for Windows 1.0 DR5 - Working toolchain        Posted: Wed May 31, 2017 12:33 pm 
Reply with quote
FTP Access
User avatar
Offline

Joined
Mon Feb 04, 2013 5:03 pm

Posts
505

Location
Czechia

Favourite OS
Development Release #5
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

_________________
Windows TEN - Totally Erroneous Numbering
Always watching you...


Top  Profile  WWW
 PostPost subject: Re: Compiling for Windows 1.0 DR5 - Working toolchain        Posted: Wed May 31, 2017 1:09 pm 
Reply with quote
Offline

Joined
Sat Apr 29, 2017 2:21 pm

Posts
74
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.


Top  Profile
 PostPost subject: Re: Compiling for Windows 1.0 DR5 - Working toolchain        Posted: Wed May 31, 2017 1:15 pm 
Reply with quote
FTP Access
User avatar
Offline

Joined
Mon Feb 04, 2013 5:03 pm

Posts
505

Location
Czechia

Favourite OS
Development Release #5
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?

_________________
Windows TEN - Totally Erroneous Numbering
Always watching you...


Top  Profile  WWW
 PostPost subject: Re: Compiling for Windows 1.0 DR5 - Working toolchain        Posted: Wed May 31, 2017 1:27 pm 
Reply with quote
Donator
User avatar
Offline

Joined
Sun Aug 18, 2013 7:26 pm

Posts
278

Location
Edinburgh, Scotland

Favourite OS
Windows for Workgroups 3.11
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?


Top  Profile
 PostPost subject: Re: Compiling for Windows 1.0 DR5 - Working toolchain        Posted: Wed May 31, 2017 3:23 pm 
Reply with quote
FTP Access
Offline

Joined
Tue Apr 21, 2015 2:50 pm

Posts
93

Location
Hong Kong

Favourite OS
Windows 7(Build 7601)
How do you make the toolchain?

我從使用 Tapatalk 的 LG-D722 發送


Top  Profile
 PostPost subject: Re: Compiling for Windows 1.0 DR5 - Working toolchain        Posted: Wed May 31, 2017 6:20 pm 
Reply with quote
Offline

Joined
Sat Apr 29, 2017 2:21 pm

Posts
74
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.


Top  Profile
 PostPost subject: Re: Compiling for Windows 1.0 DR5 - Working toolchain        Posted: Wed Apr 10, 2019 11:44 am 
Reply with quote
Donator
User avatar
Offline

Joined
Mon Jan 12, 2015 1:33 pm

Posts
76

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


Top  Profile
 PostPost subject: Re: Compiling for Windows 1.0 DR5 - Working toolchain        Posted: Wed Apr 10, 2019 11:46 am 
Reply with quote
FTP Access
User avatar
Offline

Joined
Mon Feb 04, 2013 5:03 pm

Posts
505

Location
Czechia

Favourite OS
Development Release #5
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

_________________
Windows TEN - Totally Erroneous Numbering
Always watching you...


Top  Profile  WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 




Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

All views expressed in these forums are those of the author and do not necessarily represent the views of the BetaArchive site owner.

Powered by phpBB® Forum Software © phpBB Group

Copyright © 2006-2019

 

Sitemap | XML | RSS