blob: 47cf49b33bb6f64fc6ece187c52acde21efe903c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
; MIT License, Copyright (c) 2021 Marvin Borner
extern bss_begin
extern bss_end
extern start
extern gdt
section .entry
global _start
_start:
cld
; Clear bss section
xor al, al
mov edi, bss_begin
mov ecx, bss_end
sub ecx, bss_begin
rep stosb
lgdt [gdt]
jmp 0x18:.reload_cs
.reload_cs:
mov eax, 0x20
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
cli
jmp start
|