2004-02-16 22:55:09 +01:00
|
|
|
/*
|
|
|
|
* QEMU Boot sector to launch a preloaded Linux kernel
|
|
|
|
* Copyright (c) 2004 Fabrice Bellard
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define LOAD_SEG 0x9000
|
|
|
|
|
|
|
|
.code16
|
|
|
|
.text
|
2004-02-26 00:54:25 +01:00
|
|
|
.globl _start
|
2004-02-16 22:55:09 +01:00
|
|
|
|
2004-02-26 00:54:25 +01:00
|
|
|
_start:
|
2004-02-16 22:55:09 +01:00
|
|
|
cli
|
|
|
|
cld
|
|
|
|
mov $LOAD_SEG, %ax
|
|
|
|
mov %ax, %ds
|
|
|
|
mov %ax, %es
|
|
|
|
mov %ax, %fs
|
|
|
|
mov %ax, %gs
|
|
|
|
mov %ax, %ss
|
|
|
|
mov $0x8ffe, %sp
|
|
|
|
ljmp $LOAD_SEG + 0x20, $0
|
|
|
|
|
|
|
|
1:
|
2004-02-26 00:54:25 +01:00
|
|
|
.fill 510 - (1b - _start), 1, 0
|
2004-02-16 22:55:09 +01:00
|
|
|
|
|
|
|
/* boot sector signature */
|
|
|
|
.byte 0x55
|
|
|
|
.byte 0xaa
|