How does 0xB80000 is calculated in kernel.c?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
codeblaster
Posts: 14
Joined: Fri Apr 24, 2015 1:25 pm
Libera.chat IRC: coder

How does 0xB80000 is calculated in kernel.c?

Post by codeblaster »

Hi
in Bare Bones kernel.c, how did they calculate 0xB8000 as terminal buffer address?
Attachments
kernel.c
(2.66 KiB) Downloaded 48 times
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How does kernel.c write into terminal?

Post by iansjack »

terminal_buffer is initialized in terminal_initialize:

Code: Select all

terminal_buffer = (uint16_t*) 0xB8000;
This is the memory-mapped address of the video buffer.

I'm afraid that you are just cutting and pasting code without understanding it, which is not a fruitful occupation. Read up on how text mode works in a VGA adapter.
Post Reply