Skip to content

Commit

Permalink
fix: printing "Hello World" from rust again
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrgoblings committed Dec 31, 2024
1 parent f38d518 commit e72c857
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion anasos-kernel/bootloader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions anasos-kernel/bootloader/boot-64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e72c857

Please sign in to comment.