How do I program in DOS(Disk-Operating-System)directly?
Banned - Reputation: 90
Posted 07 April 2012 - 12:44 PM
However, I'm kind of lost.
How do I specifically code a program to execute like one would in DOS back in Windows 95/98?
Windows 7 has DOS, right? Isn't it still a 16-bit OS?
But is there a specific way you program for it?
I want to make a graphical game obviously, even though DOS works in a one-bit per-pixel style.
I'm sorry, but I'm kind of confused ... any pointers?
Moderators - Reputation: 10413
Posted 07 April 2012 - 01:43 PM
If you want to really write 16-bit code, that's it anyways; if you just want a game that looks retro but still runs in 32/64-bit modes, there's easier ways to do that. If you just want to write really low-level stuff on a limited architecture, look into the Arduino or something similar.
[Work - ArenaNet] [Epoch Language] [Scribblings] [Journal - peek into my shattered mind]
Banned - Reputation: 90
Posted 07 April 2012 - 01:59 PM
Could I download an 8 or 16-bit OS, and boot a separate partition of the hard drive where I store the OS, and, when capable, program from that OS in the lower bit system support?
Like Windows 95 for example. Are there any downloads of it available?
And does coding style strictly change within different bits?
Because I notice that in DOS you have to add a whole bunch of code that is specific to DOS's 16-bit system.
Moderators - Reputation: 6654
Posted 07 April 2012 - 02:24 PM
These days, it is hard to find retro PC platforms to develop upon. Your best bet is to find a VM or emulator. You can dig around with old projects like DJGPP, which was once upon a time a pretty active project in the 16-bit era. The good thing about emulators is that you don't have to worry about the vendor-specific crap. Just code to the emulator.
As far as my personal opinion, I'm glad those days are past. GLAD, I say. I have 0 nostalgia for them. I still remember my very first graphical game written in DOS using the A86 assembler on an old 8088. 32x24 tiles at 16x16 pixels per tile on an EGA, and you could literally eat two bites of your PB&J while waiting for the screen to redraw because I knew exactly dick about the hardware and optimization. My personal opinion is to forget DOS assembly coding and emulators, and just code a retro-looking game using these so, so lovely modern tools that we have.
Crossbones+ - Reputation: 5573
Posted 07 April 2012 - 06:03 PM
Windows 7 doesn't "have DOS"; it has a command-prompt, but that command-prompt is a native Windows application. The last DOS-based version of Windows was Windows Me; Windows 2000, XP, Vista and 7 are not DOS-based.
Windows 7 is not 16-bit. The last 16-bit version of Windows was 3.x in the early 90s; Windows 95, 98 and Me were hybrid 16/32, all NT-class versions of Windows (which includes 2000, XP, Vista and 7) are fully native 32-bit or 64-bit.
Under any of these operating systems you cannot access the hardware directly. It's forbidden, you must go through an API.
JTippets is correct - the old days were horrible. No multitasking, no device drivers, no protected memory, you could (and often did) write a program that gleefully corrupted anything else on your PC. Back in the late 80s/early 90s writing "the C program that rebooted your computer" was a rite of passage - and that was the least worst thing you could do.
No standardization - you had to write a separate renderer, separate sound code, separate input code, etc for each variation of hardware that could exist. No guarantee that your program could work on any other machine.
The answer to your question is: "you don't". Those days are gone, and for very good reasons.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.