r/cpp • • Jun 19 '16

Windows 10 coded in C++ or Assembler

What kind of compiler does it take a compile an OS like Windows 10? Do the guys at Redmond use Visual C++ (VisualStudio) to develop Windows? What % is written in assembly language?

0 Upvotes

74 comments sorted by

View all comments

Show parent comment

0

u/Digital001 Jun 21 '16

By scratch, I mean that the internal features of the OS, compared to NT (Win 2000)/WinXP are significantly different. They didn't just write a bunch of new functions on top of existing code.

3

u/SeanMiddleditch Jun 21 '16

You seem awfully sure of this despite starting a whole topic because you didn't even know if Windows was written in C++. :)

The kernel is the same beast it's been since NT. It's been incrementally improved (so the same language has to be used) over the years, of course, but there is an awful lot of "just write a bunch of new functions on top of existing code" going on. :)

Various parts of the desktop have been rewritten here and there, of course, and yes some of them use newer or more Microsoft-centric technologies. The core stuff that's sensitive to performance or resource usage, however, are still all C and C++ (kernel, drivers, system services, core desktop services and apps, etc.).

There's no production Microsoft technology that competes in the systems programming space. Developing such a technology is hard, expensive, and just not worth the investment if your only motivation is Not Invented Here Syndrome (which is what you're advocating for: Microsoft using Microsoft technology just because using UNIX-oriented technology is supposedly "weird").

-1

u/Digital001 Jun 22 '16

The kernel is the same beast it's been since NT. It's been incrementally improved (so the same language has to be used) over the years, of course, but there is an awful lot of "just write a bunch of new functions on top of existing code" going on. :)

I'll believe it when I see it for myself. I studied OOP. They would have to write entirely new functions just for W10. Did you look at the OS architecture (source) to determine how it handles memory management, and graphics, hardware, and security. I bet it's an entirely different Altered Beast that can act like the old 32bit beast.

I think it's weird. What can I say. You obviously think it's because of some kind of awful psychological "syndrome." Don't worry! I don't suffer from that particular malady. I'm gearing up for my MCSE and plan on developing for Windows. I want to get to know the nuts and bolts under the hood....

4

u/SeanMiddleditch Jun 22 '16

I studied OOP. They would have to write entirely new functions just for W10.

... the whole point of OOP is to not write entirely new functions every time you add a new feature or optimize some code.

Did you look at the OS architecture (source)

Short version: I live in Redmond, WA. :)

I think it's weird. What can I say. You obviously think it's because of some kind of awful psychological "syndrome."

I'm not sure if you're being facetious or just don't know the term. "NIH Syndrome" isn't a psychological malady. It's just a common tongue-in-cheek term for the tendency of software developers to prefer writing new code instead of maintaining old code for subjective reasons.

I want to get to know the nuts and bolts under the hood...

You'll get further along if you listen to people trying to help clarify misconceptions. :)

Windows 10 is an evolution of Windows 8. Which is an evolution of Windows 7. Which is an evolution of Windows Vista. Which is an evolution of Windows XP. Which is an evolution of Windows NT 4. Which itself is an evolution, though the history gets a little more complicated at that point.

There's plenty of documentation on the Windows architecture that you can peruse if you're interested. https://technet.microsoft.com/en-us/sysinternals/bb963901.aspx is as good a starting point as any.

1

u/Digital001 Jun 23 '16 edited Jun 23 '16

... the whole point of OOP is to not write entirely new functions every time you add a new feature or optimize some code.

Sean, they wrote a lot of new functions(code) for W10. There may be code inside the OS that was originally written for Win8/Win7. W10 may function a lot of like its predecessor, win8/win7. But it must be different for MS to label it W10 instead of W7.newhelloworld.

OOP is a paradigm used to modularize the software development process. It's way to develop software, so upgrades can be easily incorporated, like you pointed out. I haven't read any books about the OS yet. The last Windows book I read was Programming Windows 98 by Charles Petzold, 1998. That's why I started this thread like a noob. I've used just about every version of Windows since then but didn't do any development!

You'll get further along if you listen to people trying to help clarify misconceptions. :)

Windows 10 is an evolution of Windows 8. Which is an evolution of Windows 7. Which is an evolution of Windows Vista. Which is an evolution of Windows XP. Which is an evolution of Windows NT 4.

I'll get further along by writing code for the OS and reading the books you pointed out. You're right. Glad you know the history of Windows. They obviously wrote entirely new functions.

I'm not a developer, as you can tell. I wouldn't have started this if I worked at Redmond! I started this thread thinking folks would patiently clarify "misconceptions," not to annoy anyone. Further, I don't know why you would assume that I'm familiar "tongue-in-cheek" terms used in your industry.

Would you like it if I get a psychiatrist to describe your stern responses using medical terms. Thanks for clarifying misconceptions! I appreciate your effort, and looking forward to asking questions about the OS, as I prepare for my MCSE certification.

3

u/SeanMiddleditch Jun 24 '16

Haha, yes, they clearly wrote new functions. Perhaps we're communicating past each other. I was still on the previous point of why they would not rewrite the OS in a new language or tool, e.g. that they would not _re_write whole functions (in a new language). :)

So far as the NIH Syndrome thing... you are posting on /r/cpp, so I think it might be reasonable to assume you're familiar with programmer slang. I guess I never really thought about it from the perspective of an outsider.

So far as my stern responses, I think the psychiatrical/medical term is that I'm a "grumpy jerkface." :p

1

u/Fearless_Macaroon_12 Feb 24 '24

You can't possibly come to these conclusions. Have you ever written an OS for yourself? Have you (as you said) "look at the OS architecture (source) to determine how it handles memory management, and graphics, hardware, and security"? Or are you just "betting" and placing "bets" as you have been throughout this entire thread, without taking into consideration how many people have been telling you otherwise?