Oldest piece of code in recent Windows version
Oldest piece of code in recent Windows version
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: 35
- Joined: Mon Feb 12, 2018 11:44 pm
Re: Oldest piece of code in recent Windows version
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).
Re: Oldest piece of code in recent Windows version
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.Pikavolt321 wrote: ↑Tue Nov 17, 2020 3:35 pmI 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).
Re: Oldest piece of code in recent Windows version
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.Meow wrote: ↑Tue Nov 17, 2020 6:05 pmThe 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.
Re: Oldest piece of code in recent Windows version
I would be interested in your definition of a kernel, then
Re: Oldest piece of code in recent Windows version
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.
Re: Oldest piece of code in recent Windows version
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: 73
- Joined: Wed Jul 24, 2013 8:23 pm
- Location: Kraków, Poland
Re: Oldest piece of code in recent Windows version
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).
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).
Re: Oldest piece of code in recent Windows version
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.Matriks404 wrote: ↑Thu Nov 19, 2020 5:48 pmThe 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
Re: Oldest piece of code in recent Windows version
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
I did the testing and feedback for Classic Shell.
Huge Microsoft fan and old software collector since Windows 3.0 and MS-DOS
I did the testing and feedback for Classic Shell.
-
Lucas Brooks
- Posts: 773
- Joined: Sat Oct 20, 2018 11:37 am
- Contact:
Re: Oldest piece of code in recent Windows version
I'd say the oldest line of code in Windows 10 is:
It existed way before Windows 1.01, possibly before the Fall Comdex 1983 demo of Windows 1.0.
Code: Select all
#include "windows.h"
- os2fan2
- Donator
- Posts: 1394
- Joined: Sun Dec 30, 2007 8:12 am
- Location: Brisbane, Queensland
- Contact:
Re: Oldest piece of code in recent Windows version
This is the DOS5 and Win31 stuff from all versions of windows from 3.50 onwards. kb16 is keyb. Some of these are new compiles (qbasic.exe, drwatson) some are straight DOS 5.0 files. Anything from DOS 5 will run under WinNT, just that NT doesn't like the DOS format or chkdsk actually doing something useful.
edit is from Win95, not WinME.
It is amusing that MS-Edlin was dropped from DOS 6 (to the supp disk), but remains in NT in all of its glory. PC-DOS dropped edlin in DOS 7 (available on the supp disk), but OS/2 keeps it and updates it on each IBM build.
edit is from Win95, not WinME.
It is amusing that MS-Edlin was dropped from DOS 6 (to the supp disk), but remains in NT in all of its glory. PC-DOS dropped edlin in DOS 7 (available on the supp disk), but OS/2 keeps it and updates it on each IBM build.
Code: Select all
ansi.sys doshelp.hlp -gorilla.bas mem.exe -qbasic.exe
append.exe dosx.exe graphics.com -money.bas -qbasic.hlp
autoexec.nt #drwatson.exe graphics.pro mscdexnt.exe redir.exe
backup.exe =edit.com himem.sys -nibbles.bas #regedit.exe
command.com =edit.hlp kb16.com ntcmds.hlp -remline.bas
config.nt edlin.exe +key01.sys ntdos.sys setver.exe
country.sys exe2bin.exe keyboard.sys ntio.sys share.exe
debug.exe fastopen.exe loadfix.com nw16.exe #sysedit.exe
Commands +added, -removed, =upgraded in Windows 2000.
Commands # are for the Wow16 subststem, work on Windows 3.1
The Win2000 set is the same as the Vista 6.1 set.
Re: Oldest piece of code in recent Windows version
I definitely remember a few registry references to Windows 3.1 Migration in at least WinXP, and I think it is still in 10, too.
I'm gonna make him an [OFFER] he can't refuse.
-
Hyoenmadan86
- Posts: 228
- Joined: Fri Sep 07, 2012 6:45 pm
Re: Oldest piece of code in recent Windows version
The only real kernel which actually existed in Win2x, 3x and 4x was the VMM. You can call it an early hypervisor type kernel, as it implements all sorts of virtualization techniques through Intel V86 cpu extensions. It can virtualize hardware access and is comparable to what Netware was and actually Xen and ESXi ones are, just more primitive, but more lightweight too. Has already been discussed it can use DOS basically as a disk driver, but generally you want to use VxD storage port drivers like ESDI506, or SCSI MPD miniports for better performance.xelloss wrote: ↑Wed Nov 18, 2020 1:26 amIIRC 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.
As for DOSX, used in Win2 and 3 standard bootmode can't be really catalogued as kernel, it is a real DPMI server implemented in top on DOS. KERNEL, KRNL286, KRNL386 and Kernel32 aren't the windows kernel per se... Them never were. In Win2, 3 and 4 them are DPMI client "special" applications which implement the windows api on top of the DPMI server, which is provided by DOSX or virtualized by the VMM kernel. On NT these are clients of the NTDLL api.
-
SpiralVortex
- Posts: 244
- Joined: Fri Oct 08, 2010 6:06 am
Re: Oldest piece of code in recent Windows version
Now that Windows 11 is going 64-bit only, that means an end to the old MS-DOS files as mentioned in earlier posts.
So, what's the oldest bit of code in 64-bit Windows? It'll be part of the 32-bit subsystem and, for no other reason than I know it was around in 1992, I'll nominate moricons.dll (which still exists in the Insider Preview build of Windows 11).
So, what's the oldest bit of code in 64-bit Windows? It'll be part of the 32-bit subsystem and, for no other reason than I know it was around in 1992, I'll nominate moricons.dll (which still exists in the Insider Preview build of Windows 11).
Re: Oldest piece of code in recent Windows version
Not necessarily. NT is built from a highly portable code base: the same source generates, in most cases, 32 bit or 64 bit executables.SpiralVortex wrote: ↑Fri Jul 02, 2021 5:39 amSo, what's the oldest bit of code in 64-bit Windows? It'll be part of the 32-bit subsystem
Still? That's amazing. Isn't it a 16 bit DLL, though?SpiralVortex wrote: ↑Fri Jul 02, 2021 5:39 amI'll nominate moricons.dll (which still exists in the Insider Preview build of Windows 11).
-
Windows8.1rocks
- Posts: 4
- Joined: Wed Sep 02, 2020 2:46 pm
Re: Oldest piece of code in recent Windows version
I would say the oldest piece of code on Windows 10/11 would be something from NT 3.1x or NT 4.0. These releases have far more in common with Windows 10 and 11 and Modern Windows in General than 95/98/Me, as these are based on NT, rather than 9x, which at its core, is DOS
- os2fan2
- Donator
- Posts: 1394
- Joined: Sun Dec 30, 2007 8:12 am
- Location: Brisbane, Queensland
- Contact:
Re: Oldest piece of code in recent Windows version
Moricons is a resource DLL. Specifically, it has small icons in it which vista+ do not show correctly.
- os2fan2
- Donator
- Posts: 1394
- Joined: Sun Dec 30, 2007 8:12 am
- Location: Brisbane, Queensland
- Contact:
Re: Oldest piece of code in recent Windows version
When i read your comment, I set the icon of an html shortcut to something in moricons.dll, and it did indeed work. On the other hand, setting the icon to WP51 (DOS) pif file, produces the same white square it always did.
Re: Oldest piece of code in recent Windows version
It might be worth noting that the equivalent of kernel.exe was originally called base.dll in the early NT builds from 1991, probably for this exact reason. The name still lives on in the file description of kernel32, kernelbase and advapi32.Hyoenmadan86 wrote: ↑Fri Jul 02, 2021 3:38 amAs for DOSX, used in Win2 and 3 standard bootmode can't be really catalogued as kernel, it is a real DPMI server implemented in top on DOS. KERNEL, KRNL286, KRNL386 and Kernel32 aren't the windows kernel per se... Them never were. In Win2, 3 and 4 them are DPMI client "special" applications which implement the windows api on top of the DPMI server, which is provided by DOSX or virtualized by the VMM kernel. On NT these are clients of the NTDLL api.
Re: Oldest piece of code in recent Windows version
I was thinking of existing Win32 code in modern Windows. It is possible to have bits of code from early Windows versions (1.0-3.0), but 1.0x to 2.xx is just a glorified file manager shell for DOS. I'm no software expert but it is possible that system files from Windows 10 are derived from Windows for Workgroups 3.1x or earlier.
Re: Oldest piece of code in recent Windows version
Windows 1.x, Windows 2.x (not Windows/386) and Windows 3.0 in Real mode are indeed graphical shells for DOS.
Windows 3.x in Standard mode is a DOS extender plus a graphical shell.
Windows/386 2.1x and Windows 3.x in Enhanced mode are DOS preemptive multitaskers plus graphical shells.
In 32-bit Windows 10, sure. It contains the NTVDM and WoW subsystems, which in turn contain modified versions of DOS 5.0 and Windows 3.1.
Re: Oldest piece of code in recent Windows version
VMM existed only in Windows 9x (Win 4x, according to your scheme of things). In Windows/386 2.1 and Windows 3.x Enhanced mode, there was WIN386.EXE instead. In all other versions of Windows 1.x, 2.x or 3.x, there was neither hardware virtualization/interception/serialization, nor virtual memory, nor DOS multitasking, so no real "kernel" either.Hyoenmadan86 wrote: ↑Fri Jul 02, 2021 3:38 amThe only real kernel which actually existed in Win2x, 3x and 4x was the VMM.
Re: Oldest piece of code in recent Windows version
The kernels interpreted API calls, hosted device drivers, and so on. They absolutely were functioning OS kernels.
Long days, and pleasant nights.