Visual Studio: Difference between revisions

m
Corrected header levels
[unchecked revision][unchecked revision]
m (→‎Quirks: Thanks for all the patience. I now know how to edit)
m (Corrected header levels)
Line 13:
where es is loaded with base address of your [[PE Binaries|PE]] file in memory, ecx will be loaded with the entry point relative to base address of PE file. Of course, if this is protected mode with a flat 4GB address space, use a register instead of using ES.
 
 
-----
'''Note:''' The options and procedures described here are for VS.NET 2003. Similar procedures should work on earlier versions. Consult the MSDN or post to the forum if you have any questions.
 
Line 165 ⟶ 163:
* /ALIGN: 512
: Together, they set the [[Section Alignment]] and [[File Alignment]] to 512 bytes. My boot loader is not sophisticated enough to handle these being different. The downside is that restrictions (read-only, etc) on sections are meaningless, as they require page-granularity for hopefully obvious reasons.
 
 
=== Bootloader Stuff: ===
Line 180 ⟶ 177:
 
Another option is to use a separate linker such as [[WLink]] with a linker script such as the one found on the [[Watcom]] page.
 
 
=== The Rebase Utility: ===
Line 199 ⟶ 195:
</pre>
and, in the example given above, it will base kernel.sys at 0xC0000000 and will base subsequent files at the next page-aligned address.
 
 
== Express 64 bit compilers ==
You can gain 64 bit compilers by installing the Windows SDK VC++ compilers (please note for VC10 SP1 you need to install the update)
 
=== Quirks ===
 
== Quirks ==
In the 64 bit compilers you '''cannot:'''
*Create naked functions
 
*Do inline assembly
Create naked functions
*Do non-fastcall calling
 
Do inline assembly
 
Do non-fastcall calling
 
 
This is why if you intend to do 64 bit development in MSVC++ you should have an external assembly layer (seperate versions for 32 bit and 64 bit), and if you want to avoid name decoration you need to declare them in a header file like this:
Line 242 ⟶ 232:
 
Give up OS dev!
=== See Also ===
[[C++]]
[[Category:IDEs]]
Anonymous user