Hello, I'm making a 16 bit operating system with Turbo C++ 3.0 and I decided not to use BIOS interrupts (becauses I want to do all the work for myself).
I know that in real mode, memory is accessed by a segment and an offset, so i can use a poke and pokeb procedures to write to the video memory but i know, and i've heard that some people uses a pointer to video memory 0xb800 and then write to memory trough that pointer.
Question: How can i create that pointer?
Maybe you would recomend me to use protected mode, but i cant understand it, and i think the proper way of starting osdev is by the simplest (realmode).
Video Pointer C++ RealMode
if you're going to do everything yourself, you might as well use pmode with one flat address space(you don't have to do paging if you don't want to).
Anyway, the physical address to the screen console(in text mode) is 0xb8000. You missed a zero. I'm not sure of the specifics of creating a segmented pointer but in protected mode you can just set a pointer to that address(which is why protected mode would actually be the easier choice.)
Anyway, the physical address to the screen console(in text mode) is 0xb8000. You missed a zero. I'm not sure of the specifics of creating a segmented pointer but in protected mode you can just set a pointer to that address(which is why protected mode would actually be the easier choice.)
The video segment in 16bit mode is actually 0xb800, so if he's in rmode, he's correct.iammisc wrote:Anyway, the physical address to the screen console(in text mode) is 0xb8000. You missed a zero.
Anyway, this might be of some help.
C8H10N4O2 | #446691 | Trust the nodes.