-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboot.S
More file actions
73 lines (61 loc) · 1016 Bytes
/
boot.S
File metadata and controls
73 lines (61 loc) · 1016 Bytes
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.section .multiboot
.align 8
multiboot_header:
.long 0xe85250d6
.long 0
.long multiboot_header_end - multiboot_header
.long -(0xe85250d6 + 0 + (multiboot_header_end - multiboot_header))
.align 8
.short 5
.short 0
.long 20
.long 1024
.long 768
.long 32
.long 0
.align 8
.short 0
.short 0
.long 8
multiboot_header_end:
.section .text
.global _start
_start:
cli
mov $stack_top, %esp
call idt_load
call pic_init
sti
push %ebx
call kmain
loop:
hlt
jmp loop
.global irq12_handler_stub
irq12_handler_stub:
pusha
push %ds
push %es
push %fs
push %gs
mov $0x10, %ax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
push %esp
call mouse_irq_handler
add $4, %esp
pop %gs
pop %fs
pop %es
pop %ds
popa
movb $0x20, %al
outb %al, $0x20
iret
.section .bootstrap_stack, "aw", @nobits
.align 16
stack_bottom:
.skip 16384
stack_top: