Visual c# Development
Visual c# Development
Ok, So i am wondering if you can develop an OS In the language visual c#(Microsoft programming) And make it bootable
I would like to know so i can dev. A C# OS
PS: Did i put this post in the wrong topic?
I would like to know so i can dev. A C# OS
PS: Did i put this post in the wrong topic?
I am a hacker, and this is my manifesto.
You may stop this individual, but you can't stop us all... after all,
we're all alike.
You may stop this individual, but you can't stop us all... after all,
we're all alike.
Re: Visual c# Development
Hello,
Any language can be used so long as it can produce binaries that your system can support and can produce system level code. So yes, it is possible (and has been done before. i.e., Singularity). Although in the case of a language like C#, it is alot more harder to get it working and may be impossible by itself (it would probably need a layer of C or C++ along with assembly language of course.)
Any language can be used so long as it can produce binaries that your system can support and can produce system level code. So yes, it is possible (and has been done before. i.e., Singularity). Although in the case of a language like C#, it is alot more harder to get it working and may be impossible by itself (it would probably need a layer of C or C++ along with assembly language of course.)
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: Visual c# Development
Yea, I think there is a C# Virtual kernel called comet i think that is what it is called, unless it is Cosmos
PS:It is cosmos i looked it up, but i am too lazy to change it
PS:It is cosmos i looked it up, but i am too lazy to change it
I am a hacker, and this is my manifesto.
You may stop this individual, but you can't stop us all... after all,
we're all alike.
You may stop this individual, but you can't stop us all... after all,
we're all alike.
Re: Visual c# Development
You'd need to implement a full CLR for C# using C/C++/Assembly before jumping to C# code.
Current work on a OS: SauOS (project homepage: http://code.google.com/p/sauos/)
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re: Visual c# Development
Not true. The CLR includes a lot of stuff like JIT that is not strictly necessary for running C# code. All you need is a run-time library, a garbage collector, and a way to compile C# to native code. It's still a lot of work, but it's not nearly equivalent to implementing a "full CLR".imate900 wrote:You'd need to implement a full CLR for C# using C/C++/Assembly before jumping to C# code.
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
Re: Visual c# Development
Right but recommended for performance reason.Colonel Kernel wrote:The CLR includes a lot of stuff like JIT that is not strictly necessary for running C# code
Compiling C# code (and any language from .net platform, J#, iron python, VB.net, F#, etc) will give you Metadata and Bytecode (IL) wrapped in a PE/Coff executable file (dll or exe).
Things that must be done to "execute" it, is decode metadata and bytecode, loading CLS common lib (in mscorlib.dll or yours), and interpret it in a virtual machine.In fact it's more complicated but i "forgive" details intentionaly
The virtual machine must be in native code on your os. So you mus t develop an os in a language that produce native code before ....
Cosmos os is not really a .net os, the SDK on dev platform translate IL to native before produce executable so the os never execute IL code
C# and CLR specification are public, PE/Coff format too, so enjoy ...
[ Grub 2 | Visual Studio 2013 | PE File ]
The OsDev E.T.
Don't send OsDev MIB !
The OsDev E.T.
Don't send OsDev MIB !
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re: Visual c# Development
Why? I don't think JIT is necessarily faster than native code. An ahead-of-time compiler is free to spend a lot more time optimizing the code than JIT.gedd wrote:Right but recommended for performance reason.
Only if that's what your compiler does. There is nothing about the C# language that prevents you from developing a compiler that compiles C# directly to native code.Compiling C# code (and any language from .net platform, J#, iron python, VB.net, F#, etc) will give you Metadata and Bytecode (IL) wrapped in a PE/Coff executable file (dll or exe).
Metadata is not required at run-time unless you use reflection. Decoding the bytecode is not necessary if you compile directly to native code. mscorlib.dll is not necessary if you implement your own run-time library. Even the CLR never interprets IL -- it is always JIT compiled first.Things that must be done to "execute" it, is decode metadata and bytecode, loading CLS common lib (in mscorlib.dll or yours), and interpret it in a virtual machine.
C#-the-language and .NET-the-framework are not the same thing.
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
Re: Visual c# Development
JIT convert IL to native code.Colonel Kernel wrote:gedd wrote:
Right but recommended for performance reason.
Why? I don't think JIT is necessarily faster than native code. An ahead-of-time compiler is free to spend a lot more time optimizing the code than JIT.
Actualy C# is use in .net platform to compile byte code only.Colonel Kernel wrote:Compiling C# code (and any language from .net platform, J#, iron python, VB.net, F#, etc) will give you Metadata and Bytecode (IL) wrapped in a PE/Coff executable file (dll or exe).
Only if that's what your compiler does. There is nothing about the C# language that prevents you from developing a compiler that compiles C# directly to native code.
False false and false, try to read ISO doc about CLR before talking aboutColonel Kernel wrote:Metadata is not required at run-time unless you use reflection
see upperColonel Kernel wrote: Decoding the bytecode is not necessary if you compile directly to native code.
mscorelib is the CTS needed by CLR, it's an assembly ( you know what it is)Colonel Kernel wrote:mscorlib.dll is not necessary if you implement your own run-time library
if
Stupid ! CLR is used to execute assemblies so bytecode and JIT thenColonel Kernel wrote:Even the CLR never interprets IL -- it is always JIT compiled first.
Really ? great discovery but i am aware on itColonel Kernel wrote:C#-the-language and .NET-the-framework are not the same thing.
.Net is my job, i'm a specialist
Now can develop your native code C# compiler it will usefull to develop your os when it will be finished
[ Grub 2 | Visual Studio 2013 | PE File ]
The OsDev E.T.
Don't send OsDev MIB !
The OsDev E.T.
Don't send OsDev MIB !
Re: Visual c# Development
Actually I have created a proof-of-concept C# to C compiler. It accepts a subset of valid C# and generates C code, which is compiled using msvc or gcc. Sources not yet available, sorry; at some later point when it is no longer POC, but an usable implementation.Only if that's what your compiler does. There is nothing about the C# language that prevents you from developing a compiler that compiles C# directly to native code.
My compiler propagates type information at compile time, so there is very little metadata stored. However, some is still required (for example, type casts). Reflection is not supported, and currently I don't plan on doing so.False false and false, try to read ISO doc about CLR before talking aboutColonel Kernel wrote:Metadata is not required at run-time unless you use reflection
My compiler agrees with Colonel Kernels point. There is no bytecode (or IL) involved.see upperColonel Kernel wrote: Decoding the bytecode is not necessary if you compile directly to native code.
I don't need mscorlib, I have (a very limited, I admit) subset of the base class library along with an implementation of the VES.mscorelib is the CTS needed by CLR, it's an assembly ( you know what it is)Colonel Kernel wrote:mscorlib.dll is not necessary if you implement your own run-time library
Sorry, I have to agree with Colonel Kernel here. The Microsoft implementation of the CLR doesn't interpret IL (as old Java versions used to interpret Java bytecode instead of using JIT techniques).ifStupid ! CLR is used to execute assemblies so bytecode and JIT thenColonel Kernel wrote:Even the CLR never interprets IL -- it is always JIT compiled first.
Actually, I'm doing just that. </sarcasm>Now can develop your native code C# compiler it will usefull to develop your os when it will be finished
Re: Visual c# Development
Woops, i shoulnt of put this topic up, It's gonna turn into something bad again
*Yells* Dont Fight please, its because of things like this that got *ALL* of my topics locked
*Yells* Dont Fight please, its because of things like this that got *ALL* of my topics locked
I am a hacker, and this is my manifesto.
You may stop this individual, but you can't stop us all... after all,
we're all alike.
You may stop this individual, but you can't stop us all... after all,
we're all alike.
- JackScott
- Member
- Posts: 1033
- Joined: Thu Dec 21, 2006 3:03 am
- Location: Hobart, Australia
- Mastodon: https://aus.social/@jackscottau
- Matrix: @JackScottAU:matrix.org
- GitHub: https://github.com/JackScottAU
- Contact:
Re: Visual c# Development
NickG, they are all using valid reasoning to point out flaws in each others arguments. Which is perfectly acceptable on a technical forum. In addition, so far they have not resorted to personal insults or anything of the kind.
Unlike some other arguments (Emacs vs. Vi, Linux vs. Windows, Tea vs. Coffee, Cats vs. Dogs), this argument is likely to result in a better understanding of the concepts for all the participants, and for the people reading the topic as well. I, for one, am finding it quite interesting.
Now that I've said this, watch the topic slide downhill and mock me...
Unlike some other arguments (Emacs vs. Vi, Linux vs. Windows, Tea vs. Coffee, Cats vs. Dogs), this argument is likely to result in a better understanding of the concepts for all the participants, and for the people reading the topic as well. I, for one, am finding it quite interesting.
Now that I've said this, watch the topic slide downhill and mock me...
Re: Visual c# Development
Alright, which would be easier, c# or c++??
And no im not inviting a flamefest, im just asking some people Which would be an easier programming language for an OS
(I bet that people will say c++)
And no im not inviting a flamefest, im just asking some people Which would be an easier programming language for an OS
(I bet that people will say c++)
I am a hacker, and this is my manifesto.
You may stop this individual, but you can't stop us all... after all,
we're all alike.
You may stop this individual, but you can't stop us all... after all,
we're all alike.
Re: Visual c# Development
hmm didnt i post something here
no no no, no vs anything, all it does is put it into arguments like, "my programming language is harder than yours" kind of arguments, especially when you comment that C++ is easier, some people will diagree and the whole thing will start from there.
oh and jackscott, i think all of those vs ideas have been used already on here, i think they were all locked also
no no no, no vs anything, all it does is put it into arguments like, "my programming language is harder than yours" kind of arguments, especially when you comment that C++ is easier, some people will diagree and the whole thing will start from there.
oh and jackscott, i think all of those vs ideas have been used already on here, i think they were all locked also
Re: Visual c# Development
Although I do not know the language, I have heard alot of times that C# is easier to learn and work with. But for OS development, C++ of course as it was based on C which in turn was originally designed to be a systems language.NickG wrote:Alright, which would be easier, c# or c++??
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re: Visual c# Development
I disagree:JackScott wrote:In addition, so far they have not resorted to personal insults or anything of the kind.
But I don't let it bother me.gedd wrote:Stupid ! CLR is used to execute assemblies so bytecode and JIT then
Using existing tools? I'd say C++, hands down. You'd have a lot less work to do since you wouldn't need a GC or run-time library. Just don't try writing your own C++ compiler unless you want to have nightmares for the rest of your life...NickG wrote:Alright, which would be easier, c# or c++??
<offtopic>I'm 1337! It says so in my post count! </offtopic>
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