The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: HATEM on March 31, 2007, 12:33:43 AM

Title: A bginner need your help(grphics)?
Post by: HATEM on March 31, 2007, 12:33:43 AM
hello evry body
i heared the text color screen have 4 page have the same charasteristic( 25 × 80)
i want to know why there are 4 bages
and how many color screan in assembly 16 bit
if there are some simple tutorial in graphics or sites please giv it to me and don't forget to answer my questions :bg
thank you
Title: Re: A bginner need your help(grphics)?
Post by: MichaelW on March 31, 2007, 08:13:56 AM
In the standard VGA alphanumeric modes there are 8 display pages, for the 40-column modes as well as the 80-column modes. Where there was an adequate amount of display memory to do so, the designers of the hardware chose to split the memory up into display pages, arranged for the pages to be individually addressable, and provided a method to quickly switch the visible page to any available page. In the alphanumeric modes this provided the capability, for example, to create a main program screen on the visible page and one or more help screens on hidden pages, and then quickly switch between the pages. The standard graphics modes support 1-8 display pages, depending on the mode. In the standard alphanumeric modes there are 16 colors available. In the standard graphics modes there are 2-256 colors available, depending on the mode.
Title: Re: A bginner need your help(grphics)?
Post by: HATEM on March 31, 2007, 10:50:20 AM
thank you Michael for your help
that's mean there are two standard mode(alphanumeric, graphics)both of them have 8 display pages not 4
Title: Re: A bginner need your help(grphics)?
Post by: MichaelW on March 31, 2007, 06:41:01 PM
For the VGA there are 5 standard alphanumeric modes (0,1,2,3,7) and they all support 8 display pages.

For the VGA there are 8 standard graphics modes:

4   1 display page
5   1 display page
Dh  8 display pages
Eh  4 display pages
10h 2 display pages
11h 1 display page
12h 1 display page
13h 1 display page

Note that these are the standard modes using the standard number of scan lines. In most cases the VGA can be programmed to use a higher number of scan lines, which may reduce the number of display pages.
Title: Re: A bginner need your help(grphics)?
Post by: HATEM on April 01, 2007, 05:32:40 PM
thank you very much Michael  :U its a good introduction for me  :cheekygreen: i hope to explain each of them please  :red with some example  at least evry day on of them if you have time because i want to start progamming a littel game just to understand graphics or if you have a good sites like your explaination
thank you in advenced
Title: Re: A bginner need your help(grphics)?
Post by: MichaelW on April 01, 2007, 06:43:32 PM
You can find some useful information regarding the BIOS interrupts in Ralf Brown's Interrupt list.

An HTML version is here:

http://www.ctyme.com/rbrown.htm

And the download version here:

http://www-2.cs.cmu.edu/~ralf/files.html

Ron Thomas has a very good free book "Graphics Programming using Assembly", and many MASM examples, available here:

http://www.ronthomas.plus.com/

And there was some discussion of the book and examples here:

http://www.masm32.com/board/index.php?topic=6693.0

If you are a beginner then I suggest you use VGA mode 13h, perform the mode set and display any text with the BIOS, and plot the pixels by directly accessing the display buffer. Mode 13h is easier to program than the other modes because there are fewer pixels to deal with, and the pixels are (effectively) stored in the display buffer as a linear array of bytes, with each byte representing the color of one pixel.
Title: Re: A bginner need your help(grphics)?
Post by: HATEM on April 01, 2007, 08:18:45 PM
thank you very much Michael :U
Title: Re: A bginner need your help(grphics)?
Post by: PBrennick on April 01, 2007, 10:28:45 PM
HATEM,
Also, remember that the paging system is also useful to display something on the screen on one page while you are writing or drawing something else on another page. This is how animation is done so that it shows in a stable manner. If you are using eight pages, you display page one while working on page two, then show page two while working on page three and so on and so forth with a wrap-around which means you display page eight while working on page one. Page switching is quick and the results will look very nice.

Paul
Title: Re: A bginner need your help(grphics)?
Post by: HATEM on April 07, 2007, 09:48:29 AM
thank you very mach paul for your help  :U