How to enter 640X480 mode??

I or we all know that mode 13h = 320X200
But can anyone tell me the mode for 640X480???
justinngAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nietodCommented:
answer coming.
0
nietodCommented:
11H is 640X480 in monochrome.  
12H is 640X480 in color.
0
justinngAuthor Commented:
erm...nietod...is that 256 colors mode?
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

nietodCommented:
I don't know.  I assumed it was the maximum
0
nietodCommented:
I found a table in ralph browns's interrupts books (the bible). 12H is 16 color.  The 256 color options seem to be hardware dependant, although I suspect that there is a standard interrupt that all SVGA supports, there is no listing as such.

Actually, they all seem to be 2EH!  It is just that they are listed by manufacturer.  Perhaps 2EH works for all.
0
nietodCommented:
Opps.  Now I see some 640X480X256 entries that are not 2Eh.  Although perhaps the cards will still recognize 2EH.
0
Ready4DisCommented:
I can give you the source to use vesa modes. 640x480x256, and others. 1280x1024x256, 800x600x16m... so on, and so forth... here it is:
# include <stdio.h>
# include <conio.h>
# include <string.h>
# include <dos.h>
# include <stdlib.h> // for rand()
# include <math.h>   // for pow()


# define TEXT               0x03
# define VGA_320x200x4      0x04
# define VGA_320x200x256    0x13
# define SVGA_640x400x256   0x100
# define SVGA_640x480x256   0x101
# define SVGA_800x600x16    0x102
# define SVGA_800x600x256   0x103
# define SVGA_1024x768x16   0x104
# define SVGA_1024x768x256  0x105
# define SVGA_1280x1024x256 0x107
# define SVGA_132x25_TEXT   0x109
# define SVGA_132x43_TEXT   0x10A
# define SVGA_640x480x32k   0x110
# define SVGA_640x480x64k   0x111
# define SVGA_640x480x16M   0x112
# define SVGA_800x600x64k   0x114
# define SVGA_800x600x16M   0x115
# define SVGA_1024x768x32k  0x116
# define SVGA_1024x768x64k  0x117

unsigned char far *video_buffer = (char far *)0xA0000000;
char bits_per_pixel;
int screen_w;
int screen_h;

void setbank(int bank)
{
   static int current_bank;
      if (bank==current_bank) return;
   current_bank = bank;
   _AX = 0x4F05;
   _BX = 0;
   _DX = bank;
   geninterrupt(0x10);
}

void plot_pixel (int x, int y, int colour)
{
// bits_per_pixel is shifted right three times to get the number into bytes.
// eg: 8 bits per pixel >>3 = 8/(2^8) = 1 byte per pixel.
   long offset = ((long)y*screen_w+(long)x)*(bits_per_pixel>>3);
   setbank(offset>>16);
      _fmemset(video_buffer+offset,colour,bits_per_pixel>>3);
}

int set_mode(int mode)
{
   _AX = 0x4F02;
      _BX = mode;
      geninterrupt(0x10);
      if (_AX==0x4F) {
            return 1;
      } else return 0;
}

main ()
{
      unsigned long count;
      set_mode (SVGA_640x400x256);
// For modes with more than 256 colors, bits_per_pixel needs to be increased.
// 256 colors = 2^8; 32K colors = 2^15; 64K colors = 2^16; 16M colors = 2^24
      bits_per_pixel = 8;
      screen_w = 640;
      screen_h = 400;
      for (count=0;count<256;count++)
            plot_pixel(count,50,count);
      getch();
      set_mode (TEXT);
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
justinngAuthor Commented:
Thanx for this excellent solution!
I've increased the points from 5 to 10 to show my appreciation.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.