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.
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.
Who use MASM and VC to develop OS?
Who use MASM and VC to develop OS?
Just For Fun
- Masterkiller
- Member
- Posts: 153
- Joined: Sat May 05, 2007 6:20 pm
Re: Who use MASM and VC to develop OS?
I am using a windows platform, but I still can't get my visual studio outputs plain binary files so I program in NASM only.
ALCA OS: Project temporarity suspended!
Current state: real-mode kernel-FS reader...
Current state: real-mode kernel-FS reader...
Re: Who use MASM and VC to develop OS?
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
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 !
The OsDev E.T.
Don't send OsDev MIB !
Re: Who use MASM and VC to develop OS?
Are you sure you use C++ or pure C ? I use pure C.gedd wrote: I use VC to developp my kernel in 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......
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.
Just For Fun
Re: Who use MASM and VC to develop OS?
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.david wrote:Are you sure you use C++ or pure C ? I use pure C.gedd wrote: I use VC to developp my kernel in 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......
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.
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?
I suppose I can put my name in the list as well here. Except I also use library files and dynamic libraries (DLLs.)
Is there any reason why you want to use plain binaries?Masterkiller wrote:I am using a windows platform, but I still can't get my visual studio outputs plain binary files so I program in NASM only.
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();}
- Masterkiller
- Member
- Posts: 153
- Joined: Sat May 05, 2007 6:20 pm
Re: Who use MASM and VC to develop OS?
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.neon wrote:Is there any reason why you want to use plain binaries?Masterkiller wrote:I am using a windows platform, but I still can't get my visual studio outputs plain binary files so I program in NASM only.
ALCA OS: Project temporarity suspended!
Current state: real-mode kernel-FS reader...
Current state: real-mode kernel-FS reader...
Re: Who use MASM and VC to develop OS?
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.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).
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: Who use MASM and VC to develop OS?
Yes, except main function in the kernel, all components are objectsdavid wrote:Are you sure you use C++ or pure C ? I use pure C.
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.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 .
A .net executable (.dll, .exe) is just CLI bytecode and Metadata wrapped in a PE file (check Undotnet project for details )
[ 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 !