I use James M 's core writing tutorials . I am writing cross-compiler code for elf-i386 arch on macOS 10.12 with GCC 6.2.0 and Binutils.
Everything compiles, except main.cthat does not work with this error:
Error: expected '=', ',', ';', 'asm' or '__attribute__' before 'INT' .
However, the file is exactly the same as in the tutorial. Can someone help me understand why?
#include <os.h>
int main(struct multiboot *mboot_ptr)
{
kprint("Welcome to the Sierra Kernel! \n");
kprint(BUILD_FULL);
asm volatile ("int $0x3");
asm volatile ("int $0x4");
}
A public repo with all kernel code is available at: https://gitlab.com/SierraKernel/Core/tree/master