Alexander Myltsev 298d1be60c Initial commit
2022-09-21 16:53:45 +03:00

29 lines
568 B
ArmAsm
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.code16
.global _start
_start: #точка входа
mov $banner, %si
call print_string
jmp . // loop forever
print_string:
mov $0x0e, %ah // "teletype output"
repeat:
lodsb // equivalent to mov (%si), %al; inc %si
test %al, %al
je done
int $0x10 // bios interrupt
jmp repeat
done:
ret
. = _start + 256 # pad to 256 bytes
banner:
.asciz "YABLOKO bootloader started\r\n"
. = _start + 510 # pad to 510 bytes
.byte 0x55, 0xaa # boot sector magic value