OSDev.org

The Place to Start for Operating System Developers
It is currently Mon May 06, 2024 1:27 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Video Pointer C++ RealMode
PostPosted: Fri Oct 26, 2007 5:26 pm 
Offline

Joined: Fri Oct 26, 2007 5:17 pm
Posts: 1
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).


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 26, 2007 5:53 pm 
Offline
Member
Member

Joined: Thu Nov 09, 2006 6:23 pm
Posts: 269
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.)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 26, 2007 6:29 pm 
Offline
Member
Member
User avatar

Joined: Thu Jan 04, 2007 3:29 pm
Posts: 1466
Location: Noricum and Pannonia
iammisc wrote:
Anyway, the physical address to the screen console(in text mode) is 0xb8000. You missed a zero.

The video segment in 16bit mode is actually 0xb800, so if he's in rmode, he's correct.

Anyway, this might be of some help.

_________________
C8H10N4O2 | #446691 | Trust the nodes.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group