handmade.network » Forums » Getting into old school MS-DOS game programming
sudo459
3 posts
#15791 Getting into old school MS-DOS game programming
1 month ago Edited by sudo459 on July 17, 2018, 2:55 p.m. Reason: Initial post

Hey everyone,

I've decided to, purely as a hobby, start programming with (in?) MS-DOS. So far, it's incredibly difficult due to the lack of information, but I feel like I can manage. The main problem I seem to be having is that I feel a bit scared to run my programs. Since I'm using real hardware, crashes, at least I think, could potentially be devastating. Without the memory protection of modern OS's, and running in real mode, I worry how my program will misbehave if it overwrites memory. My question is, how likely is it, that if my program misbehaves it will damage my computer or cause data loss? And, in what ways could this happen?
mmozeiko
Mārtiņš Možeiko
1738 posts / 1 project
#15792 Getting into old school MS-DOS game programming
1 month ago

Damaging computer - no, that won't happen. Data loss - yes, that could happen. For example, when you would write to disk with wrong data, overwriting something important (either in your application, or OS files).

But I would really suggest to develop using DosBox. Yes, it's not a real hardware, but it will help you a lot. It's close enough to real hw, unless you are really pushing boundaries. But this last step could be done separately on real hw. Begin with easy stuff, use DosBox.
sudo459
3 posts
#15796 Getting into old school MS-DOS game programming
1 month ago

I see. Thanks. I do wonder, other than a safer environment, what does DOSBox offer as far as making it easier to develop on, other than of course different emulated hardware setups? Ive tinkered around with Watcom's debugger, and Ive had trouble getting it to do remote debugging in DOSBox. It would just crash both dosboxes. Granted, I havent tried it on real hardware either, yet. And dosbox to real doesnt work either, naturally.
mmozeiko
Mārtiņš Možeiko
1738 posts / 1 project
#15797 Getting into old school MS-DOS game programming
1 month ago Edited by Mārtiņš Možeiko on July 17, 2018, 10:18 p.m.

what does DOSBox offer as far as making it easier to develop on
Easier to recover form mistakes. Something locks up / terribly crashes? Just reset whole emulation. Restarting app will be much faster than whole PC.

Also it has some kind of integrated debugger, but I've never tried it: https://github.com/Henne/dosbox-s.../master/src/debug/debug.cpp#L1277

sudo459
3 posts
#15798 Getting into old school MS-DOS game programming
1 month ago

That DOSBox debugger looks interesting, I'll have to check it out. Thanks again. Also, I must have forgotten restart time. It's not much faster, but I could see how waiting a few more seconds to restart the program when doing a test could get annoying.