You are browsing as a guest. Sign up (or log in) to start making projects!

3h 20m 11s logged

HELP

What is wrong?

Well as I said, I would continue with getting Hello World on the screen. Well that wasn’t hard to do the “simple” way, just pasting several lines for each letter. But I wanted to do it the real way, implement a writer function.

  1. I started with making a function to clear the framebuffer from that “Booting…” message. And also moving the cursor to the start.
  2. Then I continued with the writer. The writer took two parameters: (char *buf, unsigned int len). Both arguments needed.
  3. The function i began testing with calling it from kmain like this: writer(“hello”, 5) .
  4. Then in the function i processed it like this:

unsigned char *bytes = (unsigned char *)buf;
for (unsigned int i = 0; i < len; i++) {
fb_write_cell(pos * 2, bytes[i], 0x0F, 0x00);
pos++;
}

But thats where it went wrong. When compiling and booting after adding that function content it wouldn’t boot.
And that is wierd cause when i removed the bytes[i] line it booted. Somehow my kernel cant handle it. I don’t know what could currently be causing this.

What now?

Well i will of course try to solve this myself or find a way to make the writer work.
And if you have any knowledge in C and os development please help me.
The projects current code can be found on my github.

– WilGulf

0
1

Comments 0

No comments yet. Be the first!