Who use MASM and VC to develop OS?

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.
Post Reply
User avatar
david
Member
Member
Posts: 93
Joined: Tue Aug 21, 2007 4:22 am
Location: Beijing.China
Contact:

Who use MASM and VC to develop OS?

Post by david »

Because I use MASM and VC to develop an OS, only me, just for fun. I met some problems, then, resolved them. so, I want to recognize someone who do it like me.
I just want to talk about it with you. :D
I know almost of you develop OS use GCC on Linux, but I am not familiar with Linux platform, so I just write OS on Windows, use MASM and VC.
Just For Fun
User avatar
Masterkiller
Member
Member
Posts: 153
Joined: Sat May 05, 2007 6:20 pm

Re: Who use MASM and VC to develop OS?

Post by Masterkiller »

I am using a windows platform, but I still can't get my visual studio outputs plain binary files :oops: so I program in NASM only.
ALCA OS: Project temporarity suspended!
Current state: real-mode kernel-FS reader...
gedd
Member
Member
Posts: 104
Joined: Thu Apr 10, 2008 1:47 am

Re: Who use MASM and VC to develop OS?

Post by gedd »

I use VC to developp my kernel in C++, but i use nasm in a VC makefile project for boot and loader.
The only asm part in my kernel is inline.

But you should read this
[ Grub 2 | Visual Studio 2013 | PE File ]
The OsDev E.T.
Don't send OsDev MIB !
User avatar
david
Member
Member
Posts: 93
Joined: Tue Aug 21, 2007 4:22 am
Location: Beijing.China
Contact:

Re: Who use MASM and VC to develop OS?

Post by david »

gedd wrote: I use VC to developp my kernel in C++
Are you sure you use C++ or pure C ? I use pure C.
Even though I use VC, but I only use its compiler and linker(cl.exe and link.exe). I don't use any obj, lib and DLL of windows. My mothod is similar to the URL you give me. But I use MASM 6.15 and VC6. The tools are different with yours, but the mind is as same as yours.
1: build EXE file by C compiler
2: load exe file to memory in masm routine
3: jump to the main entry poin of exe file
then...... :D

I also want to use VC7 or VC8 etc at the beginnig, but I am afraid that its .NET IL assembly language could not work well with MASM, so I decide to use VC6 .
I will read it seriously.

My following work is IPC. :P
Just For Fun
ru2aqare
Member
Member
Posts: 342
Joined: Fri Jul 11, 2008 5:15 am
Location: Hungary

Re: Who use MASM and VC to develop OS?

Post by ru2aqare »

david wrote:
gedd wrote: I use VC to developp my kernel in C++
Are you sure you use C++ or pure C ? I use pure C.
Even though I use VC, but I only use its compiler and linker(cl.exe and link.exe). I don't use any obj, lib and DLL of windows. My mothod is similar to the URL you give me. But I use MASM 6.15 and VC6. The tools are different with yours, but the mind is as same as yours.
1: build EXE file by C compiler
2: load exe file to memory in masm routine
3: jump to the main entry poin of exe file
then...... :D

I also want to use VC7 or VC8 etc at the beginnig, but I am afraid that its .NET IL assembly language could not work well with MASM, so I decide to use VC6 .
I will read it seriously.

My following work is IPC. :P
I also use Visual Studio 2005/2008 and MASM to develop my OS. If you have questions, feel free to ask. In some other thread I listed what options were necessary to make Win32 dependencies go away.

And one more thing. Unless you use Managed C++, the output from MSVC will not contain any IL bytecode (unless you turn on whole program optimization, but even then the linker will generate x86/x64 machine code), so it is "safe" to use more recent versions of MSVC. Also more recent versions are more compliant with the C/C++ standards (though not 100% standards compliant).
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: Who use MASM and VC to develop OS?

Post by neon »

I suppose I can put my name in the list as well here. Except I also use library files and dynamic libraries (DLLs.)
Masterkiller wrote:I am using a windows platform, but I still can't get my visual studio outputs plain binary files :oops: so I program in NASM only.
Is there any reason why you want to use plain binaries?
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
Masterkiller
Member
Member
Posts: 153
Joined: Sat May 05, 2007 6:20 pm

Re: Who use MASM and VC to develop OS?

Post by Masterkiller »

neon wrote:
Masterkiller wrote:I am using a windows platform, but I still can't get my visual studio outputs plain binary files :oops: so I program in NASM only.
Is there any reason why you want to use plain binaries?
Yup, because they allow mixed 16-bit and 32-bit mode that occur between switching processor modes (and my OS design will access to all processor modes, including real). Anyway I got a headache trying to create a physical pages bitmap base ot the system map returned by BIOS, because of freaking 64-bit numbers, so I will postpone 32-bit coding for a while.
ALCA OS: Project temporarity suspended!
Current state: real-mode kernel-FS reader...
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: Who use MASM and VC to develop OS?

Post by neon »

Masterkiller wrote: Yup, because they allow mixed 16-bit and 32-bit mode that occur between switching processor modes (and my OS design will access to all processor modes, including real).
It is possible to provide an interface (can be a single routine) for your 32 bit program to use to switch between processor modes. I dont know if it will fit you design needs or not, however it is an option.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
gedd
Member
Member
Posts: 104
Joined: Thu Apr 10, 2008 1:47 am

Re: Who use MASM and VC to develop OS?

Post by gedd »

david wrote:Are you sure you use C++ or pure C ? I use pure C.
Yes, except main function in the kernel, all components are objects
david wrote:I also want to use VC7 or VC8 etc at the beginnig, but I am afraid that its .NET IL assembly language could not work well with MASM, so I decide to use VC6 .
As ru2aqare said if you don't want use C++ ( in fact managed C++ or C++/CLI), to produce a .net exe, you're absolutly free to produce native code.
A .net executable (.dll, .exe) is just CLI bytecode and Metadata wrapped in a PE file (check Undotnet project for details :wink: )
[ Grub 2 | Visual Studio 2013 | PE File ]
The OsDev E.T.
Don't send OsDev MIB !
Post Reply