mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-11 05:24:44 -04:00
Display a char from C++ :)
This commit is contained in:
parent
3c704bbf4d
commit
067f6efecc
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
*.bin
|
||||
*.flp
|
||||
*.flp
|
||||
*.o
|
5
Makefile
5
Makefile
@ -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
|
||||
|
BIN
kernel.bin.o
BIN
kernel.bin.o
Binary file not shown.
@ -565,6 +565,7 @@ date_command:
|
||||
ret
|
||||
|
||||
load_command:
|
||||
call 0x5000
|
||||
|
||||
ret
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
extern "C"
|
||||
void kernel_main(){
|
||||
unsigned char *vidmem = (unsigned char*) 0xB80000;
|
||||
unsigned char *vidmem = (unsigned char*) 0x0B8000;
|
||||
|
||||
*vidmem = 'a';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user