I have created a custom bootloader and created the kernel in c++ following the osdev wiki. When I try to compile the assembly with
Code:
nasm.exe -f win64 boot.asm -o boot.obj
, compile the kernel.cpp to kernel.obj, and link it with
Code:
~\tdm-gcc64\c++.exe -T linker.ld -o Boot.img -ffreestanding -nostdlib boot.obj kernel.obj
it will have extra "This program cannot be run in DOS mode" I also don't know how to set it to start at 0x7c00 as
Code:
org 0x7c00
doesn't work unless in binary format. Any help will be appreciated.