From 35c9df451d4f415632a4a1f64b06d1de12340687 Mon Sep 17 00:00:00 2001 From: Alejandro Sior Date: Sat, 21 May 2022 12:05:07 +0200 Subject: bios::drive: fix the read function --- main.ha | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'main.ha') 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!"); + }; }; -- cgit v1.2.3