summaryrefslogtreecommitdiff
path: root/main.ha
diff options
context:
space:
mode:
authorAlejandro Sior <aho@sior.be>2022-05-21 12:05:07 +0200
committerAlejandro Sior <aho@sior.be>2022-05-21 12:05:07 +0200
commit35c9df451d4f415632a4a1f64b06d1de12340687 (patch)
treeeae162590c9087639ba20b000d357cfbdcd0ea6a /main.ha
parent68e5c0c5c9dc26e9c7ce4bf5252719ee8dc4b3ae (diff)
bios::drive: fix the read function
Diffstat (limited to 'main.ha')
-rw-r--r--main.ha19
1 files changed, 6 insertions, 13 deletions
diff --git a/main.ha b/main.ha
index 75ccb98..e26fb26 100644
--- a/main.ha
+++ b/main.ha
@@ -15,17 +15,10 @@ export fn main() void = {
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);
+ //bios::drive::read(0, 512, bios::ws: uintptr);
+ let dest = 0x100000: uintptr: *[*]u8;
+ bios::drive::read(0, 512, dest)!;
+ if (dest[511] == 0xaa) {
+ term::print(&text, "\nnice!");
+ };
};