Visual Studio 2003

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
gommo

Visual Studio 2003

Post by gommo »

Is it possible to use microsofts visual studio to create a small kernel.

I have been working on a small kernel in Linux using the base code from grubs\docs (kernel.c, boot.S, multiboot.h) as I am using an image that has grub preinstalled on it.

However, I was thinking of developing on windows instead and was wondering what kind of options are available. I.e. I need boot.S to be assembled to start @ 0x100000 and be linked first in the link phase etc..

Any one used visual studio for this??
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:Visual Studio 2003

Post by Neo »

use DJGPP, the GCC port for windows. it would be familiar if you've been using linux and also is OSS. You can get it from delorie.com. IIRC osdever has a copy in their downloads sections.
You could use a linker script for the better control of the sections in your program www.delorie.com/gnu/docs/binutils/ld_6.html has more details.
Only Human
Schol-R-LEA

Re:Visual Studio 2003

Post by Schol-R-LEA »

While AFAICT it is possible to use Visual Studio 6.0 (or more specifically, Visual C++) and I think some here do so, it is a problematic choice because it means you will need to use a different compiler if and when you start developing within the OS itself. Offhand, I don't know what you'd need to do to get it to produce completely freestanding object code.

(BTW, if any of you do know these details, please add them to the Wiki OS Dev FAQ. Try to be as accurate and complete as possible!)

I cannot say for certain if Visual Studio .NET can be used or not; I imagine that as long as you compile native rather than .NET IDL, and have all the 'Managed C++' features turned off, it should be otherwise the same as VC++ 6.0.

This is assuming you mean to use C or C++; none of the other languages supported by VS are suitable for OS development, as they are all highly OS (or .NET) dependent and have heavy runtime requirements.

As for options, well, in addition to DJGPP (which Neo mentions) there is also Cygwin and MingW, two ports for Windows of the GNU tools (DJGPP is for MS-DOS using a 32-bit extender). Details about all three (as well as development tools using them such as RHIDE and Dev-C++) can be found in the FAQ. There is also LCC32, Watcom C++ and Borland C++, though the latter two at least present the same problems as VC++ does.
gommo

Re:Visual Studio 2003

Post by gommo »

Yeah I maybe should have been more specific. I would be definitly using just ANSI C or C++. Not .NET. I would just like to use the VIsual Studio IDE as such but having to use a different compiler and all that basically means I'm just using it as a glorified text editor.

In the meantime I'll just keep going with my Linux based one I think.

Thanks
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re:Visual Studio 2003

Post by bubach »

U could use GCC and dev-C++
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Visual Studio 2003

Post by Solar »

...or KDevelop, or Eclipse, or you could be "a real programmer" and use EMacs... :-D
Every good solution is obvious once you've found it.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Visual Studio 2003

Post by Candy »

Solar wrote: ...or KDevelop, or Eclipse, or you could be "a real programmer" and use EMacs... :-D
What's wrong with emacs? I've only used emacs for AOS up to now...
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Visual Studio 2003

Post by Solar »

Nothing wrong with it, but calling it an IDE is a long shot. 8)

(Says this and prepares to be flamed... wait, this isn't a Linux forum... ;D )
Every good solution is obvious once you've found it.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Visual Studio 2003

Post by distantvoices »

hehe ...

*pulls out the flame thrower ...*

emacs may be the holy egglaying milkwoolswine, but VIM is the holy grail of editors: it is quick, has nice commands directly under the fingertips and is easy to use ;-)

Honestly, I use it for editing bash scripts, php scripts and thingses in /etc.

for my daily programming **** I use Power Builder (gg) and tomDoors (editing Cobol sources on a bs2000 host), and at home, for OS brewing: KATE, gcc, nasm and ld. That's it. suficces to say, tht at least three shells are open at the same time on my desktop. *gg*
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Visual Studio 2003

Post by Candy »

beyond infinity wrote: *pulls out the flame thrower ...*
Not again... Anyway, only a real additive response, no flames (or at least, I'll try not to).
emacs may be the holy egglaying milkwoolswine, but VIM is the holy grail of editors: it is quick, has nice commands directly under the fingertips and is easy to use ;-)
<esc>:wq doesn't ring a bell with me when I want to save a file and quit. Admitted, emacs doesn't have such an intuitive command either, but I don't know of a half-decent console editor that does. No comments on usability of either, they're both as ****ed up as the other.
Honestly, I use it for editing bash scripts, php scripts and thingses in /etc.

for my daily programming **** I use Power Builder (gg) and tomDoors (editing Cobol sources on a bs2000 host), and at home, for OS brewing: KATE, gcc, nasm and ld. That's it. suficces to say, tht at least three shells are open at the same time on my desktop. *gg*
At home, no true emacs (who wants 5M in mem for editing a file?) but jove, which only misses all those incredible editing options and the super-debug-compile-mode thingies that you can reach with more than 2 complex keystrokes and nobody even really knows, let alone uses. Aside with that, usually a couple of IRL books, some virtual books (in whatever editor is required / usable), browser with this forum & a few tabs of reference in RBIL at ctyme.com/rbrown.htm for asm programming, a console for bochs debugging, plus a set of consoles with jove for editing the source, both on this computer and the other two I only use as a console interface to the main one :). I have 256MB of ram, which says "imitate THAT" to winxp, and I never have it more than half full.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Visual Studio 2003

Post by Solar »

Don't get into an editor pro-and-con flamewar here, or I'll tell you that the reason I'm finally switching to Linux these days is, I discovered that UltraEdit can be run using wine... (I believe that Linux simply lacks any decent editor. And yes, I am fluent in vim, and have used emacs more than once. 8) )
Every good solution is obvious once you've found it.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Visual Studio 2003

Post by Candy »

Solar wrote: Don't get into an editor pro-and-con flamewar here ... (I believe that Linux simply lacks any decent editor. And yes, I am fluent in vim, and have used emacs more than once. 8) )
That was the bulk of my post. Did you even bother to read it?
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Visual Studio 2003

Post by distantvoices »

Ha, neither Me is bothering to start any flamewar *rofl* I just play with words and what decent writers call sarcasm/irony.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Visual Studio 2003

Post by Pype.Clicker »

Thou shalt not use Another Text Editor than EMACS
btw, as the editor is the interface between your project and yourself and that all the possible instance of 'yourself' doesn't have the same preference, i don't believe in the One True Editor ...

I do love customizing every bits and put things the initial software designer didn't thought of, so EMACS is good for me ... I found the 'M-x' stuff intuitive but i don't expect other people to feel the same ...

btw, what was that thread about ?

Except if you have good reasons to switch to Windows for dev'ing, i would recommend to stick with your current environment. Or be prepared to face boring things like case-(in)sensitivity in file names, disappeared tools, need for a cross-compiler and things alike.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Visual Studio 2003

Post by Solar »

Pype.Clicker wrote: Except if you have good reasons to switch to Windows for dev'ing, i would recommend to stick with your current environment. Or be prepared to face boring things like case-(in)sensitivity in file names, disappeared tools, need for a cross-compiler and things alike.
[me=Solar]chuckling about case sensitivity being one of the things that makes me hate Unix's guts, and how building a cross-compiler has taught me several important and useful lessons... 8)[/me]
Every good solution is obvious once you've found it.
Post Reply