declare an entry symbol, that always would be on beginning of bootsector

This commit is contained in:
mykola2312 2024-08-07 05:47:29 +03:00
parent bafc09649c
commit 677d65b4dd
2 changed files with 5 additions and 1 deletions

View file

@ -44,4 +44,5 @@ SECTIONS
} }
} }
ENTRY(entry)
OUTPUT_FORMAT(binary) OUTPUT_FORMAT(binary)

View file

@ -1,6 +1,9 @@
.section .text .section .text
.code16 .code16
.globl entry
entry:
# initialize stack # initialize stack
mov $RAM_SEGMENT, %ax mov $RAM_SEGMENT, %ax
mov %ax, %ss mov %ax, %ss
@ -31,7 +34,7 @@
push %es push %es
pop %ds pop %ds
.entry:
call serial_init call serial_init
mov $msg, %si mov $msg, %si