Why do you still program for DOS?

DOS specific questions.
marcov
Posts: 3012
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Why do you still program for DOS?

Postby marcov » Apr 10, 2020 20:40

caseih wrote:
At Uni I remember people joking that you could identify a computer novice because his computer ran Windows 3.1 from autoexec.bat. Power users only ran win.com when absolutely required.


And did so while uttering the magic incantation "Everytime you type "win", you lose!"
caseih
Posts: 1537
Joined: Feb 26, 2007 5:32

Re: Why do you still program for DOS?

Postby caseih » Apr 10, 2020 20:55

marcov wrote:Those hacks never matched a real IDE. And those editors are not worth mentioning anyway (and I'm still a bit in dubio if VI(m) is an editor at all)
Haha! Them's fighting words.

I cut my teeth using some of the pioneering IDE tools for MS-DOS including Turbo C++, Turbo BASIC, and QuickBasic 4.5, all excellent tools. My first exposure to Unix was rather underwhelming. I remember thinking that Unix grey beards' ideas of a "programming environment" were very different than mine.

Now, however, I am one of those unix grey beards and don't have much need for an IDE except for verbose and complex libraries and languages like Java or C#, or Qt in C++. IDEs also do a nice job of build management, and integrated debuggers are nice, but I get a lot of mileage out of my two standalone debugger go-to's, ddd and kdbg. Back when I did a lot of C and C++ (other than arduino), I would use kdevelop to set up the build environment, and then do all the normal programming in vim, with make on the command line.

marcov wrote:I always considered vi and derived tools works of the devil. Can't get used to the modes, and the fact that if you accidentally leave the editing mode, normal keys are suddenly editor commands.

Probably this is all due to limited terminal key support (can't use ctrl-alt key combos like grown up editors do), but knowing that doesn't make it any easier either.
I remember having to control-Z out of vi, then killing it because I couldn't figure out how to even quit the program. But I also remember watching professors at uni working with vi (probably vim), and being very impressed by their speed and efficiency. So I learned it and now I've ruined my brain. I really can't use normal editors anymore. I keep littering my code with colons, extra y's and d's. I'd say I'm about twice as fast at simple editing tasks with vim than I am in "normal" editors. Even faster at semi-repetitive tasks, which is what vi and vim really excel at. Of course I also ruined my brain using an HP 48 calculator, and all these years later cannot use normal calculators without losing numbers. Thank goodness for Droid48 on my phone!

Fortunately both Visual Studio and Qt Creator have excellent vi emulation modes so I can work fairly efficiently in those, while still having the nice benefit of the intelligent coding tools. :)
marcov
Posts: 3012
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Why do you still program for DOS?

Postby marcov » Apr 10, 2020 21:06

Well, the wordstar editing commands are etched in my mind. Lazarus, Delphi and to a lesser degree VS support them.

Joe has a slightly different set, so that's what I use when I have to do a quick edit, for the rest I fire up lazarus.
caseih
Posts: 1537
Joined: Feb 26, 2007 5:32

Re: Why do you still program for DOS?

Postby caseih » Apr 10, 2020 22:29

Yup our brains are all ruined in different ways!
marcov
Posts: 3012
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Why do you still program for DOS?

Postby marcov » Apr 11, 2020 13:23

caseih wrote:Yup our brains are all ruined in different ways!


Well, not as far as the calculators go :-)
Munair
Posts: 886
Joined: Oct 19, 2017 15:00
Location: 't Zand, NL
Contact:

Re: Why do you still program for DOS?

Postby Munair » Apr 15, 2020 22:55

caseih wrote:I think the reason you don't see any modern compilers running on 16-bit DOS is that the memory model of the 16-bit x86 is so strange and complex compared to the modern flat models, or even the memory models of classic 8 and 16-bit systems. Pure 16-bit systems never had this problem but the 8086 and 8088 were 16-bit CPUs that worked with a 20-bit address bus. [..] The problem isn't that DOS is old or that it's only 16-bit. The problem is it's really an odd architecture. Modern compilers have no problem running on 8-bit and 16-bit microcontrollers, for example.

The 16-bits DOS architecture is the very reason I will not even think of developing a 16-bits compiler. Even though intel processors are backwards compatible as far as the general purpose registers are concerned, which in theory should make it relatively easy to adapt 32-bits code to 16 or even 8, the 64k segments architecture simply is a no go.

I still have a working 386sx with PC-DOS 7 and from time to time I check what kind of asm code QuickBASIC generates, among other things. And my children love QB's example program GORILLA.
caseih
Posts: 1537
Joined: Feb 26, 2007 5:32

Re: Why do you still program for DOS?

Postby caseih » Apr 16, 2020 1:47

Yes QB 4.5 is still, to this day, a great environment to learn programming. By the way, gorilla.bas can, with few changes, be compiled with FreeBASIC.

I don't even want to know what hoops compiler makers went through over the years to make DOS be the powerful and useful thing it was. Programs like WordPerfect, especially the last 6.1 version, were pretty awesome. All kinds of black magic including overlays, expanded and extended memory, direct video memory routines, custom printer drivers, etc. Amazing skill to make it all work reliably. To say nothing of TSRs. Pretty amazing. Of course Windows is its own special brand of complexity also. I was so happy to discover Linux decades ago, which felt kind of DOS-like to me the programmer, but with a flat memory space, and the ability to easily develop modern applications.
marcov
Posts: 3012
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Why do you still program for DOS?

Postby marcov » Apr 16, 2020 8:58

Munair wrote:
caseih wrote:I think the reason you don't see any modern compilers running on 16-bit DOS is that the memory model of the 16-bit x86 is so strange and complex compared to the modern flat models, or even the memory models of classic 8 and 16-bit systems. Pure 16-bit systems never had this problem but the 8086 and 8088 were 16-bit CPUs that worked with a 20-bit address bus. [..] The problem isn't that DOS is old or that it's only 16-bit. The problem is it's really an odd architecture. Modern compilers have no problem running on 8-bit and 16-bit microcontrollers, for example.

The 16-bits DOS architecture is the very reason I will not even think of developing a 16-bits compiler. Even though intel processors are backwards compatible as far as the general purpose registers are concerned, which in theory should make it relatively easy to adapt 32-bits code to 16 or even 8, the 64k segments architecture simply is a no go.


You might have a a look at systems that use hugeptr (iow basically emulate 24-bit linear pointers by handling all operations with normalizing routines). Not ideal, but in combination with a real mode (286) extender, some things are possible.

I still have a working 386sx with PC-DOS 7 and from time to time I check what kind of asm code QuickBASIC generates, among other things. And my children love QB's example program GORILLA.


A 386sx can run a decent 32-bit system, so for such newfangled modern stuff, there is no problem since it can run extenders just fine :-)
marcov
Posts: 3012
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Why do you still program for DOS?

Postby marcov » Apr 16, 2020 9:06

caseih wrote: Programs like WordPerfect, especially the last 6.1 version, were pretty awesome.


Afaik anything after WP 5.1 didn't work on a 286, so was probably a 32-bit program with an extender. But yes, I liked WP6 too. (well, I think I mostly used WP6.0).

The thing I liked most is the general speed of editing once you mastered the shortcuts (and I mostly made chemistry docs, so a few macros for sub/superscript and some greek letters really helped), and the control of what was happening provided by the coded view. The dual mode aspect, a fast textonly mode for the bulk of the editing, and then switch to a WYSIWYG graphics mode for a last review and some cosmetic edits was also nice.

I never felt as secure with Word, and actually now do the documentation for projects that I work on in Latex for that reason.

You might say that WP spoiled me too much to comfortably use Word :-)
Munair
Posts: 886
Joined: Oct 19, 2017 15:00
Location: 't Zand, NL
Contact:

Re: Why do you still program for DOS?

Postby Munair » Apr 16, 2020 10:57

marcov wrote:A 386sx can run a decent 32-bit system, so for such newfangled modern stuff, there is no problem since it can run extenders just fine :-)

Yes, I could do some testing on the DOS computer, especially since it has 16MB RAM on board, but it has no priority.
caseih
Posts: 1537
Joined: Feb 26, 2007 5:32

Re: Why do you still program for DOS?

Postby caseih » Apr 16, 2020 19:22

I remember the 386 SX. Wasn't that a 32-bit processor with a 16-bit data bus? A bit slower since each 32-bit fetch required 2 reads. All to save a bit of money I guess.

At least it wasn't brain-dead like the 486SX that had an onboard math coprocessor that was simply disabled, and even weirder, when you bought the 487 math coprocessor for it, it was actually just a 486DX that took over from the other CPU on the board.

Intel sure has had a history of weird things, probably driven by the bean counters. And our current 64-bit Intel architecture was actually created by AMD, not Intel. Interesting history.
marcov
Posts: 3012
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Why do you still program for DOS?

Postby marcov » Apr 16, 2020 19:30

caseih wrote:I remember the 386 SX. Wasn't that a 32-bit processor with a 16-bit data bus? A bit slower since each 32-bit fetch required 2 reads. All to save a bit of money I guess.


Yes.

At least it wasn't brain-dead like the 486SX that had an onboard math coprocessor that was simply disabled, and even weirder, when you bought the 487 math coprocessor for it, it was actually just a 486DX that took over from the other CPU on the board.


The early 486 dies were huge, and the whole idea was to bin the created dies into good ones (DXes), defects in the copro (486SX) or in the CPU (487SX), but it quickly degraded into a marketing scheme to keep DXes expensive. Cyrix made a 486 with reduced bus and called it the 486SLC. Intel also did funny things with the early pentiums (the so called pentium overdrive)

Intel sure has had a history of weird things, probably driven by the bean counters. And our current 64-bit Intel architecture was actually created by AMD, not Intel. Interesting history.


Yup. the Intel 64-bit architecture was IA64, aka Itanic.

Return to “DOS”

Who is online

Users browsing this forum: No registered users and 3 guests