projects
/
bootcensus
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
47121ee70f6443544581ad88dcca61d8f8d53d23
[bootcensus]
/
src
/
boot
/
boot2.s
1
# this is the second-stage boot loader
2
.code16
3
.section .boot2,"a"
4
5
mov $0x13, %ax
6
int $0x10
7
8
pushw $63
9
pushw $63
10
pushw $0
11
pushw $0xff
12
call set_palette
13
add $8, %sp
14
15
pushw $0xa000
16
pop %es
17
xor %di, %di
18
mov $16000, %ecx
19
mov $0xffffffff, %eax
20
rep stosl
21
22
hlt
23
24
set_palette:
25
mov %sp, %bp
26
mov $0x3c8, %dx
27
movw 2(%bp), %ax
28
outb %al, %dx
29
inc %dx
30
movw 4(%bp), %ax
31
outb %al, %dx
32
movw 6(%bp), %ax
33
outb %al, %dx
34
movw 8(%bp), %ax
35
outb %al, %dx
36
ret