It should work - try <br>
_asm{<br>
<br>
asm code here<br>
<br>
<br>
}<br>
<br>
or<br>
<br>
__asm{<br>
<br>
<br>
asm code here<br>
<br>
}<br>
: Hello. <br>
<br>
: Thank you for your assistance. I feel rather clueless now, but is that code you gave exactly what should be typed into the source file? Because I tried those _asm commands and they all resulted in syntax errors. The compiler did not recognize the word _asm. Were you using pseudo-code, or does my compiler just suck?<br>
<br>
: Paul Lalli<br>
<br>
: : Hi,<br>
<br>
: : maybe you should try using assembly for your low level I/O.<br>
<br>
: : here are some functions (the "_asm" keyword is used to indicate assembly command) :<br>
<br>
: : void outp(int port,unsigned char value)<br>
: : {<br>
: : _asm mov dx,port<br>
: : _asm mov al,value<br>
: : _asm out dx,al<br>
: : }<br>
<br>
: : unsigned char inp(int port)<br>
: : {<br>
: : unsigned char value;<br>
<br>
: : _asm mov dx,port<br>
: : _asm in al,dx<br>
: : _asm mov value,al<br>
<br>
: : return value;<br>
: : }<br>
<br>
: <br>
: <br>
<br>