summaryrefslogtreecommitdiff
path: root/main.ha
blob: 75ccb981bc847f84f6c99c150ab3e7a688057f63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use vga;
use term;
use rt;
use bios;
use bios::drive;
use drive;

export fn main() void = {
	let text = vga::attach(0xb8000, 80, 25);
	term::clear(&text);
	term::setcolors(&text, (term::color::LMAGENTA, term::color::BLACK));
	
	term::print(&text, "hello hare world!\n");
	for (let i = 0z; i < 10; i += 1) {
		term::print(&text, "a");
	};

	bios::regs.eax = 6 << 8 | 1;
	bios::regs.ebx = 0x43 << 8;
	bios::regs.ecx = 0;
	bios::regs.edx = 5 << 8 | 5;
	bios::call(0x10);
	bios::regs.eax = 0x2 << 8;
	bios::regs.ebx = 0;
	bios::regs.edx = 0 << 8 | 0;
	bios::call(0x10);
	bios::regs.eax = 0x9 << 8 | 'A': u16;
	bios::regs.ebx = 0 << 8 | 0xd;
	bios::regs.ecx = 8;
	bios::call(0x10);
};