OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 11:35 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Bare Bones page has wrong VGA_HEIGHT
PostPosted: Sun May 11, 2014 1:17 am 
Offline

Joined: Sun May 11, 2014 1:11 am
Posts: 2
On the Bare Bones (http://wiki.osdev.org/Bare_Bones) page, the variable
Code:
VGA_HEIGHT
is set to 24.
On this Wikipedia (http://en.wikipedia.org/wiki/VGA-compatible_text_mode#PC_common_text_modes) page, however, it is stated that the height is 25.
I've also seen this is true in a VM.

(Tell me if I'm wrong, and also if I've posted in the wrong place as I obviously don't have edit permission in the wiki)


Top
 Profile  
 
 Post subject: Re: Bare Bones page has wrong VGA_HEIGHT
PostPosted: Sun May 11, 2014 1:46 am 
Offline
Member
Member
User avatar

Joined: Wed Mar 21, 2012 3:01 pm
Posts: 930
Hmm. That is a bug.

Please fix it. You do have permission to edit the wiki. Add yourself to the wiki group via the forum options for your user to enable wiki editing.


Top
 Profile  
 
 Post subject: Re: Bare Bones page has wrong VGA_HEIGHT
PostPosted: Sun May 11, 2014 2:52 am 
Offline
Member
Member
User avatar

Joined: Thu Dec 19, 2013 1:40 am
Posts: 100
Location: Asia, Singapore
Um...I thought the stuff had zero-based indexing so technically it is 25 characters isn't it?

_________________
CookieOS. Want a cookie? Its only black and white for now though, probably as bad as my baking skills.


Top
 Profile  
 
 Post subject: Re: Bare Bones page has wrong VGA_HEIGHT
PostPosted: Sun May 11, 2014 5:06 am 
Offline

Joined: Sun May 11, 2014 1:11 am
Posts: 2
hometue wrote:
Um...I thought the stuff had zero-based indexing so technically it is 25 characters isn't it?

According to the width, the sizes are not zero indexed.


Top
 Profile  
 
 Post subject: Re: Bare Bones page has wrong VGA_HEIGHT
PostPosted: Sun May 11, 2014 7:41 am 
Offline
Member
Member
User avatar

Joined: Wed Mar 21, 2012 3:01 pm
Posts: 930
Sizes and offsets are fundamentally different things. For instance, an array of size 1 has an entry at offset/index 0, while an array of size 0 has no entries. The value 25 is correct here as the variable measures the number of rows (a size). This is basic programming and need little discussion. I wrote the buggy code in question and it indeed is a bug.


Top
 Profile  
 
 Post subject: Re: Bare Bones page has wrong VGA_HEIGHT
PostPosted: Fri Jun 06, 2014 10:09 am 
Offline
Member
Member

Joined: Wed Oct 30, 2013 1:57 pm
Posts: 306
Location: Germany
The D Bare Bones also sets the internal height constant to 24 (I'm fixing it) :D

_________________
managarm


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 19 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