Visual Studio: Difference between revisions

Jump to navigation Jump to search
Some info on intrinsics
[unchecked revision][unchecked revision]
m (→‎Quirks: Intrinsics)
(Some info on intrinsics)
Line 230:
 
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 ==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu