2022-01-26 20:19:39 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
2022-01-26 22:43:18 +00:00
|
|
|
|
2022-01-26 20:19:39 +00:00
|
|
|
.code16
|
2022-01-27 18:27:41 +00:00
|
|
|
.global _start
|
2022-01-27 17:34:57 +00:00
|
|
|
|
2022-01-27 18:50:02 +00:00
|
|
|
.section .rodata
|
2022-01-27 01:28:33 +00:00
|
|
|
hello2: .string "Hello from stage 2!\r\n"
|
|
|
|
hello3: .string "Hello from sector 3!\r\n"
|
2022-01-27 01:51:26 +00:00
|
|
|
hello4: .string "Hello from sector 4!\r\n"
|
2022-01-26 22:43:18 +00:00
|
|
|
|
2022-01-27 18:50:02 +00:00
|
|
|
.section .text
|
2022-01-27 18:27:41 +00:00
|
|
|
_start:
|
2022-01-27 01:46:04 +00:00
|
|
|
mov $hello2, %si
|
2022-01-26 22:43:18 +00:00
|
|
|
call print_str
|
2022-01-26 20:19:39 +00:00
|
|
|
|
2022-01-27 01:51:26 +00:00
|
|
|
mov $teststr3, %si
|
2022-01-27 01:06:12 +00:00
|
|
|
call print_str
|
|
|
|
|
2022-01-27 01:51:26 +00:00
|
|
|
mov $teststr4, %si
|
|
|
|
call print_str
|
|
|
|
|
|
|
|
ljmp $0, $sector3
|
2022-01-26 22:43:18 +00:00
|
|
|
|
2022-01-27 01:51:26 +00:00
|
|
|
.fill 512, 1, 0
|
2022-01-27 01:06:12 +00:00
|
|
|
|
2022-01-27 01:51:26 +00:00
|
|
|
teststr3: .string "Test string from sector 3\r\n"
|
2022-01-27 00:47:11 +00:00
|
|
|
|
2022-01-27 01:51:26 +00:00
|
|
|
sector3:
|
2022-01-27 01:46:04 +00:00
|
|
|
mov $hello3, %si
|
2022-01-27 01:28:33 +00:00
|
|
|
call print_str
|
|
|
|
|
2022-01-27 01:51:26 +00:00
|
|
|
ljmp $0, $sector4
|
|
|
|
|
|
|
|
.fill 512, 1, 0
|
|
|
|
|
|
|
|
teststr4: .string "Test string from sector 4\r\n"
|
|
|
|
|
|
|
|
sector4:
|
|
|
|
mov $hello4, %si
|
|
|
|
call print_str
|
2022-01-27 19:02:58 +00:00
|
|
|
ljmp $0, $hang
|