"cas" appears to be one of the programmers. There are several comments in the code with that signature. I don't see the value of that particular comment though. "Arrrrgh" doesn't really convey that much information. Unless you're a pirate, I guess.
Does viewing the leaked source count as being a pirate? (lol) Looking through it, it seems like "cas" was actually documenting things they found questionable, rather than being blamed for them by someone else. Though as you pointed out, those comments are fairly unhelpful... examples: "cas - bad code!", "cas -- inefficient!" and the classic "cas - holy sh*t!!! CODE!". I could only imagine working at MS maintaining DOS at that time was probably not a very thankful experience... there were probably 20 managers for every developer and any proposed change to a single line of code probably required committee review and was unlikely to be blessed (so snarky comments were the only way to be heard). I actually did try some searching to see if we can find out who "cas" was but haven't turned up anything yet. cas, are you reading this forum?
Clearly, they were afraid to change anything they didn't absolutely have to, as the code base is a patchwork of very different programming styles, formatting, case, indentation, tabs v. spaces, etc. IF they had a style guide, I'd *love* to read it! It does not appear that this code has changed in any significant way
since DOS 3.3 (other than the "arrrgh" comment). Though tragically IBM did mess with it in PC-DOS 7+ and
introduced a V20 bug in this very code section.
I have this recurring fantasy where Microsoft releases the source for DOS 6.22 just like they did with DOS 2.x. Then we could really show them how it should have been done.
I tend to think it's unlikely they would release the source in its completeness any time soon, especially with all of the Symantec stuff in it (DEFRAG, etc). I have a suspicion that they do still sell it in an off-the-record way to large corporate and/or government customers who still use it and will pay handsomely for support. They probably know just as well what a mess it was anyway, so why suffer the embarrassment.
And I mean, they couldn't be bothered to release 2.0 in its completeness (okay, I shouldn't complain, it was cool that they did it at all).
Last rant... so much work is done in memory with direct addressing, leading to those many 4-5 byte instructions there. Going back to that `bcd_verify` proc... using indirect+disp there alone would save you at least 3 bytes. Why would they do a `mov al,[bx] / inc bx` when lodsb would do the same? Also... `dec cx / jnz bv_loop` ... what? And yes, the `and ah, 0fh` after the four `shr`'s is quite perplexing indeed.
I do wonder if the source code could be golfed and optimized just how much speed and memory savings could be found. And I get it... this was their bread and butter at the time so why mess with a stable and proven code base. But... it seems like they got a bit complacent and just expected that everyone would just load things up in high/UMA so "who cares" about the size, right?