-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootloader.asm
More file actions
59 lines (47 loc) · 901 Bytes
/
bootloader.asm
File metadata and controls
59 lines (47 loc) · 901 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
[BITS 16]
extern read_disk, write_str, clear_scn, sleep
global _start
_start:
mov ax, 0h
mov ds, ax
push 8h
call sleep
add sp, 2
call clear_scn
push word 0x0a20
push word welcome_msg_len
mov cx, welcome_msg
push cx
call write_str
add sp, 6
push 8h
call sleep
add sp, 2
push word 0x0b18
push word loading_msg_len
mov cx, loading_msg
push cx
call write_str
add sp, 6
push ds
mov ax, 0h
mov ds, ax
push word 0
push word 1
push word os_len
push word 0500h
call read_disk ; read os from disk
add sp, 8
pop ds
push 10h
call sleep
add sp, 2
mov ax, 0500h
jmp ax ;boot os
welcome_msg:
db 'Welcome to Inori.'
welcome_msg_len equ ($-welcome_msg)
loading_msg:
db 'Loading operating system... >_<'
loading_msg_len equ ($-loading_msg)
os_len equ 16