mirror of https://github.com/E-Almqvist/eOS
parent
34a4d93970
commit
fe69547f2d
@ -1,6 +1,16 @@ |
||||
#!/usr/bin/bash |
||||
|
||||
done="[OK]" |
||||
fail="[FAIL]" |
||||
|
||||
srcDir=src |
||||
binDir=bin |
||||
|
||||
nasm -f bin $srcDir/bootloader.asm -i $srcDir -o $binDir/bootloader.bin |
||||
echo -n "Compiling bootloader... " |
||||
nasm -f bin $srcDir/bootloader.asm -i $srcDir -o $binDir/bootloader.bin && echo $done |
||||
|
||||
echo -n "Compiling kernel... " |
||||
gcc -ffreestanding -c $srcDir/kernel.c -o $binDir/kernel.o && ld -o $binDir/kernel.bin -Ttext 0x1000 $binDir/kernel.o --oformat binary 2>/dev/null && echo $done |
||||
|
||||
echo -n "Creating kernel image... " |
||||
cat $binDir/bootloader.bin $binDir/kernel.bin > $binDir/os-image && echo $done |
||||
|
@ -0,0 +1,7 @@ |
||||
// VGA base address: 0xb8000
|
||||
// Charpos = 0xb8000 + 2(row*80 + col)
|
||||
|
||||
void main() { |
||||
char* video_mem = (char*)0xb8000; // VGA Video Memory location
|
||||
*video_mem = 'X';
|
||||
} |
Loading…
Reference in new issue