3 ms·
First of all, I'd like to thank Microsoft for open-sourcing this, as well as early versions of MS-DOS; they are important pieces of computer history. Now, a fe
by peter_d_sherman 6y ago
First of all, I'd like to thank Microsoft for open-sourcing this, as well as early versions of MS-DOS; they are important pieces of computer history.
Now, a few software engineering observations (these are to my future self, not to Microsoft):
1) This is extremely minor, but it would have been nice if the main file (which I'm guessing is GWMAIN.ASM?) had been pointed to in the documentation. Reason: We're not in a language that has a default main file by custom, i.e., C's 'main.c'. But again, extremely minor...
2) This code is great, I mean, absolutely great for someone to learn x86 programming IF they have the prerequisite understanding about how memory is segmented in those early computers (including segment registers, etc.)... Reason: Very few basic x86 instructions are used, relative to the entire x86 instruction set...
3) It seems that the assembler which was being used at the time had a limitation of 6 characters per symbol. This kind of sucks a little bit for the readability of those symbols (but note that the code makes up for this with liberal commenting, which is great!), and of course, with a little bit of effort, you can mentally parse what most of these mean.
4) I would have liked to see some kind of document (although, since it's 38 years "after-the-fact", after this program was being written, I certainly don't expect one! <g>) which, at a high level, would describe the main data structure being used to hold the lines of basic code (I'm guessing this would be a linked list of sorts), in what source file that data structure lives, and how it is evaluated when a BASIC program is run...
Basically, give me the high-level view of the system.
The code itself represents the low-level implementation details of that high-level "as simple as possible but not simpler", view...
But again, those things are minor, relatively speaking, and they only amount to "notes to self" in my future software engineering efforts...
Anyway, thanks again to Microsoft for this great important contribution to computer history!!!