Page 1 of 1

Who use MASM and VC to develop OS?

Posted: Mon Jun 01, 2009 10:56 pm
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.

Re: Who use MASM and VC to develop OS?

Posted: Mon Jun 01, 2009 11:02 pm
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.

Re: Who use MASM and VC to develop OS?

Posted: Tue Jun 02, 2009 12:37 am
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

Re: Who use MASM and VC to develop OS?

Posted: Tue Jun 02, 2009 3:01 am
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

Re: Who use MASM and VC to develop OS?

Posted: Tue Jun 02, 2009 4:45 am
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).

Re: Who use MASM and VC to develop OS?

Posted: Tue Jun 02, 2009 5:38 am
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?

Re: Who use MASM and VC to develop OS?

Posted: Tue Jun 02, 2009 12:30 pm
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.

Re: Who use MASM and VC to develop OS?

Posted: Tue Jun 02, 2009 4:16 pm
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.

Re: Who use MASM and VC to develop OS?

Posted: Wed Jun 03, 2009 12:54 am
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: )