summaryrefslogtreecommitdiff
path: root/applications
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2024-01-15 15:44:20 -0500
committerBenji Dial <benji@benjidial.net>2024-01-15 15:44:20 -0500
commitc9a1266d219a83882735a3a8304f3824e0219cdb (patch)
treefea71a0b5b0de8f3a8962dc6ed417273f231e2a9 /applications
parent7c6a18d77a81f232ad2e1d3a311bb21ea8f1f5b4 (diff)
downloadhilbert-os-c9a1266d219a83882735a3a8304f3824e0219cdb.tar.gz
redo application paging and system calls, rename mercury to hilbert
Diffstat (limited to 'applications')
-rw-r--r--applications/init/main.cpp11
-rw-r--r--applications/link.ld4
2 files changed, 7 insertions, 8 deletions
diff --git a/applications/init/main.cpp b/applications/init/main.cpp
index e0019b5..1a39513 100644
--- a/applications/init/main.cpp
+++ b/applications/init/main.cpp
@@ -1,7 +1,7 @@
-#include <mercury/syscall.hpp>
+#include <hilbert/syscall.hpp>
-using mercury::syscall::encoded_color;
-using mercury::syscall::color;
+using hilbert::syscall::encoded_color;
+using hilbert::syscall::color;
encoded_color *fb;
uint32_t fb_width;
@@ -10,7 +10,7 @@ uint32_t fb_pitch;
int main(int, char **) {
- mercury::syscall::get_framebuffer(fb, fb_width, fb_height, fb_pitch);
+ hilbert::syscall::get_framebuffer(fb, fb_width, fb_height, fb_pitch);
for (uint32_t y = 0; y < fb_height; ++y)
for (uint32_t x = 0; x < fb_width; ++x) {
color c = {
@@ -18,9 +18,8 @@ int main(int, char **) {
.g = (uint8_t)(y * 255 / fb_height),
.b = (uint8_t)(x * 255 / fb_width)
};
- fb[y * fb_pitch + x] = mercury::syscall::encode_color(c);
+ fb[y * fb_pitch + x] = hilbert::syscall::encode_color(c);
}
- mercury::syscall::draw_framebuffer();
//*(int *)0x12345678 = 0;
//fb_width = *(uint32_t *)0xffffffffc0000000;
diff --git a/applications/link.ld b/applications/link.ld
index eaba220..f8c09a2 100644
--- a/applications/link.ld
+++ b/applications/link.ld
@@ -18,13 +18,13 @@ SECTIONS {
*(.text .text.*)
} : rx
- . = ALIGN(0x200000);
+ . = ALIGN(4096);
.rodata : {
*(.rodata .rodata.*)
} : ro
- . = ALIGN(0x200000);
+ . = ALIGN(4096);
.data : {
*(.data .data.*)