Created
May 3, 2014 15:18
-
-
Save VardanGrigoryan/e2bdb2b6039254d3079f to your computer and use it in GitHub Desktop.
compile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -rf *.o *.bin *.img | |
nasm -f bin bootsect.asm -o bootsect.bin | |
gcc -ffreestanding -c main.c -o main.o | |
gcc -c video.c -o video.o | |
gcc -c ports.c -o ports.o | |
ld -e main -Ttext 0x1000 -o kernel.o main.o video.o ports.o | |
ld -i -e main -Ttext 0x1000 -o kernel.o main.o video.o ports.o | |
objcopy -R .note -R .comment -S -O binary kernel.o kernel.bin | |
./makeboot a.img bootsect.bin kernel.bin | |
echo " Running OS... ! " | |
qemu-system-i386 -fda a.img -no-fd-bootchk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment