try to implement a basic operating system but this asm stuff is messing with my head i am using vs2015
the code that gives error
inline cpu_flags DisableInterrupts()
{
cpu_flags fl;
_asm volatile ("pushfl; popl %0; cli" : "=g" (fl));
return fl;
}
it gives error like this
Error C2400 inline assembler syntax error in 'opcode'; found 'data type'
after removing volatile also no luck
inline cpu_flags DisableInterrupts()
{
cpu_flags fl;
_asm ("pushfl; popl %0; cli" : "=g" (fl));
return fl;`
}
it gives
Error C2400 inline assembler syntax error in 'opcode'; found '('
thank you