Development on a 286, for a 286

Getting old software/games running on older hardware.

Development on a 286, for a 286

Postby keenmaster486 » 2019-3-05 @ 18:08

I'm interested in getting into real mode 16-bit DOS development, for 8088/8086/286 platforms, with everything done natively on those platforms i.e. no cross-compilation. Not that I have anything against cross-compilation, but I want to get the experience of developing on those old systems.

So far in my research I have found OpenWatcom, which seems to be the latest thing that targets 16-bit DOS.

But here is what I'm looking for:

  • C (or C++) language (probably with support for inline assembly)
  • Good documentation
  • Compiles for real mode 16 bit DOS without adding bloat, produces fast, efficient, and compatible executables
  • Good IDE for DOS available
  • Doesn't take more than several seconds to compile on an 8088/286/386 (is this realistic?)

Can anyone tell me whether OpenWatcom is the tool that best fits these criteria, or whether something else such as Borland Turbo C would serve me better?

I have trouble finding good IDEs for DOS. I prefer minimalist style, as in "just the text editor and file tree, please" but I don't know if that's something that existed for DOS.
I flermmed the plootash just like you asked.

http://classictechnology.herokuapp.com
http://keenmaster486.github.io
Vintage desktops: Pentium/MMX 233 (Win95), 286-12 (MS-DOS 5.0)
Vintage laptops: IBM Thinkpad 600E, 560X, 365CD
User avatar
keenmaster486
Oldbie
 
Posts: 1662
Joined: 2016-2-16 @ 02:04
Location: Atroxus

Re: Development on a 286, for a 286

Postby swaaye » 2019-3-05 @ 18:16

Moved to Software
User avatar
swaaye
Moderator
 
Posts: 7406
Joined: 2002-7-22 @ 21:24
Location: WI, USA

Re: Development on a 286, for a 286

Postby Scali » 2019-3-05 @ 18:25

In short, OpenWatcom doesn't run on a 286. It does have a DOS environment, but it requires a 386 or better.
It can cross-compile to 8086 and 286 though (I've used it for 8088 MPH and some other 16-bit DOS demos).

Borland Turbo C will actually run on a 286. It's incredibly slow though. Compiling any non-trivial bit of code will likely take minutes on a 286 (the main reason why Turbo Pascal was so popular in those days was that it was extremely fast at compiling code).
OpenWatcom generates far smaller and more efficient code though. But if you put in enough inline assembly, that might not matter to you.
Scali
l33t
 
Posts: 4107
Joined: 2014-12-13 @ 14:24

Re: Development on a 286, for a 286

Postby Jo22 » 2019-3-05 @ 18:34

keenmaster486 wrote:
  • C (or C++) language (probably with support for inline assembly)
  • Good documentation
  • Compiles for real mode 16 bit DOS without adding bloat, produces fast, efficient, and compatible executables
  • Doesn't take more than several seconds to compile on an 8088/286/386 (is this realistic?)
.


Well, not exactly what you're looking for, but..
There used to be Mix Power C. My father used it many, many years ago.
It created small code for 8086, 80186, 80286 and had got support for several memory models.

In the 90s, I used it to learn a bit of C. And by that I mean pure C, K&R C.
Not that weird ANSI stuff that took out the fun. :)

Edit: Just remembered that Power C is part of one of my earlier videos.
The compiling of a rather complex project on a 4,77MHz XT is visible at https://youtu.be/KE648YNe2Ag?t=691
By comparison, on an 80286-16 or -25, this task would have been a matter of seconds..
Last edited by Jo22 on 2019-3-06 @ 19:42, edited 1 time in total.
"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//
User avatar
Jo22
l33t
 
Posts: 3554
Joined: 2009-12-13 @ 07:06
Location: Europe

Re: Development on a 286, for a 286

Postby Errius » 2019-3-05 @ 19:04

Who remembers Zortech C++?
"I damn near killed an idiot who insisted on commenting in Klingon, but only on bits of inline assembler embedded in C ..."
User avatar
Errius
Oldbie
 
Posts: 1337
Joined: 2015-12-16 @ 19:16
Location: Lave Station

Re: Development on a 286, for a 286

Postby brostenen » 2019-3-05 @ 19:20

keenmaster486 wrote:I'm interested in getting into real mode 16-bit DOS development, for 8088/8086/286 platforms, with everything done natively on those platforms i.e. no cross-compilation. Not that I have anything against cross-compilation, but I want to get the experience of developing on those old systems.

So far in my research I have found OpenWatcom, which seems to be the latest thing that targets 16-bit DOS.

But here is what I'm looking for:

  • C (or C++) language (probably with support for inline assembly)
  • Good documentation
  • Compiles for real mode 16 bit DOS without adding bloat, produces fast, efficient, and compatible executables
  • Good IDE for DOS available
  • Doesn't take more than several seconds to compile on an 8088/286/386 (is this realistic?)

Can anyone tell me whether OpenWatcom is the tool that best fits these criteria, or whether something else such as Borland Turbo C would serve me better?

I have trouble finding good IDEs for DOS. I prefer minimalist style, as in "just the text editor and file tree, please" but I don't know if that's something that existed for DOS.


How about diving into assembler? There were 8086/88 specific assembler tools, and there might have been for 80286 as well. I know of a site on were you can find old abandonware. Though technically it is still piracy, so I am not really sure if I can post a link here.
Don't eat stuff off a 15 year old never cleaned cpu cooler.
Those cakes make you sick....

My blog: http://to9xct.blogspot.dk

001100 010010 011110 100001 101101 110011

Jah ich will trynen... Die Leute wie macht scheisse in dem Grünen.
User avatar
brostenen
l33t++
 
Posts: 5331
Joined: 2014-5-07 @ 21:13
Location: Northern Jutland, Denmark.

Re: Development on a 286, for a 286

Postby Scali » 2019-3-05 @ 19:25

brostenen wrote:How about diving into assembler? There were 8086/88 specific assembler tools, and there might have been for 80286 as well. I know of a site on were you can find old abandonware. Though technically it is still piracy, so I am not really sure if I can post a link here.


Borland released the old Turbo C++, Turbo Pascal and Turbo Assembler (TASM) into the public domain years ago.
So at the very least you could use TASM freely, older versions work on 8088 and 286, and those were the tools that people actually used back in the day.
Scali
l33t
 
Posts: 4107
Joined: 2014-12-13 @ 14:24

Re: Development on a 286, for a 286

Postby brostenen » 2019-3-05 @ 19:44

Scali wrote:
brostenen wrote:How about diving into assembler? There were 8086/88 specific assembler tools, and there might have been for 80286 as well. I know of a site on were you can find old abandonware. Though technically it is still piracy, so I am not really sure if I can post a link here.


Borland released the old Turbo C++, Turbo Pascal and Turbo Assembler (TASM) into the public domain years ago.
So at the very least you could use TASM freely, older versions work on 8088 and 286, and those were the tools that people actually used back in the day.


Yup... I had to learn x86 assembler, Turbo Pascal and C languages, back in 1995 at the school. I was too young, and I had extreme issue concentrating back then. And whenever I tried to listen and concentrate in school, I fell asleep. Yet I clearly remember that we had to program in those 3 languages, using MS-Dos based tools. And yeah.... We had to look up chips, CPU's and so on, in order to do assembly, and program directly to the hardware. Well.... At least I spend 70% of the school day getting my rest, because it was only when everyone else slept at night, it was quiet enough for me to be able to do my homework. :lol:
Don't eat stuff off a 15 year old never cleaned cpu cooler.
Those cakes make you sick....

My blog: http://to9xct.blogspot.dk

001100 010010 011110 100001 101101 110011

Jah ich will trynen... Die Leute wie macht scheisse in dem Grünen.
User avatar
brostenen
l33t++
 
Posts: 5331
Joined: 2014-5-07 @ 21:13
Location: Northern Jutland, Denmark.

Re: Development on a 286, for a 286

Postby keenmaster486 » 2019-3-05 @ 20:15

Thanks for the tips!

Maybe my last criterion of not compiling very slowly cannot be met on a 286. Perhaps I'm better off developing on a late DOS machine and testing on the 286.
I flermmed the plootash just like you asked.

http://classictechnology.herokuapp.com
http://keenmaster486.github.io
Vintage desktops: Pentium/MMX 233 (Win95), 286-12 (MS-DOS 5.0)
Vintage laptops: IBM Thinkpad 600E, 560X, 365CD
User avatar
keenmaster486
Oldbie
 
Posts: 1662
Joined: 2016-2-16 @ 02:04
Location: Atroxus

Re: Development on a 286, for a 286

Postby Scali » 2019-3-05 @ 20:43

keenmaster486 wrote:Maybe my last criterion of not compiling very slowly cannot be met on a 286. Perhaps I'm better off developing on a late DOS machine and testing on the 286.


Yes, compiling C/C++ code is inherently a CPU- and memory-intensive process. Even on my 486DX2-80, Turbo C++ is still quite slow.
Compile-and-run just wasn't a thing in the DOS age.
If you want the full DOS experience I suppose you could go for a late DOS machine (Pentium or PII?) and run OpenWatcom on that in a 32-bit DOS extender environment.
I personally use the WinNT variation of OpenWatcom under Windows 10, to compile 8088 code. I then test it in DOSBox, and eventually move to real hardware.
Scali
l33t
 
Posts: 4107
Joined: 2014-12-13 @ 14:24

Re: Development on a 286, for a 286

Postby noshutdown » 2019-3-06 @ 01:14

indeed there are less options on 286. as already mentioned, djgpp and openwatcom won't work, older version of watcom shall work though.
i think the options are:
borland c++ 3.1
microsoft c++ 7
zortech c++/symantec c++(seems pretty rare, i have yet to find)
older version of watcom(not sure which version is latested to support 286)
noshutdown
Oldbie
 
Posts: 1096
Joined: 2010-7-23 @ 17:04
Location: China

Re: Development on a 286, for a 286

Postby Damaniel » 2019-3-06 @ 02:36

If I was going to code on real hardware, I'd probably use something period-specific like Turbo/Borland C++. Those are real mode applications that generate real mode code and were designed around the time that the 286 was a mainstream CPU.

Personally, I'd avoid doing the work directly on a 286 since they're so slow, but if you have a decent 386 or even 486 then compile times will be much more bearable. I do most of my work (when not cheating and using DosBox) on my 486 - it's got the right balance of speed and real/protected mode support to support building code for everything down to an 8088 (and Turbo Pascal code compiles lightning quick on it).
Damaniel
Newbie
 
Posts: 26
Joined: 2014-10-10 @ 22:16

Re: Development on a 286, for a 286

Postby Scali » 2019-3-06 @ 06:31

Lattice C and Aztec C are two early brands of C available for DOS.
Lattice C was licened by Microsoft for their versions of C/C++. Microsoft kept using the Lattice-based compilers up to and including Visual C++ 6.0. Visual Studio.NET was the first to include a C/C++ compiler entirely written by Microsoft.
Aztec C can be found here: http://www.aztecmuseum.ca/compilers.htm#msdos
Lattice C is here: https://winworldpc.com/product/lattice-c/2x
And Microsoft C here: https://winworldpc.com/product/microsoft-c-c/2x
PowerC is here: https://winworldpc.com/product/powerc/1x
Scali
l33t
 
Posts: 4107
Joined: 2014-12-13 @ 14:24

Re: Development on a 286, for a 286

Postby Hamby » 2019-3-07 @ 06:31

Scali wrote:Lattice C and Aztec C are two early brands of C available for DOS.
Lattice C was licened by Microsoft for their versions of C/C++. Microsoft kept using the Lattice-based compilers up to and including Visual C++ 6.0. Visual Studio.NET was the first to include a C/C++ compiler entirely written by Microsoft.
Aztec C can be found here: http://www.aztecmuseum.ca/compilers.htm#msdos
Lattice C is here: https://winworldpc.com/product/lattice-c/2x
And Microsoft C here: https://winworldpc.com/product/microsoft-c-c/2x
PowerC is here: https://winworldpc.com/product/powerc/1x


I remember when I was developing for the Amiga, the two main C-compiler competitors were Lattice and Aztec. I went with Aztec at the time.
Thanks for providing these links; I may see what the development environments for DOS looked like.

The Aztec C has versions supporting CPM/86 and rommable code... interesting...
User avatar
Hamby
Member
 
Posts: 248
Joined: 2018-1-20 @ 11:12

Re: Development on a 286, for a 286

Postby Scali » 2019-3-07 @ 08:24

Hamby wrote:I remember when I was developing for the Amiga, the two main C-compiler competitors were Lattice and Aztec.


Yea, I still use SAS/C on Amiga, which is Lattice, after they changed the name (Lattice was bought by SAS Institute in 1987).
Funny enough some of the 'quirks' of SAS/C are also present in VC++ 6.0.
Scali
l33t
 
Posts: 4107
Joined: 2014-12-13 @ 14:24

Re: Development on a 286, for a 286

Postby Scali » 2019-3-07 @ 08:33

Here's an interesting article that compares 9 early C compilers for DOS:
https://archive.org/stream/byte-magazin ... 5/mode/2up

Lattice is considered the best. And the other 8 compilers are ones that weren't mentioned before.
Scali
l33t
 
Posts: 4107
Joined: 2014-12-13 @ 14:24

Re: Development on a 286, for a 286

Postby keenmaster486 » 2019-3-07 @ 22:18

Wow, this is a lot of great information! Thanks guys!

Part of the reason I asked this question is because I have an interesting 286 machine coming in the mail soon. I'll be doing research on what compiler I'll try.

I have also found Microsoft Quick C, which I am very tempted to use because I very much like the IDE. Having grown up using Quick Basic, it's intuitive for me. But I am a little wary of it; I wonder whether Quick C produces as terrible executables as Quick Basic does.
I flermmed the plootash just like you asked.

http://classictechnology.herokuapp.com
http://keenmaster486.github.io
Vintage desktops: Pentium/MMX 233 (Win95), 286-12 (MS-DOS 5.0)
Vintage laptops: IBM Thinkpad 600E, 560X, 365CD
User avatar
keenmaster486
Oldbie
 
Posts: 1662
Joined: 2016-2-16 @ 02:04
Location: Atroxus

Re: Development on a 286, for a 286

Postby .legaCy » 2019-3-08 @ 01:14

brostenen wrote:Yup... I had to learn x86 assembler, Turbo Pascal and C languages, back in 1995 at the school.

I wish that was my case, i had to learn by myself with 12 years, but i didn't dived right into asm and c, i firstly did stuff using dBase(cause thats is what my dad made living of, then he teached me basic stuff), then i went to pascal(and then object pascal, a.k.a. Delphi, and i still to this day use Object Pascal(Delphi), including professionally, people often make jokes, but i code for linux,windows,mac os, android and iOS with delphi, and native code.
After all i learned C by myself, college only served to teach me the right methodology to apply on projects, and to be honest it isn't a big deal.
User avatar
.legaCy
Oldbie
 
Posts: 605
Joined: 2016-4-08 @ 23:11
Location: Brazil

Re: Development on a 286, for a 286

Postby noshutdown » 2019-3-08 @ 02:40

keenmaster486 wrote:Wow, this is a lot of great information! Thanks guys!

Part of the reason I asked this question is because I have an interesting 286 machine coming in the mail soon. I'll be doing research on what compiler I'll try.

I have also found Microsoft Quick C, which I am very tempted to use because I very much like the IDE. Having grown up using Quick Basic, it's intuitive for me. But I am a little wary of it; I wonder whether Quick C produces as terrible executables as Quick Basic does.

i also used quickbasic a lot when i was young, but didn't know much about dos executables, how terrible is it?
borland c was the dominant c product at around 1990, and microsoft c was considered inferior for a long time until 7.0 when it finally became comparable. however i just became extremely bored with borlandc.
and if you want fastest executables, maybe you can try older versions of watcom which should work on 286, beware its a barebone compiler without any ide.
noshutdown
Oldbie
 
Posts: 1096
Joined: 2010-7-23 @ 17:04
Location: China

Re: Development on a 286, for a 286

Postby bakemono » 2019-3-09 @ 19:29

I always thought the biggest problems with QuickBASIC were the dumb things like poor file I/O functions and lack of unsigned integer support. (If you tried to use an integer as a pointer you would get an overflow error whenever it went above 32767. But that was only when you executed the program within the IDE, if you made an EXE it would run without the error). Inline asm would have been nice too. (All fixed in FreeBASIC but it requires 32/64-bit)

Without those sort of issues maybe Quick C isn't bad for a 286.
bakemono
Member
 
Posts: 228
Joined: 2018-1-15 @ 06:56

Next

Return to Software

Who is online

Users browsing this forum: No registered users and 3 guests