Microsoft Just Released MS-DOS Source Code!

pastermil@sh.itjust.works to Open Source@lemmy.ml – 819 points –
GitHub - microsoft/MS-DOS: The original sources of MS-DOS 1.25, 2.0, and 4.0 for reference purposes
github.com
159

You are viewing a single comment

LOL, some of the comments in the source are gold.

https://github.com/microsoft/MS-DOS/blob/main/v4.0/src/DOS/ABORT.ASM

Note:  We do need to explicitly close FCBs.  Reasons are as follows:  If we
; are running in the no-sharing no-network environment, we are simulating the
; 2.0 world and thus if the user doesn't close the file, that is his problem
; BUT...  the cache remains in a state with garbage that may be reused by the
; next process.  We scan the set and blast the ref counts of the FCBs we own.
;
; If sharing is loaded, then the following call to close process will
; correctly close all FCBs.  We will then need to walk the list AFTER here.
;
; Finally, the following call to NET_Abort will cause an EOP to be sent to all
; known network resources.  These resources are then responsible for cleaning
; up after this process.
;
; Sleazy, eh?~

This is what people mean when they say hostile to users damn wow

I imagine that's already a compatibility thing. If the os closed the file handles at that point but the program was expecting to do that, it might crash.