From e72c857231f45a0637c03e0cb78aabf5e35abc71 Mon Sep 17 00:00:00 2001 From: Mrgoblings Date: Tue, 31 Dec 2024 21:42:52 +0200 Subject: [PATCH] fix: printing "Hello World" from rust again --- Makefile | 2 +- anasos-kernel/bootloader/Makefile | 2 +- anasos-kernel/bootloader/boot-64.asm | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 0ee2f6a..ab7aa9b 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ bootloader-asm: nasm -f elf64 boot-64.asm -o boot-64.o && \ nasm -f elf64 boot.asm -o boot.o && \ nasm -f elf64 e820.asm -o e820.o && \ - ld -m elf_x86_64 -T ../linker.ld -o ../../AnasOS/boot/kernel boot.o boot-64.o header.o #e820.o \ + ld -m elf_x86_64 -T ../linker.ld -o ../../AnasOS/boot/kernel boot.o boot-64.o header.o e820.o \ image: grub-mkrescue -o AnasOS.iso AnasOS/ diff --git a/anasos-kernel/bootloader/Makefile b/anasos-kernel/bootloader/Makefile index 5232050..1a2e50f 100644 --- a/anasos-kernel/bootloader/Makefile +++ b/anasos-kernel/bootloader/Makefile @@ -4,7 +4,7 @@ compile: nasm -f elf64 boot.asm -o boot.o nasm -f elf64 e820.asm -o e820.o - ld -m elf_x86_64 -T ../linker.ld -o ../../AnasOS/boot/kernel boot.o boot-64.o header.o #e820.o + ld -m elf_x86_64 -T ../linker.ld -o ../../AnasOS/boot/kernel boot.o boot-64.o header.o e820.o grub-mkrescue -o AnasOS.iso ../../AnasOS/ run: compile diff --git a/anasos-kernel/bootloader/boot-64.asm b/anasos-kernel/bootloader/boot-64.asm index 3a7231c..4d7ab0c 100644 --- a/anasos-kernel/bootloader/boot-64.asm +++ b/anasos-kernel/bootloader/boot-64.asm @@ -13,12 +13,12 @@ start_long_mode: MOV gs, ax MOV ss, ax - ; CALL _start + CALL _start ; ; Write the letter "W" to the VGA text buffer - MOV rdi, 0xB8000 ; VGA text buffer address (identity-mapped in page tables) - MOV ax, 0x0F53 ; "S" (ASCII 0x53) with attribute 0x0F (white on black) - MOV word [rdi], ax ; Write the word (character + attribute) to the VGA buffer + ; MOV rdi, 0xB8000 ; VGA text buffer address (identity-mapped in page tables) + ; MOV ax, 0x0F53 ; "S" (ASCII 0x53) with attribute 0x0F (white on black) + ; MOV word [rdi], ax ; Write the word (character + attribute) to the VGA buffer HLT