2019-05-15 07:08:56 +03:00
|
|
|
asm (
|
2019-05-30 16:59:25 +03:00
|
|
|
".section .entry\n\t"
|
2019-05-15 07:08:56 +03:00
|
|
|
"xor dh, dh\n\t"
|
|
|
|
"push edx\n\t"
|
|
|
|
"call main\n\t"
|
|
|
|
);
|
|
|
|
|
2019-05-30 16:59:25 +03:00
|
|
|
#include <drivers/vga_textmode.h>
|
2019-05-31 06:47:13 +03:00
|
|
|
#include <lib/real.h>
|
2019-05-31 08:19:02 +03:00
|
|
|
#include <lib/print.h>
|
2019-05-15 07:08:56 +03:00
|
|
|
|
|
|
|
void main(int boot_drive) {
|
2019-05-30 16:59:25 +03:00
|
|
|
init_vga_textmode();
|
2019-05-31 08:19:02 +03:00
|
|
|
print("qLoader 2\n\n");
|
|
|
|
print("=> Boot drive: %x\n", boot_drive);
|
|
|
|
print("\n");
|
2019-05-31 06:47:13 +03:00
|
|
|
for (;;) {
|
|
|
|
struct rm_regs r = {0};
|
|
|
|
rm_int(0x16, &r, &r); // Real mode interrupt 16h
|
|
|
|
char c = (char)(r.eax & 0xff);
|
|
|
|
text_write(&c, 1);
|
|
|
|
}
|
2019-05-15 07:08:56 +03:00
|
|
|
}
|