3 ms·
I love it how the OS does the obviously right thing (at least to my eyes, returning from the application's main() function equivalent makes 100% perfect sense),
by unwind 12y ago
I love it how the OS does the obviously right thing (at least to my eyes, returning from the application's main() function equivalent makes 100% perfect sense), but people who have obviously spent a b*ttload of time with these things are still surprised. Not sure if it's irony, or just tragic. Good story though, thanks!
- SonOfLilit 12y agoIt's maybe the right thing, but not the obvious thing. In the context of DOS assembly language programming, the only obvious thing is "nothing". DOS is barely an OS, it's mostly a library of function calls. DOS does nothing most of the time, so you expect it to do nothing all the time. At the time I didn't yet spend a lot of time doing DOS assembly language programming, but since then I did, and had I heard about this for the first time today, I would be really surprised.
- ryanjshaw 12y agoThe first x86 assembly program I wrote ran almost perfectly the first time. That was over 15 years ago and I don't remember what it actually did, but I remember being impressed with myself. Then the screen filled with junk and my P133 rebooted. When it happened a second time I resigned myself to actually read the assembly manual section about DOS programs properly (i.e. not stop after the part which said .COM files are the simplest way to get started). The idea of asking the OS to unload my application wasn't obvious to me at all :) At the same time, realising why not asking the OS to unload my application produced the results it did was a lightbulb moment.