Display a char from C++ :)

This commit is contained in:
Baptiste Wicht 2013-10-26 16:58:11 +02:00
parent 3c704bbf4d
commit 067f6efecc
6 changed files with 4 additions and 7 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.bin
*.flp
*.flp
*.o

View File

@ -12,11 +12,6 @@ micro_kernel.bin: $(KERNEL_SRC) $(KERNEL_UTILS_SRC)
kernel.o: src/kernel.cpp
g++ -Wall -Wextra -O2 -fno-exceptions -fno-rtti -ffreestanding -c src/kernel.cpp -o kernel.o
kernel2.bin: kernel.o
ld -e kernel_main -Ttext 0x10000 -o kernel.bin.o kernel.o
ld -e kernel_main -i -Ttext 0x10000 -o kernel.bin.o kernel.o
objcopy -R .note -R .comment -S -O binary kernel.bin.o kernel.bin
kernel.bin: kernel.o
g++ -T linker.ld -o kernel.bin.o -ffreestanding -O2 -nostdlib kernel.o
objcopy -R .note -R .comment -S -O binary kernel.bin.o kernel.bin

Binary file not shown.

BIN
kernel.o

Binary file not shown.

View File

@ -565,6 +565,7 @@ date_command:
ret
load_command:
call 0x5000
ret

View File

@ -1,6 +1,6 @@
extern "C"
void kernel_main(){
unsigned char *vidmem = (unsigned char*) 0xB80000;
unsigned char *vidmem = (unsigned char*) 0x0B8000;
*vidmem = 'a';
}