VOGONS


Anybody still coding for DOS/Win16/Win32?

Topic actions

Reply 20 of 24, by doshea

User metadata
Rank Member
Rank
Member
Exploit wrote on 2023-11-13, 08:51:
If you want make your application open source or free software someday it's better to rely on tools that others can use too to c […]
Show full quote

If you want make your application open source or free software someday it's better to rely on tools that others can use too to compile your code.
The same applies to support libraries. Otherwise your code might have a vendor lock-in. You might put your code under a free license, but you can't do the same with the proprietary 3rd party libraries your using.
There have been many programs where the author was annoyed afterwards that he didn't use a freer version to develop them from the start.

That's why it is better to use free software and open source libraries for projects like this.
FreeDOS 1.3 ships with a version of DJ GCC version 4.7.1 (form 2012) and the WatcomC compiler 1.9 from 2002.

Sometimes those newer compilers have bugs with targeting older CPUs like 8086 because that support is tested by very few of the users, whereas older compilers that were mostly used on older CPUs are more likely to work, so newer isn't necessarily always 100% better.

You can certainly get locked into proprietary extensions from a particular vendor's compiler or libraries, but you can also check documentation to figure out whether things are portable and deal with that in various ways - abstraction layers/wrappers, macros, etc. Even for people who haven't done any coding themselves, if they've ever built open-source software, they'll probably have noticed that often projects can be built using a range of compilers. Of course it requires some work to make code portable between compilers, but maybe some people will find that a tradeoff worth making.

If you write something using a closed-source compiler, you can still release your code as open source, and maybe someone else will port it to an open source compiler if they feel strongly about it. In fact people who feel strongly about only using open source compilers are probably good at that kind of thing. There are also people who don't really care about whether the compiler is free or not because they see things that old as "abandonware", and I've even seen some repositories on GitHub that for example include the required Borland development tools, although "abandonware" isn't allowed on forums like this, so it does make it more difficult - if someone doesn't already have the tools you can't provide a link for them, they just have to figure it out themselves

I suspect that if one wanted to write something for inclusion in FreeDOS for example they might have to make it buildable using an open source compiler for it to be accepted, but I seem to recall that back when I worked on FreeDOS a little almost 20 years ago, some official tools could be built either with Turbo C (closed source, although some versions are free as in beer) or with some open source compiler.

There are lots of people out there who enjoy the experience of using older tools for various reasons, much like they enjoy playing with older hardware, games, etc. - it's kind of what this forum is all about - so I'd say that if you want that experience, you're not making a terrible mistake to do that. If getting to use some old tools is what motivates you to make something cool that you can share with others, then at least you've made something, and it can always be "fixed" later.

Reply 21 of 24, by Exploit

User metadata
Rank Member
Rank
Member
doshea wrote on 2023-11-14, 07:55:

Sometimes those newer compilers have bugs with targeting older CPUs like 8086 because that support is tested by very few of the users, whereas older compilers that were mostly used on older CPUs are more likely to work, so newer isn't necessarily always 100% better.

That might be the case and a good point. But that could be even more of a reason to use the newer open source compilers. Because who else will test them and write bug reports for older machines if not the ones, that write code for old hardware? This is exactly how these Compilers have a chance to get improvements for old hardware like an 8086.

There are lots of people out there who enjoy the experience of using older tools for various reasons, much like they enjoy playing with older hardware, games, etc. - it's kind of what this forum is all about - so I'd say that if you want that experience, you're not making a terrible mistake to do that.

I agree that's fine if that's your goal. But if it turns into a great tool, you'll still be annoyed later.

If getting to use some old tools is what motivates you to make something cool that you can share with others, then at least you've made something, and it can always be "fixed" later.

Unfortunately, there is usually a problem with this "fixed later". Most of the time there is no one who wants to adapt the tool to another library. And the author who originally wrote the program doesn't have the time or energy to adapt it. In some cases, real 3rd party code is used, not just a library, because the license allows it, but it is then incompatible with open source licenses.
It would then have to be removed and then it becomes even more difficult because the author often no longer knows what exactly he has adopted and what his own code is.
In the end you would have to completely rewrite the program in order to legally place it under an open source license and this is where it usually ends beforehand.

Reply 22 of 24, by doshea

User metadata
Rank Member
Rank
Member
Exploit wrote on 2023-11-14, 08:41:

That might be the case and a good point. But that could be even more of a reason to use the newer open source compilers. Because who else will test them and write bug reports for older machines if not the ones, that write code for old hardware? This is exactly how these Compilers have a chance to get improvements for old hardware like an 8086.

Yes, in the ideal case where the authors are actually interested in the cases that affect only a tiny fraction of their users and find the time to fix them, that sounds good. Perhaps someone might even volunteer to get the compiler's regression test suite running on some old hardware or some emulation of it. I'd probably just give up and try a different compiler rather than invest much time in trying to figure out how to file a bug, come up with a minimal reproduction, etc.

I agree that's fine if that's your goal. But if it turns into a great tool, you'll still be annoyed later.

If someone gets to spend time writing some software in a way that they found interesting, then that software becomes popular, and they're annoyed about its portability, they should probably try to be grateful for the multiple positive experiences that led to that point. Many of us wish we had the time to develop things and for them to actually become popular.

In some cases, real 3rd party code is used, not just a library, because the license allows it, but it is then incompatible with open source licenses.
It would then have to be removed and then it becomes even more difficult because the author often no longer knows what exactly he has adopted and what his own code is.
In the end you would have to completely rewrite the program in order to legally place it under an open source license and this is where it usually ends beforehand.

This kind of thing happens even with code licensed under open source licenses. I've been given some source to a closed-source tool to try to release as open source, but the author added all kinds of third party open source code into their tree without keeping track of what files were theirs and which were originally written by others, etc. I assume (but have yet to verify) that all the open source code is being used in ways allowed by its licenses, but to release it as open source I need to figure out where things came from and what licenses apply to the code base as a whole. I've given up on that for now because I don't have enough time.

Reply 23 of 24, by Max Headroom

User metadata
Rank Newbie
Rank
Newbie
Exploit wrote on 2023-11-13, 08:51:

That's why it is better to use free software and open source libraries for projects like this.
FreeDOS 1.3 ships with a version of DJ GCC version 4.7.1 (form 2012) and the WatcomC compiler 1.9 from 2002.

Also XPL0 may be worth trying:

XPL0 is similar to Pascal and C. Although not mainstream, over the years it has proven to be immensely useful. It has been used to write everything from operating systems for 6502- and 68000-based computers, to commercial programs for 8088-based (PC) computers, to embedded firmware for PIC and other microcontrollers. Since its inception on the 6502, it has been steadily upgraded and spread to other processors such as 8080, 6800, PDP-10, IBM-360, a couple homebrew machines, 65802, 680x0, PIC, Ubicom, and, most notably, the 80x86 family used by IBM-compatible PCs.

If you're hooked on C, XPL0 might not appeal to you. It doesn't have all the features of other languages. Normally this is not a problem, and it makes the language easier to learn.

Reply 24 of 24, by doshea

User metadata
Rank Member
Rank
Member
Exploit wrote on 2023-11-13, 08:51:

There are still things in the FreeDOS project that could be implemented or extended in existing software of that project.

I remembered later that I think the reason I contributed to FreeDOS a little (I kind of forget since it was almost 20 years ago) was just because I wanted to do some DOS coding in C, so I took a look around for things that needed to be done that I knew a bit about. It wasn't because I actually used FreeDOS funnily enough! So yeah, I thought Exploit's point above was worth repeating - if you're looking for retro coding projects to work on, FreeDOS is a good place to look.