loadwarka/src/x86/stage2.S

31 lines
450 B
ArmAsm
Raw Normal View History

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 19:32:23 +00:00
disk_number: .string "Disk number: "
2022-01-27 19:51:37 +00:00
main_returned: .string "Main returned\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 19:32:23 +00:00
mov $disk_number, %si
call print_str
call restore_disk_number
xor %ax, %ax
mov %dl, %al
call print_number
mov $newline, %si
call print_str
2022-01-27 19:49:04 +00:00
call main
2022-01-27 19:51:37 +00:00
mov $main_returned, %si
call print_str
2022-01-27 19:02:58 +00:00
ljmp $0, $hang