summaryrefslogtreecommitdiff
path: root/rt/memset.ha
diff options
context:
space:
mode:
authorAlejandro Sior <aho@sior.be>2022-05-13 20:50:39 +0200
committerAlejandro Sior <aho@sior.be>2022-05-13 20:50:39 +0200
commite50cbe8eb763cf63fb44b047d5164f6fbf07eb39 (patch)
tree8acb610a4f33462c843f54016861780ffadc010d /rt/memset.ha
boot: longmode to realmode stub
This is the initial commit to the repo. It adds all the code. The last proper thing that I got working before committing is calling real mode functions from long mode using a stub. Next up, I would like to implement a disk reader abstraction over the BIOS in order to read form partitions (most notably FAT32).
Diffstat (limited to 'rt/memset.ha')
-rw-r--r--rt/memset.ha6
1 files changed, 6 insertions, 0 deletions
diff --git a/rt/memset.ha b/rt/memset.ha
new file mode 100644
index 0000000..01b9946
--- /dev/null
+++ b/rt/memset.ha
@@ -0,0 +1,6 @@
+export fn memset(dest: *void, val: u8, amt: size) void = {
+ let a = dest: *[*]u8;
+ for (let i = 0z; i < amt; i += 1) {
+ a[i] = val;
+ };
+};