Disable interrupts, initialize segment registers and stack

This commit is contained in:
Alex Kotov 2022-01-27 02:24:24 +05:00
parent d241701b21
commit 72da86a252
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,15 @@
.global _start
.section .text
_start:
cli
xor %ax, %ax
mov %ax, %ss
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
mov $0x2000, %sp
mov $0x02, %ah
mov $1, %al /* Sectors count */
mov $0x80, %dl /* Drive */