Oldest piece of code in recent Windows version

Discuss Windows 95, 98 and ME.
Post Reply
ZXman
Posts: 2
Joined: Sat Nov 14, 2020 7:59 pm

Oldest piece of code in recent Windows version

Post by ZXman »

I wonder if in Windows 10 there are pieces of code from old Windows versions? And if they are there - are they from Windows 95 or even from Windows 3.1?

Pikavolt321
Posts: 28
Joined: Mon Feb 12, 2018 11:44 pm

Re: Oldest piece of code in recent Windows version

Post by Pikavolt321 »

ZXman wrote:
Sat Nov 14, 2020 8:20 pm
I wonder if in Windows 10 there are pieces of code from old Windows versions? And if they are there - are they from Windows 95 or even from Windows 3.1?
I imagine there's code in the WoW subsystem dating to Windows 1.0 possibly, on 32-bit Windows 10. On 64-bit, the oldest code would be from Windows NT 3.x (and maybe Win95).

Meow
Posts: 231
Joined: Mon Feb 03, 2020 5:28 am

Re: Oldest piece of code in recent Windows version

Post by Meow »

Pikavolt321 wrote:
Tue Nov 17, 2020 3:35 pm
ZXman wrote:
Sat Nov 14, 2020 8:20 pm
I wonder if in Windows 10 there are pieces of code from old Windows versions? And if they are there - are they from Windows 95 or even from Windows 3.1?
I imagine there's code in the WoW subsystem dating to Windows 1.0 possibly, on 32-bit Windows 10. On 64-bit, the oldest code would be from Windows NT 3.x (and maybe Win95).
The oldest code in the WoW subsystem would likely be from 3.0. 1.0 and 2.0 were not very popular so not many apps were written for them. 3.0 is where applications were rewritten because 1.0 and 2.0 apps were basically DOS exes with a frontend for the Windows GUI. Since 3.0 introduced an actual kernel (vs 1.0 and 2.0, which basically were dos shells, and basically did not have their own kernel) , apps needed to be rewritten for that platform. 64 bit Windows 10 would likely contain code from as far back as 1988, when NT was still OS/2 3.0.
Windows 10 should've been named Windows X

xelloss
User avatar
Donator
Posts: 332
Joined: Sun Aug 18, 2013 7:26 pm
Location: Edinburgh, Scotland

Re: Oldest piece of code in recent Windows version

Post by xelloss »

Meow wrote:
Tue Nov 17, 2020 6:05 pm
The oldest code in the WoW subsystem would likely be from 3.0. 1.0 and 2.0 were not very popular so not many apps were written for them. 3.0 is where applications were rewritten because 1.0 and 2.0 apps were basically DOS exes with a frontend for the Windows GUI. Since 3.0 introduced an actual kernel (vs 1.0 and 2.0, which basically were dos shells, and basically did not have their own kernel) , apps needed to be rewritten for that platform. 64 bit Windows 10 would likely contain code from as far back as 1988, when NT was still OS/2 3.0.
It all depends on the meaning of "the oldest code". I've recently started disassembling KERNEL from Windows DR5, and some of the functions have the exact same names used in the Windows 3.1 KRNL286/386. As for the actual code in those functions, who knows; but I'd bet a good bottle of Conero DOCG that the 16 bit kernel was never rewritten 100% from scratch: IMHO chances are a few lines of code here and there written by somebody in 1983 still survive in Windows 10 32 bit.

AlphaBeta
User avatar
Donator
Posts: 2169
Joined: Sun Aug 12, 2012 4:33 pm
Location: Czechia

Re: Oldest piece of code in recent Windows version

Post by AlphaBeta »

Meow wrote:
Tue Nov 17, 2020 6:05 pm
Since 3.0 introduced an actual kernel (vs 1.0 and 2.0, which basically were dos shells, and basically did not have their own kernel)
I would be interested in your definition of a kernel, then
AlphaBeta, stop brainwashing me immediately!

Image

Meow
Posts: 231
Joined: Mon Feb 03, 2020 5:28 am

Re: Oldest piece of code in recent Windows version

Post by Meow »

AlphaBeta wrote:
Tue Nov 17, 2020 10:30 pm
Meow wrote:
Tue Nov 17, 2020 6:05 pm
Since 3.0 introduced an actual kernel (vs 1.0 and 2.0, which basically were dos shells, and basically did not have their own kernel)
I would be interested in your definition of a kernel, then
Their kernels weren’t all that functional and they relied heavily on DOS’s kernel. 3.0’s kernel was way more functional and didn’t rely on DOS’s kernel as much. I guess you could say that their kernels were indeed kernels but in my opinion they really aren’t.
Windows 10 should've been named Windows X

xelloss
User avatar
Donator
Posts: 332
Joined: Sun Aug 18, 2013 7:26 pm
Location: Edinburgh, Scotland

Re: Oldest piece of code in recent Windows version

Post by xelloss »

AlphaBeta wrote:
Tue Nov 17, 2020 10:30 pm
I would be interested in your definition of a kernel, then
IIRC the Windows 16 bit "kernel" is about managing memory and processes (only supporting cooperative multitasking). Most notably, it doesn't provide any disk I/O, and Win16 programs need to call directly into DOS for that. There are a real mode "kernel" (KERNEL.EXE, up to version 3.0) and two protected mode kernels (KRNL286 and KRNL386, both starting from Windows 3.0); I believe the major difference between them is memory management (real mode and protected mode memory management are radically different) but maybe there's other stuff as well.

Matriks404
Posts: 72
Joined: Wed Jul 24, 2013 8:23 pm
Location: Kraków, Poland

Re: Oldest piece of code in recent Windows version

Post by Matriks404 »

I've actually thought about this as well some time before, I think one of the most prominent oldest relict (probably not code itself) of the past are the drive letters and virtual DOS devices such as COM0:, CON: or NUL (originated in CP/M), these still cause problems today, for example you can't name a directory or a file with the same name as DOS device (try naming a directory NUL).

The other relict is EDLIN DOS text editor which is still available in 32-bit versions of Windows 10 through NTVDM (16-bit DOS emulation layer), which as well originated in CP/M (editor called just ED) but was also a distant relative of the UNIX ed text editor (which first version was available in 1973). Wikipedia source: https://en.wikipedia.org/wiki/Edlin

As for oldest code I think the NTVDM in its entirety (again, 32-bit Windows only) could contain some very old DOS code, like command interpreter (COMMAND.COM) or other utilities, although based on later MS-DOS versions (probably 5.0).

xelloss
User avatar
Donator
Posts: 332
Joined: Sun Aug 18, 2013 7:26 pm
Location: Edinburgh, Scotland

Re: Oldest piece of code in recent Windows version

Post by xelloss »

Matriks404 wrote:
Thu Nov 19, 2020 5:48 pm
The other relict is EDLIN DOS text editor which is still available in 32-bit versions of Windows 10 through NTVDM (16-bit DOS emulation layer), which as well originated in CP/M (editor called just ED) but was also a distant relative of the UNIX ed text editor (which first version was available in 1973). Wikipedia source: https://en.wikipedia.org/wiki/Edlin
Oh yes, good point. That one was written by Tim Paterson for his QDOS version 0.2, long before it evolved into MS-DOS. Wow.

xpclient
User avatar
FTP Access
Posts: 470
Joined: Fri Aug 28, 2009 1:10 pm
Location: Windows

Re: Oldest piece of code in recent Windows version

Post by xpclient »

One example that comes to mind is Video for Windows API and the whole VfW codec framework that is ancient.
xpclient
Huge Microsoft fan and old software collector since Windows 3.0 and MS-DOS :mrgreen:
I did the testing and feedback for Classic Shell.

Post Reply