News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

A bginner need your help(grphics)?

Started by HATEM, March 31, 2007, 12:33:43 AM

Previous topic - Next topic

HATEM

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

MichaelW

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.
eschew obfuscation

HATEM

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

MichaelW

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.
eschew obfuscation

HATEM

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

MichaelW

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.
eschew obfuscation

HATEM


PBrennick

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
The GeneSys Project is available from:
The Repository or My crappy website

HATEM

thank you very mach paul for your help  :U