I have been dealing with Nasm on a linux environment for some time and this function worked great... but now I am switching to a windows environment and I want to use Masm (with VS2008) I cant seem to 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 more recognised and volatile throws an error saying "string", I also tried writing _asm volatile but I get an error saying "inline assembler syntax error in 'opcode'; found 'data type'"