Since I got my new Mac, I decided to reset the development of my OS.
But, as the Mac doesn't have a floppy disk drive (obviously ), I decided to do it on a CD/DVD instead .
So I would like to know if my code will work if I transfer it to a CD and boot from the CD drive.
This is my bootstrap:
http://pastebin.com/QXrga4nB (I'm sorry that pastebin.com messed up the format)
This is the assemble.bat file in my "boot" folder:
Code: Select all
@echo off
nasm -f bin -o bootloader.bin bootloader.asm
copy "C:\Users\Benjamin\Desktop\Cyborg OS X\boot\bootloader.bin" "C:\Users\Benjamin\Desktop\Cyborg OS X\output\bootloader.bin"
del bootloader.bin
pause
Code: Select all
@echo off
"C:\Program Files\bin\gcc.exe" -ffreestanding -c main.c -o main.o
ld -i -e _kernelEntry -Ttext 0x1000 -o kernel.o main.o
objcopy -O binary kernel.o kernel.bin
makeboot cyborgosx.img "C:\Users\Benjamin\Desktop\Cyborg OS X\output\bootloader.bin" kernel.bin
copy "C:\Users\Benjamin\Desktop\Cyborg OS X\core\*.o" "C:\Users\Benjamin\Desktop\Cyborg OS X\output\*.o"
copy "C:\Users\Benjamin\Desktop\Cyborg OS X\core\*.bin" "C:\Users\Benjamin\Desktop\Cyborg OS X\output\*.bin"
copy "C:\Users\Benjamin\Desktop\Cyborg OS X\core\*.img" "C:\Users\Benjamin\Desktop\Cyborg OS X\output\*.img"
del *.o
del *.bin
del *.img
pause
So, will this *.iso work, on a CD/DVD booted directly from the CD drive? - And by work I mean, will it enter the kernel.
(Which is just an entry point, that jumps into an infinite loop so far)