LINUX.ORG.RU

История изменений

Исправление fsb4000, (текущая версия) :

Windows изначально писали на Паскале

Windows писали на ассемблере.

После ассемблера перешли на С, потом на С++. Может где-то и был паскаль…

В С и ассемблере можно указывать calling conventions. Брали паскалевскую, потому что это экономило немного байт.

https://devblogs.microsoft.com/oldnewthing/20040102-00/?p=41213

Pascal does not support functions with a variable number of parameters, so it can use the callee-clean convention. Parameters are pushed from left to right, because, well, it seemed the natural thing to do. Function name decoration consists of conversion to uppercase. This is necessary because Pascal is not a case-sensitive language.

Nearly all Win16 functions are exported as Pascal calling convention. The callee-clean convention saves three bytes at each call point, with a fixed overhead of two bytes per function. So if a function is called ten times, you save 3*10 = 30 bytes for the call points, and pay 2 bytes in the function itself, for a net savings of 28 bytes. It was also fractionally faster. On Win16, saving a few hundred bytes and a few cycles was a big deal. 

Исходная версия fsb4000, :

Windows изначально писали на Паскале

Windows писали на ассемблере.