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
|
.intel_syntax noprefix
.section .mbr, "ax"
.extern _stack_start
.extern _stack_end
.extern centry
.global _start
.code16
_start:
xor ax, ax
mov ds, ax
jmp 0x0:_entry
_entry:
mov ah, 0x42
mov si, offset dap
int 0x13
jc error
mov ah, 0x0E
mov al, 'S'
mov bh, 0x0
mov bl, 0x0
int 0x10
jmp 0x0:stage1_sector
cli
hlt
error:
mov ah, 0x0e
mov al, 'E'
mov bh, 0x0
mov bl, 0x0
int 0x10
cli
hlt
.section .mbr_data, "aw"
dap:
.byte 0x10
.byte 0
.word 14
.word 0x7e00
.word 0x0
.quad 1
|