Singularity source code available for download
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Singularity source code available for download
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
Oooh, I've been waiting for this
Now I've got decent bedtime reading material
Now I've got decent bedtime reading material
Code: Select all
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M/MU d- s:- a--- C++++ UL P L++ E--- W+++ N+ w++ M- V+ PS+ Y+ PE- PGP t-- 5- X R- tv b DI-- D+ G e h! r++ y+
------END GEEK CODE BLOCK------
Looking at the bootloader right now, and so far (from the bootsectors and singldr) it looks pretty awful.
Sounds safe.
Loving the concise constant names.
Nice horizontal rule!
I'm not sure if this is some sort of weird publicity stunt or what, but a lot of it looks really hackish and generally bad.
Edit: I guess they learned C and ASM on the fly or something; the C# parts (the kernel and whatnot) actually look pretty nice. As nice as object-oriented code can look, anyways.
Code: Select all
shl eax, 5 ; (assume no overflow)
Code: Select all
else if (startKB + sizeKB >= Struct_Microsoft_Singularity_BootInfo_MAX_VIRTUAL_ADDR / 1024ul) {
sm[i].size.hi = 0;
sm[i].size.lo = Struct_Microsoft_Singularity_BootInfo_MAX_VIRTUAL_ADDR - startKB * 1024;
Code: Select all
BdPrintString("-------------------------------------------------------------------------------\n", 80);
I'm not sure if this is some sort of weird publicity stunt or what, but a lot of it looks really hackish and generally bad.
Edit: I guess they learned C and ASM on the fly or something; the C# parts (the kernel and whatnot) actually look pretty nice. As nice as object-oriented code can look, anyways.
My God. 'Struct_Microsoft_Singularity_BootInfo_MAX_VIRTUAL_ADDR'? They're ... kidding .. aren't they?lollynoob wrote:Loving the concise constant names.Code: Select all
else if (startKB + sizeKB >= Struct_Microsoft_Singularity_BootInfo_MAX_VIRTUAL_ADDR / 1024ul) { sm[i].size.hi = 0; sm[i].size.lo = Struct_Microsoft_Singularity_BootInfo_MAX_VIRTUAL_ADDR - startKB * 1024;
C8H10N4O2 | #446691 | Trust the nodes.
- os.hacker64
- Member
- Posts: 149
- Joined: Mon Feb 11, 2008 4:43 pm
- Location: Limbo City,Afterlife
-
- Member
- Posts: 190
- Joined: Tue Sep 26, 2006 1:40 pm
- Libera.chat IRC: Nokurn
- Location: Ontario, CA, USA
- Contact:
You never read the leaked source code for Win2k or WinNT, or even any Microsoft code examples? They love ridiculously long and obvious names. Either my ability to tell jokes from seriousness sucks, or they actually considered naming IE8 "IE Desktop Online Web Browser Live Professional Ultimate Edition for the Internet" (source). It certainly sounds Microsoft-ish.
Anyways, I'm back in Windows for the first time since Feb. 24th, so I'll see if I can compile it while I'm here.
Anyways, I'm back in Windows for the first time since Feb. 24th, so I'll see if I can compile it while I'm here.
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
I'm betting those long names are required for using C# constructs from C++ or asm. Most likely the C# namespaces get munged into long_names_with_underscores in the symbol table.
@lollynoob: You realize this is a research OS and not a commercial product, right?
@lollynoob: You realize this is a research OS and not a commercial product, right?
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Yes, exactly. Singularity's dialect of C# is compiled with Bartok, which emits native code, not assemblies containing IL as gmcs and friends do.Jeremiah Griffin wrote:I just looked at a hex dump of a C# executable produced by gmcs. There were no long underscored names like that. It's a Microsoft thing.
In my experience, no kernel code is. It's just a grotty, detail-infested kind of domain to work in. If you want elegance, look at compilers for higher-level languages (written in those same languages) instead.Anyways, I lost interest in the code. It's not as fancy and clean looking as I imagined, sadly.
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
-
- Member
- Posts: 391
- Joined: Wed Jul 25, 2007 8:45 am
- Libera.chat IRC: aejsmith
- Location: London, UK
- Contact:
I haven't dived into the code yet, but I've got it up and running with Virtual PC. The PDF in the source .zip details everything you need to do pretty well, except netbooting with VPC: You need to do
That starts up the netboot server program automatically (you need to have done the loopback setup stuff).
If you build everything (the World target), however, it takes eons to start from the netboot server.
Oh and one more thing, WinDbg is evil to work with
Code: Select all
boottest.cmd /net singularity.vmc
If you build everything (the World target), however, it takes eons to start from the netboot server.
Oh and one more thing, WinDbg is evil to work with
-
- Member
- Posts: 391
- Joined: Wed Jul 25, 2007 8:45 am
- Libera.chat IRC: aejsmith
- Location: London, UK
- Contact:
Just uploaded some screenshots of it here
Managed to get the webserver "working", it's a bit rusty but it seems to work, you can see it in sing5.jpg. Sorry about the bad quality of the JPGs, all I had was Paint and it likes to save JPGs in crap quality.
Managed to get the webserver "working", it's a bit rusty but it seems to work, you can see it in sing5.jpg. Sorry about the bad quality of the JPGs, all I had was Paint and it likes to save JPGs in crap quality.
FYI, another c# os http://gocosmos.org/Jeremiah Griffin wrote: Anyways, I lost interest in the code. It's not as fancy and clean looking as I imagined, sadly.
--
PS: i haven't looked at both os c# code.