exporting nasm code as win64 causes it to add extra junk
Posted: Fri May 08, 2020 10:57 am
I have created a custom bootloader and created the kernel in c++ following the osdev wiki. When I try to compile the assembly with , compile the kernel.cpp to kernel.obj, and link it with 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 doesn't work unless in binary format. Any help will be appreciated.
Code: Select all
nasm.exe -f win64 boot.asm -o boot.obj
Code: Select all
~\tdm-gcc64\c++.exe -T linker.ld -o Boot.img -ffreestanding -nostdlib boot.obj kernel.obj
Code: Select all
org 0x7c00