Visual Studio: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
m →‎Quirks: Intrinsics
Some info on intrinsics
Line 230: Line 230:


Give up OS dev!
Give up OS dev!

=== Intrinsics ===
For intrinsics, #include <intrin.h>. This IS suitable for a kernel, but don't ignore standard headers. An example follows:
<source lang="cpp">
//main body of intrinsics
#include <intrin.h>
//I/O operations
#include <conio.h>

void someFunc()
{
__enable(); //STI
char c = __inbyte(0x60); //IN
unsigned short w = __inpw(0x1F0);
unsinged int d = __inp(0xCFC);
__disable(); //CLI
__halt(); //HLT
}
</source>


== See Also ==
== See Also ==