bootsector_c/boot.c
2024-10-19 22:09:19 +05:00

25 lines
308 B
C

void putchar(char);
void write(char*);
void _start(void) {
write("Hello World!\r\n\0");
while(1)
;
}
void write(char *out) {
for (char *i = out; *i != 0; i++)
putchar(*i);
}
void putchar(char out) {
__asm__ volatile (
"movb $0x0e, %%ah;"
"movb %0, %%al;"
"int $0x10;"
:
:"r"(out)
:"%ax"
);
}