For some time I was doing Nasm in the linux environment and this function worked fine ... but now I am going to the Windows environment and I want to use Masm (with VS2008). I can't get this to work ...
void outportb (unsigned short _port, unsigned short _data)
{
__asm__ __volatile__ ("outb %1, %0" : : "dN" (_port), "a" (_data));
}
When I write something like this ...
void outportb (unsigned short _port, unsigned short _data)
{
asm volatile ("outb %1, %0" : : "dN" (_port), "a" (_data));
}
asm is no longer recognized, and volatile gives the error message "string", I also tried to write _asm volatile, but I get the error message "syntax error of the assembler in" opcode "; found" data type "
source
share